mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4417] [GUI] the Monitor, Images and About views follow the chosen language #5039
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#5039
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4417
Author: @zhujiammy
Created: 10/28/2026
Status: 🔄 Open
Base:
main← Head:gui-i18n-views📝 Commits (1)
98d3873web: the Monitor, Images and About views follow the chosen language📊 Changes
11 files changed (+1614 additions, -145 deletions)
View changed files
📝
serve/web/app.js(+121 -65)📝
serve/web/index.html(+42 -43)📝
serve/web/locales/de.json(+166 -5)📝
serve/web/locales/en.json(+147 -1)📝
serve/web/locales/es.json(+166 -5)📝
serve/web/locales/fr.json(+146 -0)📝
serve/web/locales/ja.json(+161 -5)📝
serve/web/locales/ko.json(+161 -5)📝
serve/web/locales/pt.json(+166 -5)📝
serve/web/locales/ru.json(+176 -5)📝
serve/web/locales/zh.json(+162 -6)📄 Description
The problem
The language picker translates the chat, its settings and the drawer. The Monitor, the Images view and the About view stayed English in every language, and
settings.languageNotesaid so:The model settings form was English too:
/configsends the field help in English and the page printed it unchanged.The reason is mechanical. Their text sits in
index.htmlwithout adata-i18nmark and inapp.jswithout atr()call.index.htmlhas 72data-i18nmarks and all of them are in the chat; the Monitor's card titles (Speed,GPU load), the state line (Waiting for a request), the table headers and the whole About view were plain strings, and so wasserve/web/monitor.html.What this changes
Every text of the three views now goes through the mechanism the chat already uses:
data-i18n(anddata-i18n-title/-placeholder/-label) inindex.html, for the text that is in the page;tr()inapp.js, for the text built at render time: the card titles, the state line and its details, the card sub-labels, the request table, the conversation cache, the About facts and the projection sentence;/configis looked up asconfig.<key>, so a field that a newer server adds keeps its English text instead of showing a key.en.jsonis regenerated withpython tools/web_i18n.py --write. The seven other catalogs gain the same keys in the same order; the Chinese one carries translations made while using the page.settings.languageNotenow reads "The chat, the Monitor, the Images view and the About view all follow this choice."No other behaviour changes: same requests, same rendering, same English page when no catalog is loaded.
Validation
Passed:
python -m serve.test_web_i18n—Ran 6 tests in 0.850s,OK (skipped=1)python tools/web_i18n.py— exit 0: every catalog has the keys the code has, with the same placeholdersnode --check serve/web/app.js?lang=zhon all three views: no English left except names that should not be translated (the model name, the GPU and CPU names, the OpenAI/Anthropic URLs, the language names, the run config's own keys and enum values)Failed: none.
Not run:
npm testinapps/host. This change does not touch the app.Limits
zh.json(模型状态,预填充,显存), but a review of the wording is welcome.sampling.top_k,modelandon_requeststay in English on purpose: they are the run config's own key and values, written to the file as they are shown.serve/web/monitor.html, the standalone/api-monitorpage, is still English. It is a separate page with its own script and noi18n.js; this pull request keeps to the app's views.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.