-
Notifications
You must be signed in to change notification settings - Fork 40
Translations
Languages appear in different locations in the code repository.
In the HTML code (e.g. /srv/atlas/html/
) using Django Localization
For example, to translate "Trade Flow", here is what to insert in the html document:
{% trans "Trade Flow" %}
And it uses the dictionary files, e.g. /srv/atlas/django_files/locale/fr/LC_MESSAGES
for French
msgid "Trade Flow" msgstr "Flux du commerce"
Once one of those files has been changed, then it requires re-compilation:
/srv/atlas/django_files/manage.py compilemessages
..and to restart django to see the result.
The observatory_country database contains country names.
The name_en
is the column of reference to translate in other languages. This column is usually a shorter version than the name
.
E.g. the files that generate the titles /srv/atlas/django_files/observatory/views.py
Textual elements that require a translation also appear in the JavaScript code e.g. /srv/atlas/media/js/libs
An elastic search script creates the index, it should be updated with the title names.
Next step is to find a mechanism to systematically translate the atlas
- Check quality of current translation
- Complete missing translations and/or fill with english words by default (instead of ???)
- Understand the grammatical structure of every language to
- Anticipate further updates with an automated workflow
- Make sure the translation matches the role of words in the interface: glossary in a different ways than menus and country/products