Skip to content

Interface localization design

Use local message catalogs, Intl formatting and Svelte reactive state. Bundle all ten catalogs without third-party i18n runtimes, remote translation or translation-management services. Manifests/locks govern dependencies. See architecture for resource targets and Plan.md for status.

Project localization rules

  • Support zh-CN (application default), zh-TW, en, ja, ko, es, fr, de, pt-BR and ru. Settings use native language names; saving changes language immediately, persists and restores on startup. Update page lang for assistive technology. Switching never triggers collection/changes statistics. Settings save/default-restored feedback retains message keys and resolves in the current language during rendering, including the confirmation of the language-changing save itself.
  • Negotiate valid user settings → navigator.languages → zh-CN. Map zh-Hant/TW/HK/MO to zh-TW, other zh to zh-CN, and en/ja/ko/es/fr/de/pt/ru to existing catalogs, with pt using pt-BR. Store statistics timezone independently; unspecified week starts follow regional rules.
  • Flat keys use lowercase dotted namespaces and {name} interpolation without HTML. New keys update every language. Tests check key sets, nonempty values and interpolation, without stale fixed key-count assertions.
  • Missing keys fall back to the same zh-CN key; missing default keys warn/display key names. Catalog baselines: desktop/src/lib/i18n.svelte.ts and locales.ts; feature catalogs merge as needed. No ICU parser.
  • Intl formats numbers, dates, percentages, relative times and compact units according to UI locale. Query dates, timezones, deduplication, quality coverage and raw values follow the data rules; translation cannot change ranges or turn unknowns into zeros.
  • CSV/JSON exports retain ISO dates, unlocalized numbers and stable English columns. Explain display/export formats separately; regional formatting does not affect round trips.
  • Diagnostic codes remain stable English; messages retain redacted technical facts. Frontend code maps user explanations by code; backend returns no localized strings. Structured capability enums may translate, while unmapped notes/limitations retain originals. Missing translation never expands capabilities.
  • Application-supplied chart labels/accessibility names update with language. No built-in ECharts toolbar copy is currently used. Before adding it, verify locale registration/instance switching.
  • Settings respond to available content width without sidebar crowding. Charts are focusable; arrow/Shift/Home/End/Enter use the same selection query as mouse input; see dashboard interactions.
  • Main navigation buttons/brand links have explicit localized accessible names, retained when narrow sidebars hide text. Real Linux Orca acceptance uses native Tab/Enter to reach all five pages in ten languages, checking current AT-SPI focus/actual speech for every navigation. Switch through product settings and verify saved values/HTML lang. DOM inspection, injected names or reused prior speech do not verify product behavior. Isolated containers may use audio output without hardware; results do not verify pronunciation, physical audibility, other controls or Windows screen readers.

The documentation site’s English default/browser negotiation is separate from these application settings; see the documentation requirements.

Acceptance

V31 covers negotiation, missing-key fallback, save/restore, number/date/unit formatting, export separation and unchanged statistics across languages. Fixed tests check all catalogs. Report mocked browser IPC/real Tauri IPC/WebView2 language, keyboard and layout separately in latest acceptance. Real ten-language Linux Orca focus/speech: dedicated acceptance.

Verify CSS zoom, native OS DPI, other WebViews and assistive technologies separately. Unmeasured items remain gaps; type checking/one Windows environment do not establish acceptance.