Skip to content

Shared UI dictionary still falls back to English for 51 Chinese strings #50553

Open

Description

@PangYiMing

Description

The shared UI dictionary for Simplified Chinese (packages/ui/src/i18n/zh.ts) is missing 51 keys that en.ts already carries, so those strings fall back to English wherever the shared UI layer renders them: session turn retries, compaction states, message part counters, prompt input drop hints and upload progress, tool labels, and timeline notices.

The app dictionary in packages/app/src/runtime/i18n/zh.ts is tracked separately in #50131, so this issue only covers packages/ui.

Plugins

None.

OpenCode version

V2 (v2 branch).

Steps to reproduce

  1. Set the app language to 简体中文.
  2. Trigger a retry, a session compaction, or a timeline notice, and hover the prompt input with files.

Expected: those messages read in Simplified Chinese.
Actual: they stay English because the keys above are absent and the fallback applies.

Screenshot and/or share link

Not attached; the affected areas are listed above.

Operating System

macOS 26 (Apple Silicon)

Terminal

Not applicable (desktop app)

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

  2. changed the title [-]Chinese locale still falls back to English for 469 app and UI strings[/-] [+]Shared UI dictionary still falls back to English for 51 Chinese strings[/+] on Sep 22, 2026
  3. opencodejr commented on Oct 28, 2026

    @opencodejr
    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.

    The script below loads packages/ui/src/i18n/en.ts and zh.ts at a given git ref and merges them the way the app loads a language. It then lists every key that ends up in English:

    • v2.2.0: English has 304 keys and Chinese 247, so 57 strings show in English.
    • Latest dev (fa1260d): English has 307 keys and Chinese 247, so 60 strings show in English. The gap has grown slightly since you counted 51, because new English keys were added without Chinese entries. They include the free and budget limit notices, compaction queued/done, prompt history, image zoom, comment cards, the execute tool's labels and counts, message actions and relative times (Just now, {{count}}m ago), sources, and the variant-switch timeline notices.

    The Traditional Chinese dictionary (zht.ts) is missing 60 keys too.

    Related: #53858 covers the same English fallback in the app dictionary (packages/app/src/runtime/i18n), and #50772 asks for tests that check every language has the same keys as English.

    Reproduction script (check-zh.sh)
    #!/usr/bin/env bash
    # Usage: check-zh.sh <git-ref> [repo]   e.g. check-zh.sh v2.2.0
    # Loads packages/ui/src/i18n/{en,zh}.ts at <ref>, merges them the way the app's
    # language loader does ({ ...en, ...zh }), and lists keys that resolve to English.
    set -euo pipefail
    REF=${1:-HEAD}; REPO=${2:-/workspace/repo}
    TMP=$(mktemp -d)
    git -C "$REPO" show "$REF:packages/ui/src/i18n/en.ts" > "$TMP/en.ts"
    git -C "$REPO" show "$REF:packages/ui/src/i18n/zh.ts" > "$TMP/zh.ts"
    cat > "$TMP/check.ts" <<'TS'
    import { dict as en } from "./en"
    import { dict as zh } from "./zh"
    const merged: Record<string, string> = { ...en, ...zh }
    const missing = Object.keys(en).filter((k) => !(k in zh))
    console.log(`en keys: ${Object.keys(en).length}, zh keys: ${Object.keys(zh).length}, missing from zh: ${missing.length}`)
    for (const k of missing) console.log(`  ${k} -> ${JSON.stringify(merged[k])}  (English fallback)`)
    process.exit(missing.length ? 1 : 0)
    TS
    echo "== $REF ($(git -C "$REPO" rev-parse --short "$REF^{commit}"))"
    bun "$TMP/check.ts"

    Run it: bash check-zh.sh

  4. 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