* web: recover stranded Transifex translations into canonical xliff files Transifex writes web/xliff/<lang>.xlf with underscore codes (cs_CZ.xlf), but lit-localize only reads the hyphenated files named in targetLocales. Translator work landing in the underscore files never shipped. Fold each underscore file into its canonical sibling, following the #24563 recovery rule: a stranded target wins over the existing one. A donor target is only taken when its <source> matches the canonical source and its placeholder ids match; placeholders are rewritten from the canonical source so equiv-text stays current. - In-tree duplicates: cs_CZ, de_DE, fi_FI, fr_FR, it_IT, ja_JP, pt_BR, bg_BG, pl_PL, plus ar_AA -> ar and no_NO -> nb-NO. - Files deleted by #24024, recovered from 1dc509dca^: es_ES, ko_KR, ru_RU, tr_TR (and the older cs/de/fi/fr/it/ja/pt_BR copies as a lower-priority donor). 2,478 targets filled and 167 replaced across 15 locales. The underscore duplicates are removed. Orphans for unshipped locales (bn_BD, cy_GB, da_DK, hr_HR, sk_SK, sv_SE) are left for their enablement PRs. * web: fix recovered French Kerberos help and typos The recovered fr-FR Kerberos sync help described a password or keytab cache instead of the alternative credentials. Also fixes a French typo and a German formal/informal mix. * core, web: register locales in locales.yaml and normalize Transifex paths Transifex substitutes its own language code into both translation paths, and its language_mapping is global, so it can't satisfy lit-localize (pt-BR.xlf) and Django (locale/pt_BR/) at once. Files landed under names neither build reads, and nothing reported it. - locales.yaml is the source of truth: tag, Django directory, Transifex code, and whether the locale ships. - `make gen-locales` writes targetLocales, the LocaleLoaderRecord region, and the Transifex language_mapping (code -> web tag). - `make locales-normalize` moves locale/<tag>/ to locale/<to_locale(tag)>/ and folds stray xliff files into their canonical file. - `make lint-locales` / ci-lint-locales fail on unregistered paths and stale generated files. A Django test checks each shipped catalog loads. - A workflow normalizes Transifex PRs and pushes the correction. Migration: ar_AA -> ar and no_NO -> nb_NO backend catalogs merged; locale/zh-Hans and zh-Hant renamed to zh_Hans/zh_Hant, which Django can now find (it served 37 of 1043 zh-Hans strings before); unshipped xliff orphans renamed to their tags. Refs #24563 * core: address locale pipeline review - Normalize xliff target-language on every recognized file, not only renamed ones, and fail the check on a mismatch. Transifex's mapping renames files but keeps aliases like ar-AA inside them, and lit-localize keys catalogs by that attribute. - Merge every file from a Transifex locale directory, not only django.po. A conflicting non-catalog file stops the merge before anything is deleted. - Set each catalog's Language header to its directory, and check it. - Type the merge callback for mypy --strict. - Ignore msgstr == msgid in the catalog test, so an English fallback can't count as a served translation. * core, web: ship bn-BD and sk-SK through locales.yaml Bengali and Slovak were enabled on main by hand. Register them as shipped so the generated lists stay in sync. * web: re-extract locales Normalizes Transifex entity escaping in recovered targets and drops the removed base-URL banner strings. * ci: harden translation normalize workflow
57 lines
3.4 KiB
YAML
57 lines
3.4 KiB
YAML
# The authoritative list of authentik's UI languages.
|
|
#
|
|
# tag: BCP-47 tag. Names web/xliff/<tag>.xlf and the lit-localize target locale.
|
|
# django: Directory name under locale/, always Django's to_locale(tag).
|
|
# null when the language has no backend catalog.
|
|
# transifex: The language code upstream on Transifex. null when Transifex doesn't
|
|
# translate the language.
|
|
# ship: true to include the language in the web build and the language picker.
|
|
#
|
|
# Row order is the order of the generated lists. After editing this file, run
|
|
# `make gen-locales`; `make ci-lint-locales` fails when the tree drifts from it.
|
|
# See https://github.com/goauthentik/authentik/issues/24563.
|
|
|
|
locales:
|
|
- { tag: ar, django: ar, transifex: ar_AA, ship: true }
|
|
- { tag: bg-BG, django: bg_BG, transifex: bg_BG, ship: true }
|
|
- { tag: bn-BD, django: bn_BD, transifex: bn_BD, ship: true }
|
|
- { tag: ca-ES, django: ca_ES, transifex: ca_ES, ship: false }
|
|
- { tag: cs-CZ, django: cs_CZ, transifex: cs_CZ, ship: true }
|
|
- { tag: sk-SK, django: sk_SK, transifex: sk_SK, ship: true }
|
|
- { tag: cy-GB, django: cy_GB, transifex: cy_GB, ship: false }
|
|
- { tag: da-DK, django: da_DK, transifex: da_DK, ship: false }
|
|
- { tag: de-DE, django: de_DE, transifex: de_DE, ship: true }
|
|
- { tag: el-GR, django: el_GR, transifex: el_GR, ship: false }
|
|
- { tag: en, django: en, transifex: null, ship: true }
|
|
- { tag: en-XA, django: null, transifex: null, ship: true }
|
|
- { tag: es-ES, django: es_ES, transifex: es_ES, ship: true }
|
|
- { tag: eu-ES, django: eu_ES, transifex: eu_ES, ship: false }
|
|
- { tag: fa-IR, django: fa_IR, transifex: fa_IR, ship: false }
|
|
- { tag: fi-FI, django: fi_FI, transifex: fi_FI, ship: true }
|
|
- { tag: fr-FR, django: fr_FR, transifex: fr_FR, ship: true }
|
|
- { tag: gl-ES, django: gl_ES, transifex: gl_ES, ship: false }
|
|
- { tag: hr-HR, django: hr_HR, transifex: hr_HR, ship: false }
|
|
- { tag: hu-HU, django: hu_HU, transifex: hu_HU, ship: false }
|
|
- { tag: it-IT, django: it_IT, transifex: it_IT, ship: true }
|
|
- { tag: ja-JP, django: ja_JP, transifex: ja_JP, ship: true }
|
|
- { tag: ka-GE, django: ka_GE, transifex: ka_GE, ship: false }
|
|
- { tag: ko-KR, django: ko_KR, transifex: ko_KR, ship: true }
|
|
- { tag: lt-LT, django: lt_LT, transifex: lt_LT, ship: false }
|
|
- { tag: lv-LV, django: lv_LV, transifex: lv_LV, ship: false }
|
|
- { tag: ms-MY, django: ms_MY, transifex: ms_MY, ship: false }
|
|
- { tag: nb-NO, django: nb_NO, transifex: no_NO, ship: true }
|
|
- { tag: nl-NL, django: nl_NL, transifex: nl_NL, ship: true }
|
|
- { tag: pl-PL, django: pl_PL, transifex: pl_PL, ship: true }
|
|
- { tag: pt-BR, django: pt_BR, transifex: pt_BR, ship: true }
|
|
- { tag: pt-PT, django: pt_PT, transifex: pt_PT, ship: false }
|
|
- { tag: ro-RO, django: ro_RO, transifex: ro_RO, ship: false }
|
|
- { tag: ru-RU, django: ru_RU, transifex: ru_RU, ship: true }
|
|
- { tag: sl-SI, django: sl_SI, transifex: sl_SI, ship: false }
|
|
- { tag: sv-SE, django: sv_SE, transifex: sv_SE, ship: false }
|
|
- { tag: th-TH, django: th_TH, transifex: th_TH, ship: false }
|
|
- { tag: tr-TR, django: tr_TR, transifex: tr_TR, ship: true }
|
|
- { tag: uk-UA, django: uk_UA, transifex: uk_UA, ship: false }
|
|
- { tag: vi-VN, django: vi_VN, transifex: vi_VN, ship: false }
|
|
- { tag: zh-Hans, django: zh_Hans, transifex: zh-Hans, ship: true }
|
|
- { tag: zh-Hant, django: zh_Hant, transifex: zh-Hant, ship: true }
|