Skip to content

fix(i18n): correct native-chat subagent and tool-run summary strings in zh/ja/ko/fr - #33561

Merged
nwparker merged 1 commit into
stablyai:mainfrom
beduldul:fix/i18n-subagent-kicked-off
Oct 26, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
beduldul:fix/i18n-subagent-kicked-off

Conversation

@beduldul

@beduldul beduldul commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a chat says a subagent was started, the Chinese, Japanese and Korean text said it was fired or kicked out, and two places still showed the English word Ran. The Chinese tool summary also dropped its counter words ("run 2 command" instead of "run 2 条 commands") and glued clauses together with an English comma. This fixes the wording and lets each language pick its own list separator.

What Changed

Subagent summaries (before -> after):

Locale Key Before After
zh startedOne 踢掉 1 个子智能体 启动 1 个子智能体
zh startedN 启动 {{value0}} 子智能体 启动 {{value0}} 个子智能体
zh ranOne / ranN Ran 1 子智能体 已运行 1 个子智能体
ja startedOne 1 人のサブ Agent を解雇しました 1 個のサブ Agent を起動しました
ja startedN {{value0}} サブ Agent をキックオフしました {{value0}} 個のサブ Agent を起動しました
ja ranOne / ranN 1 人の / {{value0}} サブ Agent を実行しました 1 個の / {{value0}} 個のサブ Agent を実行しました
ko startedOne 서브에이전트 1명 추방 하위 에이전트 1개가 시작되었습니다.
fr startedN Lancement des sous-agents {{value0}} A lancé {{value0}} sous-agents
fr ranN Ran les sous-agents {{value0}} A exécuté {{value0}} sous-agents

Tool-run summary in zh: added measure words (个 / 条 / 次), fixed the 然 typo (-> 运行) and the noun 清单 (-> 列出), and join clauses with 、 and 并:

before: 已搜索 1 次, 使用 1 集成, 读取 1 个文件, 已编辑 1 个文件 和 运行 2 命令
after:  已搜索 1 次、使用 1 个集成、读取 1 个文件、已编辑 1 个文件并运行 2 条命令

Mechanism: joinNativeChatToolRunClauses used to hardcode ', ' when joining leading clauses. NativeChatToolRunSentenceWords.list now receives the leading clauses as an array; the English/shared formatter joins with NATIVE_CHAT_TOOL_RUN_SENTENCE_JOINERS.separator (", "), and the renderer joins with translate('components.native-chat.tool.runListSeparator', ', ') on each call, so a live language switch picks up the new separator. A new runListSeparator key is added to en (", "), zh and ja (、); other locales fall back to ", " and render unchanged.

Why

"Kicked off" is an idiom that machine translation read as "remove", producing 解雇 / 踢掉 / 추방 — the opposite of what happened, and inconsistent with the neighbouring startedN strings. The missing counters and English comma made the Chinese summary read like a machine dump, and the comma could not be fixed in the catalog alone because the joiner was hardcoded. Passing the clause array keeps the join per-locale without an extra optional getter on the format object.

Linked Issue

Fixes #33552

Visual Proof

N/A — catalog strings and a string joiner only; no layout, component or styling change. The rendered text was verified by building the summary line with the real renderer nativeChatToolRunSentence and the real locale catalogs via i18n.t:

BEFORE (main):
ZH: 已搜索 1 次, 使用 1 集成, 读取 1 个文件, 已编辑 1 个文件 和 运行 2 命令 | 踢掉 1 个子智能体 | 启动 2 子智能体 | Ran 1 子智能体
JA: 1 回検索されました, 使用済み 1 連携, 1ファイルを読み込む, 1ファイルを編集しました、2 コマンドを実行しました | 1 人のサブ Agent を解雇しました | 2 サブ Agent をキックオフしました
AFTER:
EN: Searched 1 time, used 1 integration, read 1 file, edited 1 file, and ran 2 commands
ES: Se buscó 1 vez, se usó 1 integración, se leyó 1 archivo, se editó 1 archivo y se ejecutaron 2 comandos
ZH: 已搜索 1 次、使用 1 个集成、读取 1 个文件、已编辑 1 个文件并运行 2 条命令 | 启动 1 个子智能体 | 启动 2 个子智能体 | 已运行 1 个子智能体
JA: 1 回検索されました、使用済み 1 連携、1ファイルを読み込む、1ファイルを編集しました、2 コマンドを実行しました | 1 個のサブ Agent を起動しました
KO: 하위 에이전트 1개가 시작되었습니다.
FR: A exécuté 3 sous-agents | A lancé 3 sous-agents

English and Spanish output is unchanged.

Testing

  • Reproduced the bad strings on main with a throwaway probe (renderer sentence builder + real catalogs); the same probe passes on this branch (output above).

  • pnpm test for native-chat-shared-copy-matches-catalog, native-chat-tool-run-label, native-chat-tool-run-sentence, and src/renderer/src/i18n — 15 files, 272 tests pass. The catalog-parity test now pins runListSeparator in en.json against the shared separator.

  • oxlint (anti-slop, code-quality plugins), ast-grep, changed-code-quality gate, and oxfmt clean on touched files.

  • Platform: macOS. Locale data and pure string joining only; no platform, SSH or path behavior involved.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

  • Cross-platform / SSH / remote: no platform API; strings render the same on every host. Mixed-version clients only see catalog differences.
  • Mobile: the shared English formatter keeps ", ", so mobile output is unchanged.
  • Performance: one translate lookup per multi-clause sentence.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Original fix by @beduldul in #33561; maintainer follow-up switched the optional separator getter to passing the clause array and adjusted the zh pair joiner and ja counters. 智能体 -> Agent brand cleanup is out of scope.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ca931c9-dd8c-46a6-b7a0-817fc5ea3e5d
Commits

Reviewing files that changed from the base of the PR and between 2b2a315ceda1f94d86d09a41a42277621d54e25e and 897d41b.

Files selected for processing: 8
  • src/renderer/src/components/native-chat/native-chat-tool-run-label.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/native-chat/tools/native-chat-tool-run-sentence.test.ts
  • src/shared/native-chat/tools/native-chat-tool-run-sentence.ts
Files skipped from review as they are similar to previous changes: 5
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/ja.json
  • 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.

Walkthrough

Updated subagent activity labels in the French, Japanese, Korean, and Chinese locales. The changes correct wording for subagent start labels and update run labels in French and Chinese. Added optional separator support for tool-run clause lists with three or more clauses. The renderer reads the separator from the active locale. Tests cover default and custom separators, clause counts, and language changes.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 897d4

No actionable correctness risk remains in the reviewed localization and list-formatting changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue #33552 requires the Chinese subagent message to use 启动 1 个子智能体 and requires natural counters and punctuation in Chinese tool summaries. The PR evidence reports the corrected startedOne and c…
Out of Scope Changes check Passed The changes remain connected to the localization defect in #33552. The separator API and its tests support the required Chinese summary. The Japanese, Korean, and French string corrections use the sam…
Title check Passed The title names the change type (fix), the scope (i18n), and the affected areas: native-chat subagent and tool-run summary strings in zh, ja, ko, and fr. The changeset corrects those translated string…
Description check Passed The description follows the template closely. It includes ELI5, What Changed (with a before/after table), Why, Linked Issue (Fixes #33552), Visual Proof (marked N/A with a reason and a text-based befo…
Full details: Linked Issues check

Explanation

Issue #33552 requires the Chinese subagent message to use 启动 1 个子智能体 and requires natural counters and punctuation in Chinese tool summaries. The PR evidence reports the corrected startedOne and count forms in zh.json, including 个, 条, and 次. It also reports the target output 搜索 1 次、使用 1 个集成、读取 1 个文件并运行 2 条命令. The shared joiner supports a locale-specific separator, and native-chat-tool-run-label.ts reads that separator through a getter. The reported tests cover the joiner, locale override, language switching, and localization catalogs.

Full details: Out of Scope Changes check

Explanation

The changes remain connected to the localization defect in #33552. The separator API and its tests support the required Chinese summary. The Japanese, Korean, and French string corrections use the same subagent activity keys and correct the same kicked off mistranslation class. The default separator preserves existing behavior for other locales. No unrelated product behavior or files appear in the supplied change summary.

Full details: Title check

Explanation

The title names the change type (fix), the scope (i18n), and the affected areas: native-chat subagent and tool-run summary strings in zh, ja, ko, and fr. The changeset corrects those translated strings and adds a locale-configurable list separator, so the title matches the main change. It omits the separator mechanism, which is acceptable because the title need not cover every detail.

Full details: Description check

Explanation

The description follows the template closely. It includes ELI5, What Changed (with a before/after table), Why, Linked Issue (Fixes #33552), Visual Proof (marked N/A with a reason and a text-based before/after rendering), Testing (manual and automated checks, with the platform stated), Review, Agent skill upstream boundary, Notes, and Checklist. The AI Disclosure section is absent from the description. The template says to fill it in unless the author is a StablyAI team member, so the author should confirm whether that section applies. The Visual Proof section is N/A with a reason, which the template allows for non-visual changes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (5 skipped: 5 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · 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: 1

Caution

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

⚠️ Outside diff range comments (1)

Minor · Fix the Chinese list join and counted live labels. · zh.json:18971-18986

src/renderer/src/i18n/locales/zh.json:18971-18986
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the Chinese list join and counted live labels.

When three or more tool categories are rendered, runList supplies the final joiner. The Chinese value uses 和 instead of the requested enumeration punctuation. Keep runPair unchanged because the shared formatter uses it only for exactly two clauses, where 和 is the correct conjunction.

The counted live labels still omit 个 for files, directories, commands, and integrations.

Suggested fix
-        "runList": "{{value0}} 和 {{value1}}",
+        "runList": "{{value0}}、{{value1}}",
         "runLiveReadOne": "读取1个文件",
-        "runLiveReadMany": "读取 {{value0}} 文件",
+        "runLiveReadMany": "读取 {{value0}} 个文件",
         "runLiveSearchOne": "搜索1次",
         "runLiveSearchMany": "搜索 {{value0}} 次",
-        "runLiveListFilesOne": "清单1 目录",
-        "runLiveListFilesMany": "列出 {{value0}} 目录",
+        "runLiveListFilesOne": "列出 1 个目录",
+        "runLiveListFilesMany": "列出 {{value0}} 个目录",
         "runLiveCommandOne": "运行 1 个命令",
-        "runLiveCommandMany": "运行 {{value0}} 命令",
+        "runLiveCommandMany": "运行 {{value0}} 个命令",
         "runLiveFileChangeOne": "编辑 1 个文件",
-        "runLiveFileChangeMany": "编辑 {{value0}} 文件",
+        "runLiveFileChangeMany": "编辑 {{value0}} 个文件",
         "runLiveWebSearchOne": "网上搜索1次",
         "runLiveWebSearchMany": "搜索网络 {{value0}} 次",
-        "runLiveIntegrationOne": "使用 1 集成",
-        "runLiveIntegrationMany": "使用 {{value0}} 集成",
+        "runLiveIntegrationOne": "使用 1 个集成",
+        "runLiveIntegrationMany": "使用 {{value0}} 个集成",

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 836d3ec0-40e9-4120-b7b4-012bf0424d40
Commits

Reviewing files that changed from the base of the PR and between 33c76d8 and 2fdbd8d88ff513b8e22edb9745d3d86660fc825f.

Files selected for processing: 4
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • 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; 8 remain after this review.

Comment thread src/renderer/src/i18n/locales/zh.json Resolved
@beduldul
beduldul force-pushed the fix/i18n-subagent-kicked-off branch from 6776f4c to 51123f2 Compare October 25, 2026 17:00

@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: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95ab83d5-b69b-4848-abac-fbe110e7e7f3
Commits

Reviewing files that changed from the base of the PR and between 2fdbd8d88ff513b8e22edb9745d3d86660fc825f and 51123f2e984143dbf23d0c0eec6ae28bb314e0cf.

Files selected for processing: 8
  • src/renderer/src/components/native-chat/native-chat-tool-run-label.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/native-chat/tools/native-chat-tool-run-sentence.test.ts
  • src/shared/native-chat/tools/native-chat-tool-run-sentence.ts
Files skipped from review as they are similar to previous changes: 4
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/fr.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@beduldul
beduldul force-pushed the fix/i18n-subagent-kicked-off branch 2 times, most recently from 2b2a315 to 897d41b Compare October 26, 2026 03:03
…in zh/ja/ko/fr

Replace mistranslated subagent summaries ("kicked off" rendered as "fired"/
"kicked out", untranslated "Ran") and add missing measure words to the zh
tool-run clauses. Leading tool-run clauses are now joined with a translated
runListSeparator so CJK locales use 、 instead of an English comma.

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
@nwparker
nwparker force-pushed the fix/i18n-subagent-kicked-off branch from 897d41b to 56c149f Compare October 26, 2026 18:56
@nwparker nwparker changed the title fix(i18n): the subagent summary says the subagent was fired fix(i18n): correct native-chat subagent and tool-run summary strings in zh/ja/ko/fr Oct 26, 2026
@nwparker
nwparker merged commit 8f4b64c into stablyai:main Oct 26, 2026
42 checks passed
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.

[Bug]: Simplified Chinese chat activity mistranslates "Kicked off 1 subagent" as "踢掉 1 个子智能体"

2 participants