Skip to content

desktop: zh locale has unreviewed machine-translation errors (壳牌, 出口, 个贝壳) #51868

Open

Description

@CHIMO23333

Description

The Simplified Chinese (zh) catalog in desktop 2.0.18 contains a few machine-translation errors, and 93 of the 1828 keys in the English base catalog have no zh entry, so those strings fall back to English.

Wrong translations

key English current zh suggested
settings.timeline.category.shell Shell 壳牌 shell 命令
ui.promptInput.exitShell Exit 出口 退出
session.background.shell.other {{count}} shells {{count}}个贝壳 {{count}}个shell
settings.timeline.title Timeline 时间表 时间线
settings.timeline.preset.detailed Detailed 详情 详细
settings.timeline.description.quiet Group edits and subagents. Hide other activity. 对已使用的编辑和子代理进行分组。隐藏其他活动。 对编辑和子代理进行分组。隐藏其他活动。
settings.timeline.description.detailed Expand shell output and edits. Show subagents separately and group other activity. 展开shell输出和编辑。 单独显示子代理,并在已使用中对其他活动进行分组。 …并在编辑中对其他活动进行分组。

壳牌 (the Shell oil company), 出口 (customs/export exit) and 个贝壳 (a seashell) are clearly unreviewed machine translation. For reference, the rest of the catalog keeps "shell" in English in every sentence it appears in (输入 shell 命令…, Shell 命令, {{count}}个shell), so settings.timeline.category.shell is also inconsistent with the catalog's own convention. description.detailed additionally has a stray space after 。.

Missing keys: 93

English base catalog 1828 keys, zh 1735 keys (94.9%). Most are the new provider-connect flow:

  • provider.connect.* — 39 (the entire "Sign in to OpenCode Console" flow)
  • settings — 18, pair — 10, file — 10, session — 8, command — 4, home — 2, common / server — 1 each

Happy to paste the full key list if useful.

Application menu bar is always English

The main-process catalog (/out/main/translations-*.js inside app.asar) contains no CJK at all, so the Windows menu bar (File / Edit / View / Go / Window / Help) is never localized even when the renderer UI is Chinese. Looks like an oversight rather than an intended limitation.

Where the catalogs live

Inside resources/app.asar: the zh catalog is /out/renderer/assets/zh-*.js (2 chunks, 13 KB + 81 KB) and the English base is inlined in /out/renderer/assets/main-*.js. The counts above come from parsing the asar and diffing the "key": \value`` maps.

Suggestions

  1. A build-time check that diffs each locale catalog's key set against the English base and fails (or warns) on missing keys, so new features cannot ship untranslated.
  2. A review pass on zh additions — the three failures above are characteristic of raw machine translation.

Plugins

none

OpenCode version

2.0.18 (desktop app @opencode/desktop 2.0.18)

Steps to reproduce

  1. Desktop 2.0.18, UI language zh (system display language Chinese Simplified).
  2. Settings > Timeline: the Shell category reads 壳牌.
  3. Prompt input > Esc: the exit hint reads 出口.
  4. Settings > Providers > Add account: the whole connect flow is in English.

Screenshot and/or share link

No response

Operating System

Windows 11 Home (zh-CN) 10.0.26200.8457, x64

Terminal

OpenCode desktop integrated terminal (TERM=xterm-256color)

Activity

  1. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #35601: Chinese localization for desktop application menu labels.
    • #50553: Missing Simplified Chinese UI dictionary keys causing English fallback.
    • #10836: Missing Chinese translations in provider and settings dialogs.
    • #50772: Locale dictionary parity checks to catch missing translations.

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. changed the title [-]desktop: zh locale has machine-translation errors and 93 untranslated keys[/-] [+]desktop: zh locale has unreviewed machine-translation errors (壳牌, 出口, 个贝壳)[/+] on Sep 28, 2026
  3. CHIMO23333 commented on Sep 28, 2026

    @CHIMO23333
    Author

    Thanks for the check. Clarifying the scope:

    The reason I filed this separately is that the reports above are all about missing keys that fall back to English. What is reported here is the opposite: keys that exist and are wrong. A key-parity check, or a PR that fills in missing keys, will not catch any of these. Worth noting that PR #50131 generates translations for 399 keys — if that is machine-generated, it risks seeding more of the same errors.

    Concretely, on desktop 2.0.18 with the UI in Simplified Chinese:

    • settings.timeline.category.shell = 壳牌 (the Shell oil company). Every other "shell" string in the catalog keeps the English word in sentences (输入 shell 命令…, Shell 命令, {{count}}个shell), so this one is also inconsistent with the catalog's own convention.
    • ui.promptInput.exitShell = 出口 (customs/export exit) instead of 退出.
    • session.background.shell.other = {{count}}个贝壳 (seashells) instead of {{count}}个shell; session.background.shell.one is correct, so the two disagree with each other.
    • settings.timeline.title = 时间表 (schedule) instead of 时间线.
    • settings.timeline.preset.detailed = 详情 instead of 详细.
    • settings.timeline.description.quiet and .detailed render "edits" as 已使用 ("already used") instead of 编辑.

    So the fix I am asking for is a human review pass over zh/zht, not more automated key filling. I can open a PR with those seven entries if that helps — I only filed here because these are wrong translations rather than absent keys.

  4. CHIMO23333 commented on Sep 28, 2026

    @CHIMO23333
    Author

    One more piece of evidence from the shipped 2.0.18 build, in case it helps separate the menu issue from "missing translations":

    The main-process bundle (/out/main/desktop-*.js) references 96 translation keys, and all 96 already have Chinese values in the renderer catalog — zero of them are missing. The menu labels are translated; the main process simply resolves them against its own English-only catalog instead of the locale data.

    So the desktop menu is a wiring bug (main process not loading the locale), not a missing-translation problem. That distinction is worth keeping, since a "fill in the missing keys" fix will not touch it.

  5. AugetyYoYo commented on Oct 23, 2026

    @AugetyYoYo

    Still reproduces on desktop 2.1.3 (verified 2026-10-23), and I can pin down where the strings live: packages/app/src/runtime/i18n/zh.ts.

    Two of the seven entries from the original report are gone from main (ui.promptInput.exitShell, session.background.shell.other / .one — renamed or removed), so the list is down to four. All four are still wrong:

    key en zh (current) why
    settings.timeline.category.shell Shell 壳牌 repo-wide code search for 壳牌 returns exactly 1 hit — this line
    settings.timeline.title Timeline 时间表 the same screen calls it 时间轴 twice: settings.timeline.detail = 时间轴详细信息, settings.timeline.description = 选择时间轴上显示的活动量. The section header contradicts its own rows.
    settings.timeline.description.quiet Group edits and subagents. Hide other activity. 对已使用的编辑和子代理进行分组。隐藏其他活动。 "edits" → 已使用
    settings.timeline.description.detailed Expand shell output and edits. Show subagents separately and group other activity. 展开shell输出和编辑。 单独显示子代理,并在已使用中对其他活动进行分组。 "edits" → 已使用, plus a stray space after 。

    zht.ts carries the same 已使用 problem in three strings. Its settings.timeline.category.shell is already Shell, so 壳牌 is zh-only.

    Suggested:

    • 壳牌 → 命令, parallel with 编辑 / 思考 / 子代理 / 注意事项 / 其他工具. shell 命令 also works if the catalog prefers keeping "shell" in Latin — either is better than the oil company.
    • 时间表 → 时间轴, matching the rest of the same screen.
    • 已使用 → 编辑 (×2).
    • Drop the space after 。.

    Reproduce: desktop 2.1.3, Settings → Preferences → Timeline → expand 高级.

    Not filing this as a separate issue since it's the same defect — just updating the report so it reflects current main.

  6. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. I checked the Simplified Chinese catalogs in the source at v2.0.18 and on the latest dev (86ce19d).

    Still wrong on dev:

    • settings.timeline.category.shell: 壳牌
    • settings.timeline.title: 时间表
    • settings.timeline.preset.detailed: 详情
    • settings.timeline.description.detailed: still contains 已使用 and the stray space after 。
    • ui.promptInput.exitShell: 出口. The Traditional Chinese and Japanese catalogs use 出口 for this key too.
    • I also noticed session.background.moveRunning reads 移至背景, which should probably be 移至后台.

    Gone on dev: 个贝壳 and the description.quiet wording have been removed or reworded.

    Missing keys: I confirmed the 93 missing keys in 2.0.18. The catalog is built to fall back to English for untranslated keys, so a coverage check would be an improvement rather than a fix.

    Menu bar: I couldn't confirm this one. The menu labels are translated at runtime with strings the UI sends to the main process, and zh has entries for them, so the main-process bundle not containing Chinese text is expected. If the Windows menu still shows English while the UI is in Chinese, a screenshot would help.

    The script below checks the reported strings at any version.

    Reproduction script (check.sh)
    #!/usr/bin/env bash
    # Usage: check.sh <git-ref>   (run inside an opencode checkout)
    # Prints the reported zh strings and the count of en keys missing from zh.
    ref=${1:-HEAD}
    for f in packages/app/src/runtime/i18n/zh.ts packages/ui/src/i18n/zh.ts; do
      echo "== $ref:$f"
      git show "$ref:$f" 2>/dev/null | grep -nE '"(settings\.timeline\.(category\.shell|title|preset\.detailed|description\.(quiet|detailed))|ui\.promptInput\.exitShell|session\.background\.shell\.other)"'
    done
    for pkg in packages/app/src/runtime/i18n packages/ui/src/i18n; do
      en=$(git show "$ref:$pkg/en.ts" | grep -oE '^\s*"[a-zA-Z0-9_.]+":' | tr -d ' :"' | sort -u)
      zh=$(git show "$ref:$pkg/zh.ts" | grep -oE '^\s*"[a-zA-Z0-9_.]+":' | tr -d ' :"' | sort -u)
      missing=$(comm -23 <(echo "$en") <(echo "$zh"))
      echo "== $ref:$pkg en=$(echo "$en"|wc -l) zh=$(echo "$zh"|wc -l) missing=$(echo "$missing"|grep -c .)"
      echo "$missing" | grep . | cut -d. -f1-2 | sort | uniq -c | sort -rn | head -8
    done
    echo "== desktop menu localized via nativeT?"; git show "$ref:packages/desktop/src/main/native/menu.ts" 2>/dev/null | grep -c nativeT

    Run it: bash check.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions