Repository navigation
i18n(zh-CN): Settings › General - #131
Merged
X4Applegate merged 1 commit intoOct 10, 2026
Merged
Conversation
Adds the Settings › General page to the Simplified Chinese catalog: the General options (activity retention, auto-sync, site title, favicon, color theme, global maintenance, fallback page, globally stripped response headers), the Timezone block, and the Default language block. 44 new keys, all of them the ones v2.63.0 added under these prefixes. Data-only: web/i18n/zh-CN.json is the only file touched. Also fixes the wording of settings.default_language.auto, as agreed on X4Applegate#130: 否则用英文 → 否则显示英文. 「否则用英文」followed the English word order too closely; Chinese UI text for a fallback reads 否则显示… / 否则为….
chongfenglaosiji
marked this pull request as ready for review
October 10, 2026 08:29
chongfenglaosiji
added a commit
to chongfenglaosiji/caddyui
that referenced
this pull request
Oct 10, 2026
`settings.section.*` — The Settings navigation itself — every section name and description `settings.expectations.*` — Post-apply checks: heading, rollback toggle and its help text `settings.theme.*` — The colour-theme option names `settings.*` (shared) — Settings heading, *Save … settings* button, saved/applied messages, nav aria label 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.
chongfenglaosiji
added a commit
to chongfenglaosiji/caddyui
that referenced
this pull request
Oct 10, 2026
`dashboard.*` — The whole Dashboard page 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.
chongfenglaosiji
added a commit
to chongfenglaosiji/caddyui
that referenced
this pull request
Oct 10, 2026
`profile.msg.*` — The server-built confirmations and errors, now looked up in the reader's language `profile.account.*` — Account info block `profile.totp.*` — Two-factor section `profile.password.*` — Change-password form `profile.*` (shared) — Page heading and intro 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.
chongfenglaosiji
added a commit
to chongfenglaosiji/caddyui
that referenced
this pull request
Oct 10, 2026
…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.
This was referenced Oct 10, 2026
Merged
Merged
X4Applegate
added a commit
that referenced
this pull request
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
i18n(zh-CN): Settings › General
What & why
Continues the
zh-CNcatalog with the batch you flagged in #130: theSettings › General page, as a data-only change.
Data-only:
web/i18n/zh-CN.jsonis the only file touched. No Go, template orJavaScript edits.
Scope
44 new keys — exactly what v2.63.0 added under these prefixes:
settings.general.*settings.timezone.*settings.default_language.*Catalog goes from 63 to 107 keys (34% of English). The 206 still missing stay
English by design, so nothing breaks.
Also in this commit
settings.default_language.auto: 跟随各访问者的浏览器(否则用英文)→(否则显示英文). This is the wording change agreed in #130 — 「否则用英文」
tracked the English word order a little too closely; Chinese UI text for a fallback
reads 否则显示… / 否则为…. It is the only existing key whose value changes, and the
English text of that key is untouched.
Checklist
go build ./...compilesgo test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale'passesdocs/TRANSLATING.mdCHANGELOG.md/ version bump — left to you, as beforeNotes for reviewers
Verification — run against this exact file, in a Linux container (WSL):
exit=0— includingTestEveryCatalogMatchesEnglishKeysAndPlaceholdersandTestEveryTranslationKeyUsedExistsInEnglish. The CI run on this PR ("Go build andtest", ubuntu-latest) is green too.
One note if you ever test on Windows: a plain checkout there fails
internal/caddy'sTestBuildProxyRouteGolden, because that test compares bytes andcore.autocrlfmakes thetestdata/*.jsongolden files CRLF on disk while thegenerated JSON is LF. Nothing to do with this PR — it reproduces on an untouched
main— but it's why the local run above is documented as Linux.Catalog facts
{section}keeps its position:保存{section}设置, with the section label substituted from the Go-defined navigation)
Fragment keys, assembled — the ones the template splits around
<code>/<em>:strip_headers_help+_afterstrip_response_headers字段拼接—两者都会生效。timezone.help+_afterTZ环境变量。timezone.any_ianatimezone.currentAsia/Shanghai。expectations.help+_afterthemes_note+_afterusers.color_theme) ,并应用于你登录的每台设备。strip_candidates_framing+_insteadX-Frame-Options(当你想通过 Content-Security-Policy 控制页面嵌入frame-ancestors时改用),X-Powered-By、Server。maintenance_active_1/2/3One thing worth knowing for future splits (not a bug, and nothing to change here): on
the
strip_candidatesandexpectationslines the brackets sit at the ends of twodifferent fragments —
(at the end of fragment A,)at the start of fragment B. Itworks as long as each language keeps a bracket at its own end, but it does mean the
translator has to work out which bracket belongs to which clause from the fragment alone.
Worth keeping whole brackets inside a single fragment when the next line is split.
Next batches: Dashboard (96 keys) and Profile (32), plus the
js.*/status.*keys, as separate data-only PRs.