[PR #2294] [CLOSED] web: an optional interface language (zh-CN first), English unchanged #3967

Closed
opened 2026-11-07 15:32:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2294
Author: @wulezhi-hui
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: webui-zh-CN


📝 Commits (1)

  • 62c7c07 web: an optional interface language (zh-CN first), English unchanged

📊 Changes

6 files changed (+537 additions, -12 deletions)

View changed files

📝 serve/web/app.js (+9 -9)
➕ serve/web/i18n.js (+523 -0)
📝 serve/web/index.html (+1 -0)
📝 serve/web/monitor.html (+1 -0)
📝 serve/web/monitor.js (+2 -2)
📝 serve/web/tokens.css (+1 -1)

📄 Description

A small layer (serve/web/i18n.js) walks the DOM and replaces the interface's English text with the chosen language. Chat messages, reasoning, tool output, code blocks and form fields are never touched, and a MutationObserver handles text the app adds later (toasts, status pills, monitor rows).

  • English strings are the keys, so nothing changes for English users.
  • The choice is remembered (localStorage "strata.lang"); without it the browser's own language decides.
  • A header button switches back and forth; switching to English restores the original text (no reload), so it cannot get stuck.
  • tokens.css adds CJK fallbacks to the font stack.
  • app.js/monitor.js: five interface strings that land in skipped areas go through tr().

Title

Issue: Resolves #

Summary

What changed

Extra Notes


🔄 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/2294 **Author:** [@wulezhi-hui](https://github.com/wulezhi-hui) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `webui-zh-CN` --- ### 📝 Commits (1) - [`62c7c07`](https://github.com/Niko1221/Strata/commit/62c7c0768638ab080e857b37b14a8f8dde9304e1) web: an optional interface language (zh-CN first), English unchanged ### 📊 Changes **6 files changed** (+537 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.js` (+9 -9) ➕ `serve/web/i18n.js` (+523 -0) 📝 `serve/web/index.html` (+1 -0) 📝 `serve/web/monitor.html` (+1 -0) 📝 `serve/web/monitor.js` (+2 -2) 📝 `serve/web/tokens.css` (+1 -1) </details> ### 📄 Description A small layer (serve/web/i18n.js) walks the DOM and replaces the interface's English text with the chosen language. Chat messages, reasoning, tool output, code blocks and form fields are never touched, and a MutationObserver handles text the app adds later (toasts, status pills, monitor rows). - English strings are the keys, so nothing changes for English users. - The choice is remembered (localStorage "strata.lang"); without it the browser's own language decides. - A header button switches back and forth; switching to English restores the original text (no reload), so it cannot get stuck. - tokens.css adds CJK fallbacks to the font stack. - app.js/monitor.js: five interface strings that land in skipped areas go through tr(). ## Title <!-- If Applicable, reference the GitHub issue --> Issue: Resolves # ## Summary <!-- Quick Summary of changes --> ## What changed <!-- Specifics on files changed, and what changes were made there --> ## Extra Notes <!-- Any extra notes, delete if there are none --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:05 +07:00
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#3967
No description provided.