mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-16 05:05:28 +02:00
Crowdin exported the frontend translations to a folder named after %two_letters_code%, so every regional variant of a language landed in the same folder: zh-CN and zh-TW both gave "zh", and the last one downloaded overwrote the other. Mapping the Chinese locales apart would have fixed only that pair, and each new variant (pt-BR, es-MX, en-GB...) would have needed its own entry. Use %locale% instead, which is unique per locale, like the backend already does with %locale_with_underscore%. format-deploy keeps the keys of translations.json as they are today (fr, de...) and only keeps the region (zh-cn, zh-tw) when several locales of the same language are translated. The language detection and the language picker already match a locale exactly before falling back to its language, so they need no change. The export pattern is stored by Crowdin with the source file: the sources must be uploaded again before the next download, and the zh-CN data that was polluted with Traditional Chinese still needs to be re-uploaded. Fixes #2749
30 lines
682 B
YAML
30 lines
682 B
YAML
#
|
|
# Your crowdin's credentials
|
|
#
|
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
|
project_id_env: CROWDIN_PROJECT_ID
|
|
base_path_env: CROWDIN_BASE_PATH
|
|
|
|
#
|
|
# Choose file structure in crowdin
|
|
# e.g. true or false
|
|
#
|
|
preserve_hierarchy: true
|
|
|
|
#
|
|
# Files configuration
|
|
#
|
|
files: [
|
|
{
|
|
source : "/backend/locale/django.pot",
|
|
dest: "/backend-impress.pot",
|
|
translation : "/backend/locale/%locale_with_underscore%/LC_MESSAGES/django.po"
|
|
},
|
|
{
|
|
source: "/frontend/packages/i18n/locales/impress/translations-crowdin.json",
|
|
dest: "/frontend-impress.json",
|
|
translation: "/frontend/packages/i18n/locales/impress/%locale%/translations.json",
|
|
skip_untranslated_strings: true,
|
|
},
|
|
]
|