Skip to content

docs: add Simplified Chinese translation - #32

Merged
bitwalt merged 1 commit into
mainfrom
feature/chinese-translation
Aug 13, 2026
Merged

bitwalt merged 1 commit into
mainfrom
feature/chinese-translation

Conversation

@jelleml

@jelleml jelleml commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a full Simplified Chinese (cn) localization of the docs — all 80 pages across every tab (Overview, Desktop App, Extensions, AI Tools, SDK, CLI, API Reference).
  • Restructures docs.json onto navigation.languages so Mintlify serves a language switcher. English stays the default language at the repo root — no existing URLs change. The translation mirrors the tree under mintlify-docs/cn/.
  • openapi.json and snippets/ stay shared, not duplicated, so the API spec and version numbers keep a single source of truth.
  • Tab/group labels, sidebar anchors, and the navbar are localized per language, since Mintlify doesn't auto-translate docs.json UI copy.
  • Cross-page anchor links are handled by pinning the English heading slug onto the translated heading via Mintlify's {#custom-id} syntax, instead of guessing a Chinese slug — links keep resolving even if a heading is later reworded.
  • Adds TRANSLATION-GUIDE.md (rules + a ~60-term glossary) and two maintenance scripts:
    • scripts/check-cn-parity.py — coverage, structural parity, links, anchors
    • scripts/pin-cn-anchors.py — pins anchor ids, idempotent

Test plan

  • python scripts/check-cn-parity.py — 80/80 pages present, 0 structural-parity issues, 0 bad links, 0 unresolved anchors, 0 frontmatter issues
  • docs.json validated against Mintlify's published JSON schema
  • Verified live with mintlify dev: language switcher shows both English and 简体中文 and toggles correctly on the same page; sidebar/navbar/anchor labels render in Chinese; a pinned anchor (mcp-servers#installation-and-configuration) resolves and scrolls to the right heading; spot-checked table/code-heavy pages (cli/command-reference, api-reference/market-apis) render without errors
  • Reviewer: check the Mintlify preview deploy for this PR, in particular the language switcher and a couple of dense tables

Notes for reviewers

While translating, a few pre-existing issues were found in the English sources (out of scope for this PR, left untouched):

  • desktop-app/trading/asset-swaps.mdx — missing blank line before the **Nostr P2P** bullet pulls it out of the "Trading Modes" list (rendering bug)
  • sdk/faq.mdx / sdk/additional-resources.mdx — leftover "both environments" / list phrasing from before the regtest environment was dropped
  • api-reference/swap-apis.mdx — example asset_id/amount values are inconsistent between the request and response shown

Happy to open a follow-up branch for these if wanted.

🤖 Generated with Claude Code

Adds a full zh-Hans localization of the docs, covering all 80 pages across
every tab, and restructures docs.json onto navigation.languages so Mintlify
serves a language switcher.

English pages stay at the repo root and keep their current URLs; the
translation mirrors the tree under mintlify-docs/cn/. openapi.json and
snippets/ are shared, not duplicated, so version numbers and the API spec
keep a single source of truth.

Tab and group labels, sidebar anchors, and the navbar are localized per
language, since Mintlify does not translate docs.json UI copy.

Anchor links are handled by pinning the English slug onto the translated
heading with Mintlify's {#custom-id} syntax, rather than rewriting fragments
to a slug derived from Chinese text. Links keep working if a heading is later
reworded, and correctness does not depend on how CJK text gets slugified.

Adds TRANSLATION-GUIDE.md (rules plus a ~60 term glossary) and two scripts
that keep the tree honest as the English docs change:

  scripts/check-cn-parity.py   coverage, structural parity, links, anchors
  scripts/pin-cn-anchors.py    pins anchor ids, idempotent

check-cn-parity.py currently reports no findings: 80/80 pages present, no
structural drift from the English sources, no broken or unprefixed links, no
unresolved anchors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bitwalt
bitwalt merged commit 1ff5e97 into main Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants