designcraft/crates
Shao Wenbin 9d85777546 UI: add Chinese and Arabic localization with RTL-safe interface text
Extend interface language selection with Chinese and Arabic translations
across menus, dialogs, panels, tooltips, and common application controls.
Keep English fallback for untranslated strings, return borrowed translation
text, and validate translation key uniqueness and language switching.

Bundle redistributable Noto CJK and Arabic fonts with OFL license files and
ASSETS.md attribution so native and WASM builds have portable glyph coverage.
Register Arabic regular and semibold families while retaining existing font
fallbacks for proportional and monospace controls.

Render Arabic labels using Unicode bidirectional runs and contextual shaping.
Wrap logical text at grapheme boundaries before ordering each visual line,
mirror neutral punctuation, preserve logical source text for accessibility,
and handle truncation, empty lines, and mixed Latin text and numbers. Keep
ASCII labels on the normal rendering path. Disable selection on shaped RTL
labels because egui's default label cursor mapping assumes LTR text.

Adapt welcome controls, menu ordering, popup alignment, and new-document rows
for RTL layout. Bound popup geometry and avoid unsupported RTL grid behavior;
keep numeric inputs LTR. Isolate user-provided document names from Latin
application and zoom metadata. Interface language changes leave document
binding, paragraph direction, editable text, and engine state unchanged.

Add regressions for contextual Arabic joining, bidirectional punctuation,
mixed document names, logical wrapping, truncation, language switching, and
finite widget geometry. Update the roadmap with localization coverage.
Apply equivalent chunk-iteration and PDF Option/borrow simplifications needed
by the current Rust toolchain's strict Clippy checks.

Validation:
- cargo xtask ci: fmt, Clippy, native tests, assets, and layers passed;
  native tests total 517 passed and 2 ignored.
- UI regression suite: 26 passed.
- Headless UI screenshots verified Arabic welcome/new-document creation,
  menus, mixed-script document names, and switching back to Chinese/English.
- Default WASM gate is blocked by this host's missing precompiled wasm32
  standard library. All 15 WASM crates pass using the installed Rust sources:
  RUSTC_BOOTSTRAP=1 CARGO_UNSTABLE_BUILD_STD=std,panic_abort
  target/debug/xtask wasm.
2026-10-06 15:12:49 -04:00
..
color Never crash: geom and color return or fall back instead of panicking 2026-10-04 11:39:33 -04:00
compose Never crash: doc and compose 2026-10-04 12:43:33 -04:00
doc Never crash: doc and compose 2026-10-04 12:43:33 -04:00
engine Snap: visible bounds and constrained gestures 2026-10-06 09:05:59 -04:00
epub Never crash: importers (text, IDML, fonts, format, EPUB, images) 2026-10-04 12:43:34 -04:00
fonts Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 11:01:35 -04:00
format Never crash: importers (text, IDML, fonts, format, EPUB, images) 2026-10-04 12:43:34 -04:00
geom Never crash: geom and color return or fall back instead of panicking 2026-10-04 11:39:33 -04:00
idml Never crash: importers (text, IDML, fonts, format, EPUB, images) 2026-10-04 12:43:34 -04:00
images Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 11:01:35 -04:00
mcp Snap: carry SnapView on the tool context 2026-10-06 09:05:59 -04:00
pdf PDF/X-4: warn when a transparency group still blends in RGB 2026-10-06 09:05:03 -04:00
render Never crash: render and pdf 2026-10-04 12:43:33 -04:00
textimport Never crash: importers (text, IDML, fonts, format, EPUB, images) 2026-10-04 12:43:34 -04:00
tools Snap: snap preferences as a command, overlay colours from tokens, tidy-up 2026-10-06 09:05:59 -04:00
ui-egui UI: add Chinese and Arabic localization with RTL-safe interface text 2026-10-06 15:12:49 -04:00