Skip to content

feat(i18n): add Persian (fa) locale with full key coverage - #459

Merged
stefan-ernst merged 6 commits into
mainfrom
wi-2033-persian-locale
Nov 8, 2026
Merged

stefan-ernst merged 6 commits into
mainfrom
wi-2033-persian-locale

Conversation

@stefan-ernst

Copy link
Copy Markdown
Contributor

Summary

Adds a Persian (fa) frontend locale and registers it as a right-to-left locale, covering the Persian UI request in #457.

  • 22 locale files under frontend/src/lib/locales/fa/, mirroring the English catalog key for key (8,079 leaf keys).
  • fa registered in SUPPORTED_LOCALES with direction: 'rtl', so it appears in the language picker and is negotiated from fa-* browsers.
  • check-i18n.js now requires full key coverage for fa (alongside ru, de, fr, zh-CN), so the locale can never silently fall back to English.
  • README language list updated.

Testing

  • cd frontend && bun run check — passes, including the i18n gate: fa at 100% coverage, placeholder parity, and no untranslated carryovers.
  • Frontend unit test in the companion test repo (core-tests-internal, branch wi-2033-persian-locale): frontend/src/lib/stores/i18n.svelte.test.js covers locale registration and RTL direction.
  • ./run-overlay-script.sh ../core scripts/run-frontend-tests.sh src/lib/stores/i18n.svelte.test.js — 2 passed.

Notes

  • Translations are a first pass and should be reviewed by a native Persian speaker before release.
  • The Jalali/Shamsi calendar part of Jalali(Hijri Shamsi) Calendar support? #457 is not addressed here; converting the native date inputs and custom calendars is a separate, larger change.

Add a Persian (fa) frontend locale that mirrors the English catalog key for
key, and register it as a right-to-left locale so it appears in the language
picker and is negotiated from fa-* browsers.

The i18n gate now requires full key coverage for fa alongside ru, de, fr, and
zh-CN, so the locale can never silently fall back to English.

Refs #457 (Persian UI portion).
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

…y (WI-2033)

Fix literal machine-translation artifacts across the Persian locale: domain
terms (token, runner, board, swimlane, theme, slug, field, value, backlog,
mapping, grant, assignment), untranslated fragments, garbled sentences,
grammar/word-order errors, register inconsistencies, and terminology drift.
Also fills several help strings that were empty in fa.
…033)

Introduce DatePicker and CalendarGrid on top of Melt UI's headless
createCalendar and @internationalized/date. The grid renders the
calendar implied by the UI locale (Persian for fa) with the locale's
week start and numerals, while the bound value stays a Gregorian
YYYY-MM-DD string so storage and APIs are unchanged.

Promote @internationalized/date to a direct dependency and add the
picker strings to the fully covered locales.
Main introduced the backend email catalog and numeric date-format table.
Persian is a fully covered locale, so add fa/email.js, register it in the
locale index, translate the new email-template and portal-language keys,
and declare the fa numeric layout. Regenerate the Go catalog.
Route every date input through DatePicker. Gregorian locales keep the
native input (best keyboard and OS-picker behaviour); Persian loads the
Jalali calendar lazily, so the calendar code and @internationalized/date
never reach locales that keep the native picker.

- Input delegates type=date to DatePicker, covering Input and TextField
  call sites; raw inputs and the create-modal date chips are converted.
- Mirror the active locale into appLocale so DatePicker can read it
  without importing the frequently mocked i18n store.
- Forward inputRef and key/blur/focus handlers so inline editors keep
  their keyboard save/cancel contract.
@stefan-ernst
stefan-ernst merged commit 7d9dcaa into main Nov 8, 2026
@stefan-ernst
stefan-ernst deleted the wi-2033-persian-locale branch November 12, 2026 16:05
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