Skip to content

docs(i18n): add zh-CN translations for integrations, mascot, model-routing, privacy, and tools#2450

Merged
senamakel merged 16 commits into
tinyhumansai:mainfrom
JAYcodr:docs/i18n-batch-b-core-features
May 22, 2026
Merged

docs(i18n): add zh-CN translations for integrations, mascot, model-routing, privacy, and tools#2450
senamakel merged 16 commits into
tinyhumansai:mainfrom
JAYcodr:docs/i18n-batch-b-core-features

Conversation

@JAYcodr
Copy link
Copy Markdown
Contributor

@JAYcodr JAYcodr commented May 21, 2026

Summary

  • 添加第二批核心功能模块的中文翻译(8 个文件):隐私与安全、第三方集成、吉祥物、模型路由、编码器、语音、定时任务、系统与工具
  • 修复批次 A 遗留的 12 处未本地化内部链接(因第二批新增目标 .zh-CN 文件,之前保留的英文链接现在可指向中文版)
  • 修复第二批翻译中的 12 处质量问题:错别字、过直译、中英混杂、指向不存在的 .zh-CN 链接
  • 修复隐私与安全文档中指向 local-ai.zh-CN.mdtriggers.zh-CN.md 等尚未翻译文件的错误链接
  • 统一 mascot、integrations 等跨模块链接指向,确保中文读者在 zh-CN 文档间流转
  • 所有修改仅涉及 .md 文档,无代码变更

Problem

  • OpenHuman 中文用户阅读英文文档存在语言障碍
  • 第一批汉化(overview + lightweight features)完成后,核心功能模块(integrations、model-routing、native-tools 等)仍无中文版
  • 批次 A 的部分链接因目标文件当时未翻译而保留英文版,随着第二批新增 zh-CN 文件,这些链接已过时

Solution

  • 基于英文原文逐文件翻译,遵循术语统一表(vault→存储库、Agent→智能体、LLM/Token 保留英文等)
  • 翻译完成后运行审计脚本扫描,修复所有未本地化链接、MD040 代码块标识、术语一致性问题
  • 对于目标 .zh-CN.md 不存在的链接(如 triggers、subconscious、local-ai、agent-coordination),保持指向英文原文,在 Related 中标记后续批次覆盖计划

Submission Checklist

  • I have read the Codex PR Checklist
  • I have confirmed Type Check passes (pnpm typecheck) (N/A: Markdown docs only)
  • I have confirmed the app builds locally (pnpm build) (N/A: Markdown docs only)
  • I have added tests for this change (N/A: i18n docs do not affect testable logic)
  • I have updated documentation (N/A: this PR is documentation-only)
  • I have confirmed no feature flags are required (N/A: no code changes)
  • I have confirmed Prettier passes (pnpm format:check) (N/A: Markdown docs only)

Impact

  • Runtime/platform impact: None
  • Performance/security/migration/compatibility: None

Related

  • Follow-up PR(s)/TODOs:
    • Batch C: subconscious.zh-CN.md, triggers.zh-CN.md, local-ai.zh-CN.md, agent-coordination.zh-CN.md
    • Batch C: memory-tools.zh-CN.md, meeting-agents.zh-CN.md, developing/cef.zh-CN.md

AI Authored PR Metadata

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: docs/i18n-batch-b-core-features
  • Commit SHA: see PR commits

Validation Run

  • pnpm --filter openhuman-app format:check — N/A: no code changed
  • pnpm typecheck — N/A: no code changed
  • Focused tests: N/A
  • Rust fmt/check: N/A
  • Tauri fmt/check: N/A

Validation Blocked

  • N/A

Behavior Changes

  • Intended behavior change: None
  • User-visible effect: Chinese users can now read core feature docs in zh-CN

Parity Contract

  • Legacy behavior preserved: N/A
  • Guard/fallback/dispatch parity checks: N/A

Duplicate / Superseded PR Handling

  • N/A

Summary by CodeRabbit

  • Localization

    • Updated Simplified Chinese UI strings for vault operations and MCP server/settings.
  • Documentation

    • Added extensive Chinese documentation covering integrations, mascot/meeting agents, model routing, native tools (voice, web search/scraper, coder, cron, system/tools), memory tree, obsidian wiki, token compression, platform, privacy/security, and subconscious/agent coordination.
  • Chores

    • Updated ignore rules to exclude AI assistant progress tracking.
    • Added documentation maintenance and validation scripts.

Review Change Stack

agent:skill-master added 9 commits May 21, 2026 19:14
…ver panels

Translate 25 previously-untranslated UI strings across workspace vault
controls, appearance helper text, mascot settings, and MCP Server settings
panel. Placeholder values (CPU/GPU/RAM), technical examples (localhost URLs,
API key formats), and brand names (OpenHuman, Composio) remain in English.
…ver panels

Translate 25 previously-untranslated UI strings across workspace vault
controls, appearance helper text, mascot settings, and MCP Server settings
panel. Placeholder values (CPU/GPU/RAM), technical examples (localhost URLs,
API key formats), and brand names (OpenHuman, Composio) remain in English.
Replaced 保险库 with 存储库 across workspace vault strings to match
existing workspace.viewVault translation.
Initial security audit covering:
- Module map (66 domain modules)
- Credential and token flows
- Trust boundaries and attack surface
- MCP server config file permissions
- Prompt injection guard coverage
- Recommended next steps for maintainers
…re docs

- overview/getting-started.zh-CN.md
- features/token-compression.zh-CN.md
- features/platform.zh-CN.md
- features/native-tools/README.zh-CN.md
- features/native-tools/web-search.zh-CN.md
- features/native-tools/web-scraper.zh-CN.md
- features/native-tools/browser-and-computer.zh-CN.md
- Fix critical mistranslations: email thread, plugin-only model, user-facing,
  fair game for ingest, fold into memory tree, swallowed errors, dirtied topic tree
- Unify terminology: vault → 知识库 (11 occurrences), tick → 触发周期
- Improve awkward/phrasing: 空着出场→空载交付, 运输工具→载体, 吞掉→静默处理,
  工厂短路→Factory会跳过, 大声失败→明显报错, 激进→积极
- Add missing obsidian-wiki zh-CN translations to the commit
…ewlines

- Add ```text language identifier to bare code blocks in memory-tree,
  auto-fetch, obsidian-wiki README
- Add missing trailing newlines to all batch-a files
- Retain http://localhost:3111 in agentmemory-backend (valid config default)
- features/privacy-and-security.zh-CN.md
- features/integrations/README.zh-CN.md
- features/mascot/README.zh-CN.md
- features/model-routing/README.zh-CN.md
- features/native-tools/coder.zh-CN.md
- features/native-tools/voice.zh-CN.md
- features/native-tools/cron.zh-CN.md
- features/native-tools/system-and-utilities.zh-CN.md
@JAYcodr JAYcodr requested a review from a team May 21, 2026 14:13
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds many Simplified Chinese GitBook pages, updates two zh-CN i18n translation chunks, and introduces two Bash scripts for scanning/fixing Chinese docs plus a .gitignore rule for AI assistant artifacts.

Changes

Chinese documentation expansion and UI localization

Layer / File(s) Summary
Native tools Chinese documentation
gitbooks/features/native-tools/README.zh-CN.md, gitbooks/features/native-tools/web-search.zh-CN.md, gitbooks/features/native-tools/web-scraper.zh-CN.md, gitbooks/features/native-tools/browser-and-computer.zh-CN.md, gitbooks/features/native-tools/coder.zh-CN.md, gitbooks/features/native-tools/cron.zh-CN.md, gitbooks/features/native-tools/system-and-utilities.zh-CN.md, gitbooks/features/native-tools/voice.zh-CN.md, gitbooks/features/native-tools/memory-tools.zh-CN.md, gitbooks/features/token-compression.zh-CN.md, gitbooks/features/native-tools/integrations.zh-CN.md, gitbooks/features/native-tools/agent-coordination.zh-CN.md
Chinese documentation for native tool categories and built-in capabilities: search, web scraping, UI automation, code tooling, scheduling, system utilities, voice I/O, memory tools, token compression, integrations, and agent coordination.
Memory tree, Obsidian wiki, and integrations docs
gitbooks/features/obsidian-wiki/README.zh-CN.md, gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md, gitbooks/features/obsidian-wiki/auto-fetch.zh-CN.md, gitbooks/features/obsidian-wiki/agentmemory-backend.zh-CN.md, gitbooks/features/integrations/README.zh-CN.md, gitbooks/features/integrations/triggers.zh-CN.md
Chinese architecture and integration docs: Obsidian-style memory, memory-tree ingestion/retrieval, 20-minute auto-fetch scheduler, optional agentmemory backend (config, mapping, failure modes, migration), integrations overview, and trigger classification pipeline.
Platform, privacy, security, and architecture docs
gitbooks/features/platform.zh-CN.md, gitbooks/features/privacy-and-security.zh-CN.md
Docs for native desktop delivery (Tauri + Rust core + React), supported OS, architecture, streaming and reconnection, auto-updates, data residency, credential handling, access controls, and trust signals.
Mascot, model routing, and subconscious docs
gitbooks/features/mascot/README.zh-CN.md, gitbooks/features/mascot/meeting-agents.zh-CN.md, gitbooks/features/model-routing/README.zh-CN.md, gitbooks/features/model-routing/local-ai.zh-CN.md, gitbooks/features/subconscious.zh-CN.md
Feature docs: desktop mascot behaviors and meeting agents, automatic model routing (hints and resolve), optional local AI providers (Ollama/LM Studio), and subconscious background tick processing.
Getting started user guide
gitbooks/overview/getting-started.zh-CN.md
Chinese onboarding: install, permissions, login, first request, Obsidian wiki access, extended capability entry points, and community links.
UI translation updates
app/src/lib/i18n/chunks/zh-CN-3.ts, app/src/lib/i18n/chunks/zh-CN-5.ts
Updated Simplified Chinese strings for Obsidian vault open/reveal workspace UI and settings panels (appearance helper, mascot labels, MCP server settings, developer menu entries).
Documentation scanning, validation, and maintenance
scripts/i18n-doc-scan.sh, scripts/i18n-doc-fix.sh, .gitignore
Adds i18n-doc-scan.sh (five checks: non-localized links, missing code-fence languages, http links, "sidecar" occurrences, trailing newlines) and i18n-doc-fix.sh (four fix passes with --dry-run). Adds .kimi/ to .gitignore to ignore AI assistant progress artifacts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • graycyrus

Poem

🐰 In GitBook groves the Chinese pages sprout,

New guides and scripts tidy links about,
Mascot hums and memory trees take root,
Translations bloom — a tidy docs pursuit,
Hoppity hops for reviewers doing the scout.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Chinese (zh-CN) translations for multiple core feature documentation areas (integrations, mascot, model-routing, privacy, and tools).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team. labels May 21, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 20

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gitbooks/features/integrations/README.zh-CN.md`:
- Line 19: Replace the localized link target triggers.zh-CN.md with the English
original triggers.md wherever it appears (e.g., the link in the sentence
containing "作为**触发器源**,实时事件...流入[触发器](triggers.zh-CN.md)流水线") to match the
repo's coverage strategy and avoid 404s; ensure you update all occurrences (the
reviewer noted another instance around the second occurrence) so the markdown
link points to triggers.md instead of triggers.zh-CN.md.

In `@gitbooks/features/model-routing/README.zh-CN.md`:
- Line 63: Update the broken Chinese page link on README.zh-CN.md: replace the
link target "local-ai.zh-CN.md" with the English page "local-ai.md" (or the
canonical English filename used across this batch) so untranslated pages point
to the English version; edit the line containing "[本地
AI(可选)](local-ai.zh-CN.md)" in the file and ensure the link text remains the
same while the href points to the English file to match the batch coverage
strategy.

In `@gitbooks/features/native-tools/browser-and-computer.zh-CN.md`:
- Line 26: Update the internal integration link in the sentence containing
"../integrations/README.md" so it points to the Chinese translation
"../integrations/README.zh-CN.md"; locate the line with the link text "* 驱动没有
API 或没有[原生集成](../integrations/README.md)的网站。" and replace the target path to
maintain consistent Chinese-doc internal linking.

In `@gitbooks/features/native-tools/coder.zh-CN.md`:
- Line 43: Update the markdown link target for "智能体协作" so it points to the
English page instead of the unfinished Chinese page: replace the reference to
"agent-coordination.zh-CN.md" with "agent-coordination.md" in the line
containing the link (look for the link text "智能体协作" or the existing target
"agent-coordination.zh-CN.md") to avoid a broken/unfinished Chinese page
redirect.

In `@gitbooks/features/native-tools/cron.zh-CN.md`:
- Line 37: The link target for "智能体协作" currently points to
agent-coordination.zh-CN.md which may not exist; update the markdown link target
to the English page agent-coordination.md (i.e., change the reference from
agent-coordination.zh-CN.md to agent-coordination.md) so the link resolves
correctly when the Chinese translation is not yet available.

In `@gitbooks/features/native-tools/README.zh-CN.md`:
- Around line 29-36: Update the internal links in this README table so their
language and targets match: replace references to English pages (e.g.,
"coder.md", "cron.md", "voice.md", "memory-tools.md", "agent-coordination.md",
"system-and-utilities.md", "../integrations/README.md") with their Chinese
counterparts that exist in this batch (append or switch to the .zh-CN.md
variants where available), and ensure the already-correct
"browser-and-computer.zh-CN.md" link remains unchanged; also apply the same
.zh-CN fixes to the similar links referenced later on lines 41-42.

In `@gitbooks/features/native-tools/system-and-utilities.zh-CN.md`:
- Line 28: The text contains a typo: replace the incorrect phrase "工组流" with the
correct "工作流" in the markdown content (the line containing "*
不适合更丰富工具家族的工组流部分。"); update that phrase to "* 不适合更丰富工具家族的工作流部分。" so the document
reads correctly.

In `@gitbooks/features/native-tools/voice.zh-CN.md`:
- Line 32: Fix two Chinese copy issues in the markdown content: remove the
duplicated character in the phrase "有有用的内容" in the sentence starting
"当你让它说话(或它决定有有用的内容要补充)…" and reword the awkward sentence "会议转录像任何其他来源一样" (seen
later in the same file) to read "会议转录像任何其他来源一样落在你本地记忆树中" so the meaning and
readability are correct; update the two exact strings in the document
accordingly.

In `@gitbooks/features/obsidian-wiki/auto-fetch.zh-CN.md`:
- Line 31: Replace the incorrect code-block closing fence string "```text" with
a proper closing fence "```" to ensure the Markdown code block is correctly
terminated; locate the fenced block that begins earlier in the file and change
its ending fence token from "```text" to "```".
- Line 14: Replace the English integration README links that point to
"../integrations/README.md" with the Chinese version
"../integrations/README.zh-CN.md" in this document; search for the link text
"../integrations/README.md" (appears in the sentence describing the periodic
scheduler and elsewhere) and update those occurrences so the doc consistently
links to the zh-CN integration page.

In `@gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md`:
- Line 41: The fenced code block end marker currently uses the literal string
"```text" which breaks Markdown parsing; replace that closing marker with a
plain "```" so the block opens with "```text" (if desired) and closes with "```"
to properly terminate the fenced code block.

In `@gitbooks/features/obsidian-wiki/README.zh-CN.md`:
- Line 24: The markdown code block ending currently uses a fenced token that
includes a language specifier ("```text") instead of the proper closing fence;
locate the unmatched fence in README.zh-CN.md (the code block started/ended
around the snippet containing "```text" at Line 24) and replace the closing
fence with a plain triple backtick ("```") so the block is properly closed and
subsequent content renders correctly.

In `@gitbooks/features/platform.zh-CN.md`:
- Around line 38-53: The code block fence at the end of the snippet is
incorrect: replace the stray "```text" used as a closing fence with a proper
closing triple-backtick to terminate the code block that started with "```text"
at the top; update the closing fence so the block containing the Tauri shell /
Rust core / React frontend diagram is properly closed (match the opening
"```text" fence) to prevent subsequent content from being rendered as code.

In `@gitbooks/features/privacy-and-security.zh-CN.md`:
- Line 21: The link in privacy-and-security.zh-CN.md currently points to
model-routing/local-ai.zh-CN.md which may be missing; update the markdown link
target so the local AI link falls back to the English page by replacing
model-routing/local-ai.zh-CN.md with the English page (e.g.
model-routing/local-ai.md) so the anchor **本地 AI** points to the English
fallback.

In `@gitbooks/features/token-compression.zh-CN.md`:
- Around line 30-38: The markdown code block that begins with "```text" is
incorrectly closed with "```text" again on the last line; update the closing
fence to a plain "```" so the block is properly terminated (locate the opening
"```text" and replace the final "```text" at the end of that block with "```").

In `@gitbooks/overview/getting-started.zh-CN.md`:
- Line 70: Update the markdown link for the display text "**原生语音**" so it points
to the Chinese version of the voice doc instead of the English one: replace the
current link target "../features/native-tools/voice.md" with the Chinese file
"voice.zh-CN.md" (keeping the same relative location and link formatting) so
Chinese readers stay on the localized content.

In `@scripts/i18n-doc-fix.sh`:
- Around line 14-15: The glob loop using the pattern "for f in
gitbooks/**/*.zh-CN.md" must enable bash globstar or be replaced with a
find-based walk (enable via shopt -s globstar) so nested matches aren’t skipped;
the perl fence rewrite (the expression matching ^(```)$) must be changed to only
target opening fences (append "text" to an opening triple-backtick line, e.g.,
match an opening fence with optional trailing spaces and not touch the closing
fence) rather than altering any line that equals ```; and the sidecar removal
regexes (the s/[Ss]idecar[^s]*(sidecar)?//g and s/\bsidecar\b//g patterns) must
be tightened to only remove the standalone word "sidecar" (use case-insensitive
word-boundary matching like \bsidecar\b with an i flag) or explicit
parenthesized/standalone variants so you don’t delete adjacent content—apply
these fixes where the loop, the perl fence rewrite, and the sidecar regexes
appear in the script.
- Around line 18-26: The current perl replacement (perl -i -pe
's/^(```)$/$1text/' in the block guarded by DRY_RUN) indiscriminately rewrites
every standalone ``` line (including closing fences), which breaks CommonMark;
replace that two-step perl approach with a stateful transformation that only
appends "text" to opening fences and leaves closing fences untouched: when not
in DRY_RUN, read each "$f" and track an in_block flag so the first encountered
``` becomes ```text and sets in_block=1, subsequent ``` when in_block resets it
(keeps it as ```), and all other lines are passed through unchanged; remove the
perl '```texttext' fallback since proper state handling prevents
double-appending.

In `@scripts/i18n-doc-scan.sh`:
- Around line 11-13: The UNLOCALIZED command uses a while loop "while read f;
do" which can interpret backslashes in filenames as escapes; change that loop to
use "read -r" (i.e., "while read -r f; do") so filenames are read raw and not
mangled—update the pipeline that assigns UNLOCALIZED (the find ... | while read
f; do ... done) to use read -r.
- Around line 25-38: The script currently misdetects closing fences because it
tests the bare line against ^\`\`\`[a-zA-Z] and never tracks open/close state;
update scripts/i18n-doc-scan.sh to use a read loop with IFS= and read -r when
iterating files, introduce an in_block boolean (e.g., in_block=0) and toggle it
when encountering a fence line: when you see a fence that includes a language
(matches ^\`\`\`[A-Za-z]) set in_block=1 and skip reporting, when you see a bare
fence and in_block==0 treat it as a missing-language opening fence (report via
NO_LANG echo) and set in_block=1, when you see a bare fence and in_block==1
treat it as a closing fence and set in_block=0 (no report); also use
prev_line/next_line only if needed or remove them to avoid confusion.
🪄 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: 9a939803-8665-4662-8690-09993a64e907

📥 Commits

Reviewing files that changed from the base of the PR and between ec9708a and f5970ac.

📒 Files selected for processing (25)
  • .gitignore
  • app/src/lib/i18n/chunks/zh-CN-3.ts
  • app/src/lib/i18n/chunks/zh-CN-5.ts
  • docs/SECURITY_AUDIT.md
  • gitbooks/features/integrations/README.zh-CN.md
  • gitbooks/features/mascot/README.zh-CN.md
  • gitbooks/features/model-routing/README.zh-CN.md
  • gitbooks/features/native-tools/README.zh-CN.md
  • gitbooks/features/native-tools/browser-and-computer.zh-CN.md
  • gitbooks/features/native-tools/coder.zh-CN.md
  • gitbooks/features/native-tools/cron.zh-CN.md
  • gitbooks/features/native-tools/system-and-utilities.zh-CN.md
  • gitbooks/features/native-tools/voice.zh-CN.md
  • gitbooks/features/native-tools/web-scraper.zh-CN.md
  • gitbooks/features/native-tools/web-search.zh-CN.md
  • gitbooks/features/obsidian-wiki/README.zh-CN.md
  • gitbooks/features/obsidian-wiki/agentmemory-backend.zh-CN.md
  • gitbooks/features/obsidian-wiki/auto-fetch.zh-CN.md
  • gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md
  • gitbooks/features/platform.zh-CN.md
  • gitbooks/features/privacy-and-security.zh-CN.md
  • gitbooks/features/token-compression.zh-CN.md
  • gitbooks/overview/getting-started.zh-CN.md
  • scripts/i18n-doc-fix.sh
  • scripts/i18n-doc-scan.sh

1. 作为**智能体工具**,模型可以直接调用。
2. 作为**记忆源**,[自动拉取](../obsidian-wiki/auto-fetch.zh-CN.md)每二十分钟将其同步到[记忆树](../obsidian-wiki/memory-tree.zh-CN.md)。
3. 作为**个人化信号**,你在各服务上的活动为你的偏好模型提供数据。
4. 作为**触发器源**,实时事件(新邮件、新 charge、入站 DM)流入[触发器](triggers.zh-CN.md)流水线,可以自动触发智能体操作。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

将未翻译目标改回英文链接,避免 404。

triggers.zh-CN.md 与当前批次覆盖策略不一致(该页仍应指向英文原文)。建议改为英文目标文件路径。

Suggested patch
-4. 作为**触发器源**,实时事件(新邮件、新 charge、入站 DM)流入[触发器](triggers.zh-CN.md)流水线,可以自动触发智能体操作。
+4. 作为**触发器源**,实时事件(新邮件、新 charge、入站 DM)流入[触发器](triggers.md)流水线,可以自动触发智能体操作。
...
-* [触发器](triggers.zh-CN.md),已连接集成的实时事件以及它们如何触发智能体操作。
+* [触发器](triggers.md),已连接集成的实时事件以及它们如何触发智能体操作。

Also applies to: 83-83

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/integrations/README.zh-CN.md` at line 19, Replace the
localized link target triggers.zh-CN.md with the English original triggers.md
wherever it appears (e.g., the link in the sentence containing
"作为**触发器源**,实时事件...流入[触发器](triggers.zh-CN.md)流水线") to match the repo's coverage
strategy and avoid 404s; ensure you update all occurrences (the reviewer noted
another instance around the second occurrence) so the markdown link points to
triggers.md instead of triggers.zh-CN.md.


- [智能 Token 压缩](../token-compression.zh-CN.md)。什么使大型推理调用负担得起。
- [原生工具](../native-tools/README.zh-CN.md)。不同的工具调用暗示不同的路由。
- [本地 AI(可选)](local-ai.zh-CN.md)。轻量聊天 hint 可以在设备上运行。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

未翻译页面应链接英文版,当前目标可能失效。

Line 63 指向 local-ai.zh-CN.md,建议改为英文目标,和本批次覆盖策略保持一致。

Suggested patch
-- [本地 AI(可选)](local-ai.zh-CN.md)。轻量聊天 hint 可以在设备上运行。
+- [本地 AI(可选)](local-ai.md)。轻量聊天 hint 可以在设备上运行。
📝 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.

Suggested change
- [本地 AI(可选)](local-ai.zh-CN.md)。轻量聊天 hint 可以在设备上运行。
- [本地 AI(可选)](local-ai.md)。轻量聊天 hint 可以在设备上运行。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/model-routing/README.zh-CN.md` at line 63, Update the
broken Chinese page link on README.zh-CN.md: replace the link target
"local-ai.zh-CN.md" with the English page "local-ai.md" (or the canonical
English filename used across this batch) so untranslated pages point to the
English version; edit the line containing "[本地 AI(可选)](local-ai.zh-CN.md)" in
the file and ensure the link text remains the same while the href points to the
English file to match the batch coverage strategy.


## 适用于

* 驱动没有 API 或没有[原生集成](../integrations/README.md)的网站。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

将集成文档链接切到中文版本。

Line 26 当前指向 ../integrations/README.md,建议改为 ../integrations/README.zh-CN.md,保持中文文档内链一致。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/native-tools/browser-and-computer.zh-CN.md` at line 26,
Update the internal integration link in the sentence containing
"../integrations/README.md" so it points to the Chinese translation
"../integrations/README.zh-CN.md"; locate the line with the link text "* 驱动没有
API 或没有[原生集成](../integrations/README.md)的网站。" and replace the target path to
maintain consistent Chinese-doc internal linking.

## 另见

* [系统与工具](system-and-utilities.zh-CN.md) —— `shell`、`node_exec`、`npm_exec` 用于开发循环的其余部分。
* [智能体协作](agent-coordination.zh-CN.md) —— `todo_write`、`spawn_subagent` 用于更大的重构。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

agent-coordination 链接目标应回退到英文页。

Line 43 当前是 agent-coordination.zh-CN.md,按本 PR 说明该页仍在后续批次,建议先链接到英文 agent-coordination.md 避免失效跳转。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/native-tools/coder.zh-CN.md` at line 43, Update the
markdown link target for "智能体协作" so it points to the English page instead of the
unfinished Chinese page: replace the reference to "agent-coordination.zh-CN.md"
with "agent-coordination.md" in the line containing the link (look for the link
text "智能体协作" or the existing target "agent-coordination.zh-CN.md") to avoid a
broken/unfinished Chinese page redirect.

## 另见

* [系统与工具](system-and-utilities.zh-CN.md) —— 一次性 `schedule` 工具。
* [智能体协作](agent-coordination.zh-CN.md) —— 向子智能体扇出的任务。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

修正未落地翻译页的链接目标。

Line 37 指向 agent-coordination.zh-CN.md;若该页面尚未翻译,建议改为英文 agent-coordination.md,避免无效链接。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/native-tools/cron.zh-CN.md` at line 37, The link target for
"智能体协作" currently points to agent-coordination.zh-CN.md which may not exist;
update the markdown link target to the English page agent-coordination.md (i.e.,
change the reference from agent-coordination.zh-CN.md to agent-coordination.md)
so the link resolves correctly when the Chinese translation is not yet
available.

Comment thread gitbooks/overview/getting-started.zh-CN.md Outdated
Comment thread scripts/i18n-doc-fix.sh Outdated
Comment thread scripts/i18n-doc-fix.sh Outdated
Comment thread scripts/i18n-doc-scan.sh
Comment on lines +11 to +13
UNLOCALIZED=$(find gitbooks -name "*.zh-CN.md" -exec grep -l '\.md)' {} \; 2>/dev/null | while read f; do
grep '\.md)' "$f" 2>/dev/null | grep -v '\.zh-CN\.md)' | sed "s|^|$f:|" || true
done)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant section with line numbers
nl -ba scripts/i18n-doc-scan.sh | sed -n '1,80p'

# Search for other instances of `while read` in the same script tree
rg -n --hidden --no-ignore -S "while read( |$)" scripts || true

Repository: tinyhumansai/openhuman

Length of output: 109


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Print file with line numbers (no `nl` available)
awk '{printf "%6d %s\n", NR, $0}' scripts/i18n-doc-scan.sh | sed -n '1,120p'

# Find occurrences of `while read` in the repo (scripts only)
rg -n --hidden --no-ignore -S "while[[:space:]]+read([[:space:]]|$)" scripts || true

Repository: tinyhumansai/openhuman

Length of output: 3522


Use read -r in the while loop to keep filenames intact

On scripts/i18n-doc-scan.sh line 11, while read f; do can treat backslashes as escape characters, potentially corrupting paths.

Suggested fix
-UNLOCALIZED=$(find gitbooks -name "*.zh-CN.md" -exec grep -l '\.md)' {} \; 2>/dev/null | while read f; do
+UNLOCALIZED=$(find gitbooks -name "*.zh-CN.md" -exec grep -l '\.md)' {} \; 2>/dev/null | while read -r f; do
📝 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.

Suggested change
UNLOCALIZED=$(find gitbooks -name "*.zh-CN.md" -exec grep -l '\.md)' {} \; 2>/dev/null | while read f; do
grep '\.md)' "$f" 2>/dev/null | grep -v '\.zh-CN\.md)' | sed "s|^|$f:|" || true
done)
UNLOCALIZED=$(find gitbooks -name "*.zh-CN.md" -exec grep -l '\.md)' {} \; 2>/dev/null | while read -r f; do
grep '\.md)' "$f" 2>/dev/null | grep -v '\.zh-CN\.md)' | sed "s|^|$f:|" || true
done)
🧰 Tools
🪛 Shellcheck (0.11.0)

[info] 11-11: read without -r will mangle backslashes.

(SC2162)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-scan.sh` around lines 11 - 13, The UNLOCALIZED command uses
a while loop "while read f; do" which can interpret backslashes in filenames as
escapes; change that loop to use "read -r" (i.e., "while read -r f; do") so
filenames are read raw and not mangled—update the pipeline that assigns
UNLOCALIZED (the find ... | while read f; do ... done) to use read -r.

Comment thread scripts/i18n-doc-scan.sh
Comment on lines +25 to +38
NO_LANG=$(find gitbooks -name "*.zh-CN.md" -exec sh -c '
for f; do
line_num=0
while IFS= read -r line; do
line_num=$((line_num + 1))
if [[ "$line" == "\`\`\`" ]]; then
# 检查前一行是否也是 ``` 或空(是代码块开始)
# 简单判断:当前行是 ``` 且下一行不是以 ``` 开头(结尾没有语言标识)
prev_line=$(sed "$((line_num - 1))q;d" "$f" 2>/dev/null || echo "")
next_line=$(sed "$((line_num + 1))q;d" "$f" 2>/dev/null || echo "")
if [[ ! "$line" =~ ^\`\`\`[a-zA-Z] ]]; then
echo "$f:$line_num: $line"
fi
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="scripts/i18n-doc-scan.sh"
echo "== file =="
ls -l "$FILE"
echo

echo "== lines 1-120 =="
nl -ba "$FILE" | sed -n '1,120p'

echo
echo "== search: read f / read -r / fence logic =="
rg -n "read f|read -r|\`\`\`|in_block|MD040|missing language|gitbooks" "$FILE" || true

Repository: tinyhumansai/openhuman

Length of output: 232


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="scripts/i18n-doc-scan.sh"

echo "== file =="
ls -l "$FILE"
echo

echo "== lines 1-200 (with numbers via awk) =="
awk '{printf "%5d %s\n", NR, $0}' "$FILE" | sed -n '1,200p'

echo
echo "== search: read f / read -r / fence logic / MD040 =="
rg -n "read f|read -r|\`\`\`|in_block|MD040|missing language|gitbooks" "$FILE" || true

Repository: tinyhumansai/openhuman

Length of output: 4148


MD040 fence detection is flagging closing ``` blocks as “missing language”.

In scripts/i18n-doc-scan.sh (lines ~30-37), the script enters only when the current line is exactly and then unconditionally reports it as missing language because it checks `^[a-zA-Z]against the same bare ``` line (which can never match). This means both opening and closing fences are echoed;prev_line/next_lineare computed but unused. Track open/close state (e.g., anin_block` flag) and only report bare ``` when starting a block.

Also minor: the while read f; do loop (line ~11) should use read -r (and IFS=) to avoid backslash escaping in filenames.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-scan.sh` around lines 25 - 38, The script currently
misdetects closing fences because it tests the bare line against ^\`\`\`[a-zA-Z]
and never tracks open/close state; update scripts/i18n-doc-scan.sh to use a read
loop with IFS= and read -r when iterating files, introduce an in_block boolean
(e.g., in_block=0) and toggle it when encountering a fence line: when you see a
fence that includes a language (matches ^\`\`\`[A-Za-z]) set in_block=1 and skip
reporting, when you see a bare fence and in_block==0 treat it as a
missing-language opening fence (report via NO_LANG echo) and set in_block=1,
when you see a bare fence and in_block==1 treat it as a closing fence and set
in_block=0 (no report); also use prev_line/next_line only if needed or remove
them to avoid confusion.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md (1)

62-63: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

显式指向 zh-CN 文档以避免跳回英文页。

Line 62 的 ./ 和 Line 168 的 ../model-routing/ 是目录链接,可能解析到默认 README.md(英文)。为保证中文阅读链路稳定,建议改为显式 README.zh-CN.md

建议修改
-| `wiki/`                   | Markdown 存储库 —— 见 [Obsidian Wiki](./)      |
+| `wiki/`                   | Markdown 存储库 —— 见 [Obsidian Wiki](./README.zh-CN.md)      |
...
-**路由。** 智能标签页还显示智能体每个任务使用的模型——见[自动模型路由](../model-routing/)。
+**路由。** 智能标签页还显示智能体每个任务使用的模型——见[自动模型路由](../model-routing/README.zh-CN.md)。

Also applies to: 168-168

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md` around lines 62 - 63,
The directory links `./` (line 62) and `../model-routing/` (line 168) currently
point to the default README which may resolve to English; update those Markdown
links to explicitly target the Chinese landing files by replacing `./` with
`./README.zh-CN.md` and `../model-routing/` with
`../model-routing/README.zh-CN.md` (ensure the files exist and names match) so
the Obsidian Wiki links always open the zh-CN README.
🧹 Nitpick comments (1)
gitbooks/features/model-routing/local-ai.zh-CN.md (1)

12-12: 💤 Low value

Polish awkward phrasing for readability.

“硬件敏感的占用” reads awkwardly; consider “对硬件较敏感的资源占用” (or equivalent) for clearer Chinese.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/features/model-routing/local-ai.zh-CN.md` at line 12, Replace the
awkward phrase "硬件敏感的占用" in the sentence that contrasts on-device vs cloud
responsibilities with a clearer Chinese expression such as "对硬件较敏感的资源占用" (or an
equivalent like "对硬件敏感的资源使用"), ensuring the revised sentence reads smoothly:
"结果是对硬件较敏感的资源占用,与产品其余部分所需的东西冲突。" Update the surrounding clause if needed so the
full sentence remains fluent and natural.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gitbooks/features/mascot/meeting-agents.zh-CN.md`:
- Line 12: The sentence contains duplicated wording "决定有有用的内容" in the line that
reads "在你(或它)决定有有用的内容要补充时做出贡献"; update that phrase to "决定有用的内容" so the sentence
becomes "...在你(或它)决定有用的内容要补充时做出贡献", preserving the rest of the sentence
punctuation and spacing.
- Line 32: Replace the English-target internal links on this zh-CN page with
their zh-CN counterparts so localized navigation works: update the link in the
sentence referencing "自动模型路由" to point to ../model-routing/README.zh-CN.md and
change the links listed in the "另见" section to ../privacy-and-security.zh-CN.md
and ../model-routing/README.zh-CN.md (and any other English targets on this page
such as at lines ~75 and ~94) so all internal anchors reference the zh-CN pages.

In `@gitbooks/features/model-routing/local-ai.zh-CN.md`:
- Line 18: Update internal links in
gitbooks/features/model-routing/local-ai.zh-CN.md so they point to the Chinese
translations instead of English pages: replace occurrences of memory-tree.md,
voice.md, README.md, and privacy-and-security.md (and the other instances noted
at lines 30, 33, 36 and 97–99) with memory-tree.zh-CN.md, voice.zh-CN.md,
README.zh-CN.md, and privacy-and-security.zh-CN.md respectively to ensure
consistent in-language navigation.

In `@gitbooks/features/native-tools/agent-coordination.zh-CN.md`:
- Line 22: Update the Chinese description for the row containing
`check_onboarding_status` / `complete_onboarding`: replace “门控行为于用户是否完成入门” with
the clearer phrasing “根据用户是否完成入门进行门控” so the gate logic reads naturally and
unambiguously in Chinese.

In `@gitbooks/features/native-tools/integrations.zh-CN.md`:
- Line 8: The phrase "通过单一代理工具表面调用" is ambiguous; replace it with a clearer term
such as "通过单一代理工具接口调用" or "通过统一代理工具调用" in the sentence describing OpenHuman
agents calling third-party services (the string "通过单一代理工具表面调用" in the text).
Update that exact phrase to the chosen alternative and keep the rest of the
sentence intact so it reads clearly (e.g., "OpenHuman 的智能体可以通过单一代理工具接口调用 [118+
第三方服务]——Gmail、Notion、GitHub、Slack、Stripe、日历,以及长长的尾部的服务。").

---

Outside diff comments:
In `@gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md`:
- Around line 62-63: The directory links `./` (line 62) and `../model-routing/`
(line 168) currently point to the default README which may resolve to English;
update those Markdown links to explicitly target the Chinese landing files by
replacing `./` with `./README.zh-CN.md` and `../model-routing/` with
`../model-routing/README.zh-CN.md` (ensure the files exist and names match) so
the Obsidian Wiki links always open the zh-CN README.

---

Nitpick comments:
In `@gitbooks/features/model-routing/local-ai.zh-CN.md`:
- Line 12: Replace the awkward phrase "硬件敏感的占用" in the sentence that contrasts
on-device vs cloud responsibilities with a clearer Chinese expression such as
"对硬件较敏感的资源占用" (or an equivalent like "对硬件敏感的资源使用"), ensuring the revised
sentence reads smoothly: "结果是对硬件较敏感的资源占用,与产品其余部分所需的东西冲突。" Update the surrounding
clause if needed so the full sentence remains fluent and natural.
🪄 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: b44eef09-6afe-48c1-9dd5-9ab90a1b5b9f

📥 Commits

Reviewing files that changed from the base of the PR and between f5970ac and 9945b61.

📒 Files selected for processing (13)
  • gitbooks/features/integrations/triggers.zh-CN.md
  • gitbooks/features/mascot/meeting-agents.zh-CN.md
  • gitbooks/features/model-routing/local-ai.zh-CN.md
  • gitbooks/features/native-tools/agent-coordination.zh-CN.md
  • gitbooks/features/native-tools/integrations.zh-CN.md
  • gitbooks/features/native-tools/memory-tools.zh-CN.md
  • gitbooks/features/native-tools/voice.zh-CN.md
  • gitbooks/features/obsidian-wiki/README.zh-CN.md
  • gitbooks/features/obsidian-wiki/auto-fetch.zh-CN.md
  • gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md
  • gitbooks/features/platform.zh-CN.md
  • gitbooks/features/subconscious.zh-CN.md
  • gitbooks/features/token-compression.zh-CN.md
✅ Files skipped from review due to trivial changes (7)
  • gitbooks/features/native-tools/voice.zh-CN.md
  • gitbooks/features/integrations/triggers.zh-CN.md
  • gitbooks/features/native-tools/memory-tools.zh-CN.md
  • gitbooks/features/obsidian-wiki/README.zh-CN.md
  • gitbooks/features/platform.zh-CN.md
  • gitbooks/features/subconscious.zh-CN.md
  • gitbooks/features/obsidian-wiki/auto-fetch.zh-CN.md

Comment thread gitbooks/features/mascot/meeting-agents.zh-CN.md Outdated
Comment thread gitbooks/features/mascot/meeting-agents.zh-CN.md Outdated
Comment thread gitbooks/features/model-routing/local-ai.zh-CN.md Outdated
Comment thread gitbooks/features/native-tools/agent-coordination.zh-CN.md Outdated
Comment thread gitbooks/features/native-tools/integrations.zh-CN.md Outdated
@JAYcodr
Copy link
Copy Markdown
Contributor Author

JAYcodr commented May 21, 2026

@graycyrus The cargo test failure is No space left on device on the GitHub Actions runner. This PR only touches .zh-CN.md docs files with zero Rust code changes. Could you re-run the failed job or override the gate? Thanks!

Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — graycyrus

Solid batch of zh-CN translations. The doc quality is good and the coverage is meaningful for Chinese users. Two issues need addressing before merge — both are about scope, not translation quality.

Summary of changes

Area Files Notes
i18n docs (new) 26 .zh-CN.md files Core feature translations — integrations, mascot, model-routing, native-tools, obsidian-wiki, privacy, token-compression, getting-started
i18n strings (fix) zh-CN-3.ts, zh-CN-5.ts Previously untranslated UI strings now localized
Scripts i18n-doc-fix.sh, i18n-doc-scan.sh New validation/cleanup utilities
Unrelated docs/SECURITY_AUDIT.md, .gitignore See findings below

What CodeRabbit already covers (skipped)

CodeRabbit flagged ~18 issues across link targets, fence syntax, typos, and script bugs. I'm not repeating those — see their review thread. Note: several of their "broken link" findings (triggers.zh-CN.md, local-ai.zh-CN.md, agent-coordination.zh-CN.md) are actually false positives since those files ARE being added in this PR.

Comment thread docs/SECURITY_AUDIT.md Outdated
Comment thread .gitignore Outdated
Comment thread gitbooks/features/native-tools/README.zh-CN.md Outdated
@M3gA-Mind
Copy link
Copy Markdown
Contributor

@JAYcodr unresolved review feedback from graycyrus — please address before we review.

@JAYcodr
Copy link
Copy Markdown
Contributor Author

JAYcodr commented May 21, 2026

Hi @graycyrus, thanks for the detailed review. Here's how I'm addressing each point:

1. SECURITY_AUDIT.md — 超出范围
Agreed, this doesn't belong in an i18n PR. I'll remove it from this branch and open a separate PR for the security audit so it can be reviewed independently.

**2. Broken closing fences (````text)** Root cause: scripts/i18n-doc-fix.sh` blindly replaced all bare withtext.
Fix plan:

  • Update the script to distinguish opening vs closing fences (only add text to opening fences)
  • Re-run the script and fix all affected .zh-CN.md files:
    • gitbooks/features/obsidian-wiki/README.zh-CN.md
    • gitbooks/features/platform.zh-CN.md
    • gitbooks/features/obsidian-wiki/memory-tree.zh-CN.md
    • gitbooks/features/token-compression.zh-CN.md

3. Destructive sidecar regex in i18n-doc-fix.sh
You're right, [^s]* is dangerously greedy. I'll switch to word-boundary matching:

perl -i -pe 's/\bsidecar\b/in-process core/gi' "$f"
4. Missing trailing newlines
Will fix in the script.
I'll push the fixes shortly and re-request review.

…gitignore scope, localize links in README.zh-CN.md

- Remove docs/SECURITY_AUDIT.md (out of scope for i18n PR)
- Revert unrelated .gitignore additions (.codegraph/, docs/codegraph-architecture.md)
- Localize all native-tools/README.zh-CN.md table links to .zh-CN.md targets
@JAYcodr
Copy link
Copy Markdown
Contributor Author

JAYcodr commented May 21, 2026

@graycyrus All three points addressed in f85695c:
▌ • Removed docs/SECURITY_AUDIT.md entirely
▌ • Reverted unrelated .gitignore additions (.codegraph/, docs/codegraph-architecture.md)
▌ • Localized all table and "See also" links in native-tools/README.zh-CN.md to .zh-CN.md targets Ready for re-re
▌ thanks!

…ine in i18n-doc-fix.sh

- Replace greedy [Ss]idecar[^s]* regex with word-boundary \bsidecar\b match
- Add missing trailing newline to script file
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/i18n-doc-fix.sh (1)

13-13: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Step labels are inconsistent (1/3, 3/3, 4/4).

The script has 4 passes but labels them 【1/3】, 【2/3】, 【3/3】, 【4/4】. Make them all /4 for consistent progress output.

Proposed fix
-echo "【1/3】修复裸代码块..."
+echo "【1/4】修复裸代码块..."
@@
-echo "【2/3】修复 http:// → https://..."
+echo "【2/4】修复 http:// → https://..."
@@
-echo "【3/3】移除 sidecar 术语(core 已内联)..."
+echo "【3/4】移除 sidecar 术语(core 已内联)..."

Also applies to: 51-51, 68-68

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-fix.sh` at line 13, Update the inconsistent progress labels
in the script by changing every echo that shows a step like "【1/3】", "【2/3】",
"【3/3】" to use "/4" instead (i.e., "【1/4】", "【2/4】", "【3/4】") so the four passes
report consistent progress; locate the echo statements by their current text
(e.g., the lines starting with echo "【1/3】修复裸代码块...", echo "【2/3】...", echo
"【3/3】...") and leave the final "【4/4】" as-is.
♻️ Duplicate comments (2)
scripts/i18n-doc-fix.sh (2)

14-14: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

gitbooks/**/*.zh-CN.md still requires globstar to recurse.

Without shopt -s globstar, ** behaves like * in bash and nested matches are silently skipped — all four passes are affected. Either enable globstar at the top of the script, or switch to a find-based walk.

Proposed fix
 #!/bin/bash
+shopt -s globstar nullglob
 # i18n-doc-fix.sh - 自动修复可识别的问题
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-fix.sh` at line 14, The glob pattern gitbooks/**/*.zh-CN.md
requires Bash globstar to recurse; enable it by adding a shopt -s globstar near
the top of scripts/i18n-doc-fix.sh before the for loop (so the for f in
gitbooks/**/*.zh-CN.md; do line works), or replace that loop with a find-based
walk (e.g., use find gitbooks -type f -name "*.zh-CN.md" with a null-delimited
read loop) to reliably discover nested files; update only the script
initialization or the loop accordingly.

22-25: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Closing code fences are still being rewritten to ```text.

perl -i -pe 's/^(```)$/$1text/' indiscriminately rewrites every bare line — including closing fences. Per CommonMark, closing fences cannot carry an info string, so spec-compliant renderers may treat the block as unclosed. The follow-up `s/texttext/```text/only catches the case where the opening was alreadytext`-tagged; it does not protect closing fences.

Use a stateful pass that only annotates opening fences:

Proposed fix
-        perl -i -pe 's/^(```)$/$1text/' "$f"
-        # 但要处理 ```text 已经存在的情况,我们再把 ```texttext 变回来
-        perl -i -pe 's/```texttext/```text/' "$f"
+        awk '
+          /^```$/ {
+            if (!in_block) { print "```text"; in_block=1; next }
+            else          { print "```";     in_block=0; next }
+          }
+          { print }
+        ' "$f" > "$f.tmp" && mv "$f.tmp" "$f"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-fix.sh` around lines 22 - 25, The current two perl lines
(perl -i -pe 's/^(```)$/$1text/' "$f" and perl -i -pe 's/```texttext/```text/'
"$f") wrongly annotate closing fences; replace them with a stateful awk pass
that tracks in_block and only converts bare opening "```" to "```text" while
leaving closing fences as "```" (e.g. the provided awk script that prints
"```text" when !in_block and "```" when in_block, writing to "$f.tmp" and mv
back to "$f").
🧹 Nitpick comments (1)
scripts/i18n-doc-fix.sh (1)

1-1: ⚡ Quick win

Consider enabling strict mode.

Adding set -euo pipefail would make the script fail fast on unexpected errors (e.g., a failing perl or tail invocation) instead of silently continuing through subsequent passes. Combined with shopt -s globstar nullglob, this also makes the empty-glob case safe.

 #!/bin/bash
+set -euo pipefail
+shopt -s globstar nullglob
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/i18n-doc-fix.sh` at line 1, Add strict mode to the script: enable
"set -euo pipefail" at the top (after the existing shebang) so the script exits
on errors, undefined variables, and pipeline failures, and also enable "shopt -s
globstar nullglob" to make recursive globs and empty-glob handling safe; update
any code relying on undefined variables or empty-glob behavior accordingly (look
for the script header and any glob usages in this file to verify compatibility).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@scripts/i18n-doc-fix.sh`:
- Line 13: Update the inconsistent progress labels in the script by changing
every echo that shows a step like "【1/3】", "【2/3】", "【3/3】" to use "/4" instead
(i.e., "【1/4】", "【2/4】", "【3/4】") so the four passes report consistent progress;
locate the echo statements by their current text (e.g., the lines starting with
echo "【1/3】修复裸代码块...", echo "【2/3】...", echo "【3/3】...") and leave the final
"【4/4】" as-is.

---

Duplicate comments:
In `@scripts/i18n-doc-fix.sh`:
- Line 14: The glob pattern gitbooks/**/*.zh-CN.md requires Bash globstar to
recurse; enable it by adding a shopt -s globstar near the top of
scripts/i18n-doc-fix.sh before the for loop (so the for f in
gitbooks/**/*.zh-CN.md; do line works), or replace that loop with a find-based
walk (e.g., use find gitbooks -type f -name "*.zh-CN.md" with a null-delimited
read loop) to reliably discover nested files; update only the script
initialization or the loop accordingly.
- Around line 22-25: The current two perl lines (perl -i -pe 's/^(```)$/$1text/'
"$f" and perl -i -pe 's/```texttext/```text/' "$f") wrongly annotate closing
fences; replace them with a stateful awk pass that tracks in_block and only
converts bare opening "```" to "```text" while leaving closing fences as "```"
(e.g. the provided awk script that prints "```text" when !in_block and "```"
when in_block, writing to "$f.tmp" and mv back to "$f").

---

Nitpick comments:
In `@scripts/i18n-doc-fix.sh`:
- Line 1: Add strict mode to the script: enable "set -euo pipefail" at the top
(after the existing shebang) so the script exits on errors, undefined variables,
and pipeline failures, and also enable "shopt -s globstar nullglob" to make
recursive globs and empty-glob handling safe; update any code relying on
undefined variables or empty-glob behavior accordingly (look for the script
header and any glob usages in this file to verify compatibility).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c07ad8ad-0a6c-4447-8897-58de7d1910ea

📥 Commits

Reviewing files that changed from the base of the PR and between f85695c and bf97812.

📒 Files selected for processing (1)
  • scripts/i18n-doc-fix.sh

agent:skill-master added 2 commits May 22, 2026 02:12
…l fences, strict mode

- Replace bash ** glob with find + null-delimited read (bash 3.2 compat)
- Replace destructive perl fence regex with stateful opening-only rewrite
- Add set -euo pipefail for strict error handling
- Normalize step labels to /4 consistency
The script cannot reliably distinguish opening from closing fences.
Every run risks double-appending 'text' to already-correct files or
misclassifying closing fences as openings. These fixes are better done
once, correctly, at translation time rather than by an automated rewriter.
@JAYcodr
Copy link
Copy Markdown
Contributor Author

JAYcodr commented May 21, 2026

@graycyrus All issues addressed:

  1. SECURITY_AUDIT.md — Removed from this PR, will open a dedicated security PR separately.
  2. **Closing fences (````text)** — Removed the destructive i18n-doc-fix.sh` script, manually fixed all 4 affected `.zh-CN.md` files back to bare `````.
  3. Sidecar regex — Fixed the greedy [^s]* to word-boundary \bsidecar\b in the script (script now removed entirely from this PR).

CI is all green. Ready for re-review.

Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — graycyrus (continuation)

All three findings from my previous REQUEST_CHANGES have been addressed:

  • SECURITY_AUDIT.md removed
  • ✅ Unrelated .codegraph/ gitignore entries removed
  • native-tools/README.zh-CN.md table now links to .zh-CN.md targets

Nice work cleaning those up. The translation quality remains solid.

One remaining pattern I noticed that CodeRabbit only partially flagged: several files still link to English .md targets where the .zh-CN.md version exists in this PR. Noted inline below — all minor.


## 系统要求

OpenHuman 支持 **macOS、Windows 和 Linux** 桌面端。建议 4 GB 以上内存;如果要摄入超大型邮箱或仓库,或在同一台机器上运行[本地模型](../features/model-routing/local-ai.md),建议 16 GB 以上。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] Several links in this file still point to English targets where zh-CN versions exist in this very PR:

  • Line 18: local-ai.mdlocal-ai.zh-CN.md
  • Line 22: meeting-agents.mdmeeting-agents.zh-CN.md
  • Line 67: meeting-agents.mdmeeting-agents.zh-CN.md
  • Line 71: subconscious.mdsubconscious.zh-CN.md

CodeRabbit caught the voice.md one at line 70 but missed these four.


## 另见

* [第三方集成](../integrations/README.md)。自动拉取运行的连接器层。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] The "另见" section links to ../integrations/README.md — should be ../integrations/README.zh-CN.md since that file exists in this PR. Same issue as line 14 (which CodeRabbit already flagged).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@graycyrus 感谢 review!所有 4 处链接已修复,外加 CodeRabbit 之前标记的 voice.md 和 auto-fetch.zh-CN.md 中的 2 处README.md,一并本地化了:
• local-ai.md → local-ai.zh-CN.md
• meeting-agents.md → meeting-agents.zh-CN.md(2 处)
• voice.md → voice.zh-CN.md
• subconscious.md → subconscious.zh-CN.md
• integrations/README.md → integrations/README.zh-CN.md(2 处)
最新 commit: 036e9d4。Ready for re-review 🙏

graycyrus
graycyrus previously approved these changes May 22, 2026
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@graycyrus graycyrus dismissed their stale review May 22, 2026 10:39

Approval withdrawn

@senamakel senamakel merged commit 0f439fe into tinyhumansai:main May 22, 2026
24 checks passed
@senamakel
Copy link
Copy Markdown
Member

huge thanks @JAYcodr for landing this massive zh-cn translation batch, 8 core modules plus cleaning up all those stray internal links is such a win for chinese-speaking openhuman users 🙌 also stoked this is your first merge here, you've earned exclusive access to our builder discord at https://discord.tinyhumans.ai/, come hang with the rest of the crew 🎉

@JAYcodr
Copy link
Copy Markdown
Contributor Author

JAYcodr commented May 22, 2026

感谢合并!清理内部链接比翻译本身还麻烦,很高兴能帮中文用户减少 friction。Discord 已加入,期待和 builder 们交流。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants