Skip to content

[BUG]: zh/zht locale dictionaries missing 93 keys present in en (pairing, provider connect, file viewer) #53858

Open

Description

@imyu37

Description

The Simplified (zh.ts) and Traditional (zht.ts) app dictionaries have drifted behind en.ts: 93 keys exist in English but not in zh/zht, so those strings fall back to English at runtime and the Chinese UI shows mixed-language screens.

Breakdown of the missing keys by prefix:

Prefix Missing
provider.* (provider connect wizard: Console/OAuth/device-code/remote flows) 39
settings.* (pairing, projects, provider accounts, models) 18
file.* (file viewer preview/source/open-in-browser) 10
pair.* (pairing page body, screen-active toggle, QR/copy errors) 10
session.* 8
command.* 4
home.* 2
common.* 1
server.* 1

Most of these landed with recent features (#49291 device pairing, provider connect flows) that shipped en.ts entries without zh/zht translations. All 63 locales are affected; zh/zht are the ones I can PR for.

The fix adds the missing translations per language (placeholders/$OPENCODE_* vars preserved, terminology per packages/app/AGENTS.md §Localization).

Steps to reproduce

  1. Set the desktop app locale to 中文.
  2. Open Settings → Pairing.
  3. The whole page renders in English instead of Chinese.

Follow-up PR: #52040


Note: this supersedes #52039, which was auto-closed by the issue-compliance workflow before its body was converted to the bug-report template structure. The original report is preserved there; this issue carries the same scope in template form.

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the report. I could confirm this by comparing the dictionary files; I didn't run the desktop app, so I haven't seen the Chinese UI itself. It still happens on the latest v2 branch (a19285d), and it now goes a bit beyond what the issue lists:

    • packages/app/src/runtime/i18n/: en.ts has 918 keys and zh.ts/zht.ts have 858 each, so 128 English keys have no zh/zht entry. On v2.0.24 the gap was 98. Most are provider.*, settings.*, session.* and server.*.
    • The Settings → Pairing strings have moved to packages/gui-extensions/src/pairing/i18n/, which has only en.ts. That's why the whole Pairing page shows in English, in every language and not only zh/zht.
    • packages/gui-extensions/src/file/i18n/: zh.ts and zht.ts are missing the 10 view.* keys that en.ts has.

    If you update #52040, it's worth covering the new gui-extensions locations (pairing, file) as well as the app dictionary. Related: #50553 (the same English fallback in the shared UI dictionary) and #50772 / #50835 (tests that check every language has the same keys as English).

  2. RicSchonfelder commented on Oct 13, 2026

    @RicSchonfelder

    Same drift on br (Brazilian Portuguese), measured on v2:

    Dictionary en keys br keys Missing from br
    packages/app/src/runtime/i18n 912 863 129
    packages/ui/src/i18n 253 262 5

    Placeholders ({{param}}) all match en for the keys br has, so only coverage is short — the missing rows are what shows in English in the Brazilian UI. Sample from the app dictionary:

    command.provider.connect.description · common.retry
    home.project.missing.description · home.project.missing.title
    dialog.model.chatgptManageUsage · dialog.model.chatgptPlan
    dialog.server.signedOut · palette.group.recentSessions
    

    and from ui: ui.message.pending, ui.message.moveToQueue, ui.message.deletePending, ui.message.modelVariant, ui.messagePart.compaction.queued.

    Happy to send the pt-BR rows as a PR (a native pt-BR speaker reviews our work — this is the same shape of contribution we landed in eight of the Craft apps: FilmCraft #176, LightCraft #228, EffectCraft #217, PdfCraft #165, DesignCraft #103, VectorCraft #384, PhotoCraft #700/#833).

    I am also glad to take the parity test in #50772 if it is still unclaimed — we built the same guard in CadCraft/DeckCraft (placeholder-set equality, keys ⊆ en, and a "missing count may only fall" baseline), which is exactly what that issue asks for.

  3. zhuabaobao123 commented on Oct 27, 2026

    @zhuabaobao123

    Updating with measurements from the shipped 2.2.0 desktop build (2026-10-27), taken from app.asar rather than the repo, so this is what users actually see.

    Dictionary en zh missing coverage
    packages/app/src/runtime/i18n 1157 727 430 62.8%
    packages/ui/src/i18n 304 246 58 80.9%
    desktop main process 68 67 1 98.5%
    total 1529 1040 489 68.0%

    This is not zh-specific. I parsed all 62 locale bundles in the 2.2.0 build and every one has exactly 1040 keys (hr/hu/is/lt are at 973). The 489 missing keys are absent from every locale, which points at en entries landing without any locale following, rather than zh/zht drifting on their own.

    Missed keys by prefix: settings 86, usage 64, provider 60, ui 57, session 55, dialog 45, sidebar.inbox 21, server 16, voice 16, command 15, model 14, lab 13.

    #52040 reports 986/986 parity, which matched dev on Oct 8. dev's en.ts is now 1154 keys and the 2.2.0 bundle has 1157, so that branch needs a re-sync before it can close this.

    Also confirmed the terminology errors from #51868 are still present in the 2.2.0 bundle: settings.timeline.category.shell → 壳牌, ui.promptInput.exitShell → 出口, settings.timeline.title → 时间表, settings.timeline.preset.everything → 一切.

    Happy to provide the full en → missing-key list per dictionary if that helps whoever picks up #52040.

  4. trt44343 commented on Oct 29, 2026

    @trt44343

    Re-measured on the shipped 2.2.1 desktop build (Windows 11 10.0.22631.5472, x64), reading the i18n assets the running app actually serves (/_assets/...), so these are the strings users see rather than the repo source.

    Pairing is not partially translated — it is structurally English-only

    Every copy key on the Settings → Pairing page is absent from both zh and zht:

    pair.title, pair.description, pair.open
    remote.title, remote.description, remote.error
    screenActive.title, screenActive.description
    

    Two separate causes:

    1. The page copy moved to packages/gui-extensions/src/pairing/, which ships English only — tracked in feat(i18n): add Chinese (zh, zht) translations for the remaining built-in GUI plugins #56020.

    2. Built-in GUI extensions in the 2.2.1 bundle declare only en in their i18n map. All four shipped extensions look like this:

      { i18n: { en: { "pair.title": "Pair a device", ... } } }

      Per the GUI plugin docs ("write every locale inline"), an extension that declares only en never resolves a host locale, so no host-side dictionary fix can reach these pages.

    This is why repairing packages/app/src/runtime/i18n/zh.ts alone (#52040) does not clear the Pairing page.

    Coverage in 2.2.1

    Base catalog 1168 keys; zh has non-empty Chinese for 648, so 520 fall back to English. zht is currently the better-served locale at 725/1168 (62.1%), which is a workable stopgap for users to know about.

    Missing by prefix (zh):

    prefix en zh missing
    settings.* 303 205 98
    session.* 136 70 66
    provider.* 81 21 60
    dialog.* 98 51 47
    sidebar.* 25 4 21
    model.* 35 15 20
    common.* 63 48 15

    Method differs from the 2.2.0 measurement above (bundled runtime assets vs app.asar), so absolute numbers are not directly comparable, but the direction is unchanged release over release.

    Open work

    Both are needed for the Pairing page: #56020 for the extension-owned keys, #52040 for the app-level gaps.

  5. added a commit that references this issue on Nov 7, 2026
    4e8ab35
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