mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1230] serve/web: add English / Simplified Chinese (zh-CN) UI localization #507
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @btc1000w on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1230
Summary / 概述
Adds a lightweight, dependency-free i18n layer to the Strata web control panel (
serve/web/), so the UI can render in English or Simplified Chinese (zh-CN).为 Strata 网页控制面板(
serve/web/)加入一套轻量、无依赖的国际化层,界面可显示 英文 或 简体中文(zh-CN)。localStorage["strata.lang"], elsenavigator.languagestarting withzh→ zh-CN, otherwise English.Files / 改动文件
serve/web/i18n.jst,apply,setLang,onChange)serve/web/i18n.en.jsserve/web/i18n.zh-CN.jsserve/web/index.htmldata-i18n*attributes, script tags, language buttonserve/web/app.jst();/confighelp viaabout.cfg.help.<key>serve/web/monitor.htmldata-i18n*attributes + script tagsserve/web/monitor.jst()tokens.css,components.css,app.css,sprite.svgare untouched (SHA-256 identical to upstream).Runtime API
Verification / 验证
document.documentElement.lang === "zh-CN"; header tabs, chat, monitor, about and the runtime-generated Model settings form all render Chinese; English still renders exactly as before.node --checkclean on all five JS files.favicon.ico404.index.htmlpreserved; one id added (lang-btn); no class changes, so no layout regression.Patch
A
git format-patchpatch (againstmain82f46a8c8f475f001ad76d92f58f4a4f8ffb0253, v0.1.40.1) is available — 7 files changed, +1227 / -269.I can attach the patch file here or open a PR if you prefer.
Happy to adjust naming, split the dictionaries, or add more languages if you want.
@btc1000w commented on GitHub (Oct 6, 2026):
i18n-zh-cn-patch.txt
@btc1000w commented on GitHub (Oct 6, 2026):
Attached the
git format-patchpatch: i18n-zh-cn-patch.txt (148,679 B; 7 files changed, +1227 / -269).GitHub rejects the
.patchextension, so it is uploaded as.txt— rename it back to.patchand apply:@DDK00011 commented on GitHub (Oct 10, 2026):
I built on this patch and added 12 more UI dictionaries:
ko,ja,vi,id,zh-TW,es,pt-BR,de,fr,ru,it,tr. Each one has the 373 strings that the web app and the API Monitor page use. Everything is underserve/web/(newi18n.<code>.jsfiles,i18n.js,index.html,monitor.html,app.js,monitor.js). It is applied on top of currentmain(fb58e0d); two strings thatmainadded after the patch (monitor.sub.gpuNa,monitor.sub.gpuNoteWinAmd) are translated too.<select>(in the header on wide screens, in About > Settings on narrow ones). The language still follows the browser language by default, so English browsers see no change.{placeholders}, HTML tags, product names, flags and numbers are unchanged.test_monitor,test_runconfig) pass.I can open a PR on top of this patch, or post the patch here, if you want it. I also saw #1204, #1427 (ru) and #1152 (ar), which add other language switches. I would rather not collide with them, so tell me which direction you prefer.
@Moge800 commented on GitHub (Oct 11, 2026):
Hi @DDK00011, I can help proofread the Japanese translations if needed!
@DDK00011 commented on GitHub (Oct 11, 2026):
Hi @Moge800, thank you so much for offering—yes please, I would love your help!
The Japanese dictionary is in
serve/web/i18n.ja.jsin draft PR https://github.com/Niko1221/Strata/pull/1973 (375 UI strings). The text is an AI first draft followed by AI review passes; no native speaker has read it yet. The easiest way to review is right on that file: leave a comment on a line, or use GitHub's "suggest changes" block. There is no need to fix everything; even a few corrections already help a lot!I am mainly unsure about three things:
If you run the app, you can pick 日本語 in the language menu (in the header, or in About > Settings on narrow screens).
Prepared with the help of Claude Code.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.