Repository navigation
web: recover stranded Transifex translations into canonical xliff files - #26735
Conversation
authentik translations instructionsThanks for your pull request! authentik translations are handled using Transifex. Please edit translations over there and they'll be included automatically. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26735 +/- ##
=======================================
Coverage 92.34% 92.35%
=======================================
Files 1176 1177 +1
Lines 77895 77978 +83
Branches 4129 4129
=======================================
+ Hits 71934 72017 +83
Misses 5895 5895
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Playwright e2eDownload this run's HTML report and traces, then open the report: gh run download 37649185087 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-reportInstallation instructionsInstructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-94aa54c243e0652be4ad362aec4fd56c2a57cbc6
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-94aa54c243e0652be4ad362aec4fd56c2a57cbc6Afterwards, run the upgrade commands from the latest release notes. |
6f3bc80 to
4978910
Compare
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 1dc509d^: 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.
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.
…aths 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
- 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.
Bengali and Slovak were enabled on main by hand. Register them as shipped so the generated lists stay in sync.
4978910 to
afc0d2e
Compare
Normalizes Transifex entity escaping in recovered targets and drops the removed base-URL banner strings.
305a508 to
94aa54c
Compare
This PR folds translations that Transifex wrote into underscore-named
web/xliff/files, which lit-localize never reads, back into the canonical hyphenated files, then removes the duplicates.es_ES,ko_KR,ru_RU,tr_TRrecovered from before web, locale: Normalize legacy locale file names #24024.bn_BD,cy_GB,da_DK,hr_HR,sk_SK,sv_SE) to their enablement PRs.Testing: every file parses, placeholders match their source, and
lit-localize buildcompiles all 20 shipped locales.Refs #24563