docs/counter_translation.md
counter_translation.pyThe script scripts/counter_translation.py checks the translation progress of the property files in the directory app/core/src/main/resources/.
It compares each messages_*.properties file with the English reference file messages_en_GB.properties and calculates a percentage of completion for each language.
In addition to console output, the script automatically updates the progress badges in the project’s README.md and maintains the configuration file scripts/ignore_translation.toml, which lists translation keys to be ignored for each language.
tomlkit).README.md and scripts/ignore_translation.toml.python scripts/counter_translation.py
This command:
app/core/src/main/resources/ for all messages_*.properties files,README.md,scripts/ignore_translation.toml (sorted, multi-line arrays).python scripts/counter_translation.py --lang messages_fr_FR.properties
fr_FR: 87% translated).--show-missing-keys, all untranslated keys are listed as well.For scripts or CI pipelines, the output can be reduced to just the percentage value:
python scripts/counter_translation.py --lang messages_fr_FR.properties --show-percentage
The console will then only print 87 (without the percent symbol or any extra text).
ignore_translation.tomlignore are alphabetically sorted and written as multi-line arrays.language.direction is ignored. If that key is later translated, the script automatically removes it from the ignore list.Whenever translations are updated, this script should be executed.
The updated badges and the modified ignore_translation.toml should be committed together with the changed messages_*.properties files.
--lang with an absolute path.= or an unmatched line.