Skip to content

fix(web-shell): reword the Chinese tool-group summary (执行了 → 调用了) - #5876

Merged
ytahdn merged 1 commit into
QwenLM:mainfrom
wenshao:fix/web-shell-zh-tool-summary-wording
Jun 26, 2026
Merged

fix(web-shell): reword the Chinese tool-group summary (执行了 → 调用了)#5876
ytahdn merged 1 commit into
QwenLM:mainfrom
wenshao:fix/web-shell-zh-tool-summary-wording

Conversation

@wenshao

@wenshao wenshao commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Rewords the collapsed tool-group summary in the Web Shell's Chinese locale from 执行了 N 个工具 to 调用了 N 个工具. The English locale (Ran N tools) is unchanged.

Why it's needed

In Chinese a tool is 调用 (invoked/called), not 执行 (executed) — 执行 collocates more naturally with 操作/命令/任务, while a tool/function is something you 调用. The codebase already uses 工具调用 as the established term for "tool call" (e.g. the CLI locale's {{count}} 个工具调用). The previous 执行了 N 个工具 read like a literal machine translation; 调用了 N 个工具 is more idiomatic.

Reviewer Test Plan

How to verify

This is a single i18n display string (toolGroup.summary in the ZH message table). In the Web Shell with the Chinese locale, run a turn that triggers tool calls; once the tool group collapses, the summary now reads 调用了 N 个工具 (e.g. 调用了 3 个工具). The English locale still shows Ran N tools.

  • npm test in packages/web-shell → 471 passing.
  • npm run build in packages/web-shell → succeeds; the built bundle contains 调用了 ${...} 个工具.

Evidence (Before & After)

Chinese summary
Before 执行了 3 个工具
After 调用了 3 个工具

English is unchanged (Ran 3 tools). This is a one-string wording swap with no layout or logic change, so there is no visual diff beyond the text itself.

Tested on

OS Status
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

A locale string is platform-independent; verified on macOS via web-shell unit tests + production build.

Environment (optional)

N/A — verified via packages/web-shell unit tests and npm run build.

Risk & Scope

  • Main risk or tradeoff: None functional — a single Chinese display string. Note the running-state summary still reads 正在执行 …, so there is a minor 执行/调用 wording split between the in-progress and completed states; this PR intentionally scopes to the completed summary only.
  • Not validated / out of scope: English wording (intentionally unchanged); the 正在执行 running-state string.
  • Breaking changes / migration notes: None.

Linked Issues

None.

中文说明

这个 PR 做了什么

把 Web Shell 中文语言包里折叠后的工具组摘要从 执行了 N 个工具 改为 调用了 N 个工具。英文(Ran N tools)保持不变。

为什么需要

中文里工具是被调用的,不是被执行的——执行 更常搭配 操作/命令/任务,而工具/函数是「调用」。代码库里 "tool call" 的既有译法本就是工具调用(例如 CLI 语言包的 {{count}} 个工具调用)。原来的 执行了 N 个工具 读着像直译,调用了 N 个工具 更地道。

验证方式

这是单条 i18n 文案(ZH 文案表里的 toolGroup.summary)。在中文语言包下,跑一轮会触发工具调用的对话,工具组折叠后摘要显示 调用了 N 个工具(如 调用了 3 个工具);英文仍显示 Ran N tools

  • packages/web-shellnpm test → 471 通过。
  • packages/web-shellnpm run build → 成功,产物包含 调用了 ${...} 个工具

改动前后

中文摘要
改前 执行了 3 个工具
改后 调用了 3 个工具

英文不变(Ran 3 tools)。仅文案替换,无布局或逻辑改动。

风险与范围

  • 主要风险/取舍:无功能影响——单条中文文案。注意进行中态摘要仍是 正在执行 …,因此进行中与完成态之间存在轻微的 执行/调用 用词不一致;本 PR 有意只改完成态摘要。
  • 未验证/范围外:英文文案(有意不动);正在执行 进行中态文案。
  • 破坏性变更/迁移说明:无。

The collapsed tool-group summary read "执行了 N 个工具", but in Chinese a tool is "调用" (invoked), not "执行" (executed); 执行 collocates with 操作/命令/任务. "工具调用" is also the established term elsewhere in the codebase. Switch the zh string to "调用了 N 个工具". The English "Ran N tools" is unchanged.
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓ — all required sections present, bilingual, with a clear test plan.

On direction: this is a clean i18n wording fix — changing 执行了 (executed) to 调用了 (called/invoked) for tools in the Chinese locale. Solidly aligned with the codebase's existing convention of 工具调用 for "tool call" (e.g. the CLI locale's {{count}} 个工具调用). No direction concerns.

On approach: the change is minimal and exactly right for the goal — one line, one locale key, no drive-by edits. The PR description honestly calls out the minor 执行/调用 inconsistency with the toolGroup.running string (正在执行 …) and explicitly scopes it out, which is the right call. Nothing to cut.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓ — 所有必要章节齐全,中英双语,测试计划清晰。

方向:这是一个干净的中文 i18n 用词修正——把工具组摘要从 执行了 改为 调用了。与代码库已有的"工具调用"惯例一致(如 CLI 语言包的 {{count}} 个工具调用)。方向无问题。

方案:改动极小且精准——一行代码、一个语言键、无顺手改动。PR 描述坦诚指出了 toolGroup.running正在执行 …)中 执行/调用 的轻微不一致,并明确将其排除在本次范围之外,这是正确的选择。无需删减。

进入代码审查 🔍

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Code Review

One file, one line, zero surprises. The change swaps 执行了调用了 in the ZH locale's toolGroup.summary key (packages/web-shell/client/i18n.tsx:2222). I verified:

  • The CLI locale already uses 工具调用 for "tool call" (e.g. zh.js:2187'{{count}} 个工具调用'), so this brings the web-shell in line with established terminology.
  • The toolGroup.running string (正在执行 …) is intentionally left unchanged — the PR description flags this as an explicit scope decision, which I agree with. Mixing a running-state reword into a one-line fix would expand scope for a separate judgment call.
  • The test mock in ToolGroup.test.tsx only maps English strings; the Chinese zhT mock falls through for unhandled keys. No test updates needed.
  • No other toolGroup.summary references require changes — the key is consumed in exactly one place (ToolGroup.tsx:534).

No blockers. No convention violations. Clean.

Test Results

Full web-shell suite after npm run build:

 ✓ components/messages/ToolGroup.test.tsx (10 tests) 4ms

 Test Files  27 passed (27)
      Tests  471 passed (471)
   Duration  2.02s

All 471 tests pass — matches the PR author's claim exactly.

Tmux Real-Scenario Testing

N/A — this is a web-shell browser UI locale string, not a CLI feature. The toolGroup.summary key only renders in the browser-based web-shell when a tool group collapses after completion. There is no terminal invocation that exercises this code path. Unit tests are the appropriate verification here.

中文说明

代码审查

一个文件、一行代码、零意外。改动将 ZH 语言包的 toolGroup.summary 键从 执行了 改为 调用了packages/web-shell/client/i18n.tsx:2222)。已验证:

  • CLI 语言包已使用 工具调用 表示 "tool call"(如 zh.js:2187'{{count}} 个工具调用'),此改动使 web-shell 与既有惯例保持一致。
  • toolGroup.running 字符串(正在执行 …)有意未改动——PR 描述明确将此列为范围外决策,我同意。在进行态文案的改动混入一行修复中会扩大范围。
  • ToolGroup.test.tsx 中的测试 mock 仅映射英文字符串;中文 zhT mock 对未处理的键直接穿透。无需更新测试。
  • 无其他 toolGroup.summary 引用需要改动——该键仅在一处被消费(ToolGroup.tsx:534)。

无阻塞项,无规范违反。干净。

测试结果

npm run build 后完整 web-shell 测试套件:471 项测试全部通过,与 PR 作者声明一致。

Tmux 真实场景测试

不适用——这是 web-shell 浏览器端的语言包字符串,不是 CLI 功能。toolGroup.summary 键仅在浏览器 web-shell 中工具组折叠完成后渲染,没有终端调用路径能触发此代码。单元测试是此处合适的验证方式。

Qwen Code · qwen3.7-max

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

This is exactly the kind of PR I want to see from the community — small, focused, well-reasoned, and honest about its own limitations.

The PR author identified a genuine Chinese wording issue (执行了 being less idiomatic than 调用了 for tools), backed it up with evidence from the codebase's own established terminology (工具调用), made the minimal one-line fix, and explicitly scoped out the adjacent 正在执行 running-state string rather than sneaking in a second judgment call. The description even anticipates the reviewer's likely question about the 执行/调用 inconsistency and addresses it head-on.

My independent proposal would have been identical: find toolGroup.summary in the ZH locale table, swap the verb. The PR matches exactly. All 471 tests pass. The change is trivially maintainable — a single i18n string with no logic, no layout impact, no cross-package effects.

Approving. ✅

中文说明

这正是社区贡献的理想范例——小范围、聚焦、有理有据,且对自身局限性坦诚。

PR 作者发现了一个真实的中文用词问题(执行了 对于工具来说不如 调用了 地道),用代码库自有的惯例(工具调用)作为依据,做了最小的一行修复,并明确将相邻的 正在执行 进行中态文案排除在范围之外,而非悄悄加入第二个判断。描述甚至预判了审查者可能对 执行/调用 不一致性的疑问并正面回应。

我的独立方案与之完全一致:找到 ZH 语言表中的 toolGroup.summary,替换动词。PR 完全匹配。471 项测试全部通过。改动极易维护——单条 i18n 字符串,无逻辑、无布局影响、无跨包效应。

通过。✅

Qwen Code · qwen3.7-max

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, looks ready to ship. ✅

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No issues found. Downgraded from Approve to Comment: CI still running. LGTM! ✅

— qwen3.7-max via Qwen Code /review

@ytahdn
ytahdn added this pull request to the merge queue Jun 26, 2026
Merged via the queue into QwenLM:main with commit 9e5c25d Jun 26, 2026
34 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.

3 participants