Skip to content

Translations

Chris Oelmueller edited this page Sep 17, 2013 · 5 revisions

.pot files are translation templates. .po files contain human-editable translations, which are compiled to .mo bytecode.

Compile translations

If you edit any .po file, to see the changes ingame you need to run setup.py build_i18n.

Refresh template files

If you change or add translatable content in py, xml, yaml (not scenarios) or sql files, run [development/create_pot.sh] (../tree/master/development/create_pot.sh) to also update the templates.

There are different helper files for gathering all data from those sources in one place. If you are interested, check the extract_strings_ files in development/.

Refresh scenario templates

When you (for example) change or add strings in the file tutorial_en.yaml, run [development/create_scenario_pot.sh tutorial] (../tree/master/development/create_scenario_pot.sh).

Update from templates

To make the .po translation files aware of changes in the template, run [development/update_translations.py] (../tree/master/development/update_translations.py).

Add new languages for Weblate

[msginit -i "inputfile.pot" -l "languagecode" --no-translator -o] (http://www.gnu.org/software/gettext/manual/html_node/msginit-Invocation.html)

Clone this wiki locally