From c54c716325393694539ee570844c517d32c37249 Mon Sep 17 00:00:00 2001 From: llingting0 <55472926+lingting0@users.noreply.github.com> Date: Mon, 12 Oct 2026 13:30:50 +0800 Subject: [PATCH] i18n(zh): complete Simplified Chinese catalogue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fill the 408 entries that were missing from the Simplified Chinese catalogue, bringing coverage of en.json from 72.5% to 100% (1073 -> 1481 entries; 1480/1480 English keys now translated). Files updated, per docs/adding_translations.md ("Commit the edited YAML and all regenerated JSON and TypeScript resources together"): - src/common/messagesYAML/zh.yaml - source catalogue - src/common/messagesJson/zh.json - npm run i18n:yaml2json - src/common/messages/combinedMessages.prod.ts - npm run i18n:bakejson The TypeScript resource matters: the release workflow runs `npm run build`, which is only `node esbuild.config.mjs production` and does NOT re-run `i18n:bake`. Since src/common/translation.ts imports combinedMessages.prod.ts directly, a catalogue change that omits this file would not reach the shipped main.js. Verification - No existing translation was modified: every key already present in zh.json is byte-identical (0 changed, 0 removed). - Placeholders checked string-for-string against the English source. 15 new entries contain ${...} or {HERE}; all match. - combinedMessages.prod.ts regenerated with _tools/bakei18n.ts and formatted with the project's Prettier config. The diff against main is 408 added `zh:` lines plus the expected bookkeeping, and no other language changes. - Terminology follows the existing catalogue (Vault -> 库, Passphrase -> 密码短语, Setup URI -> 设置 URI, chunk -> 块). Technical identifiers (URL, JWT, CouchDB, S3, TURN, IDB, P2P) are intentionally left in English, matching current practice. Two unrelated upstream issues, not addressed here 1. `dialog.yourLanguageAvailable` defines its placeholder as `%{Display language}` while `$msg()` substitutes on `${...}`, so the placeholder is never expanded and the literal text is shown in every language. 2. The committed YAML catalogues appear stale relative to the JSON ones (e.g. `en.yaml` lacks entries that `en.json` already contains, and its wrapping differs from current tool output). This affects every language and probably deserves a separate change. --- src/common/messages/combinedMessages.prod.ts | 410 +++++++++- src/common/messagesJson/zh.json | 410 +++++++++- src/common/messagesYAML/zh.yaml | 749 +++++++++++++++---- 3 files changed, 1406 insertions(+), 163 deletions(-) diff --git a/src/common/messages/combinedMessages.prod.ts b/src/common/messages/combinedMessages.prod.ts index 65fc8dcb..a5b12d87 100644 --- a/src/common/messages/combinedMessages.prod.ts +++ b/src/common/messages/combinedMessages.prod.ts @@ -5,6 +5,7 @@ export const allMessages: Readonly [!INFO]- The connected devices have been detected as follows:\n${devices}": { @@ -211,6 +221,7 @@ export const allMessages: Readonly Storage": { @@ -1247,6 +1321,7 @@ export const allMessages: Readonly Almacenamiento", ko: "데이터베이스 -> 스토리지", ru: "База данных -> Файлы", + zh: "数据库 → 存储", "zh-tw": "資料庫 -> 儲存空間", }, "Database Adapter": { @@ -1285,6 +1360,7 @@ export const allMessages: Readonly ${remote})": { def: "Higher (${local} > ${remote})", es: "Superior (${local} > ${remote})", ko: "더 높음 (${local} > ${remote})", ru: "Больше (${local} > ${remote})", + zh: "较高(${local} > ${remote})", "zh-tw": "較高(${local} > ${remote})", }, "Highlight diff": { @@ -2701,6 +2843,7 @@ export const allMessages: Readonly Base de datos", ko: "스토리지 -> 데이터베이스", ru: "Файлы -> База данных", + zh: "存储 → 数据库", "zh-tw": "儲存空間 -> 資料庫", }, "Strongly Recommended": { @@ -9932,6 +10238,7 @@ export const allMessages: Readonly