Skip to content

i18n(tr): tool usage summary mistranslated as second-hand (ikinci el) #60872

Done

Description

@olcanaskar

Summary

In the Turkish locale, the tool-usage summary line reads İkinci el 18 Oku, Düzenle, Yaz ve Kabuk, i.e. "second-hand 18 Read, Edit, Write and Shell". The English source string Used {{count}} {{tools}} was translated as the adjective "second-hand" instead of the verb "kullanıldı", so every assistant turn that calls tools shows a nonsense label.

Environment

  • opencode version: desktop app 2.2.5 (bundled CLI v2.0.29)
  • OS: Windows 11 (Windows_NT 10.0.26300, win32 x64)
  • Terminal: desktop app (Electron), UI language set to Turkish
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: desktop app, latest channel (ai.opencode.desktop)
  • Active plugins: opencode-usage-meter (unrelated)

Reproduction

  1. Set the UI language to Turkish.
  2. Send a prompt that makes the agent call a few tools (e.g. read a file, edit it, run a shell command).
  3. Look at the tool summary line above the collapsed tool calls.

Expected Behavior

A Turkish sentence meaning "18 tools used: Read, Edit, Write and Shell", for example:

  • 18 araç kullanıldı: Oku, Düzenle, Yaz ve Kabuk
  • or Kullanılan {{count}} araç: {{tools}}

Actual Behavior

İkinci el 18 Oku, Düzenle, Yaz ve Kabuk

Screenshot text (Turkish UI):

İkinci el 18 Oku, Düzenle, Yaz ve Kabuk

Kabuk tamamlandı · & "C:\Program Files\...

İkinci el 4 Kabuk

Additional Context

The offending entries are in packages/ui/src/i18n/tr.ts (still present on dev):

"ui.messagePart.tools.used.one": "İkinci el {{count}} {{tools}}",
"ui.messagePart.tools.used.other": "İkinci el {{count}} {{tools}}",

English source in packages/ui/src/i18n/en.ts:

"ui.messagePart.tools.used.one": "Used {{count}} {{tools}}",
"ui.messagePart.tools.used.other": "Used {{count}} {{tools}}",

Suggested fix:

"ui.messagePart.tools.used.one": "{{count}} araç kullanıldı: {{tools}}",
"ui.messagePart.tools.used.other": "{{count}} araç kullanıldı: {{tools}}",

Related (lower priority): "ui.tool.shell": "Kabuk" is a literal translation of "shell". It is technically correct in Turkish, but in the UI it reads like the noun "shell/nutshell" and pairs awkwardly with status lines such as Kabuk tamamlandı. "Terminal" or "Komut kabuğu" would read better for end users.

Other locales translate used correctly (de: verwendet, es: Se usó, fr: utilisé, az: istifadə edildi), so this looks like a one-off machine-translation slip rather than a systematic key issue.

Activity

  1. changed the title [-]i18n(tr): araç kullanım özeti yanlış çevrilmiş (ikinci el)[/-] [+]i18n(tr): tool usage summary mistranslated as second-hand (ikinci el)[/+] on Oct 31, 2026
  2. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Thanks for the clear report. I've confirmed this: building the tool summary label from the Turkish dictionary the same way the app does (Turkish plural rule, Turkish list formatting, count 18) gives exactly İkinci el 18 Oku, Düzenle, Yaz ve Kabuk, and İkinci el 4 Kabuk for a single tool. Both plural forms of ui.messagePart.tools.used in packages/ui/src/i18n/tr.ts are "İkinci el {{count}} {{tools}}", a mistranslation of "Used {{count}} {{tools}}". It is the same on v2.0.29 and on the latest dev (bf544cd). The script below reproduces it.

    Related: #51868 reports similar machine-translation slips in the zh locale. The Kabuk → Terminal suggestion is a separate wording change that maintainers can consider on its own.

    Reproduction script (repro.sh)
    #!/usr/bin/env bash
    # Renders the Turkish tool-usage summary label (ui.messagePart.tools.used) the way
    # session-ui's tool-renderer does: i18n.plural(key, count, { tools: list }).
    # Usage: REPO=/path/to/opencode REF=v2.0.29 ./repro.sh   (REF=WORKTREE uses the checkout as is)
    set -euo pipefail
    REPO=${REPO:-/workspace/repo}; REF=${REF:-WORKTREE}
    DIR=$(mktemp -d)
    for f in en tr; do
      if [ "$REF" = WORKTREE ]; then cp "$REPO/packages/ui/src/i18n/$f.ts" "$DIR/$f.ts"
      else git -C "$REPO" show "$REF:packages/ui/src/i18n/$f.ts" > "$DIR/$f.ts"; fi
    done
    cat > "$DIR/run.ts" <<'TS'
    import { dict as tr } from "./tr"
    const locale = "tr"
    const resolve = (t: string, p: Record<string, unknown>) => t.replace(/{{\s*([^}]+?)\s*}}/g, (_, k) => String(p[k] ?? ""))
    const plural = (key: string, count: number, params: Record<string, unknown>) => {
      const cat = new Intl.PluralRules(locale).select(count)
      const v = (tr as any)[`${key}.${cat}`] ?? (tr as any)[`${key}.other`]
      return resolve(v, { ...params, count })
    }
    const list = (items: string[]) => new Intl.ListFormat(locale, { style: "long", type: "conjunction" }).format(items)
    const tools = list([(tr as any)["ui.tool.read"] ?? "Oku", "Düzenle", "Yaz", (tr as any)["ui.tool.shell"]])
    console.log(plural("ui.messagePart.tools.used", 18, { tools }))
    console.log(plural("ui.messagePart.tools.used", 4, { tools: (tr as any)["ui.tool.shell"] }))
    TS
    echo "== $REF"; bun "$DIR/run.ts"

    Run it: bash repro.sh

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions