Repository navigation
Conversation
Persian is one of the most widely spoken RTL languages, but it was absent from both GUI catalogs: the desktop app shipped en/zh/zh-hant/ja/ar, and the dashboard shipped 17 locales with no fa. Adds a Persian catalog to each front-end and registers it in the existing RTL sets, so `document.documentElement.dir` flips and Tailwind's logical utilities mirror the layout. No new CSS — the dashboard's html[dir="rtl"] rule is already language-agnostic. Scoped to the two TypeScript GUI catalogs. locales/fa.yaml and the fa entry in agent/i18n.py are deliberately untouched: that CLI/gateway half is already covered by the open PR NousResearch#53398, and CONTRIBUTING asks contributors not to open competing duplicates. The halves are independent and can land in either order. Translation notes: {placeholder} tokens and arrow-function signatures are preserved; brand names, env-var keys, paths, cron expressions, and protocol terms stay untranslated; Latin digits are used throughout to match ar.ts and runtime interpolation; ZWNJ is applied where Persian orthography requires it. Dari (fa-AF) aliases to this catalog rather than falling back to English.
The dashboard pluralizes count labels by substituting `{s}` with a literal
"s" (EnvPage/SkillsPage: `.replace("{s}", n !== 1 ? "s" : "")`). Carrying the
token into the Persian catalog rendered a stray Latin "s" on the end of a
Persian word — "5 مهارتs".
Persian nouns stay singular after a numeral, so the token is simply dropped
from the five affected strings; the replace then finds nothing and is a
no-op, leaving the shared component code untouched.
Adds fa.test.ts pinning both forms: no catalog string carries `{s}`, and
each label renders the same for singular and plural counts.
The previous assertions only rejected a trailing ASCII "s", which a
hard-coded value could satisfy. Each count template is now compared against
itself with only {count} substituted, proving the plural branch contributes
nothing for either count, and every template is checked for {count}.
config.fields is split out rather than folded into that group: it is a bare
noun with no {count} of its own — ConfigPage renders the number beside it in
JSX — so it is asserted to be count-invariant instead. Expected rendered
text is now pinned for all five labels in both forms.
Three strings used U+066A ARABIC PERCENT SIGN. The merged ar.ts uses a plain "%", and these percentages are interpolated with Latin digits, so pairing them with an Arabic-Indic percent sign was inconsistent both with the existing locale and with the digit convention this catalog already follows.
fe148db to
37d26d4
Compare
|
Following up on the Persian desktop/dashboard localization. This branch was refreshed on September 5, with local desktop/web tests, type checks, lint and production builds recorded in the delivery report. I have checked the discussion again and found no requested revisions. Could a maintainer review the change and approve any fork workflows that still require approval? I am happy to address specific feedback or split the patch if preferred. |
|
Merged current upstream main ( Validation: web check passes (351 tests, typecheck, zero lint errors), desktop i18n 34 tests and all three desktop typechecks pass, web production and desktop renderer builds pass. New upstream strings retain the existing English fallback where Persian coverage is not yet added; the PR description now states that scope explicitly. Native packaging and live visual review were not run. GitHub currently reports this PR mergeable. Ready for another review. |
|
Updated this branch against main dc39239 and resolved the registry/component extraction conflicts. The refresh fixes the configured-shortcut signature, removes retired core catalog entries, adds Persian canonical group recovery/control copy, and registers the partial overlay in the existing gap ratchet. Current checks passed: desktop renderer typecheck, all 82 desktop i18n tests, web typecheck, all 484 web tests, targeted ESLint, and contribution whitespace checks. The PR description now explicitly records the 2,557 desktop keys still using English fallback rather than claiming full translation coverage. Native packaging and live desktop visual QA were not rerun. |
|
Updated against main at 6bb377a and resolved the overlay-gap merge conflict. The new English catalog exposed 41 missing Persian messages; this update translates the recovery actions, local-runtime errors, cron stop/catch-up controls, browser notification permissions, plugin installation/version-change warnings, and tab actions. It also removes a retired translation property and two retired fallback keys, preserving the existing fallback allowance rather than expanding it for these new messages. Validation: 76 tests in 10 desktop i18n files passed using a temporary focused Vitest config with jsdom, the existing setup file and workspace aliases. Interpolation tests cover provider/time/commit values and missing optional details. Scoped ESLint passed. The standard UI test configuration stalled during import; four Bot Mode-dependent i18n files were not successfully validated in this run, and the focused config is not a substitute for the complete desktop test suite. No Electron packaging or fresh visual RTL check is claimed. The desktop renderer TypeScript check (tsc -p apps/desktop/tsconfig.json --noEmit) also passed. The contribution diff against the new upstream base passed whitespace validation; existing upstream-only whitespace warnings were left unchanged. |
What does this PR do?
Adds Persian locale selection, RTL layout support, and locally bundled Vazirmatn to Hermes Desktop and the web dashboard. Switching back to English restores LTR; code and terminal typography stays monospace.
Preserves the original four commits and authorship by @blackorange-mega from #86335. Complements CLI/gateway locale work in #53398.
Closes #76854. Related: #53398. Supersedes with preserved credit: #86335.
Implementation
dc3923961431892f44bdf0bc10f8682e39485682, preserving the new language registry, additional upstream languages, and extracted copy-last control.Current validation (2026-10-28)
These checks supersede the older test counts. Native packaging, Electron/E2E typechecks, and a fresh live desktop browser review were not rerun in this refresh. No live model interaction is claimed.