docs: add Simplified Chinese (zh-cn) documentation translation#74
docs: add Simplified Chinese (zh-cn) documentation translation#74lrliang wants to merge 2 commits intobmad-code-org:mainfrom
Conversation
Add complete zh-cn translations for all 19 documentation pages following the Diataxis structure, configure Starlight i18n support, and add a Chinese README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds Simplified Chinese localization: new Chinese README and extensive docs under Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Author as Content Author
participant Repo as Git Repository
participant BuildTool as tools/build-docs.mjs
participant Site as Astro/Starlight Website
participant Browser as User Browser
Author->>Repo: Add docs/zh-cn/* and i18n files
Repo->>BuildTool: push triggers docs build
BuildTool->>Repo: shouldExcludeFromLlm(path includes zh-cn) => true
BuildTool-->>Site: release site with i18n config
Site->>Site: load website/src/lib/locales.mjs and i18n collection
Browser->>Site: request /zh-cn/ pages
Site-->>Browser: serve localized pages and UI strings from zh-CN.json
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (1)
docs/zh-cn/explanation/module-configuration.md (1)
162-186: Consider restructuring procedural content to align with explanation format.This section provides step-by-step procedures for using Module Builder, which is more appropriate for a tutorial or how-to guide. Explanation documents should focus on clarifying concepts and describing how the system works rather than providing procedural instructions.
Consider rewriting to explain the conceptual differences between multi-skill and single-skill module creation approaches without numbered steps, or move the procedural content to a dedicated tutorial or how-to document.
As per coding guidelines, Markdown documentation must follow the Diataxis structure (tutorials, how-to, explanation, reference).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/zh-cn/explanation/module-configuration.md` around lines 162 - 186, This section mixes procedural steps with conceptual explanation; remove the numbered how-to steps and rewrite the Module Builder block to describe concepts and differences (e.g., what Module Builder/bmad-module-builder does, the roles of Ideate Module (IM), Create Module (CM) and Validate Module (VM), and how it detects single-skill vs multi-skill inputs) and relocate the detailed sequences for multi-skill and single-skill flows into a tutorial/how-to file; if you prefer, keep a short conceptual summary mentioning Agent Builder (BA) and Workflow Builder (BW) and note artifacts produced (e.g., module.yaml, module-help.csv, assets/module-setup.md, marketplace.json) but remove the step-by-step numbered procedures from this explanation doc.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.gitignore:
- Around line 45-46: The current .gitignore unignore rule only covers the
docs/zh-cn/ directory entry but not its nested contents because the broad z*/
pattern still ignores files under it; update .gitignore to also unignore all
nested files and subdirectories by adding a recursive unignore for docs/zh-cn
(e.g., add a rule referencing the existing !docs/zh-cn/ like !docs/zh-cn/**) so
that files inside docs/zh-cn/ are tracked properly.
In `@docs/zh-cn/404.md`:
- Line 8: Update the link in the Chinese 404 page so it points to the localized
homepage: replace the Markdown link target "[返回首页](../index.md)" in
docs/zh-cn/404.md with the path to the Chinese index (e.g., "../zh-cn/index.md"
or "./index.md" depending on repo structure) so users are routed to
docs/zh-cn/index.md rather than docs/index.md.
In `@docs/zh-cn/explanation/module-configuration.md`:
- Line 187: Update the incorrect relative link target "../what-are-modules.md"
in the string to point to the local file in the same directory by replacing it
with "./what-are-modules.md" (or "what-are-modules.md"); leave the existing
"../../reference/builder-commands.md" link unchanged. This change applies to the
text that currently reads "参见 **[什么是模块](../what-are-modules.md)** …".
In `@docs/zh-cn/explanation/progressive-disclosure.md`:
- Around line 109-110: Update the placeholder naming to match project convention
by replacing occurrences of '{project_root}' with '{project-root}' in the
examples (specifically the strings '{project_root}/docs/brief.md' and
'{project_root}/data/sources.json'); ensure any other instances in the same
document (progressive-disclosure.md) use '{project-root}' for consistency.
In `@docs/zh-cn/explanation/skill-authoring-best-practices.md`:
- Line 100: Replace the awkward phrase "最佳第三视角" with the clearer wording
"最佳的第三种视角" in the table cell that currently reads "| **情境化** | LLM
为该领域选择最佳第三视角(健康科技的监管风险、开发工具的 DX 评论家) |" so the sentence becomes "| **情境化** | LLM
为该领域选择最佳的第三种视角(健康科技的监管风险、开发工具的 DX 评论家) |". Ensure punctuation and spacing remain
consistent with the surrounding markdown.
In `@docs/zh-cn/explanation/what-are-skills.md`:
- Line 25: The two relative links in the sentence currently point to sibling
files using parent-directory paths (`../what-are-bmad-agents.md` and
`../what-are-workflows.md`) but the targets live in the same explanation
directory; update those link targets to use same-directory paths (e.g.,
`./what-are-bmad-agents.md` and `./what-are-workflows.md` or simply
`what-are-bmad-agents.md` and `what-are-workflows.md`) in
docs/zh-cn/explanation/what-are-skills.md so they resolve correctly.
In `@docs/zh-cn/explanation/what-are-workflows.md`:
- Line 69: The relative link target '../../reference/builder-commands.md' in the
"构建器命令参考" link is incorrect for the Chinese docs; update the Markdown link
target to '../reference/builder-commands.md' so it points to the Chinese
reference document while keeping the link text "构建器命令参考" unchanged.
In `@docs/zh-cn/how-to/distribute-your-module.md`:
- Line 21: Update the relative link `../../tutorials/build-your-first-module.md`
in the sentence "一个已完成并验证的 BMad 模块(参见
**[构建你的第一个模块](../../tutorials/build-your-first-module.md)**)" so it points to
the Chinese tutorial path `../tutorials/build-your-first-module.md` (i.e.,
`docs/zh-cn/tutorials/build-your-first-module.md`), ensuring the link targets
the localized `build-your-first-module.md` in the zh-cn docs.
In `@docs/zh-cn/index.md`:
- Line 92: The in-page link for "设计模式" uses the English fragment
`#design-patterns` which likely won't match the localized Chinese heading slug;
update the link in docs/zh-cn/index.md so the table entry either points to the
explanation index page (`./explanation/` or `./explanation/index.md`) or uses
the exact Chinese-generated anchor for the “设计模式” heading (replace
`./explanation/#design-patterns` with the correct localized fragment or the
index path), ensuring the visible text remains "设计模式".
---
Nitpick comments:
In `@docs/zh-cn/explanation/module-configuration.md`:
- Around line 162-186: This section mixes procedural steps with conceptual
explanation; remove the numbered how-to steps and rewrite the Module Builder
block to describe concepts and differences (e.g., what Module
Builder/bmad-module-builder does, the roles of Ideate Module (IM), Create Module
(CM) and Validate Module (VM), and how it detects single-skill vs multi-skill
inputs) and relocate the detailed sequences for multi-skill and single-skill
flows into a tutorial/how-to file; if you prefer, keep a short conceptual
summary mentioning Agent Builder (BA) and Workflow Builder (BW) and note
artifacts produced (e.g., module.yaml, module-help.csv, assets/module-setup.md,
marketplace.json) but remove the step-by-step numbered procedures from this
explanation doc.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 55dfb3d5-a2c0-4578-9b29-27c2d78eac1c
📒 Files selected for processing (26)
.gitignoreREADME_CN.mddocs/zh-cn/404.mddocs/zh-cn/explanation/agent-memory-and-personalization.mddocs/zh-cn/explanation/index.mddocs/zh-cn/explanation/module-configuration.mddocs/zh-cn/explanation/progressive-disclosure.mddocs/zh-cn/explanation/scripts-in-skills.mddocs/zh-cn/explanation/skill-authoring-best-practices.mddocs/zh-cn/explanation/subagent-patterns.mddocs/zh-cn/explanation/what-are-bmad-agents.mddocs/zh-cn/explanation/what-are-modules.mddocs/zh-cn/explanation/what-are-skills.mddocs/zh-cn/explanation/what-are-workflows.mddocs/zh-cn/how-to/distribute-your-module.mddocs/zh-cn/index.mddocs/zh-cn/reference/builder-commands.mddocs/zh-cn/reference/index.mddocs/zh-cn/reference/workflow-patterns.mddocs/zh-cn/tutorials/build-your-first-module.mddocs/zh-cn/tutorials/index.mdtools/build-docs.mjswebsite/astro.config.mjswebsite/src/content/config.tswebsite/src/content/i18n/zh-CN.jsonwebsite/src/lib/locales.mjs
What
Add complete Simplified Chinese (zh-cn) translations for all 19 documentation pages and configure Starlight i18n support.
Why
Expand documentation accessibility for Chinese-speaking users, consistent with the main BMad Method project which already provides zh-cn translations.
How
docs/zh-cn/following the Diataxis structure, matching the tone and terminology conventions of the main BMad Method zh-cn docs (智能体, 工作流, 技能, 模块, etc.)locales.mjs,zh-CN.jsonUI strings, sidebar translations inastro.config.mjs, andi18nSchemainconfig.ts.gitignoreto exemptdocs/zh-cn/from thez*/exclusion pattern, and excludedzh-cnfrombuild-docs.mjsLLM outputREADME_CN.mdat the project rootTesting
Ran
npm run docs:devlocally and manually verified all 19 zh-cn pages render correctly, sidebar navigation works with locale switcher, all internal relative links resolve without 404s, and external links point to zh-cn versions of docs.bmad-method.org.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
New Features