Skip to content

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

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

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

Conversation

@pourmirzai

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

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

What does this PR does

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.

Files changed:

  • packages/app/src/i18n/fa.ts (996 keys, 1104 lines)
  • packages/ui/src/i18n/fa.ts (171 keys)
  • packages/desktop/src/renderer/i18n/fa.ts (21 keys)
  • packages/app/src/context/language.tsx (Locale union, LOCALES, INTL, LABEL_KEY, loaders, localeMatchers)
  • packages/desktop/src/renderer/i18n/index.ts (imports, detectLocale, build)
  • packages/app/src/i18n/en.ts + 17 other locales (language.fa: فارسی)
  • packages/app/src/i18n/parity.test.ts (fa in appLocales)
  • script/translate-app.ts (fa in locale registry)

otes/fa-audit.md (existing RTL PRs audit, gap analysis)

Key parity verified: 996/996 (app), 171/171 (ui), 21/21 (desktop), 0 placeholder mismatches.

Deliberate scope decisions:

How did you verify your code works

Ran official parity.test.ts with bun — all fa parity checks pass:

  • ✅ placeholder preservation
  • ✅ unseen session keys
  • ✅ changed-file summary keys
  • ✅ key parity (authoritative check via bun module import: 0 missing, 0 extra, 0 placeholder mismatches across app/ui/desktop)

Note: parity.test.ts fails on �r locale (5 missing keys: dialog.provider.custom.label, dialog.model.unpaid.viewMoreProviders, session.header.reveal.finder/fileExplorer/containingFolder). This is a pre-existing gap in dev, unrelated to fa.

Screenshots / recordings

N/A (i18n strings only — no UI layout changes; RTL will follow via #39423).

Checklist

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

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

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

The search results show PR #40386 (the current PR) and related but distinct PRs that are intentionally scoped separately:

@pourmirzai

Copy link
Copy Markdown
Author

Will resubmit on updated dev base

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@pourmirzai