docs(zh): translate all 81 documentation pages into Simplified Chinese

Merged
KA
14d ago
+25380-18

Adds a Simplified Chinese translation of the docs: docs/zh/, one page for each of the 81 English pages at the same path, next to the Japanese translation in docs/ja/.

  • Pages. docs/zh/<path>.mdx translates docs/<path>.mdx. Prose, frontmatter, and component titles are translated; code blocks, inline code, URLs, link targets, and anchors stay as on the English page. The tab and group labels are in docs/zh/navigation.json.
  • Style and glossary. docs/zh/README.md holds the rules, the style (你, full-width punctuation, a space between Chinese and Latin text, where a line may wrap), and the glossary. Error categories, API names, and literals such as test or configuration stay in English.
  • Checks. scripts/check-docs-translations.ts and scripts/check-docs-anchors.ts now cover zh as well as ja, so every Chinese page keeps its English page's outline, ids, and code blocks byte for byte.
  • Kept out. The npm package (packages/e2e/scripts/prepare-build.ts), Context7 (context7.json), and the skill wording test (packages/e2e/tests/unit/skill.test.ts) skip docs/zh/ as they skip docs/ja/.
  • Contributor docs. AGENTS.md and the authoring-docs skill's "Translations" section now cover both languages.

The pages were translated with GPT-6 Astra (the glossary and quickstart first, then the remaining pages in parallel against that glossary), then reviewed in a fresh context. The review fixes kept the error categories in English and aligned three terms (setup test 准备测试, blocked 受阻, schema).

Verified

Ran it locally: yes

  • pnpm check passes, including docs translations: 162 translated pages match their English outline and code, docs anchors: 3561 anchor links across 243 pages resolve and docs mdx: 243 pages compile as standard MDX.
  • Built the docs site in production with this branch's docs/ and opened /docs/zh. Every page renders, including /docs/zh/reference/config and /docs/zh/reference/errors, /docs/zh/quickstart.md serves the Chinese markdown, and the pages carry hreflang="zh-Hans" alternates. The language menu opens the same section in Chinese, Japanese, and English.
Desktop, language menu openMobile, 390px
desktopmobile