feat(i18n): complete catalog parity and runtime localization
Summary
feat(i18n): complete catalog parity and runtime localization. This is logical change 4/11 in the dependency-ordered product-audit release stack.
Refs #969
What changed
- feat(i18n): complete catalog parity and runtime localization
- Exact source commit:
dd3135661e3d728152724f807d6d8d1c2a2e4f49; validated tree:9f71693e7667635c7a4eed1d96bf8d8eafa50652. - Depends on the preceding release-stack PR. Retarget to main only after its dependency is merged and deployed.
Why
Make related tools, Cron output, Regex explanations, and CIDR messages consistent across ten supported locales.
Verification
-
bun run buildpassed on this exact candidate tree. -
npm test -- --maxWorkers=2passed on this exact candidate tree. - Affected behavior manually exercised as described below.
- Latest GitHub Build, Unit Tests (Vitest), and E2E Tests (Playwright) must all pass before merge.
Tests 758 passed (758)
CANDIDATE_BUILD_UNIT_GREEN
Committed tree equals validated tree: 9f71693e7667635c7a4eed1d96bf8d8eafa50652
Three browser tests traversed all ten locales; 247 backfill keys per locale checked and generators were byte-stable.
Final combined tree additionally passed 801 unit tests and all 293 Playwright tests with retries disabled, plus all 48 primary tool workflows at desktop and mobile. The exploratory Color Converter exact-HEX boundary remains a documented pre-existing defect; its runtime is unchanged by this stack.
Risk & rollback
- Risk: Dependent commits require earlier stack changes; merge in order.
- Rollback: revert this PR through a new PR; do not revert dependencies beneath already-merged dependents.
- Release: require an approving review and latest-SHA CI. Respect the 15-minute soak between deploy-affecting merges and verify the production deployment before continuing.
Summary by cubic
Completes catalog parity across all 10 locales and localizes Cron builder, Regex explanations, CIDR messages, and related-tool cards at runtime so those surfaces no longer fall back to English. Refs #969. This PR is part of a dependency-ordered release stack; merge after its preceding PR.
Runtime localization
- Passes the route language to the related-tools section on every tool page so cards render translated server-side; related card links now preserve the route language via
withLanguageQuery. - Replaces hardcoded English in Cron builder, Regex visualizer, CIDR messages, and related-tool cards with catalog lookups; cron field text is inserted literally by the runtime translator.
- Fixes mismatched tooltip keys in the CSS gradient generator and the cheatsheet id in the markdown editor, plus French and Japanese string defects.
- Merges the base branch's layout fix (related-tools section inside the content wrapper,
oauth-debugger's emptymt-8div dropped) with thecurrentLangargument.
Catalog tooling and tests
- Adds
i18n-tool-backfill.mjsandi18n-catalog-additions.mjswith per-locale JSON backfill files to keep the 10 catalogs in sync; pinsacornat 8.16.0 and compares backfill placeholders as an order-independent multiset. - Aligns the es/de repos.yml placeholder with the generator so all ten locales deep-equal regenerated output.
- Adds catalog parity, runtime i18n, and E2E tests covering all locales; the rendered-keys guard now resolves prefixed
_thelper call keys, and new tests assert every related-tools section renders, keeps the language on its links, and a concrete?lang=link contract.