Skip to content

i18n: add Arabic (ar) interface, mirrored right to left (stacked on #34) - #385

Draft
tlomts-dev wants to merge 4 commits into
storytold:mainfrom
tlomts-dev:arabic-stacked-on-34
Draft

tlomts-dev wants to merge 4 commits into
storytold:mainfrom
tlomts-dev:arabic-stacked-on-34

Conversation

@tlomts-dev

Copy link
Copy Markdown

Stacks on #34 (the Ukrainian catalog and language selection): this branch is #34's work, merged with current main, plus one Arabic commit on top (e794ce4). It should merge after #34; once #34 is in main the diff of this pull request is just the Arabic delta. Same arrangement as #199 and #259.

What this adds

  • Catalog: crates/ui-egui/src/i18n/ar.tsv, 1,455 entries, every key of uk.tsv, written from the meaning of the English text. Modern Standard Arabic, Western digits, count-neutral wording (so no plural forms are needed). Selected by ar and every ar-* system locale and by the saved Preferences choice; app.language takes ar. No Microsoft or other product localisation consulted.
  • Display order (bidi.rs): egui joins Arabic letters but lays words out left to right, so the catalog is put into display order at load; sentences with values are filled in typing order and reordered as a whole; long labels are wrapped in reading order (rtl::wrap, i18n::prose).
  • Mirrored window (rtl.rs): title bar, tabs, ribbon, panels (thumbnails on the right, task pane on the left), status bar, File tab, dialogs (with their own title bar), menus, check boxes, radio buttons and sliders. Every egui::Grid goes through rtl::grid; a plain Grid in a right-aligned layout produces NaN widget rectangles and panics. Directional icons (back, undo, redo, indent, chevrons) mirror. The slide itself is never mirrored.
  • Surfaces main added after Add Ukrainian interface translation and language selection #34 are translated too (File tab, Selection pane, Lock, the missing-font notice, export and print messages, theme names, transition option labels). The Ukrainian entries for them are new in this commit and unreviewed; I could not check them, so a Ukrainian reader should.
  • Fonts: web builds embed Noto Sans Arabic Regular from the optional craft-fonts input (no font file is added to this repository; ATTRIBUTION.md is updated); desktop builds without it borrow an installed Arabic face.

Tests

Catalog parity and placeholders for both languages, every literal translation call, locales and saved preference, display order, counts, and an audit that walks every tab, File page, dialog, pane, view, menu and ribbon control in Arabic: no panic, mirrored, no English left.

Checks

cargo xtask ci on this branch passes all six steps (fmt, clippy -D warnings, test, assets, layers, wasm). Headless ui_shot renders in Arabic were read to confirm mirroring and joined letters. Built and run as a Windows x64 .msi. The catalog has not been read line by line by a native speaker.

Related

#256 is another Arabic PR (language switching and RTL alignment, 17 files, without the stacked structure); I have not compared the two catalogs entry by entry.

🤖 Generated with Claude Code

dmatviichuk and others added 4 commits October 10, 2026 20:36
Selection pane, File tab and export moved out of dialogs.rs and panes.rs on main; the
transition option labels, placeholder prompts in transitions and the canvas region renderer
are reconciled. Catalog entries for newer labels follow separately.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Stacked on the Ukrainian catalog infrastructure of PR storytold#34 (merged with current main).

- ar.tsv: 1,455 entries, every key of uk.tsv, written from the meaning of the English text
  (Modern Standard Arabic, Western digits, count-neutral wording). Selected by `ar` and
  `ar-*` system locales and by the saved Preferences choice; `app.language` takes `ar`.
- bidi.rs: egui joins Arabic letters but lays words out left to right, so the catalog is put
  into display order at load; sentences with values are filled in typing order and reordered
  as a whole; long labels are wrapped in reading order (rtl::wrap, i18n::prose).
- rtl.rs: mirrored window: title bar, tabs, ribbon, panels (thumbnails right, task pane left),
  status bar, File tab, dialogs (own title bar), menus, check boxes, radio buttons, sliders.
  Every egui::Grid goes through rtl::grid (a plain Grid in a right-aligned layout panics).
  Directional icons (back, undo, redo, indent, chevrons) mirror. The slide itself is never
  mirrored.
- Translated the surfaces main added after PR storytold#34 (File tab, Selection pane, Lock, missing-font
  notice, export and print messages, theme names, transition option labels); the Ukrainian
  entries for them are new and unreviewed.
- Web builds embed Noto Sans Arabic Regular; desktop builds without it borrow an installed
  Arabic face.
- Tests: catalog parity and placeholders for both languages, every literal translation call,
  locales and saved preference, display order, counts, and an audit that walks every tab, File
  page, dialog, pane, view, menu and ribbon control in Arabic (no panic, mirrored, no English).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants