What we stripped away¶
The usual workflow for translating apps is pretty complex. We made it simple by removing some of the steps that don’t bring much of a value in a regular translation pipeline. Our design philosophy is “make simple simple, make complex possible”. There are some of these things:
The compiled translations are stored next to your Python code instead of
We don’t generate
*.potfiles. Instead, we directly create empty
*.pofiles for all languages.
You don’t need to explicitly update translations for each language. Instead, the
extractcommand updates all translation files in place.
There is only one translation file per project per language. No need to merge multiple files together.
There is no
LC_MESSAGESsubdirectory because “flat is better than nested”.
There is only one
.getmethod instead of the whole mess of similar ones (
pgettext, and so on) provided by gettext.
The locale doesn’t have categories. While UNIX and other OS allow to specify locale for each action (
LC_TIMEfor formatting time,
LC_NUMERICfor formatting numbers), we make one-to-one correspondence between locales and categories. If you need to format a number in a different locale, just use a separate Locale instance for it.