Skip to content

feat(i18n): enable Persian language selection and complete #241 acceptance audit - #385

Merged
khaira777 merged 3 commits into
mainfrom
feat/241-j-enable-persian-selection
Aug 18, 2026
Merged

khaira777 merged 3 commits into
mainfrom
feat/241-j-enable-persian-selection

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

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

  • Enabled Persian (fa) language selection across the UI by updating getBrowserLanguage to detect fa locales, offering Persian in the setup wizard for Persian-locale browsers, and adding Persian to the Settings language dropdown.
  • Added setup.languagePersian and settings.languageFa translation keys across all supported locale dictionaries (en, es, pt, fa).
  • Updated README supported languages, stylesheet notes, unit tests (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.

  • Evidence: Setup wizard with Persian language option (fa browser locale) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-setup-wizard-persian-locale.png)
  • Evidence: Setup wizard with English browser locale (Persian omitted) (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-setup-wizard-english-locale.png)
  • Evidence: Settings language selector showing Persian (FA) option (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-settings-language-selector-card.png)
  • Evidence: Settings store tab rendered in Persian RTL mode (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/evidence-settings-store-fullpage-fa.png)
  • Evidence: Login screen rendered in Persian RTL mode (local file: /var/folders/y_/1ltcxtwj0zd_w1dg9jv4jl580000gn/T/no-mistakes-evidence/01M091HVYE3XXHEBMP38749A97/auth-login-rtl-fa.png)
  • Evidence: POS cashier screen rendered in Persian RTL mode (local file: /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:translations
  • npm run test:rtl-setup-auth-settings
  • npm run test:rtl-foundation
  • npm run test:rtl-dashboard-pos-common
  • npm run test:rtl-kds-server-whatsapp
  • npm run test:currency
  • npx --prefix frontend playwright test e2e/rtl-setup-auth-settings.spec.ts
  • npx --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.

@khaira777
khaira777 requested a review from itsbkm as a code owner August 17, 2026 23:48
@khaira777
khaira777 enabled auto-merge (squash) August 18, 2026 00:27
@khaira777
khaira777 merged commit 6f14ce2 into main Aug 18, 2026
12 checks passed
@khaira777
khaira777 deleted the feat/241-j-enable-persian-selection branch August 18, 2026 00:31
@khaira777 khaira777 self-assigned this Aug 19, 2026
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.

feat(i18n): add Persian/Farsi and Iran support

1 participant