Skip to content

Draft: Internationalization: EN-FR

Luis Aleixo requested to merge feature/internationalization into master

How to extract new strings to be translated:

Make sure that pybabel is installed:

pip install pybabel

In the caimira/apps directory run the following command:

pybabel extract -F babel-mapping.ini -o locale/base.pot ./

How to update the .po file:

In the caimira/apps directory run the following command:

msgmerge --no-wrap --sort-by-file --output-file=locale/fr/LC_MESSAGES/messages.po locale/fr/LC_MESSAGES/messages.po locale/base.pot

At this stage the translations can be done in the .po file.

How to compile and genera the .mo file:

msgfmt locale/fr/LC_MESSAGES/messages.po --output-file=locale/fr/LC_MESSAGES/messages.mo

Reference: https://st4lk.github.io/en/blog/2015/01/31/tornado-internationalization-and-localization.html

Edited by Luis Aleixo

Merge request reports