From d7ddcc44d88d431985b19ba901c7d29669056140 Mon Sep 17 00:00:00 2001 From: argszero Date: Sun, 13 Sep 2026 13:56:10 +0800 Subject: [PATCH] fix(ui): drop two false/stale static i18n fallbacks in index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ui/index.html` carries every `data-i18n` string twice: once as the element's static text (the fallback) and once in the pack (`ui/js/i18n.js`). `applyStatic()` overwrites the element with the pack value on DOMContentLoaded, so the fallback is normally invisible — but it is still a second source of truth, and two of its entries state things that are no longer true: - `ops.hours.sub`: 「按小时用量记录 · 本地时区」. The backend buckets `today_hours` by UTC (`src/routes/ops.rs:5`, `:115`) and the pack says 「服务端 UTC 时区」. Introduced already-contradictory in 09e4121 (#157). - `settings.ep.note`: 「部署后替换为你的网关域名(原型占位说明)」 — a verbatim copy of the prototype (docs/prototype/aitokenpool-console.html:705) including the 「原型占位说明」 marker. The endpoint card became config-driven in e74f7fc (#96) and the pack was updated then; only the static fallback was left behind. Both static strings are now identical to their pack entry. Data-only (HTML text), zero behaviour change: the rendered UI already showed the pack value, so no user-visible output changes. No i18n key added or removed (786 keys before and after), no JS/CSS touched, so no cache-bust. The remaining fallback divergences are deliberate older wording (which is the fallback's purpose) and are left alone; only false/stale text is a defect. --- ui/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/index.html b/ui/index.html index 268ebf0..67c332b 100644 --- a/ui/index.html +++ b/ui/index.html @@ -497,7 +497,7 @@

接入方式

POST /anthropic/v1/messages · Claude Code / Goose / OpenClaw -

部署后替换为你的网关域名(原型占位说明)

+

端点来自服务端配置 public_url;生产部署请在 config 中设为你的网关域名

① 在下方生成 API Key② 工具 Base URL 填上面对应端点③ API Key 填刚生成的 key
@@ -762,7 +762,7 @@

运营视图

今日调用量(按小时)

-

按小时用量记录 · 本地时区

+

按小时用量记录 · 服务端 UTC 时区