Repository navigation
feat(i18n): add Persian locale with RTL support - #165
Open
cyb3rAcad3my wants to merge 1 commit into
Open
cyb3rAcad3my wants to merge 1 commit into
cyb3rAcad3my wants to merge 1 commit into
Conversation
Adds Persian (fa) as an optional language for the web UI, following the existing i18n architecture in packages/app and packages/ui. - New dictionaries: packages/app/src/i18n/fa.ts, packages/ui/src/i18n/fa.ts - Register fa in Locale, LOCALES, LABEL_KEY, DICT, localeMatchers, PARITY_CHECK - Add "language.fa" to every existing locale dictionary - Set document.documentElement.dir so Persian renders RTL and switching back restores LTR; also set it pre-paint in cs-theme-preload.js - New pure direction() helper so it is testable without JSX - Unit tests for direction, completeness and placeholder integrity, plus two e2e tests for RTL switching and persistence English stays the default and every existing locale is unchanged. Tool names, config values and brand names are deliberately left untranslated. The TUI and the console site use separate systems and are not covered.
cyb3rAcad3my
commented
Oct 16, 2026
cyb3rAcad3my
left a comment
Author
There was a problem hiding this comment.
This PR adds Persian (fa) localization to the web UI, including RTL support, locale registration, and tests for direction handling, dictionary completeness, and persistence.
English remains the default, and existing translations are preserved. The TUI and console site are intentionally out of scope.
Thank you for reviewing this contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Persian (
fa) as an optional language for the web UI, reusing the existing i18n setup.fadictionaries forpackages/appandpackages/uifainLocale,LOCALES,LABEL_KEY,DICT,localeMatchers,PARITY_CHECKdocument.documentElement.dirso Persian renders RTL and switching back restores LTR, both in-app and pre-paint incs-theme-preload.js"language.fa"to every existing locale so the selector label resolvesEnglish stays the default and no existing locale changes. Tool names, config values and brand names are deliberately left untranslated. The TUI and the console site use separate systems, so they are out of scope.
Closes #164
Type of change
Security impact
How did you verify it works?
bun turbo typecheckclean (also ran as the pre-push hook, 11/11 tasks)bun testinpackages/app: 206 pass, up from 196. The 10 failures and 5 errors are the same set as onmain, so no regressions.bun run buildsucceedsfahas the exact key set and order ofen, and every{{placeholder}}matches{"locale":"fa"},{"locale":"en"}, and malformed JSONStill open: the 2 new Playwright e2e tests have not been run, and I have not done a manual pass with a live LLM provider.
Checklist
bun turbo typecheckpasses