Reputation: 14793
The project I am working on has gotten pretty big. As have it's localization files. It has gotten hard to find your way around the translations.
How do you manage big localization files in your django projects? I would like to separate the *.po files by context. (e.g. email, push message, web view etc.)
That way I could add them to different translation projects at poeditor or onesky etc.
Upvotes: 5
Views: 1136
Reputation: 2901
Intersting question. At the moment Django hardcodes the gettext domain to django
, so you cannot rely on this namespacing capability. There is an open and active issue about this.
You may want to use alternate LOCALE_PATHS
though.
Upvotes: 1
Reputation: 5249
Use Contextual Markers.
They will add msgctxt
to your .po
files. You can then easily create a script which leaves only msgctxt "email"
in the .po
file, translate this subset and then merge the results for compilation.
Upvotes: 0