Skip to content

chore(i18n): use 智能体 for Chinese Agent copy - #25767

Merged
AmethystLiang merged 1 commit into
mainfrom
translation-update
Oct 6, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
translation-update

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 0
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​180 $\color{#cf222e}{\Huge{\mathbf{−}}}$​161 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​19

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

  • Before: Simplified Chinese used 代理 for both the Agent concept and proxies, so "Agents", "Subagent", and "Proxy Command" were ambiguous.
  • After: the Agent concept is 智能体 (subagent is 子智能体). 131 zh.json values were converted. 代理 is kept for genuine proxy senses — HTTP/network proxy, SSH Proxy Command, reverse proxy, and browser "user agent" (26 values left unchanged).
  • Mechanism: updated the translation policy so the pipeline enforces it, not just the catalog:
    • 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.
    • Overrides updated to match: locale-value-overrides, locale-key-overrides, locale-macos-tcc-key-overrides, locale-zh-value-overrides, and locale-search-keyword-overrides (agent/agents → 智能体, proxy → 代理).
    • Updated the two policy tests that pinned the old 代理 output.

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

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Verification (all pass):

  • node config/scripts/verify-localization-catalog.mjs — all five locales 15278/15289, 0 interpolation mismatches, 0 generic-term regressions
  • node config/scripts/audit-localization-coverage.mjs --check
  • node config/scripts/verify-localization-extraction.mjs
  • node config/scripts/generate-runtime-required-english-catalog.mjs
  • vitest locale suites — 296 tests pass, including the updated zh policy tests and the proxy-vs-agent policy test
  • pnpm run check:code-quality:changed — 0 new findings

Notes

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.

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.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Walkthrough

The 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 user or user-. Proxy meanings and browser “user agent” remain distinct.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 10ecc

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)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: using 智能体 for Chinese Agent copy.
Description check ✅ Passed The description explains the user-facing change, rationale, implementation, visual-proof exception, and reported test results. The Linked Issue section says N/A, but the template requires an issue lin…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18395ed6-e25a-428d-a64c-a533019e46d5
📥 Commits

Reviewing files that changed from the base of the PR and between 1b52be6 and 10eccd6.

📒 Files selected for processing (10)
  • config/scripts/locale-key-overrides.mjs
  • config/scripts/locale-macos-tcc-key-overrides.mjs
  • config/scripts/locale-phrase-fixes.mjs
  • config/scripts/locale-search-keyword-overrides.mjs
  • config/scripts/locale-translation-policy.test.mjs
  • config/scripts/locale-translation-policy.zh-round5.test.mjs
  • config/scripts/locale-value-overrides.mjs
  • config/scripts/locale-zh-value-overrides.mjs
  • config/update-translation.txt
  • src/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' },

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.

🎯 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.

Suggested change
{ pattern: /代理商/g, replacement: '智能体', whenEnIncludes: 'agent' },
{ pattern: /代理商/g, replacement: '智能体', whenEnMatches: /(?<!user[ -])(?:sub)?agents?\b/i },

Comment on lines +17950 to +17953
"startedOne": "踢掉 1 个子智能体",
"startedN": "启动 {{value0}} 子智能体",
"ranOne": "Ran 1 子智能体",
"ranN": "Ran {{value0}} 子智能体",

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.

🎯 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/locales

Repository: 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.json

Repository: 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.

Suggested change
"startedOne": "踢掉 1 个子智能体",
"startedN": "启动 {{value0}} 子智能体",
"ranOne": "Ran 1 子智能体",
"ranN": "Ran {{value0}} 子智能体",
"startedOne": "启动了 1 个子智能体",
"startedN": "启动了 {{value0}} 个子智能体",
"ranOne": "运行了 1 个子智能体",
"ranN": "运行了 {{value0}} 个子智能体",

@AmethystLiang
AmethystLiang merged commit 059e81a into main Oct 6, 2026
12 checks passed
YorrickBao added a commit to YorrickBao/orca that referenced this pull request Nov 17, 2026
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.
zengwenliang416 pushed a commit to zengwenliang416/orca that referenced this pull request Nov 19, 2026
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.
zengwenliang416 added a commit to zengwenliang416/orca that referenced this pull request Nov 19, 2026
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.
YorrickBao added a commit to YorrickBao/orca that referenced this pull request Nov 20, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant