# README
Catalog
This package holds i18n for dbaas-controller.
To translate dbaas-controller's messages, we need to follow the next steps.
- Use shared
golang.org/x/text/message.Printer
object'sSprintf
method for messages that should be translated. Do not useSprint
as it will not be collected on the next step. - Run
make gen
to collect new messages from source code and merge them with existing translations inmessages.gotext.json
. - The output of the command above will contain messages starting with "en: Missing entry for XXX".
That's new messages that should be translated in that file. Fill
translation
fields. - Run
make gen
to regeneratecatalog.go
file. - Compile Go program as usual (
make release
) to use updated translations.
Files
messages.gotext.json
contains translated messages.catalog.go
generated file; includes the content ofmessages.gotext.json
. dbaas-controller uses it to choose the right translation.