Skip to content

Add Arabic language with full RTL support#10906

Open
Nexeon-Ai wants to merge 1 commit into
hcengineering:developfrom
Nexeon-Ai:feat/arabic-rtl
Open

Add Arabic language with full RTL support#10906
Nexeon-Ai wants to merge 1 commit into
hcengineering:developfrom
Nexeon-Ai:feat/arabic-rtl

Conversation

@Nexeon-Ai

@Nexeon-Ai Nexeon-Ai commented Jun 9, 2026

Copy link
Copy Markdown

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

  • ar added 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 العربية).
  • Arabic label string added to the ui plugin and every existing locale file.

Translations

  • lang/ar.json added for all 66 asset plugins (~4,000 strings) in Modern Standard Arabic, preserving keys and ICU placeholders.
  • Validated against en parity with the platform's own intl-messageformat parser (0 ICU-argument mismatches, 0 parse failures).
  • 'ar' added to the shared locale parity test (testUtils.ts) so CI guards Arabic parity; all lang.test.ts pass.

RTL

  • packages/theme/src/Theme.svelte sets document.documentElement.dir = 'rtl' for RTL languages, live on language switch.
  • A logical-property codemod rewrote 971 physical CSS declarations across 292 files (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.
  • Horizontal Chevron carets mirror; _rtl.scss keeps code/mono content LTR inside an RTL document.

Typography

  • Bundles IBM Plex Sans Arabic (matches the IBM Plex UI family) and appends it to the font stack, so Latin and Arabic glyphs resolve per-glyph everywhere with no language gating.

Verification

  • rush install + full rush build (all packages) pass.
  • Booted the stack via Docker and verified live: login, signup, workspace creation, and Tracker all render in Arabic with the whole UI mirrored (nav rail/navigator on the right, content on the left), Arabic typography applied.

Notes for maintainers

  • The Arabic strings are machine-generated (LLM) and structurally validated, but would benefit from native-speaker review before being treated as final — happy to iterate on terminology.
  • Tooling added under 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.

@huly-github-staging

Copy link
Copy Markdown

Connected to Huly®: UBERF-16504

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>
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