Add Arabic language with full RTL support#10906
Open
Nexeon-Ai wants to merge 1 commit into
Open
Conversation
|
Connected to Huly®: UBERF-16504 |
dbeaaed to
912c916
Compare
Register Arabic ('ar') as a supported UI language and implement full
right-to-left layout mirroring — the platform's first RTL language.
Language registration:
- Add 'ar' to enabled-language lists (dev/prod + desktop platform.ts,
branding.json) and the settings language dropdown (العربية).
- Add the "Arabic" label string to the ui plugin + all locale files.
Translation:
- Add ar.json for all 66 plugins (~4000 strings, Modern Standard Arabic),
preserving keys and ICU placeholders. Validated against en parity with
the platform's intl-messageformat parser.
- Extend the official lang parity test (testUtils) to cover 'ar'.
RTL:
- Theme.svelte sets document dir=rtl for RTL languages, live on switch.
- scripts/rtl-codemod.mjs rewrites 971 physical CSS declarations across
292 files to logical properties (margin/padding/border/inset/text-align/
float) — identical to physical in LTR, so no LTR regression.
- Chevron mirrors horizontal carets; _rtl.scss keeps code/mono LTR.
Typography:
- Bundle IBM Plex Sans Arabic (matches the IBM Plex UI family) and append
it to the font stack so Latin and Arabic glyphs resolve per-glyph.
Tooling:
- scripts/translate-arabic.mjs (Claude API) for reproducible re-translation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Nexeon-Ai <205628096+Nexeon-Ai@users.noreply.github.com>
912c916 to
161885d
Compare
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.
Summary
Adds Arabic (
ar) as a supported UI language and implements full right-to-left (RTL) layout mirroring — the platform's first RTL locale.Language registration
aradded to the enabled-language lists (dev/prod/src/platform.ts,desktop/src/ui/platform.ts,dev/prod/public/branding.json) and the settings language dropdown (packages/ui/.../SettingsPopup.svelte, label العربية).Arabiclabel string added to theuiplugin and every existing locale file.Translations
lang/ar.jsonadded for all 66 asset plugins (~4,000 strings) in Modern Standard Arabic, preserving keys and ICU placeholders.enparity with the platform's ownintl-messageformatparser (0 ICU-argument mismatches, 0 parse failures).'ar'added to the shared locale parity test (testUtils.ts) so CI guards Arabic parity; alllang.test.tspass.RTL
packages/theme/src/Theme.sveltesetsdocument.documentElement.dir = 'rtl'for RTL languages, live on language switch.margin/padding/border/inset/text-align/float→ inline-logical). These are identical to physical properties under LTR, so there is no LTR regression, and the.ml-*/.mr-*spacing utilities now mirror automatically.Chevroncarets mirror;_rtl.scsskeeps code/mono content LTR inside an RTL document.Typography
Verification
rush install+ fullrush build(all packages) pass.Notes for maintainers
scripts/(rtl-codemod.mjs,translate-arabic.mjs) is reproducible and reversible; can be dropped from the PR if you'd prefer the result-only diff.