Repository navigation
feat(i18n): enable Persian language selection and complete #241 acceptance audit - #385
Merged
Merged
Conversation
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
Batch J for issue #241: unhide Persian as a user-selectable UI language and complete the #241 acceptance audit. Persian fa was fully implemented in batches A-I but intentionally hidden from user-facing language selectors. Requirements: browser language detection returns fa for fa* locales in getBrowserLanguage; the setup wizard offers fa as a language option when the browser language is fa, with browser-relative ordering fa en es pt while an English browser still gets en es pt only; the Settings language selector always lists fa; add settings.languageFa and setup.languagePersian keys to all four translation files en es pt fa because the translations test enforces key parity and the setup wizard needs a real Persian label instead of falling back to the English label; update the Playwright E2E spec so a new fa-IR locale test asserts Persian IS present in setup options and the settings test asserts the selector contains fa; refresh stale comments claiming Persian stays hidden. Verification must pass: npm run lint, npm run build:frontend, npm test all 97 suites, npm run test:translations, npx playwright test rtl-setup-auth-settings including the new fa-locale test. Commit message requested by the user: feat(i18n): enable Persian language selection and complete #241 acceptance audit. The PR body should carry the acceptance audit results and use Fixes #241. Do not add AI-attribution or Co-Authored-By footers to any commit. The acceptance audit was performed and all six #241 criteria passed: setup and settings selection with server-side persistence and standalone KDS inheritance, no raw translation keys with correct RTL rendering, Iran country profile fa-IR IRR Asia/Tehran +98 Economic Code, Rial Toman date and receipt behavior, printer arabicShaping capability gate with documented warnings fallback, and unchanged EN ES PT behavior.
What Changed
fa) language selection across the UI by updatinggetBrowserLanguageto detectfalocales, offering Persian in the setup wizard for Persian-locale browsers, and adding Persian to the Settings language dropdown.setup.languagePersianandsettings.languageFatranslation keys across all supported locale dictionaries (en,es,pt,fa).tests/rtl-setup-auth-settings.test.ts), and Playwright E2E suites to verify Persian browser detection and selector options, completing the feat(i18n): add Persian/Farsi and Iran support #241 acceptance audit. Fixes feat(i18n): add Persian/Farsi and Iran support #241.Risk Assessment
✅ Low: The change cleanly unhides Persian language selection across setup and settings, maintains translation parity across all four locale bundles, updates E2E tests cleanly, and introduces no regressions.
Testing
Executed targeted unit, translation integrity, RTL foundation, and Playwright E2E browser tests covering getBrowserLanguage locale detection, Setup wizard browser-relative language ordering, Settings language dropdown options, and full RTL layout rendering. All automated tests passed and visual screenshots were captured demonstrating Persian language selection and RTL rendering.
/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-setup-wizard-persian-locale.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-setup-wizard-english-locale.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-settings-language-selector-card.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-settings-store-fullpage-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/auth-login-rtl-fa.png)/var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/pos-rtl-fa.png)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:translationsnpm run test:rtl-setup-auth-settingsnpm run test:rtl-foundationnpm run test:rtl-dashboard-pos-commonnpm run test:rtl-kds-server-whatsappnpm run test:currencynpx --prefix frontend playwright test e2e/rtl-setup-auth-settings.spec.tsnpx --prefix frontend playwright test e2e/rtl-dashboard-pos-common.spec.ts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.