NFR-A11Y-1 — Localisation: a catalogue, not a Rust match #35

Open
opened 2026-09-05 16:20:17 +00:00 by dtourolle · 1 comment
Owner

NFR-A11Y-1 — Localisation. @tr( appears zero times across 14,482 lines of Slint.

The good news first

That number overstates the problem, because the genuinely architectural part was got right:

  • LocalizedKey keeps display strings out of core/ entirely.
  • Every operation publishes a key rather than a label.
  • labels::resolve is the single point where a key becomes text.
  • A test (ui_names_no_operation.rs) enforces the boundary.

The problem

What that single point does is a hardcoded English match in Rust source. Changing a translation requires a recompile, which is the one thing the requirement explicitly forbids. There is no message catalogue in any format, no locale-resolution rule, and no decision recorded about RTL.

The work is smaller than it looks and entirely mechanical

  • Choose a catalogue format and record why.
  • A load path behind resolve, falling back to the current English when a key is missing.
  • @tr( around the Slint literals.
  • A locale-resolution rule, and a recorded decision about RTL.

The design it needs already exists. This is the easy half of §6 and the hard half is done.

See docs/outstanding.md §6.

**NFR-A11Y-1 — Localisation.** `@tr(` appears **zero** times across 14,482 lines of Slint. ## The good news first That number overstates the problem, because **the genuinely architectural part was got right**: - `LocalizedKey` keeps display strings out of `core/` entirely. - Every operation publishes a key rather than a label. - `labels::resolve` is the single point where a key becomes text. - A test (`ui_names_no_operation.rs`) enforces the boundary. ## The problem What that single point *does* is a hardcoded English `match` in Rust source. **Changing a translation requires a recompile**, which is the one thing the requirement explicitly forbids. There is no message catalogue in any format, no locale-resolution rule, and no decision recorded about RTL. ## The work is smaller than it looks and entirely mechanical - [ ] Choose a catalogue format and record why. - [ ] A load path behind `resolve`, falling back to the current English when a key is missing. - [ ] `@tr(` around the Slint literals. - [ ] A locale-resolution rule, and a recorded decision about RTL. The design it needs already exists. This is the easy half of §6 and the hard half is done. See `docs/outstanding.md` §6.
dtourolle added the uiunmet-requirementsize:Mi18n labels 2026-09-05 16:20:17 +00:00
Author
Owner

Do alongside #36 — both pass through labels::resolve, and doing them separately means touching eighteen Slint files twice.

**Do alongside** #36 — both pass through `labels::resolve`, and doing them separately means touching eighteen Slint files twice.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dtourolle/DarkRoom#35