Skip to content

feat: add Simplified Chinese (zh) translations for docs product#5203

Open
dsinghvi wants to merge 8 commits intomainfrom
devin/1777393497-zh-cn-docs-translation
Open

feat: add Simplified Chinese (zh) translations for docs product#5203
dsinghvi wants to merge 8 commits intomainfrom
devin/1777393497-zh-cn-docs-translation

Conversation

@dsinghvi
Copy link
Copy Markdown
Member

@dsinghvi dsinghvi commented Apr 28, 2026

Summary

Adds Simplified Chinese (zh) translations for the entire Docs product — all 128 content pages covering getting started, configuration, writing content, components, AI features, preview & publish, customization, localization, accessibility, API references, SEO, authentication, security, self-hosted, integrations, and developer tools.

Changes

  • fern/docs.yml: Added translations config with en (default) and zh
  • fern/translations/zh/: Created 128 translated .mdx files mirroring the docs product page structure

Translation approach

  • All prose content translated to natural, professional Simplified Chinese
  • MDX component syntax, code blocks, URLs, links, and frontmatter keys preserved as-is
  • Technical terms (API, SDK, CLI, REST, GraphQL, etc.) kept in English per standard Chinese tech writing conventions
  • Product names (Fern, Ask Fern, Fern Writer, Fern Editor) kept in English
  • sidebar-title frontmatter added to each translated file for Chinese sidebar navigation
  • Component attribute values (title, description, label) translated where appropriate

Note on locale code

Uses zh (ISO 639-1) instead of zh-CN (BCP 47) because the currently published Fern CLI only supports ISO 639-1 codes. Once CLI 4.103.0+ is published with BCP 47 support, the directory can be renamed to zh-CN if needed.

Review & Testing Checklist for Human

  • Spot-check 3–5 translated pages for translation quality and accuracy
  • Run fern docs dev locally to confirm the language switcher appears and zh pages render correctly
  • Confirm that MDX components render properly in translated pages (code blocks, callouts, cards, etc.)
  • Verify that internal links in translated pages still resolve correctly

Notes

  • Changelog entries and API reference sections (auto-generated from specs) were not translated — only manually-authored content pages
  • Pages that are hidden: true in the navigation were still translated for completeness
  • The translations use the directory structure fern/translations/zh/products/docs/pages/... matching the relative paths from the fern directory, as expected by the Fern CLI's translation loader

Link to Devin session: https://app.devin.ai/sessions/f02ae173d5d142cfa91d2c275713fd0b
Requested by: @dsinghvi

- Add translations config to docs.yml with en (default) and zh-CN
- Create fern/translations/zh-CN/ directory with 128 translated MDX files
- Translate all docs product pages: getting started, configuration,
  writing content, components, AI features, preview & publish,
  customization, localization, accessibility, API references, SEO,
  authentication, security, self-hosted, integrations, developer tools
- Preserve all MDX component syntax, code blocks, links, and frontmatter
- Add sidebar-title frontmatter for Chinese sidebar navigation
- Bump fern CLI version from 4.62.3 to 4.104.0 for BCP 47 locale support

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>
@dsinghvi dsinghvi requested a review from devalog as a code owner April 28, 2026 16:25
The published Fern CLI only supports ISO 639-1 locale codes.
Renamed translations/zh-CN/ to translations/zh/ and reverted
fern.config.json version bump.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat: add zh-CN (Simplified Chinese) translations for docs product feat: add Simplified Chinese (zh) translations for docs product Apr 28, 2026
Version 4.62.3 does not recognize the translations property.
Version 4.104.0 supports both translations and zh locale code.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>
@github-actions
Copy link
Copy Markdown
Contributor

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

The translation LLM broke JSX component structure in these files
(unclosed Accordion, Card, Step, etc. tags), causing the entire
translation registration with FDR to fail. These 9 pages will
fall back to English while the remaining ~119 pages show Chinese.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>
devin-ai-integration Bot and others added 4 commits April 28, 2026 19:46
Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>
- Upgraded Fern CLI from 4.104.0 to 4.107.0
- Added missing Chinese translations for:
  - component-library/snippets/example-code.mdx
  - component-library/snippets/language-url.mdx
  - integrations/mintlify.mdx

All 130 non-changelog docs pages are now translated to Chinese.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Fern CLI translation overlay parser
(parseDocsConfiguration.ts:loadTranslationNavigationOverlays) loads from
translations/<lang>/fern/docs.yml, not translations/<lang>/docs.yml — that
nested fern/ directory is required.

Strip title and navbar-links: the overlay parser
(parseNavigationOverlayFromDocsYml) only extracts tabs, products, versions,
announcement, and navigation. navbar CTAs and the top-level title are not
translatable today.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant