[PR #4435] [MERGED] Offer Simplified Chinese as a documentation language #6377

Closed
opened 2026-10-23 04:09:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4435
Author: @kolacheee
Created: 8/1/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @kolacheee

Base: staging ← Head: agent/docs-language-zh-hans


📝 Commits (3)

  • fbf9671 Offer Simplified Chinese as a documentation language
  • 0eb52f7 Reference #4435 in the changelog entry
  • 59d9bb9 Merge branch 'staging' into agent/docs-language-zh-hans

📊 Changes

6 files changed (+27 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 CONTRIBUTING.md (+1 -0)
📝 packages/client/src/components/modals/DocsViewerModal.tsx (+22 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+1 -1)
📝 packages/shared/src/constants/docs-languages.ts (+1 -0)
📝 scripts/regressions/docs-language.regression.ts (+1 -0)

📄 Description

Why

Simplified Chinese is the next language on the documentation-translation roadmap (all UI Language locales get a docs pack; 简体中文 follows Korean). Chinese-speaking users — a large share of the Chinese SillyTavern community, where this app genre is well established — currently read all guides in English. This PR makes them available in natural Simplified Chinese through the existing Settings → General → Documentation Language selector and the onboarding tutorial's language suggestion.

Follows up on #4100 (selector + architecture + Spanish), #4157 (German), #4191 (French), #4229 (Brazilian Portuguese), #4235 (Polish), #4281 (Russian), #4345 (Japanese), and #4374 (Korean). The translated pack itself lives on the docs-i18n branch (pushed together with this PR); this Engine PR adds only the language wiring.

What changed

  • packages/shared/src/constants/docs-languages.ts — "zh-hans": { label: "简体中文", englishLabel: "Simplified Chinese" } (byte-matched to the Language dropdown's Intl.DisplayNames output; second region-suffixed code after pt-br — the tutorial matcher's two-stage lowercase logic handles the zh-Hans UI locale at stage 1, verified by execution).
  • packages/client/src/components/modals/DocsViewerModal.tsx — Chinese sidebar category labels (指南, 主页, 安装, 连接, 角色, 聊天, 世界书, 智能体, 媒体, 提示词, 外观, 设置, 数据, 扩展, 集成, 开发; mode names and Noodle stay English).
  • packages/client/src/components/panels/SettingsPanel.tsx — settings-search aliases chinese, simplified, 简体中文, 中文.
  • scripts/regressions/docs-language.regression.ts — asserts Simplified Chinese stays offered.
  • CONTRIBUTING.md — Simplified Chinese translation-convention bullet (see below).
  • CHANGELOG.md — release-notes entry (placed under the in-flight [2.4.0] section alongside the other post-release entries, matching current changelog practice).

No server changes are needed per language: the pack list, download URL, verification, and serving all derive from the shared label map.

Simplified Chinese conventions (documented in CONTRIBUTING)

Because the in-app docs search is literal substring matching, the pack enforces one term, one script, and one typography per concept end to end:

  • 你 address (modern mainland software convention), never 您; Chinese drops subjects, so pronouns stay sparse.
  • Simplified characters only — audited against a full traditional→simplified table (3,200+ forms, sense-splits like 着/著 and 里/裡 handled); a reader typing simplified never misses on a stray traditional form. A runtime probe confirms: searching the traditional 世界書 returns zero results while 世界书 returns 53 guides.
  • The Chinese SillyTavern community's established terms: 世界书 (lorebook — universal in the community), 角色卡, 提示词 (prompt), 智能体 (agent), 立绘 (sprites), 开场白 (greetings), with SillyTavern glossed as 酒馆 exactly once in the import guide.
  • Full-width CJK punctuation in prose, half-width ASCII for all Latin letters and digits (full-width 7860 would never match a search for 7860), with a crisp two-case parenthesis convention (half-width tight after any Latin token including bold labels and inline code; full-width in pure Chinese context) and a uniform CJK↔Latin spacing rule — all normalized pack-wide and codified in the glossary.
  • Curly “” for Chinese-prose quoting (GB/T 15834), while quoted English UI strings stay byte-exact to what the app renders, including each label's own ellipsis character; NFC-normalized throughout; no ideographic space, no NBSP.

Validation performed

  • Translation pipeline: all guides through translate → structural verify (traditional-character detection, NFC, full-width bans, byte-identical code fences, heading/link-target/table parity) → fix → re-verify, then a consistency sweep and two dedicated normalization passes (paren convention with data-driven ruling, strict bold-span parity with the English restored across 36 drifted files, quote-style split resolved into a principled 301/12).
  • Four independent native-reader QA panels read every file end-to-end (~150 fixes: a three-way profile-term split unified, real mistranslation catches, 翻译腔 rewrites), followed by a reconciliation resolving every cross-panel conflict with recorded rulings.
  • An adversarial engine-diff review verified the change surface file-for-file against the sibling PRs, executed the label byte-match and matcher simulations, and validated every changelog claim against the pack.
  • node scripts/docs-i18n/validate-pack.mjs passes for all nine packs at 124/124 against current staging (the companion docs-i18n push also carries a catch-up translating the new chat-resource drag-drop developer plan into every language and the schedules-guide addition, plus quality-verified mirrors of the World Maps rewrite — including full retranslations of the German and Spanish copies, whose earlier mirrors were found to be broken machine translation).
  • Committed git blobs re-hashed against every manifest (9 × 124 files, 0 mismatches).
  • pnpm regression:docs passes (en, de, es, fr, ja, ko, pl, pt-br, ru, zh-hans); pnpm check passes.
  • Runtime-verified on a smoke server with the pack materialized as installed: 简体中文 active at 124/124, Chinese serving for user and developer docs, ranked Chinese searches (提示词 → 74 guides, 连接 → 88, 世界书 → 53), 270 highlight marks in the viewer, all 20 sidebar labels, and the traditional-form search probe returning zero.

Summary by CodeRabbit

  • New Features

    • Added a downloadable Simplified Chinese documentation language pack covering all in-app and developer guides.
    • Added Chinese navigation labels and terminology throughout the documentation viewer.
    • Added Chinese language names and search aliases in Documentation Language settings.
  • Documentation

    • Added guidance for maintaining consistent Simplified Chinese translations, formatting, and product terminology.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4435 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/1/2026 **Status:** ✅ Merged **Merged:** 8/1/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `agent/docs-language-zh-hans` --- ### 📝 Commits (3) - [`fbf9671`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fbf96711bdfc6be75d176b88ab16ec99742e152d) Offer Simplified Chinese as a documentation language - [`0eb52f7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0eb52f72be55fa572f8706a340741c9d1037b1a1) Reference #4435 in the changelog entry - [`59d9bb9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/59d9bb9c8d8b9a08a77c090311ac28117e8ec569) Merge branch 'staging' into agent/docs-language-zh-hans ### 📊 Changes **6 files changed** (+27 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `CONTRIBUTING.md` (+1 -0) 📝 `packages/client/src/components/modals/DocsViewerModal.tsx` (+22 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+1 -1) 📝 `packages/shared/src/constants/docs-languages.ts` (+1 -0) 📝 `scripts/regressions/docs-language.regression.ts` (+1 -0) </details> ### 📄 Description ## Why Simplified Chinese is the next language on the documentation-translation roadmap (all UI `Language` locales get a docs pack; 简体中文 follows Korean). Chinese-speaking users — a large share of the Chinese SillyTavern community, where this app genre is well established — currently read all guides in English. This PR makes them available in natural Simplified Chinese through the existing **Settings → General → Documentation Language** selector and the onboarding tutorial's language suggestion. Follows up on #4100 (selector + architecture + Spanish), #4157 (German), #4191 (French), #4229 (Brazilian Portuguese), #4235 (Polish), #4281 (Russian), #4345 (Japanese), and #4374 (Korean). The translated pack itself lives on the `docs-i18n` branch (pushed together with this PR); this Engine PR adds only the language wiring. ## What changed - `packages/shared/src/constants/docs-languages.ts` — `"zh-hans": { label: "简体中文", englishLabel: "Simplified Chinese" }` (byte-matched to the **Language** dropdown's `Intl.DisplayNames` output; second region-suffixed code after pt-br — the tutorial matcher's two-stage lowercase logic handles the `zh-Hans` UI locale at stage 1, verified by execution). - `packages/client/src/components/modals/DocsViewerModal.tsx` — Chinese sidebar category labels (指南, 主页, 安装, 连接, 角色, 聊天, 世界书, 智能体, 媒体, 提示词, 外观, 设置, 数据, 扩展, 集成, 开发; mode names and Noodle stay English). - `packages/client/src/components/panels/SettingsPanel.tsx` — settings-search aliases `chinese`, `simplified`, `简体中文`, `中文`. - `scripts/regressions/docs-language.regression.ts` — asserts Simplified Chinese stays offered. - `CONTRIBUTING.md` — Simplified Chinese translation-convention bullet (see below). - `CHANGELOG.md` — release-notes entry (placed under the in-flight `[2.4.0]` section alongside the other post-release entries, matching current changelog practice). No server changes are needed per language: the pack list, download URL, verification, and serving all derive from the shared label map. ## Simplified Chinese conventions (documented in CONTRIBUTING) Because the in-app docs search is literal substring matching, the pack enforces one term, one script, and one typography per concept end to end: - **你 address** (modern mainland software convention), never 您; Chinese drops subjects, so pronouns stay sparse. - **Simplified characters only** — audited against a full traditional→simplified table (3,200+ forms, sense-splits like 着/著 and 里/裡 handled); a reader typing simplified never misses on a stray traditional form. A runtime probe confirms: searching the traditional 世界書 returns zero results while 世界书 returns 53 guides. - **The Chinese SillyTavern community's established terms**: 世界书 (lorebook — universal in the community), 角色卡, 提示词 (prompt), 智能体 (agent), 立绘 (sprites), 开场白 (greetings), with SillyTavern glossed as 酒馆 exactly once in the import guide. - **Full-width CJK punctuation in prose, half-width ASCII for all Latin letters and digits** (full-width 7860 would never match a search for `7860`), with a crisp two-case parenthesis convention (half-width tight after any Latin token including bold labels and inline code; full-width in pure Chinese context) and a uniform CJK↔Latin spacing rule — all normalized pack-wide and codified in the glossary. - **Curly “” for Chinese-prose quoting** (GB/T 15834), while quoted English UI strings stay byte-exact to what the app renders, including each label's own ellipsis character; NFC-normalized throughout; no ideographic space, no NBSP. ## Validation performed - Translation pipeline: all guides through translate → structural verify (traditional-character detection, NFC, full-width bans, byte-identical code fences, heading/link-target/table parity) → fix → re-verify, then a consistency sweep and two dedicated normalization passes (paren convention with data-driven ruling, strict bold-span parity with the English restored across 36 drifted files, quote-style split resolved into a principled 301/12). - Four independent native-reader QA panels read every file end-to-end (~150 fixes: a three-way profile-term split unified, real mistranslation catches, 翻译腔 rewrites), followed by a reconciliation resolving every cross-panel conflict with recorded rulings. - An adversarial engine-diff review verified the change surface file-for-file against the sibling PRs, executed the label byte-match and matcher simulations, and validated every changelog claim against the pack. - `node scripts/docs-i18n/validate-pack.mjs` passes for all nine packs at **124/124** against current `staging` (the companion `docs-i18n` push also carries a catch-up translating the new chat-resource drag-drop developer plan into every language and the schedules-guide addition, plus quality-verified mirrors of the World Maps rewrite — including full retranslations of the German and Spanish copies, whose earlier mirrors were found to be broken machine translation). - Committed git blobs re-hashed against every manifest (9 × 124 files, 0 mismatches). - `pnpm regression:docs` passes (`en, de, es, fr, ja, ko, pl, pt-br, ru, zh-hans`); `pnpm check` passes. - Runtime-verified on a smoke server with the pack materialized as installed: 简体中文 active at 124/124, Chinese serving for user and developer docs, ranked Chinese searches (提示词 → 74 guides, 连接 → 88, 世界书 → 53), 270 highlight marks in the viewer, all 20 sidebar labels, and the traditional-form search probe returning zero. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a downloadable Simplified Chinese documentation language pack covering all in-app and developer guides. * Added Chinese navigation labels and terminology throughout the documentation viewer. * Added Chinese language names and search aliases in Documentation Language settings. * **Documentation** * Added guidance for maintaining consistent Simplified Chinese translations, formatting, and product terminology. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:09:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6377
No description provided.