Skip to content

web: recover stranded Transifex translations into canonical xliff files - #26735

Merged
GirlBossRush merged 7 commits into
mainfrom
web/xliff-recovery
Oct 8, 2026
Merged

GirlBossRush merged 7 commits into
mainfrom
web/xliff-recovery

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Follows the Translation tracking issue #24563 recovery rule: the stranded translation wins. A translation is taken only when its source and placeholders match the current string.
  • 2,478 translations filled and 167 replaced across 15 locales, including es_ES, ko_KR, ru_RU, tr_TR recovered from before web, locale: Normalize legacy locale file names #24024.
  • Leaves the underscore files for unshipped locales (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 build compiles all 20 shipped locales.

Refs #24563

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

authentik translations instructions

Thanks for your pull request!

authentik translations are handled using Transifex. Please edit translations over there and they'll be included automatically.

@netlify

netlify Bot commented Oct 6, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit d4304d6
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ac521c0b2b5900008d028f7
😎 Deploy Preview https://deploy-preview-26735--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.79518% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.35%. Comparing base (d610776) to head (94aa54c).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/root/tests/test_locales.py 98.79% 1 Missing ⚠️
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           
Flag Coverage Δ
conformance 32.84% <0.00%> (-0.04%) ⬇️
e2e 37.62% <0.00%> (-0.06%) ⬇️
integration 29.66% <0.00%> (-0.04%) ⬇️
rust 46.45% <ø> (ø)
unit 93.77% <98.79%> (+<0.01%) ⬆️
unit-migrate 93.76% <98.79%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download 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-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-94aa54c243e0652be4ad362aec4fd56c2a57cbc6

Afterwards, run the upgrade commands from the latest release notes.

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.
Normalizes Transifex entity escaping in recovered targets and drops the removed base-URL banner strings.
@GirlBossRush
GirlBossRush requested review from a team as code owners October 7, 2026 15:44
@GirlBossRush
GirlBossRush merged commit edee3e0 into main Oct 8, 2026
148 of 149 checks passed
@GirlBossRush
GirlBossRush deleted the web/xliff-recovery branch October 8, 2026 00:14
@asbjoern-navio asbjoern-navio mentioned this pull request Oct 8, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants