docs: Add Chinese (zh-CN) translations for all documentation #157
docs: Add Chinese (zh-CN) translations for all documentation #157affaan-m merged 2 commits intoaffaan-m:mainfrom
Conversation
📝 WalkthroughWalkthroughAdds a large set of Chinese (zh-CN) documentation: contributing guide, project README, agent specs, command manuals, contexts, rules, examples, plugins, and many SKILL docs across languages and frameworks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 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 |
There was a problem hiding this comment.
Actionable comments posted: 15
🤖 Fix all issues with AI agents
In `@docs/zh-CN/agents/build-error-resolver.md`:
- Around line 8-11: The sentence contains a duplicated phrase: replace the
current line that reads "你是一位专注于快速高效修复 TypeScript、编译和构建错误的专家构建错误解决专家。" (found
under the header "# 构建错误解决器") with a concise version such as "你是一位专注于快速高效修复
TypeScript、编译和构建错误的专家。" to remove the repeated "构建错误解决专家".
In `@docs/zh-CN/agents/security-reviewer.md`:
- Around line 381-384: Replace the escaped backtick sequence used to open and
close the JavaScript code fence around the example (the `` ```javascript ``
and closing `` ``` ``) with a proper unescaped triple-backtick fence
(```javascript and ```), ensuring the block containing the comment line "//
如何利用此漏洞的示例" is enclosed by real Markdown code fences so it renders correctly.
In `@docs/zh-CN/commands/instinct-import.md`:
- Around line 91-92: Replace the phrasing "置信度高的胜出" with the more natural
"置信度更高者胜出" in the document (update the bullet item currently reading "*
**置信度高的胜出**:保留置信度更高的那个" to "* **置信度更高者胜出**:保留置信度更高的那个") so the wording is
clearer and consistent with the adjacent bullet "* **合并证据**:合并观察计数".
In `@docs/zh-CN/commands/python-review.md`:
- Line 318: The table cell contains escaped backticks ("类型联合 (\`x | None\`) |
3.10+") which causes them to render literally; update that table row by removing
the backslashes so the code fence reads "类型联合 (`x | None`) | 3.10+" ensuring the
inline code is rendered correctly in the markdown table.
In `@docs/zh-CN/commands/update-codemaps.md`:
- Around line 1-21: Clarify in the docs whether the paths (codemaps/* and
.reports/) are created by the update-codemaps command or merely a planned
structure: update the update-codemaps.md text to explicitly state
"update-codemaps will create codemaps/ and .reports/ if missing" (or
alternatively mark them as "planned — not created by the command"), and correct
any paths if they should point to existing locations; also add a note
referencing the English source file (docs/commands/update-codemaps.md) or the
original source document used for this Chinese translation so reviewers know the
translation origin.
In `@docs/zh-CN/plugins/README.md`:
- Around line 34-38: The inline comments in the bash/code block containing
"/plugins" and the example command "claude plugin install
typescript-lsp@claude-plugins-official" are in English while the page is
Chinese; update those inline comments and any surrounding short English phrases
in that block to Chinese for localization consistency (translate the brief
comment text only, preserving the commands exactly).
In `@docs/zh-CN/skills/clickhouse-io/SKILL.md`:
- Around line 167-180: The bulkInsertTrades example builds SQL by interpolating
Trade fields directly, opening an SQL injection vulnerability; update
bulkInsertTrades to use parameterized inserts or the ClickHouse client's bulk
insert API instead of string interpolation: assemble an array of trade rows
(e.g., arrays or objects for id, market_id, user_id, amount, timestamp) and call
the ClickHouse client's insert/query method that accepts parameters or data
streams (use clickhouse.insert or clickhouse.query with prepared parameters) to
bind values safely; ensure all string fields (id, market_id, user_id, timestamp)
are passed as parameters rather than concatenated into the SQL string and remove
any direct template interpolation in bulkInsertTrades.
- Around line 357-375: The ETL pipeline calls bulkInsertToClickHouse and uses
setInterval without error handling or cancellation; fix by ensuring
bulkInsertToClickHouse is implemented with parameterized/prepared statements or
safe client APIs and strict input validation/escaping to prevent SQL injection
(review bulkInsertTrades-style code path), wrap the etlPipeline invocation body
in try/catch to log and surface errors from
extractFromPostgres/transform/bulkInsertToClickHouse, and replace the raw
setInterval call with a cancellable/timed mechanism (store the interval ID or
use an AbortController/stop function, and implement retry/backoff or stop on
repeated failures) so the pipeline can be cleanly stopped and errors handled.
In `@docs/zh-CN/skills/continuous-learning-v2/agents/observer.md`:
- Around line 38-41: 将文档中不自然的短语 "立即的撤销/重做模式" 替换为更顺畅的表达,例如 "即时撤销/重做模式"、"即时撤销与重做"
或 "即时的撤销/重做操作";在文件中定位包含该短语的项目符号项并用其中一种建议的替代表达进行替换,确保风格与周围条目(如 "不,使用 X 而不是
Y"、"实际上,我的意思是……")保持一致。
In `@docs/zh-CN/skills/continuous-learning/SKILL.md`:
- Around line 99-102: The block quote starting with "来自 homunculus 的关键见解:" is
too long and must be shortened to ≤25 words; replace the existing quoted
sentence (the v1/v2 comparison about skills, hooks, and instincts) with a
concise paraphrase under 25 words that preserves the meaning and attribution
(keep "来自 homunculus 的关键见解:" and a shortened quote).
- Line 111: Replace the machine-specific absolute path string
`/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` in
docs/zh-CN/skills/continuous-learning/SKILL.md with the repository-relative path
`docs/zh-CN/skills/continuous-learning-v2/SKILL.md`; locate the exact line
containing the absolute path and update the string so the document references
the repo file instead of a local filesystem path.
In `@docs/zh-CN/skills/django-patterns/SKILL.md`:
- Around line 221-224: The save() example uses slugify but the symbol is not
imported; add an import for slugify at the top of the snippet (e.g., from
django.utils.text import slugify or from django.template.defaultfilters import
slugify depending on intended source) so the save(self, *args, **kwargs) method
can call slugify(self.name) without NameError; update the code example to
include that import line near other imports and ensure it matches the Django
version used in the docs.
In `@docs/zh-CN/skills/django-security/SKILL.md`:
- Around line 47-51: The snippet references ImproperlyConfigured but never
imports it; add the missing import (from django.core.exceptions import
ImproperlyConfigured) near the top of the file so the raise
ImproperlyConfigured('DJANGO_SECRET_KEY environment variable is required') in
the SECRET_KEY retrieval block works; ensure the import sits alongside the
existing os import and any other Django imports referenced by SECRET_KEY =
os.environ.get('DJANGO_SECRET_KEY').
In `@docs/zh-CN/skills/eval-harness/SKILL.md`:
- Around line 27-33: Fix the duplicated word in the checklist under the "成功标准:"
section by editing the checklist item that currently reads "- [ ] 标准 标准 3" to
remove the extra word so it reads "- [ ] 标准 3"; locate this text in the SKILL.md
content near the "成功标准:" header and update only that checklist line.
In `@docs/zh-CN/skills/postgres-patterns/SKILL.md`:
- Around line 99-100: The heading "### 反模式检测**" contains stray trailing markdown
characters; remove the trailing "**" so the heading becomes "### 反模式检测" (update
the heading text in the SKILL.md content where the heading appears).
🧹 Nitpick comments (3)
docs/zh-CN/skills/coding-standards/SKILL.md (1)
3-3: Consider consistent Chinese/English spacing for readability.In Chinese docs, adding spaces around English technical terms improves readability and consistency (e.g., “TypeScript、JavaScript、React 和 Node.js”). Optional but nice polish for a style guide.
✨ Suggested tweak
-description: 适用于TypeScript、JavaScript、React和Node.js开发的通用编码标准、最佳实践和模式。 +description: 适用于 TypeScript、JavaScript、React 和 Node.js 开发的通用编码标准、最佳实践和模式。Also applies to: 40-41
docs/zh-CN/skills/jpa-patterns/SKILL.md (1)
73-79: Clarify where the projection query method should be added.The
findAllBymethod signature on line 78 is shown separately from theMarketRepositoryinterface (lines 62-67), which may confuse readers about where to place this method. Consider adding this method to the repository interface example or adding a comment indicating it should be added toMarketRepository.📝 Suggested documentation clarification
Option 1: Add the method to the repository interface:
public interface MarketRepository extends JpaRepository<MarketEntity, Long> { Optional<MarketEntity> findBySlug(String slug); `@Query`("select m from MarketEntity m where m.status = :status") Page<MarketEntity> findByStatus(`@Param`("status") MarketStatus status, Pageable pageable); + + Page<MarketSummary> findAllBy(Pageable pageable); }Option 2: Add clarifying text before line 78:
MarketStatus getStatus(); } + +// 在 MarketRepository 中添加此方法: Page<MarketSummary> findAllBy(Pageable pageable);docs/zh-CN/skills/clickhouse-io/SKILL.md (1)
198-206: Consider adding error handling.While the streaming insert pattern is safe from SQL injection, production code should include error handling for stream failures.
♻️ Proposed improvement with error handling
async function streamInserts() { const stream = clickhouse.insert('trades').stream() + + stream.on('error', (err) => { + console.error('Stream insert failed:', err) + }) for await (const batch of dataSource) { stream.write(batch) } await stream.end() }
| ```javascript | ||
|
|
||
| // 如何利用此漏洞的示例 | ||
| ``` |
There was a problem hiding this comment.
Fix markdown code fence escaping.
The code block uses escaped backticks which will not render correctly. Markdown code fences should not be escaped.
📝 Proposed fix
**概念验证:**
-```javascript
+```javascript
// 如何利用此漏洞的示例
-```
+```🤖 Prompt for AI Agents
In `@docs/zh-CN/agents/security-reviewer.md` around lines 381 - 384, Replace the
escaped backtick sequence used to open and close the JavaScript code fence
around the example (the `` ```javascript `` and closing `` ``` ``) with a
proper unescaped triple-backtick fence (```javascript and ```), ensuring the
block containing the comment line "// 如何利用此漏洞的示例" is enclosed by real Markdown
code fences so it renders correctly.
| * **置信度高的胜出**:保留置信度更高的那个 | ||
| * **合并证据**:合并观察计数 |
There was a problem hiding this comment.
“置信度高的胜出”措辞不够自然。
建议改为“置信度更高者胜出”以提升可读性。
✏️ 建议修改
-* **置信度高的胜出**:保留置信度更高的那个
+* **置信度更高者胜出**:保留置信度更高的那个📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| * **置信度高的胜出**:保留置信度更高的那个 | |
| * **合并证据**:合并观察计数 | |
| * **置信度更高者胜出**:保留置信度更高的那个 | |
| * **合并证据**:合并观察计数 |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~91-~91: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:高"地"胜出
Context: ... ### 针对重复项 当导入一个与现有本能匹配的本能时: * 置信度高的胜出:保留置信度更高的那个 * 合并证据:合并观察计数 * **更新...
(wb4)
🤖 Prompt for AI Agents
In `@docs/zh-CN/commands/instinct-import.md` around lines 91 - 92, Replace the
phrasing "置信度高的胜出" with the more natural "置信度更高者胜出" in the document (update the
bullet item currently reading "* **置信度高的胜出**:保留置信度更高的那个" to "*
**置信度更高者胜出**:保留置信度更高的那个") so the wording is clearer and consistent with the
adjacent bullet "* **合并证据**:合并观察计数".
| | 海象运算符 (`:=`) | 3.8+ | | ||
| | 仅限位置参数 | 3.8+ | | ||
| | Match 语句 | 3.10+ | | ||
| | 类型联合 (\`x | None\`) | 3.10+ | |
There was a problem hiding this comment.
Minor markdown formatting issue.
The backticks in the table are escaped with backslashes, which will cause them to render literally. In markdown, backticks don't need escaping inside tables.
📝 Proposed fix
-| 类型联合 (\`x | None\`) | 3.10+ |
+| 类型联合 (`x | None`) | 3.10+ |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | 类型联合 (\`x | None\`) | 3.10+ | | |
| | 类型联合 (`x | None`) | 3.10+ | |
🤖 Prompt for AI Agents
In `@docs/zh-CN/commands/python-review.md` at line 318, The table cell contains
escaped backticks ("类型联合 (\`x | None\`) | 3.10+") which causes them to render
literally; update that table row by removing the backslashes so the code fence
reads "类型联合 (`x | None`) | 3.10+" ensuring the inline code is rendered correctly
in the markdown table.
| # 更新代码地图 | ||
|
|
||
| 分析代码库结构并更新架构文档: | ||
|
|
||
| 1. 扫描所有源文件的导入、导出和依赖关系 | ||
|
|
||
| 2. 以以下格式生成简洁的代码地图: | ||
| * codemaps/architecture.md - 整体架构 | ||
| * codemaps/backend.md - 后端结构 | ||
| * codemaps/frontend.md - 前端结构 | ||
| * codemaps/data.md - 数据模型和模式 | ||
|
|
||
| 3. 计算与之前版本的差异百分比 | ||
|
|
||
| 4. 如果变更 > 30%,则在更新前请求用户批准 | ||
|
|
||
| 5. 为每个代码地图添加新鲜度时间戳 | ||
|
|
||
| 6. 将报告保存到 .reports/codemap-diff.txt | ||
|
|
||
| 使用 TypeScript/Node.js 进行分析。专注于高层结构,而非实现细节。 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify referenced paths in the documentation
echo "=== Checking codemaps directory ==="
if [ -d "codemaps" ]; then
echo "✓ codemaps directory exists"
find codemaps -type f 2>/dev/null | head -20
else
echo "✗ codemaps directory not found"
fi
echo -e "\n=== Checking .reports directory ==="
if [ -d ".reports" ]; then
echo "✓ .reports directory exists"
find .reports -type f 2>/dev/null | head -20
else
echo "✗ .reports directory not found"
fi
echo -e "\n=== Checking English documentation version ==="
if [ -f "docs/commands/update-codemaps.md" ]; then
echo "✓ English version exists at docs/commands/update-codemaps.md"
else
echo "✗ English version not found at docs/commands/update-codemaps.md"
fi
echo -e "\n=== Listing docs directory structure ==="
find docs -type d -maxdepth 2 | sort
echo -e "\n=== Checking if Chinese file exists ==="
if [ -f "docs/zh-CN/commands/update-codemaps.md" ]; then
echo "✓ Chinese file exists at docs/zh-CN/commands/update-codemaps.md"
else
echo "✗ Chinese file not found"
fiRepository: affaan-m/everything-claude-code
Length of output: 700
Clarify whether the referenced paths are created by the command or document planned structure.
The directories referenced in this documentation do not currently exist in the codebase:
codemaps/directory and its files (architecture.md, backend.md, frontend.md, data.md).reports/directory
Confirm whether:
- These paths are created by the update-codemaps command itself
- This documentation describes planned/future directory structure
- The paths should be corrected to reference existing locations
Additionally, no English documentation version exists at docs/commands/update-codemaps.md to serve as the source for this Chinese translation. If this file is part of a broader documentation migration, clarify the translation source document.
🤖 Prompt for AI Agents
In `@docs/zh-CN/commands/update-codemaps.md` around lines 1 - 21, Clarify in the
docs whether the paths (codemaps/* and .reports/) are created by the
update-codemaps command or merely a planned structure: update the
update-codemaps.md text to explicitly state "update-codemaps will create
codemaps/ and .reports/ if missing" (or alternatively mark them as "planned —
not created by the command"), and correct any paths if they should point to
existing locations; also add a note referencing the English source file
(docs/commands/update-codemaps.md) or the original source document used for this
Chinese translation so reviewers know the translation origin.
| 4. **领域标记** - 代码风格、测试、git、调试等 | ||
| 5. **演进路径** - 将相关本能聚类为技能/命令 | ||
|
|
||
| 完整规格请参见:`/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n docs/zh-CN/skills/continuous-learning/SKILL.md | sed -n '105,115p'Repository: affaan-m/everything-claude-code
Length of output: 344
🏁 Script executed:
#!/bin/bash
# Find candidate spec files for continuous-learning v2
fd -a -t f 'continuous-learning.*v2|continuous-learning-v2' .Repository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
# Also search for any continuous-learning files
fd -a -t f 'continuous-learning' . | head -20Repository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
# Search more broadly for spec or documentation files
find . -type f \( -name "*.md" -o -name "*.txt" \) | xargs grep -l "continuous.*learning" 2>/dev/null | head -20Repository: affaan-m/everything-claude-code
Length of output: 781
🏁 Script executed:
# Check the directory structure around the file
ls -la docs/zh-CN/skills/continuous-learning/ 2>/dev/nullRepository: affaan-m/everything-claude-code
Length of output: 246
🏁 Script executed:
# Look for any v2 related files in docs
find docs -type f -name "*v2*" 2>/dev/nullRepository: affaan-m/everything-claude-code
Length of output: 57
Replace the local absolute path with the repo-relative path.
/Users/affoon/Documents/tasks/12-continuous-learning-v2.md is machine-specific and won't work for other developers. Use docs/zh-CN/skills/continuous-learning-v2/SKILL.md instead, which exists in the repository.
🤖 Prompt for AI Agents
In `@docs/zh-CN/skills/continuous-learning/SKILL.md` at line 111, Replace the
machine-specific absolute path string
`/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` in
docs/zh-CN/skills/continuous-learning/SKILL.md with the repository-relative path
`docs/zh-CN/skills/continuous-learning-v2/SKILL.md`; locate the exact line
containing the absolute path and update the string so the document references
the repo file instead of a local filesystem path.
| def save(self, *args, **kwargs): | ||
| if not self.slug: | ||
| self.slug = slugify(self.name) | ||
| super().save(*args, **kwargs) |
There was a problem hiding this comment.
Import slugify for the save() example.
slugify is used but not imported in the snippet.
✏️ Proposed fix
-from django.core.validators import MinValueValidator, MaxValueValidator
+from django.core.validators import MinValueValidator, MaxValueValidator
+from django.utils.text import slugify🤖 Prompt for AI Agents
In `@docs/zh-CN/skills/django-patterns/SKILL.md` around lines 221 - 224, The
save() example uses slugify but the symbol is not imported; add an import for
slugify at the top of the snippet (e.g., from django.utils.text import slugify
or from django.template.defaultfilters import slugify depending on intended
source) so the save(self, *args, **kwargs) method can call slugify(self.name)
without NameError; update the code example to include that import line near
other imports and ensure it matches the Django version used in the docs.
| # Secret key (must be set via environment variable) | ||
| SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY') | ||
| if not SECRET_KEY: | ||
| raise ImproperlyConfigured('DJANGO_SECRET_KEY environment variable is required') | ||
|
|
There was a problem hiding this comment.
Add missing import for ImproperlyConfigured.
The snippet raises ImproperlyConfigured but doesn’t import it.
✏️ Proposed fix
# settings/production.py
import os
+from django.core.exceptions import ImproperlyConfigured🤖 Prompt for AI Agents
In `@docs/zh-CN/skills/django-security/SKILL.md` around lines 47 - 51, The snippet
references ImproperlyConfigured but never imports it; add the missing import
(from django.core.exceptions import ImproperlyConfigured) near the top of the
file so the raise ImproperlyConfigured('DJANGO_SECRET_KEY environment variable
is required') in the SECRET_KEY retrieval block works; ensure the import sits
alongside the existing os import and any other Django imports referenced by
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY').
| [能力评估:功能名称] | ||
| 任务:描述 Claude 应完成的工作 | ||
| 成功标准: | ||
| - [ ] 标准 1 | ||
| - [ ] 标准 2 | ||
| - [ ] 标准 标准 3 | ||
| 预期输出:对预期结果的描述 |
There was a problem hiding this comment.
Fix duplicated word in checklist item.
Line 32 has a repeated word (“标准 标准 3”).
✍️ Suggested fix
- - [ ] 标准 标准 3
+ - [ ] 标准 3📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [能力评估:功能名称] | |
| 任务:描述 Claude 应完成的工作 | |
| 成功标准: | |
| - [ ] 标准 1 | |
| - [ ] 标准 2 | |
| - [ ] 标准 标准 3 | |
| 预期输出:对预期结果的描述 | |
| [能力评估:功能名称] | |
| 任务:描述 Claude 应完成的工作 | |
| 成功标准: | |
| - [ ] 标准 1 | |
| - [ ] 标准 2 | |
| - [ ] 标准 3 | |
| 预期输出:对预期结果的描述 |
🤖 Prompt for AI Agents
In `@docs/zh-CN/skills/eval-harness/SKILL.md` around lines 27 - 33, Fix the
duplicated word in the checklist under the "成功标准:" section by editing the
checklist item that currently reads "- [ ] 标准 标准 3" to remove the extra word so
it reads "- [ ] 标准 3"; locate this text in the SKILL.md content near the "成功标准:"
header and update only that checklist line.
| ### 反模式检测\*\* | ||
|
|
There was a problem hiding this comment.
Fix stray markdown in heading.
The heading has trailing **, which renders oddly and looks accidental.
✏️ Proposed fix
-### 反模式检测**
+### 反模式检测📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### 反模式检测\*\* | |
| ### 反模式检测 |
🤖 Prompt for AI Agents
In `@docs/zh-CN/skills/postgres-patterns/SKILL.md` around lines 99 - 100, The
heading "### 反模式检测**" contains stray trailing markdown characters; remove the
trailing "**" so the heading becomes "### 反模式检测" (update the heading text in the
SKILL.md content where the heading appears).
affaan-m
left a comment
There was a problem hiding this comment.
✅ Approved!
Excellent contribution! 83 files translated to Chinese - this will significantly help Chinese-speaking developers.
Notes:
- Translation quality looks good from spot-checking
- Structure preserves original formatting
- All frontmatter and links appear intact
Thank you for this massive effort! 🙏
Description
Add Chinese (zh-CN) translations for all documentation to make the project more accessible to Chinese-speaking developers.
Translation Details
All Markdown documentation has been translated to Chinese while preserving:
File Statistics
Type of Change
fix:Bug fixfeat:New featurerefactor:Code refactoringdocs:Documentationtest:Testschore:Maintenance/toolingci:CI/CD changesChecklist
node tests/run-all.js)Summary by CodeRabbit