-
Notifications
You must be signed in to change notification settings - Fork 40
Translations
To have a global impact, The Atlas should support various languages. However, given the current code repository we have, languages appear in different locations which makes them difficult to translate. In an ideal world, we would like to have one dictionary to translate, and then it populates everywhere it is required.
Below is the list of locations where translations are done:
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, 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. Products too.
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 translations of countries, products, and interface elements
- Complete missing translations and/or fill with english words by default (instead of ???)
- 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
- Understand the grammatical structure of every language to better build titles and search recommendations
- Update titles and search feature
- Identify all the implication for translation updates
- Re-generate static images
- Translate twitter / FB messages
- Etc.