Repository navigation
docs: add Simplified Chinese translation - #32
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cn) localization of the docs — all 80 pages across every tab (Overview, Desktop App, Extensions, AI Tools, SDK, CLI, API Reference).docs.jsonontonavigation.languagesso Mintlify serves a language switcher. English stays the default language at the repo root — no existing URLs change. The translation mirrors the tree undermintlify-docs/cn/.openapi.jsonandsnippets/stay shared, not duplicated, so the API spec and version numbers keep a single source of truth.docs.jsonUI copy.{#custom-id}syntax, instead of guessing a Chinese slug — links keep resolving even if a heading is later reworded.TRANSLATION-GUIDE.md(rules + a ~60-term glossary) and two maintenance scripts:scripts/check-cn-parity.py— coverage, structural parity, links, anchorsscripts/pin-cn-anchors.py— pins anchor ids, idempotentTest plan
python scripts/check-cn-parity.py— 80/80 pages present, 0 structural-parity issues, 0 bad links, 0 unresolved anchors, 0 frontmatter issuesdocs.jsonvalidated against Mintlify's published JSON schemamintlify 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 errorsNotes 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 theregtestenvironment was droppedapi-reference/swap-apis.mdx— exampleasset_id/amount values are inconsistent between the request and response shownHappy to open a follow-up branch for these if wanted.
🤖 Generated with Claude Code