7 Commits
Author SHA1 Message Date
devmobasa 70d2e70f44 feat(configurator): make the language row easy to recognize
Put the language picker first in General UI, with a globe and a title
that includes every supported language. Derive its title and search terms
from shared language metadata.

Add regression coverage for the title, icon and row order, and format the
additions with the pinned Rust toolchain.
2026-10-19 11:39:54 +02:00
devmobasa d9165ca50a fix(configurator): keep font and color config values untranslated 2026-10-18 10:15:24 +02:00
devmobasa d3f583e15a feat(i18n): search translated command text without changing English scores 2026-10-17 21:42:09 +02:00
devmobasa afbdbd83b9 feat(i18n): make the language setting easy to find 2026-10-17 21:42:09 +02:00
devmobasa fcbc437816 feat(cli): choose and list the interface language from the command line
`--language CODE` sets the interface language for one run of --active,
--freeze, --daemon or --about without changing config.toml. It accepts
the spellings `[ui] language` does and takes precedence over both
WAYSCRIBER_LANGUAGE and the config. A daemon started with it gives it to
the About windows it opens, and to its overlays as an optional
environment input that an older overlay ignores. The process broker
strips that input from every other helper, so a configurator opened from
an overlay keeps previewing its own Language row. With --daemon-toggle or
an overlay action the flag is an error, since a running daemon's
overlays cannot be changed from outside.

`--list-languages` prints each language's code and name, the configured
language, and the language in effect with the setting that decided it.

Languages now carry their native and English names, and the
configurator's Language row takes its labels from them. The help text,
README, CONFIG.md, I18N.md and config.example.toml describe both options.
2026-10-16 18:42:33 +02:00
devmobasa 98b6f54c15 docs(i18n): describe per-process languages, previews and override limits
docs/I18N.md still said the configurator was untranslated, that the
language was set once at startup, and that a translation could reorder
the {} placeholders; the guard rules and the steps for adding a language
were incomplete. It now covers which processes draw translated text and
when each picks up a change, the configurator preview, how auto resolves
in a systemd user service, the fixed placeholder order, the guard's call
forms and its derived-label audit, the limits on local catalog overrides,
search under translation, and every place a new language has to be added.

CONFIG.md, config.example.toml and the catalogs README state the same
timing, override and placeholder rules.
2026-10-16 18:04:08 +02:00
Mona 32bf7901bf Add multi-language UI support (zh-CN first)
Wrap every user-visible string in the overlay and the configurator with
tr()/trf(), make the UI language selectable at runtime, and ship a
complete Simplified Chinese catalog.

Core:
- src/i18n.rs: process-global language state, tr()/trf() lookup, and
  locale resolution (WAYSCRIBER_LANGUAGE > [ui] language > desktop
  locale > English)
- src/domain/language.rs: Language enum with serde spellings
- locales/zh-CN.toml: 2247 entries, embedded via include_str!
- config: [ui] language = "auto" | "en" | "zh-CN"

Coverage:
- overlay: help overlay, context menus, board picker, status bar,
  toasts, command palette chrome, properties panel, about window,
  onboarding hints, top-toolbar menus (wayland + GTK), input HUD,
  arrow-style labels, navigation hints, all action labels
- wayscriber-configurator: shell, sidebar tabs, every settings page,
  dialogs, and status messages; it loads the language at startup and
  again when the Language row changes, so its chrome follows the
  overlay

Guards and tests:
- tests/repository_guards/translations.rs: every tr()/trf() literal in
  src/ and configurator/src/ must have a catalog entry (call sites are
  reported); a value may not repeat its key; placeholder counts must
  match
- tests/i18n.rs: catalog loading, override, and detection
- configurator suite: 519 pass; full lib suite unchanged apart from
  pre-existing/environment failures

Deliberately untranslated: --help/--version, log messages, keyboard key
names, TOML config keys shown in validation errors, gsettings/systemctl
command arguments, CSS class names, and product names.
2026-10-16 11:37:15 +08:00