feat: add Simplified Chinese (zh) translations for docs product#5203
Open
feat: add Simplified Chinese (zh) translations for docs product#5203
Conversation
- 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>
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>
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>
Contributor
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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>
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>
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
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: Addedtranslationsconfig withen(default) andzhfern/translations/zh/: Created 128 translated.mdxfiles mirroring the docs product page structureTranslation approach
sidebar-titlefrontmatter added to each translated file for Chinese sidebar navigationtitle,description,label) translated where appropriateNote on locale code
Uses
zh(ISO 639-1) instead ofzh-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 tozh-CNif needed.Review & Testing Checklist for Human
fern docs devlocally to confirm the language switcher appears and zh pages render correctlyNotes
hidden: truein the navigation were still translated for completenessfern/translations/zh/products/docs/pages/...matching the relative paths from the fern directory, as expected by the Fern CLI's translation loaderLink to Devin session: https://app.devin.ai/sessions/f02ae173d5d142cfa91d2c275713fd0b
Requested by: @dsinghvi