Repository navigation
chore(i18n): use 智能体 for Chinese Agent copy - #25767
Conversation
Simplified Chinese rendered the Agent concept as 代理, which collides with 代理 = proxy. Standardize on 智能体 for Agent (and 子智能体 for subagent), while keeping 代理 for proxy senses: HTTP/network proxy, SSH Proxy Command, reverse proxy, and browser user agent. - Converted 131 zh catalog values (incl. 子代理 -> 子智能体); 26 proxy / user-agent values left as 代理. - locale-phrase-fixes.mjs: 客服人员/代理商/座席 -> 智能体, 代理 -> 智能体 when the English names an agent (guard excludes "user agent"); removed the old 智能体 -> 代理 rule so the pipeline no longer reverts it. - Updated value/key/search/macos-tcc overrides to 智能体; proxy keyword and proxy override entries unchanged. - Updated the two policy tests that pinned the old 代理 output. Gates: catalog verify, coverage --check, extraction, runtime-catalog, and the locale vitest suites (296 tests) pass.
📝 WalkthroughWalkthroughThe change updates Simplified Chinese agent terminology from “代理” to “智能体” across translation rules, overrides, tests, and renderer locale strings. The phrase-repair rule now limits this replacement to agent and subagent meanings, with exceptions for English terms preceded by Priority: ⬇️ Low Merge Risk: 🔵 Low · up to The Chinese repair rule could mislabel a user-agent translation, and the subagent activity panel has misleading and untranslated labels. These are localized, limited-impact issues, so overall merge risk is low. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
18395ed6-e25a-428d-a64c-a533019e46d5
📒 Files selected for processing (10)
config/scripts/locale-key-overrides.mjsconfig/scripts/locale-macos-tcc-key-overrides.mjsconfig/scripts/locale-phrase-fixes.mjsconfig/scripts/locale-search-keyword-overrides.mjsconfig/scripts/locale-translation-policy.test.mjsconfig/scripts/locale-translation-policy.zh-round5.test.mjsconfig/scripts/locale-value-overrides.mjsconfig/scripts/locale-zh-value-overrides.mjsconfig/update-translation.txtsrc/renderer/src/i18n/locales/zh.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| { pattern: /虎鲸:\/\//g, replacement: 'orca://', whenEnIncludes: 'orca://' }, | ||
| { pattern: /代理商/g, replacement: '代理', whenEnIncludes: 'agent' }, | ||
| { pattern: /智能体/g, replacement: '代理', whenEnIncludes: 'agent' }, | ||
| { pattern: /代理商/g, replacement: '智能体', whenEnIncludes: 'agent' }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Narrow or drop the unconditional 代理商 rule.
代理商 means "reseller/distributor" or "agency". It also appears in machine-translated proxy text. The rule fires on any English containing "agent", including "user agent". The user[ -] exclusion on the next rule does not apply here. A "user agent" string translated as 用户代理商 would become 用户智能体. Reuse the same whenEnMatches guard on this rule.
Proposed fix
- { pattern: /代理商/g, replacement: '智能体', whenEnIncludes: 'agent' },
+ { pattern: /代理商/g, replacement: '智能体', whenEnMatches: /(?<!user[ -])(?:sub)?agents?\b/i },📝 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.
| { pattern: /代理商/g, replacement: '智能体', whenEnIncludes: 'agent' }, | |
| { pattern: /代理商/g, replacement: '智能体', whenEnMatches: /(?<!user[ -])(?:sub)?agents?\b/i }, |
| "startedOne": "踢掉 1 个子智能体", | ||
| "startedN": "启动 {{value0}} 子智能体", | ||
| "ranOne": "Ran 1 子智能体", | ||
| "ranN": "Ran {{value0}} 子智能体", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '17935,17975p' src/renderer/src/i18n/locales/zh.json
rg -n '"(startedOne|startedN|ranOne|ranN)"' src/renderer/src/i18n/localesRepository: stablyai/orca
Length of output: 3568
🏁 Script executed:
rg -n -F -- 'startedOne' src/renderer/src --glob '!i18n/locales/**'
rg -n -F -- 'startedN' src/renderer/src --glob '!i18n/locales/**'
rg -n -F -- 'ranOne' src/renderer/src --glob '!i18n/locales/**'
rg -n -F -- 'ranN' src/renderer/src --glob '!i18n/locales/**'
rg -n -F -- '"startedOne"' src/renderer/src/i18n/locales/en.json
rg -n -F -- '"startedN"' src/renderer/src/i18n/locales/en.json
rg -n -F -- '"ranOne"' src/renderer/src/i18n/locales/en.json
rg -n -F -- '"ranN"' src/renderer/src/i18n/locales/en.jsonRepository: stablyai/orca
Length of output: 3577
🏁 Script executed:
nl -ba src/renderer/src/components/native-chat/NativeChatSubagentRun.tsx | sed -n '200,280p'
nl -ba src/renderer/src/i18n/locales/zh.json | sed -n '17944,17957p'
nl -ba src/renderer/src/i18n/locales/en.json | sed -n '18158,18169p'Repository: stablyai/orca
Length of output: 5624
Translate the subagent headlines accurately.
The renderer uses started* while any child is working and ran* when none are working. 踢掉 means removing a child, and Ran remains untranslated.
Suggested translation
- "startedOne": "踢掉 1 个子智能体",
- "startedN": "启动 {{value0}} 子智能体",
- "ranOne": "Ran 1 子智能体",
- "ranN": "Ran {{value0}} 子智能体",
+ "startedOne": "启动了 1 个子智能体",
+ "startedN": "启动了 {{value0}} 个子智能体",
+ "ranOne": "运行了 1 个子智能体",
+ "ranN": "运行了 {{value0}} 个子智能体",📝 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.
| "startedOne": "踢掉 1 个子智能体", | |
| "startedN": "启动 {{value0}} 子智能体", | |
| "ranOne": "Ran 1 子智能体", | |
| "ranN": "Ran {{value0}} 子智能体", | |
| "startedOne": "启动了 1 个子智能体", | |
| "startedN": "启动了 {{value0}} 个子智能体", | |
| "ranOne": "运行了 1 个子智能体", | |
| "ranN": "运行了 {{value0}} 个子智能体", |
Six strings merged from main (administrator restart summary, hand-off dialog title, daemon kill-all, three CloseTerminalDialog agent titles) still used 代理 for AI agents after the merge. Re-applies the stablyai#25767 terminology per-item.
Simplified Chinese names AI agents 智能体 (stablyai#25767; the sibling dashboard copy is being re-aligned in stablyai#43434), and 编队 reads as a team of agents where 舰队 reads as a naval fleet.
Simplified Chinese names AI agents 智能体 (stablyai#25767; the sibling dashboard copy is being re-aligned in stablyai#43434), and 编队 reads as a team of agents where 舰队 reads as a naval fleet.
Upstream merged 919 commits since the PR base (a private period and a bulk MT refresh), re-introducing 代理 across the catalogs and wiping the earlier fixes. Re-applies the stablyai#25767 terminology per item: - 505 mechanical 代理→智能体 (EN source matches \b(sub)?agents?\b) - orchestration-worker family unified on 工作智能体 (29 keys incl. workspaceCleanup rules; main mixed 工作者/工人/工作进程; CSV-preview and plugin workers keep 工作进程) - dc708f3eff: EN Close agents was 紧密代理, now 关闭智能体 - 2 untranslated Agent/agent strings localized Excluded (pre-existing wrong-sense copy, documented in stablyai#43430): useMacosTccPromptNotice.titleOne/titleMany, TerminalQuickCommandDialog. ed04233b3e, ActivityPrototypePage.770d458144
ELI5
In Simplified Chinese, Orca called AI agents "代理" — the same word used for a network "proxy". That made labels like "Agents" and "Proxy Command" read identically. This change calls agents "智能体" everywhere, while keeping "代理" where it really means a proxy.
What Changed
zh.jsonvalues were converted. 代理 is kept for genuine proxy senses — HTTP/network proxy, SSH Proxy Command, reverse proxy, and browser "user agent" (26 values left unchanged).config/scripts/locale-phrase-fixes.mjs:客服人员/代理商/座席→ 智能体, and代理→ 智能体 when the English names an agent (guarded to exclude "user agent"); removed the old智能体→代理rule that would have reverted the change.locale-value-overrides,locale-key-overrides,locale-macos-tcc-key-overrides,locale-zh-value-overrides, andlocale-search-keyword-overrides(agent/agents→ 智能体,proxy→ 代理).Why
Removes a real ambiguity between "agent" and "proxy" in the Chinese UI and makes Orca's agent terminology consistent with the rest of the catalog (which already used 智能体 in many places). Alternative — changing only
zh.json— was rejected because the repair pipeline would revert 智能体 back to 代理 on the next localization run and the policy tests would fail.Linked Issue
N/A — recurring translation maintenance; tracked in
config/update-translation.txt(Terminology change 2026-10-06).Visual Proof
N/A — locale JSON and translation-policy values only; rendered through the existing i18n path.
Testing
Verification (all pass):
node config/scripts/verify-localization-catalog.mjs— all five locales 15278/15289, 0 interpolation mismatches, 0 generic-term regressionsnode config/scripts/audit-localization-coverage.mjs --checknode config/scripts/verify-localization-extraction.mjsnode config/scripts/generate-runtime-required-english-catalog.mjspnpm run check:code-quality:changed— 0 new findingsNotes
Only 代理 meanings that are proxies were preserved, not just those under the literal "HTTP settings" section: SSH
Proxy Command, reverse proxy, update proxy, and browser "user agent" would be nonsense if rendered with 智能体. If you want those converted too, say so and I'll scope it.