Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 3.83 KB

README.md

File metadata and controls

95 lines (69 loc) · 3.83 KB

Translation files

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.

Context

e.g. BE, FE, Chatbot, Comment, Moderator. Only for reference.

django

True/False - comes with django and thus has translations for some locales If django is True, the string is assumed present in the codebase

Tag

  • 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

Status (autogenerated)

  • 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

Replacement strings

pipe (|) separated list of possible sensible replacements for the given string (These are intended to be from translations.csv)

Replacement quality

  • 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

Comments

For reference.

To update translations_status.csv

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.

To update PO files

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

Outputs

Move translatable_strings.py to /home/translatable_strings.py. Move locale/* to /.

New Process, to update translations_status.csv and the PO files

From the root folder, run:

python3 manage.py translation_tracking