Skip to content
Alvaro Andrés Rodríguez Scelza edited this page Oct 29, 2021 · 3 revisions

Do NOT use this tool to add new languages use Transifex instead.

The main reason is that Transifex does not sync with GitHub.

Usage

Command-line parameters:

new [language]  create new translation.
compile         compile all PO files into MO files.
update          update all translations based on POT file.
extract         extract all messages from templates and create the POT file.

Requirements

This tool uses Babel, install with pip install Babel.

Translation flow

Let's translate to Spanish for example. You need to run:

./translate.sh new es or ./translation.sh new es_MX

This will create the translation file for Spanish in:

translations/es/LC_MESSAGES/messages.po

After this, you can open this file with any text editor and fill all missing translations.

Then you can compile your translation with:

./translate.sh compile

This will create the compiled translation file in:

translations/es/LC_MESSAGES/messages.mo

That's it.