mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
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:
1 parent
25afadd303
commit
0c016a1e36
10 files changed
+2699
-488
No files matched your search
@@ -34,6 +34,7 @@ go test ./...
|
||||
go test -race ./...
|
||||
go vet ./...
|
||||
node --check webui/app.js
|
||||
node --check webui/i18n.js
|
||||
go build -trimpath -o opencode2api ./cmd/opencode2api
|
||||
```
|
||||
|
||||
@@ -81,7 +82,7 @@ Messages,以及这三种协议的流式输出。真实模型 ID 的原有调
|
||||
- `POST /api/rotation/current`:`{"group":"sota","model":"glm-5.3"}`;立即
|
||||
修改当前模型并解除该模型的临时暂停。
|
||||
|
||||
验证:`go test -race ./...`、`go vet ./...`、`node --check webui/app.js`。
|
||||
验证:`go test -race ./...`、`go vet ./...`、`node --check webui/app.js`、`node --check webui/i18n.js`。
|
||||
模拟上游测试覆盖 9 次普通错误上限、超过 3 个额度跳过、混合错误预算、
|
||||
Retry-After、单个模型故障不影响 Key、三种入口协议的跨协议转换、成功保持、
|
||||
别名发现与用量归属、畸形响应、输出前错误、首个输出超时、输出后故障、
|
||||
|
||||
Reference in new issue
Block a user