zai-org / zai-org/feedback

[Bug] Hardcoded Chinese error message "browser 命令 screenshot 超时(30000ms)" ignores en-US locale

Open
#501 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2
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
  1. Set ZCode Desktop to English (locale: en-US in ~/.zcode/v2/setting.json; Windows display language: English).
  2. Run a browser-tool command (e.g. the browser-use plugin's screenshot) and let it exceed the 30,000 ms timeout.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.