docs: add Simplified Chinese (zh-CN) localization (Proof of Concept)#1053
Open
clanzhang wants to merge 1 commit into
Open
docs: add Simplified Chinese (zh-CN) localization (Proof of Concept)#1053clanzhang wants to merge 1 commit into
clanzhang wants to merge 1 commit into
Conversation
- Add locales configuration in astro.config.ts for en and zh-CN - Add Chinese UI labels in src/content/i18n/zh-CN.json - Add translated Getting Started page as a proof of concept - Ignore pnpm-lock.yaml to maintain npm consistency Resolves AvdLee#1040
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
This PR introduces the initial setup for Simplified Chinese (zh-CN) documentation translation, as discussed in #1040.
As a proof of concept, this PR includes the core i18n configuration and a translated sample page. Code examples and CLI commands remain in English, while prose, titles, and UI labels are translated.
Related Issue
Changes Made
docs/astro.config.ts: Addedlocalesconfiguration to enableen(root) andzh-CNrouting.docs/src/content/i18n/zh-CN.json: Added Simplified Chinese translations for Starlight UI components (search, theme toggle, navigation, etc.).docs/src/content/docs/zh-CN/getting-started/index.mdx: Added a translated "Getting Started" index page as a proof of concept..gitignore: Addedpnpm-lock.yamlto prevent accidental commits, maintaining consistency with the project'spackage-lock.json.Next Steps
If this approach and structure are approved, I will proceed to translate the remaining high-priority pages (e.g., CLI, App Actions, Networking) in follow-up commits or a subsequent PR.
Checklist
npm run dev) and verified the/zh/routes render correctly.Thank you for maintaining this project open source! Looking forward to your feedback.