Skip to content

docs: add Simplified Chinese (zh-CN) localization (Proof of Concept)#1053

Open
clanzhang wants to merge 1 commit into
AvdLee:masterfrom
clanzhang:docs/1040-zh-cn-translation
Open

docs: add Simplified Chinese (zh-CN) localization (Proof of Concept)#1053
clanzhang wants to merge 1 commit into
AvdLee:masterfrom
clanzhang:docs/1040-zh-cn-translation

Conversation

@clanzhang

Copy link
Copy Markdown

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: Added locales configuration to enable en (root) and zh-CN routing.
  • 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: Added pnpm-lock.yaml to prevent accidental commits, maintaining consistency with the project's package-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

  • I have tested the changes locally (npm run dev) and verified the /zh/ routes render correctly.
  • The changes only affect the documentation site, not the main RocketSim app or CLI.
  • I have read and followed the project's contribution guidelines.

Thank you for maintaining this project open source! Looking forward to your feedback.

- 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
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.

Add Chinese (Simplified) translation for documentation

1 participant