Skip to content

feat(webroot): implement multi-language (i18n) support for WebUI - #195

Open
HSSkyBoy wants to merge 11 commits into
JingMatrix:devfrom
HSSkyBoy:feat/webui-i18n
Open

feat(webroot): implement multi-language (i18n) support for WebUI#195
HSSkyBoy wants to merge 11 commits into
JingMatrix:devfrom
HSSkyBoy:feat/webui-i18n

Conversation

@HSSkyBoy

@HSSkyBoy HSSkyBoy commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Adds full multi-language (i18n) support to the WebUI, with English,
Traditional Chinese (zh-TW), and Simplified Chinese (zh-CN) translations.

  • New i18n.js module: a dictionary-based translation system with
    t(key, fallback) for programmatic lookups and translateDOM() to
    translate all [data-i18n] elements in the DOM.
  • Language preference is persisted via localStorage and applied on
    load; switching language reloads the page to fully re-render text.
  • Falls back to English for any key missing in the active locale, so a
    partial translation never breaks the UI.
  • Technical terms and identifiers (e.g. StrongBox, TEE, schema field
    names like Brand/Device/Serial) are intentionally left
    untranslated to avoid ambiguity for developer-facing/debugging text.
  • Covers all views: Profiles, Keyboxes, Keys, System, Logs, and their
    associated dialogs, hints, and error states.

Design notes

  • Translations favor natural, idiomatic phrasing over literal
    word-for-word translation, so longer descriptive strings (e.g.
    attestation/harvest failure messages, patch vs. generation mode
    explanations) read clearly to native speakers rather than as
    machine-translated text.
  • All three locale dictionaries are kept in sync — no missing or extra
    keys across en / zh-TW / zh-CN.

Testing

  • Verified i18n.js loads without syntax errors and all three locales
    expose an identical key set.
  • Manually switched languages in the WebUI and confirmed labels, hints,
    and error messages render correctly with no leftover untranslated
    strings (aside from the intentionally-untranslated technical terms).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Add multi-language support to the new WebUI in v4.0

1 participant