refactor(i18n): sync non-English locales + add CI enforcement for key parity#9009
Merged
sriramveeraghanta merged 1 commit intorefactor-translationsfrom May 4, 2026
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- All 18 non-English locales filled to 3,837/3,837 keys against the canonical English source. Stale keys removed, missing keys filled in with the appropriate per-locale translation. - New scripts/lib/locale-io.ts module shared between sync-check and future tooling. readJsonFile() wraps JSON.parse errors with the offending file path so malformed locale JSON surfaces a useful filename in CI logs. - New .github/workflows/i18n-sync-check.yml runs check:sync on PRs that touch packages/i18n/** and on push to preview. Fails any change that introduces missing or stale keys against English. - Pin tsx@4.20.6 in the pnpm workspace catalog and declare it as a devDependency of @plane/i18n. Replace npx tsx@4.19.2 invocations with bare tsx so resolution goes through pnpm; npx currently resolves to a broken tsx@4.21.0 that pulls an unpublished esbuild range.
b0064b2 to
019a629
Compare
sriramveeraghanta
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Phase 2 of the i18n refactor. Closes the English-to-locale sync gap inherited from
refactor-translationsand adds a CI workflow that blocks future drift. No changes to the public API of@plane/i18nand no changes to how the app loads translations at runtime.Locale sync: 100% key parity with English
de) with stale keys still hanging around from the old monolithictranslations.ts.CI enforcement:
.github/workflows/i18n-sync-check.ymltsx packages/i18n/scripts/sync-check.ts --cion PRs that touchpackages/i18n/**or the workflow itself. Also runs onpushtopreviewas a backstop.Script refactor: shared locale I/O + better error context
flattenKeys/loadLocale/LOCALES_DIRout ofscripts/sync-check.tsinto a newscripts/lib/locale-io.tsmodule.readJsonFile()helper that wrapsJSON.parseerrors with the offending file path — closes a CI-debugging gap where malformed locale JSON threw with no filename in the error.check:syncoutput format, per-locale counts, and exit codes are identical to before.Build tooling: pin
tsxin pnpm catalognpx tsx@4.19.2 …invocations in@plane/i18nscripts with baretsx ….npx tsxcurrently resolves to a broken release (tsx@4.21.0declares an unpublishedesbuild~0.27.0), causing local builds to fail withnpm error code ETARGET.tsx: 4.20.6in the workspace catalog and declared it as adevDependencyof@plane/i18nso resolution goes through pnpm, not npx.Type of Change
Screenshots and Media (if applicable)
N/A — no visual changes. All existing translations continue to render identically; previously-missing keys now render their translated values instead of falling back to English.
Test Scenarios
pnpm --filter=@plane/i18n run check:syncexits 0 with "All locales are in sync with English. No issues found."pnpm --filter=@plane/i18n run buildsucceeds;keys.generated.tsregenerates cleanly (3,837 keys × 28 namespaces).pnpm --filter=@plane/i18n check:lint/check:types/check:formatall pass.actionlint .github/workflows/i18n-sync-check.ymlpasses.References
Follow-ups (not in this PR)