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