Repository navigation
fix(i18n): enable Persian, resolve scoped translation keys, and add repo-native translation tooling - #412
Merged
Conversation
Enable Persian for end users, remove untranslated and unsupported translation fallbacks, and provide repository-native language scaffolding and integrity checks before the legacy cleanup work.
Contributor
Greptile SummaryThe PR enables Persian throughout the locale registry and UI, migrates affected screens to scoped translation keys, and adds repository-native locale scaffolding and validation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| frontend/src/lib/i18n/languages.ts | Registers Persian as a selectable RTL locale and keeps locale loading centralized. |
| frontend/src/components/providers/I18nProvider.tsx | Aligns active-language validation and message loading with the language registry. |
| frontend/src/app/setup/page.tsx | Exposes all selectable locales during setup and localizes newly migrated setup content. |
| scripts/i18n-add.cjs | Adds an offline locale scaffolder with strict locale-code validation and overwrite protection. |
| tests/translations.test.ts | Resolves literal keys from scoped translators, validates registered locale files, and blocks legacy bridge usage. |
Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/pre-381-i18..." | Re-trigger Greptile
This was referenced Aug 19, 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.
Intent
fix(i18n): enable Persian, resolve scoped translation keys, and add repo-native translation tooling (#412)
What Changed
fa) as a selectable language in the registry, aligned browser language detection to match selectable locales, and addedisLanguagehelper validation across auth and settings.en,es,fa,pt), removed inline fallback defaults from UI components, and updated translation tests to resolve scopeduseTranslations()keys and block legacy bridge imports.scripts/i18n-add.cjs(npm run i18n:add) to scaffold new locale files from the canonical English schema and updatednpm run i18n:checkto include frontend TypeScript validation.Risk Assessment
✅ Low: The changes are well-bounded, clean, and directly satisfy all i18n requirements for Persian enablement, scoped key resolution, and scaffolding tooling with robust test coverage.
Testing
Executed targeted test suites covering translation parity and scoped key extraction across all four locales (en, es, pt, fa), script validation for i18n-add with overwrite protection, RTL foundation and screen suites, locale chunk splitting for the lazy fa bundle, and the full Playwright E2E suite capturing 14 rendered screenshots across Persian and English UI surfaces.
/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/setup-step1-fa-locale-fa-option.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/setup-step1-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/setup-step2-master-pin-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/setup-step3-owner-account-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/settings-store-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/settings-account-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/settings-taxes-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/settings-health-check-dialog-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/auth-login-rtl-fa.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ/auth-recover-rtl-fa.png)Evidence: CLI Scaffolding Tool Transcript for i18n-add
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm run test:translationsnpx ts-node --transpile-only -P tests/tsconfig.json tests/dev-tooling-scripts.test.tsnpm run test:rtl-setup-auth-settingsnpm run test:rtl-foundationnpm run test:rtl-dashboard-pos-commonnpm run test:rtl-kds-server-whatsappnpm run test:locale-chunksEVIDENCE_DIR=/Users/gurkiratkhaira/.no-mistakes/evidence/01M0E1KB5CQR7RWQHYFJTG9ZSQ npx playwright test e2e/rtl-setup-auth-settings.spec.tsnode scripts/i18n-add.cjsnode scripts/i18n-add.cjs ennode scripts/i18n-add.cjs invalid-codenode scripts/i18n-add.cjs xx✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.