Repository navigation
i18n: add Simplified Chinese (zh-CN) catalog - #130
Conversation
Adds web/i18n/zh-CN.json covering every key currently in en.json (63 keys): the navigation and its sections, the top bar and Create menu, the user menu, the command-palette search, the list-page titles and the language settings themselves. Data-only change; no Go, template or JavaScript edits. Checked with: go test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale'
|
Merged and released in v2.62.1 — thank you @chongfenglaosiji! 🎉 I reviewed all 63 strings (natural, accurate wording; plain text only), ran the catalog checks and the full test suite against your branch, and looked at it rendered: the navigation, section titles, search, Create menu and page headings all show in Chinese, and the rest falls back to English as designed. Anyone can now pick 简体中文 under Profile → Language, and browsers that ask for Chinese get it automatically. You're listed as the zh-CN maintainer in docs/TRANSLATING.md. Next I'll keep moving more of the interface onto keys, a batch per release; I'll mention you here when new keys land so |
|
Thank you — that was a genuinely fast turnaround, from the first issue to a merged catalog in a few hours, and the plumbing design ( I've already built the merge commit against a real Caddy and confirmed the sidebar and top bar come out in Chinese with nothing regressed in English. I'm on board as the |
|
Small follow-up, @chongfenglaosiji: in v2.62.2 the Default language setting now takes effect before the browser language (it used to be overridden by any English browser), so I updated the English and Chinese text of |
|
@chongfenglaosiji — the next batch is out in v2.63.0: about 250 new keys in
A few notes:
The full list of new keys is the difference between jq -r 'keys[]' web/i18n/en.json > /tmp/en; jq -r 'keys[]' web/i18n/zh-CN.json > /tmp/zh; comm -23 /tmp/en /tmp/zhNo rush, and thank you again! The next batches are the other Settings pages, then the list pages and forms. |
|
Thanks — your Chinese reads naturally and I'm happy to keep it as-is. I went through it phrase by phrase against the new English and it's accurate:
I compared it against how established projects word the same control — Gitea's Simplified Chinese uses 「如果您希望自动检测语言,请留空」 for the equivalent "default language" helper, and 「若要使用其他用户,请…」 for the conditional. Yours sits comfortably in that style, so no correction needed. One small suggestion while I'm here —
「否则用英文」follows the English word order a little closely; Chinese UI text for a fallback normally reads 「否则显示英文」/「否则为英文」. Minor, and only worth it if you're changing nearby strings anyway — I'll fold it into my next On the next batch: I see v2.63.0 added ~250 keys. I'll work through them in a few data-only PRs (Settings › General first, then Dashboard, then Profile), and I'll ping you here as each one lands. |
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 否则显示… / 否则为….
What & why
Adds the Simplified Chinese (
zh-CN) catalog:web/i18n/zh-CN.json, covering every key currently inen.json(63 keys) — the navigation and its section titles, the top bar and its Create menu, the user menu, the command-palette search, the list-page titles for proxy hosts / redirections / advanced routes / certificates, and the language settings themselves.Data-only change: one new file. No Go, template or JavaScript edits, as requested in #128.
Related issue
Closes #128.
Type of change
Checklist
go build ./...compiles andgo test ./...passesCHANGELOG.mdwith a version bumpweb/templates/docs.html, and/or the wiki)Notes for reviewers
Verification
Passes, including
TestEveryCatalogMatchesEnglishKeysAndPlaceholders,TestEveryTranslationKeyUsedExistsInEnglishandTestASecondLanguageActuallyRenders. The fullgo build ./... && go test ./...also passes.Rendered it, not just tested it. Built the image and ran it against a real Caddy; with the language set to 简体中文 the sidebar and top bar come out in Chinese (总览 / 流量 / 观测 / 配置 / 开发者, 代理主机 / 重定向 / 高级路由 / 四层代理 / 中间件配置集, 搜索资源和操作 / 创建 …), while everything not yet on keys correctly stays English. English output is unchanged.
Catalog facts
{placeholder}differences (English has none in this batch)On
CHANGELOG.md: left unticked deliberately. The v2.62.0 entry already records this — "the first translation (Simplified Chinese) is coming from the community" — and the version bump is your release decision, so updating the changelog from a translation PR seemed presumptuous. Happy to add an entry if you would rather I did.Maintaining it: happy to own
zh-CN— ping me when new keys land inen.jsonand I will keep the catalog current.Thanks for turning the plumbing around so quickly, and for
docs/TRANSLATING.md— the_meta.nameand English-fallback behaviour made this a pure data change.