Skip to content

feat(i18n): add Farsi (fa) locale for app, UI, and desktop - #40387

Open
pourmirzai wants to merge 1 commit into
anomalyco:devfrom
pourmirzai:i18n-fa-locale
Open

feat(i18n): add Farsi (fa) locale for app, UI, and desktop#40387
pourmirzai wants to merge 1 commit into
anomalyco:devfrom
pourmirzai:i18n-fa-locale

Conversation

@pourmirzai

@pourmirzai pourmirzai commented Aug 4, 2026

Copy link
Copy Markdown

Issue for this PR

Builds on localization work in #37184 (docs/README/glossary fa) and #34396 (closed), fills the app/UI/desktop locale gap left by auto-closed #33338.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds full Persian (Farsi, fa) locale support for non-terminal surfaces — app web UI, shared UI components, and desktop Electron wrapper — with complete key/placeholder parity, adapted to the new centralized locale structure introduced in dev.

Files changed (9):

  • packages/app/src/i18n/fa.ts (new, 996 keys, 1104 lines)
  • packages/ui/src/i18n/fa.ts (new, 171 keys)
  • packages/desktop/src/renderer/i18n/fa.ts (new, 21 keys)
  • packages/app/src/i18n/en.ts (+language.fa: فارسی)
  • packages/app/src/i18n/desktop-native.ts (+fa to DESKTOP_NATIVE_LOCALES)
  • packages/app/src/context/language.tsx (RTL, INTL, LABEL_KEY, loaders, localeMatchers)
  • packages/desktop/src/renderer/i18n/index.ts (imports, detectLocale, build)
  • packages/app/src/i18n/parity.test.ts (+fa to ^GppLocales)
  • script/translate-app.ts (+ a: Farsi)

All locale registrations follow the new centralized structure from recent i18n refactors (desktop-native.ts locale source of truth, RTL_LOCALES for direction detection, etc.).

Key parity verified: standalone bun script confirms 996/996 (app), 171/171 (ui), 21/21 (desktop) with 0 placeholder mismatches.

How did you verify your code works?

  • Typecheck passes for packages/app and packages/desktop (tsgo -b)
  • Parity verified via standalone bun module import: 0 missing, 0 extra keys, 0 placeholder mismatches
  • Locale registration follows existing patterns (all loaders, localeMatchers, RTL_LOCALES updated)

Note: The official parity.test.ts is skipIf(CI) and may report drift due to pre-existing gaps in other locales (not introduced by fa).

Screenshots / recordings

N/A (i18n strings only — no UI layout changes; RTL already partially implemented in dev)

Checklist

  • I have tested my changes locally (typecheck verified; desktop/web runtime testing deferred)
  • I have not included unrelated changes in this PR (9 files, all i18n-related)

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 4, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant