feat(webui): add Vietnamese interface with a runtime language switch

Translate the whole management console and let the operator pick a language
without replacing the shipped copy.

- webui/i18n.js holds the dictionaries only; the Simplified Chinese text stays
  in index.html and app.js and is the fallback for every untranslated string,
  so a new locale never rewrites the original.
- Static text uses data-i18n / data-i18n-attr hooks, JavaScript text goes
  through t(); a locale switch re-renders both without a reload, and the
  choice persists in localStorage under opencode2api.ui.lang.
- The switcher is a flag button in the toolbar and on the login card that
  opens a menu of every supported locale. Flags are inline SVG, because
  Unicode flag emoji renders as plain letters on Windows.
- Ships 简体中文 (original), English and Tiếng Việt.
- README.vi.md translates the full README; all three READMEs cross-link and
  document how to add a locale.
This commit is contained in:
hanlap0503 committed 2026-10-15 09:20:28 +00:00
1 parent 25afadd303
commit 0c016a1e36
10 files changed
+2699 -488

No files matched your search

+3 -1
View File
@@ -53,6 +53,8 @@ jobs:
exit 1
fi
- name: Check WebUI syntax
run: node --check webui/app.js
run: |
node --check webui/app.js
node --check webui/i18n.js
- name: Check container entrypoint syntax
run: sh -n docker-entrypoint.sh