[Bug] Hardcoded Chinese error message "browser 命令 screenshot 超时(30000ms)" ignores en-US locale
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Category
Tool use / MCP
Agent framework
ZCode Agent (self-developed)
Severity
Minor (cosmetic / i18n)
Reproducibility
Always
Description
The browser-tool timeout error message is hardcoded in Chinese and is shown regardless of the app locale. It is not model output — it is a raw template literal in the app bundle (resources/app.asar) that bypasses the react-intl i18n string tables the rest of the UI uses, so no locale setting, rules file, or prompt can change it.
Steps to reproduce
- Set ZCode Desktop to English (locale:
en-USin~/.zcode/v2/setting.json; Windows display language: English). - Run a browser-tool command (e.g. the browser-use plugin's
screenshot) and let it exceed the 30,000 ms timeout. - Observe the tool error shown in the UI.
Expected behavior
A localized English timeout error, routed through the i18n system — consistent with the generic English message Command timed out after … used by other tools in the same bundle.
Actual behavior
The error always renders in Chinese regardless of locale:
browser 命令 screenshot 超时(30000ms)
In the minified bundle, the browser-command executor returns:
{ ok: false, error: { code: "timeout",
message: `browser 命令 ${method} 超时(${W}ms)`, ... } }
This is a raw template literal, not an i18n key (the app's zh-CN/en string tables, e.g. "chat.toolCall.taskOutput.timeout", are not used on this code path).
ZCode version
3.10.2.6414 (v3.10.2)
Device / OS / Browser
Windows 11 (build 10.0.26200), ZCode Desktop
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the browser-command executor and the timeout template literal in resources/app.asar, then compare it with the react-intl string tables and the existing chat.toolCall.taskOutput.timeout message. Verify the timeout path under en-US and zh-CN; done means the browser screenshot timeout is localized rather than always rendered in Chinese.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- desktop-dev, internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100