There is a `script/i18n/test_seed_all_locales` to test seeding in all
locales, or one locale.
A GitHub action tests all locales seeding every week on Sunday at 2 AM
UTC. It can also be triggered manually.
Example:
script/i18n/test_seed_all_locales # Seed all locales sequentially
script/i18n/test_seed_all_locales --list # Output available locales as JSON
script/i18n/test_seed_all_locales zh-CN # Seed a single locale
https://community.openproject.org/wp/53584https://community.openproject.org/wp/53586
When making Portuguese Brazilian and Portuguese Portugal translations
apart from each other in https://community.openproject.org/wp/53374, we
missed that the root key in the `pt-BR.yml` and `pt-PT.yml` files is
still `pt`. The backend is gracefully falling back to the `pt`
translations but the frontend just fails to translate and falls back to
the English strings, leading to mixed English and Portuguese in the user
interface.
A script fixes the root key in the `pt-BR.yml` and `pt-PT.yml` files.
This script is executed each time the translations are updated from
crowdin.
Previously, downloading translations files from crowdin would write both
zh-CN and zh-TW to the same file, overwriting the previous one. This
commit adds a mapping to the crowdin.yml file to avoid this.
As a side effect, the script `fix_crowdin_translation_filenames.rb` is now
superfluous.
https://community.openproject.org/wp/48450
Before this commit, `modules/bim/config/locales/en.seeders.yml` would be
sent to crowdin as `<branch>/en.seeders.yml` and would be ignored as
`config/locales/en.seeders.yml` is already sent as
`<branch>/en.seeders.yml` first.
This happens because crowdin CLI removes the common path of a group of
source files. As this file is alone in his group, the whole path is
removed and only the file name remains.
The fix is to have another empty source file in another module to change
the common path computation and get the right final file:
`<branch>/bim/config/locales/en.seeders.yml`.
script/i18n_generate_languages_translations can fetch CLDR and generate the yml translation files automatically.
Group i18n related scripts in a directory