docs: add Simplified Chinese (zh-CN) documentation#27
docs: add Simplified Chinese (zh-CN) documentation#27lrliang wants to merge 2 commits intobmad-code-org:mainfrom
Conversation
Add full Chinese translation for all 19 documentation pages, matching the i18n pattern established in the BMAD-METHOD main project. Infrastructure changes: - Add Starlight i18n locale config (locales.mjs, zh-CN.json UI strings) - Update astro.config.mjs with locale support and sidebar translations - Update content config with i18n schema - Exclude zh-cn/ from llms-full.txt in build pipeline - Fix .gitignore z*/ pattern to only match repo root - Fix bare URL lint error in README.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 3 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds comprehensive Simplified Chinese documentation for the Creative Intelligence Suite across tutorials, how-tos, explanations, and reference sections. It introduces internationalization infrastructure including locale configuration, sidebar translations, and Chinese UI strings for the Starlight documentation site. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/build-docs.mjs (1)
39-42: Avoid locale drift by importing translated locales from the shared config.This local hardcoded list can diverge from
website/src/lib/locales.mjs. ReusetranslatedLocalesas the single source of truth.♻️ Proposed refactor
import { fileURLToPath } from 'node:url'; import { getSiteUrl } from '../website/src/lib/site-url.mjs'; +import { translatedLocales } from '../website/src/lib/locales.mjs'; @@ -const TRANSLATED_LOCALE_DIRS = ['zh-cn']; +const TRANSLATED_LOCALE_DIRS = translatedLocales;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/build-docs.mjs` around lines 39 - 42, Replace the hardcoded TRANSLATED_LOCALE_DIRS array with a derived value from the shared translatedLocales export: import the translatedLocales symbol and compute TRANSLATED_LOCALE_DIRS by filtering translatedLocales to exclude the English key (e.g., 'en' or the default locale) and mapping to the locale directory keys used by the build; update any references to TRANSLATED_LOCALE_DIRS in tools/build-docs.mjs to use this derived constant so the script stays in sync with the single source of truth (translatedLocales).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tools/build-docs.mjs`:
- Around line 39-42: Replace the hardcoded TRANSLATED_LOCALE_DIRS array with a
derived value from the shared translatedLocales export: import the
translatedLocales symbol and compute TRANSLATED_LOCALE_DIRS by filtering
translatedLocales to exclude the English key (e.g., 'en' or the default locale)
and mapping to the locale directory keys used by the build; update any
references to TRANSLATED_LOCALE_DIRS in tools/build-docs.mjs to use this derived
constant so the script stays in sync with the single source of truth
(translatedLocales).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 25d41b53-11bc-4970-94a6-fe1671d25131
📒 Files selected for processing (26)
.gitignoreREADME.mddocs/zh-cn/404.mddocs/zh-cn/explanation/brainstorming-techniques.mddocs/zh-cn/explanation/creative-intelligence.mddocs/zh-cn/explanation/design-thinking-phases.mddocs/zh-cn/explanation/index.mddocs/zh-cn/explanation/innovation-frameworks.mddocs/zh-cn/how-to/brainstorm.mddocs/zh-cn/how-to/design-thinking.mddocs/zh-cn/how-to/index.mddocs/zh-cn/how-to/innovation-strategy.mddocs/zh-cn/how-to/problem-solving.mddocs/zh-cn/how-to/storytelling.mddocs/zh-cn/index.mddocs/zh-cn/reference/agents.mddocs/zh-cn/reference/configuration.mddocs/zh-cn/reference/index.mddocs/zh-cn/reference/workflows.mddocs/zh-cn/tutorials/getting-started.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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
What
Add full Simplified Chinese (zh-CN) documentation translation covering all 19 pages, along with the Starlight i18n infrastructure to support it.
Why
Expand documentation accessibility for Chinese-speaking users, consistent with the i18n pattern already established in the BMAD-METHOD main project.
How
docs/zh-cn/with 19 translated markdown files mirroring the English docs structure (tutorials, how-to, explanation, reference)locales.mjs,zh-CN.jsonUI strings, sidebar translations inastro.config.mjs, i18n schema inconfig.ts)tools/build-docs.mjsto excludezh-cn/fromllms-full.txtgeneration.gitignorez*/→/z*/so it no longer matchesdocs/zh-cn/README.mdTesting
Verified locally with
npm run docs:dev— Chinese docs render at/zh-cn/, language switcher works, sidebar labels display in Chinese, and all internal links resolve correctly without 404s.