[PR #4417] [GUI] the Monitor, Images and About views follow the chosen language #5039

Open
opened 2026-11-07 16:32:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 98d3873 web: 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.languageNote said so:

Chat, its settings and the buttons above are translated. The Monitor, Images and About views are still in English.

The model settings form was English too: /config sends the field help in English and the page printed it unchanged.

The reason is mechanical. Their text sits in index.html without a data-i18n mark and in app.js without a tr() call. index.html has 72 data-i18n marks 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 was serve/web/monitor.html.

What this changes

Every text of the three views now goes through the mechanism the chat already uses:

  • data-i18n (and data-i18n-title / -placeholder / -label) in index.html, for the text that is in the page;
  • tr() in app.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;
  • the model-settings help from /config is looked up as config.<key>, so a field that a newer server adds keeps its English text instead of showing a key.

en.json is regenerated with python 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.languageNote now 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 placeholders
  • node --check serve/web/app.js
  • Chrome, ?lang=zh on 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 test in apps/host. This change does not touch the app.
  • The other seven catalogs: their new keys are filled with the English text, so those languages read exactly as before in these views. A translator should replace them.

Limits

  • I am not a native Chinese speaker of the maintainers' wording: the Chinese text follows the rest of zh.json (模型状态, 预填充, 显存), but a review of the wording is welcome.
  • sampling.top_k, model and on_request stay 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-monitor page, is still English. It is a separate page with its own script and no i18n.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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4417 **Author:** [@zhujiammy](https://github.com/zhujiammy) **Created:** 10/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `gui-i18n-views` --- ### 📝 Commits (1) - [`98d3873`](https://github.com/Niko1221/Strata/commit/98d38738b3cae90f02451a2e54e259ae0fca9dbd) web: the Monitor, Images and About views follow the chosen language ### 📊 Changes **11 files changed** (+1614 additions, -145 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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.languageNote` said so: > Chat, its settings and the buttons above are translated. The Monitor, Images and About views are still in English. The model settings form was English too: `/config` sends the field help in English and the page printed it unchanged. The reason is mechanical. Their text sits in `index.html` without a `data-i18n` mark and in `app.js` without a `tr()` call. `index.html` has 72 `data-i18n` marks 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 was `serve/web/monitor.html`. ## What this changes Every text of the three views now goes through the mechanism the chat already uses: - `data-i18n` (and `data-i18n-title` / `-placeholder` / `-label`) in `index.html`, for the text that is in the page; - `tr()` in `app.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; - the model-settings help from `/config` is looked up as `config.<key>`, so a field that a newer server adds keeps its English text instead of showing a key. `en.json` is regenerated with `python 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.languageNote` now 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 placeholders - `node --check serve/web/app.js` - Chrome, `?lang=zh` on 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 test` in `apps/host`. This change does not touch the app. - The other seven catalogs: their new keys are filled with the English text, so those languages read exactly as before in these views. A translator should replace them. ## Limits - I am not a native Chinese speaker of the maintainers' wording: the Chinese text follows the rest of `zh.json` (`模型状态`, `预填充`, `显存`), but a review of the wording is welcome. - `sampling.top_k`, `model` and `on_request` stay 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-monitor` page, is still English. It is a separate page with its own script and no `i18n.js`; this pull request keeps to the app's views. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5039
No description provided.