translations.csv
is the source of translations that is used to create the PO files used on the website.
Some translations might be improvised: In this case the intended English string is logged in the English column,
but the translations are taken from a different English source string for which translations are available.
This source string is noted in the column "source string for bad transation". The locales for which this
bad source string is used is indicated in the column "locales with missing/bad translation" (this is not always
the complete set of string as some might be available from django or IoGT v1).
translations_status.csv
lists the status of strings that are used in the code or have been used in the past.
e.g. BE, FE, Chatbot, Comment, Moderator. Only for reference.
True/False - comes with django and thus has translations for some locales If django is True, the string is assumed present in the codebase
- not needed - may appear on the site, but doesn't face front-end users
- remove - should or has been removed from the code base
- translate - should be translated
- unused: the string does not appear in the codebase
- not needed: the string appears in the codebase but does not need to be translated
- has translation: the string appears in the codebase and a translation is present in
translations.csv
- has translation (improvised): like 'has translation', but translation is marked as bad in
translations.csv
- needs translation: the string appears in the codebase and but there are no translations for it nor any of its replacement strings in
translations.csv
- needs translation (partial): like 'needs translation', but this is a django string and thus has translations for some locales
- needs translation (temp): like 'needs translation', but is in the list of strings for the country offices to translate
- TODO: either
- tagged with 'remove' but still present in the codebase
- tagged with 'translate', a translation for one of its replacements (but not the string itself) is present in
translations.csv
, or in the list of strings for the country offices to translate
Thus unused/not needed/has translation require no action, 'TODO' has an actionable solution, 'needs translation' needs a solution.
Thus, depending on various factors, the following Tag => Status updates are possible:
- not needed => unused/not needed
- remove => unused/has translation/TODO
- translate => unused/has translation/needs translation/TODO
pipe (|) separated list of possible sensible replacements for the given string (These are intended to be from translations.csv
)
- good: this is a sensible replacement and should be applied
- ok: this replacement is not ideal and should be replaced by a proper translation in the future
For reference.
From the root folder, run:
python3 manage.py makemessages -l xy -d django
python3 manage.py makemessages -l xy -d djangojs
From here, run:
update_status.py
Note: Any entry different from 'remove' and 'not needed' is considered equivalent to 'translate'.
If strings not present in translations_status.csv
are found, their tags need to be added manually.
python3 make_testing_po.py
python3 make_pos.py
Note: make_testing_po
assumes that any entry from translations_status.csv
which is marked as a plural in translations.csv
is preceded by its singular in translations_status.csv
.
TODO: Extra status: country office provide translations
Move translatable_strings.py
to /home/translatable_strings.py
.
Move locale/*
to /
.
From the root folder, run:
python3 manage.py translation_tracking