Skip to content

i18n(zh-CN): health tooltips and shared status words - #135

Merged
X4Applegate merged 1 commit into
X4Applegate:mainfrom
chongfenglaosiji:i18n/zh-CN-js-status
Oct 10, 2026
Merged

X4Applegate merged 1 commit into
X4Applegate:mainfrom
chongfenglaosiji:i18n/zh-CN-js-status

Conversation

@chongfenglaosiji

Copy link
Copy Markdown
Contributor

i18n(zh-CN): health tooltips and shared status words

What & why

Next batch of the zh-CN catalog: health tooltips and shared status words, as a data-only change.

Data-only: web/i18n/zh-CN.json is the only file touched. No Go, template or
JavaScript edits.

Scope

29 new keys:

Prefix Keys Covers
js.health.* 15 The health-dot tooltips the Dashboard and the per-host health page draw from JavaScript
js.dashboard.* 5 Dashboard script texts: update notice, upstream summary, version fallbacks
status.* 9 Shared status words: Online, Offline, Enabled, Disabled, Active, Managed, External, Read-only, Unknown

Catalog goes from 63 shipped keys to 92 keys (29% of English). The
rest stays English by design, so nothing breaks.

Merge order (please read)

This diff is a snapshot of the whole file, so besides its own 29 keys it
contains the settings.default_language.auto wording fix that #131 also carries
(否则用英文 → 否则显示英文). Every batch PR sets that line to the same value, so they
merge cleanly in any order and none of them can silently revert it.

Checklist

  • go build ./... compiles
  • go test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale' passes
  • Commits are clean and the PR is focused on one concern
  • Data-only, matching docs/TRANSLATING.md
  • CHANGELOG.md / version bump — left to you, as before
  • Licensed under Apache 2.0

Notes for reviewers

  • These are js.-prefixed keys, so they are exposed to the browser scripts, not only to templates.
  • js.health.in_ms is a fragment appended after a status (English: " in {ms}ms"); it is ,用时 {ms}ms — leading full-width comma, no leading space.
  • status.* are short shared words used as badges across many pages, so they are kept terse (已启用 / 已停用 / 已激活 / 受管 / 外部 / 离线 / 在线 / 只读 / 未知).

Verification — run against this exact file, in a Linux container (WSL):

go test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale' -count=1
go build ./...

exit=0 — including TestEveryCatalogMatchesEnglishKeysAndPlaceholders and
TestEveryTranslationKeyUsedExistsInEnglish. Same as #131.

One note if you ever test on Windows: a plain checkout there fails
internal/caddy's TestBuildProxyRouteGolden, because that test compares bytes and
core.autocrlf makes the testdata/*.json golden files CRLF on disk while the
generated JSON is LF. It reproduces on an untouched main, so it is unrelated to this
PR — it is just why the run above is documented as Linux.

The pr5 log of that run is kept locally if you want it pasted here.

Catalog facts

  • 92/92 keys valid; no key English does not have; no duplicate keys
  • Placeholders identical to English on every key
  • No empty values; UTF-8 without BOM; LF; no HTML in any value

…9 keys)

`js.health.*` — The health-dot tooltips the Dashboard and the per-host health page draw from JavaScript
`js.dashboard.*` — Dashboard script texts: update notice, upstream summary, version fallbacks
`status.*` — Shared status words: Online, Offline, Enabled, Disabled, Active, Managed, External, Read-only, Unknown

Data-only: web/i18n/zh-CN.json is the only file touched.

The diff also carries the settings.default_language.auto wording fix from X4Applegate#131
(otherwise this snapshot would revert it). All the batch PRs change that same line
to the same value, so they merge cleanly in any order.
@X4Applegate
X4Applegate merged commit dad5118 into X4Applegate:main Oct 10, 2026
6 checks passed
X4Applegate added a commit that referenced this pull request Oct 10, 2026
@X4Applegate

Copy link
Copy Markdown
Owner

Thank you @chongfenglaosiji! 🎉 All five (#131, #132, #133, #134, #135) are merged and shipped in v2.63.1 (binaries plus applegater/caddyui:v2.63.1 / :stable / :latest).

Splitting them by page made them easy to review. Since they all touch zh-CN.json, they conflicted on neighbouring lines once the first was merged, so I resolved those on my side. No two PRs disagreed on any key. The catalog now has all 313 keys with every placeholder intact, so the Dashboard, Profile and Settings › General pages are fully Chinese with no English left over.

Next batch on my side: the other Settings pages (Notifications, DNS, Security, Analytics, Integrations, AI, Backup). I'll ping you here with the new keys when it lands. No rush, as always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants