[GH-ISSUE #3825] [GUI] Four slash-command hints show English labels in the Chinese UI (/tune, /serve, /model, /skills) #1618

Closed
opened 2026-11-04 01:52:41 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3825

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows, Linux or Mac)

What happened

With the desktop UI language set to 中文(简体) (zh), typing / in the chat composer shows four command hints that mix a translated template with an untranslated label:

Command Actual hint in the Chinese UI Expected hint
/tune 打开 Model settings 打开模型设置
/serve 打开 Serving 打开 API 服务
/model 打开 Models 打开模型
/skills 打开 Skills 打开技能

The slash tokens themselves (/tune, /serve, /model, /skills) should stay in English; this report is only about the hint text.

The rest of the slash menu is translated: the section label is 命令, the “Slash commands” label is 斜杠命令, the empty state is 没有命令匹配“/, and the other command hints (including /monitor → 打开监控 and /tasks → 打开任务) are in Chinese.

Related but separate: #3479 reports 48 strings that never reached en.json, including the fully English /plan, /research and /new hints. Those three are tracked there. This issue is only about the four hints above, whose template (打开 {0}) is translated but whose slot value remains English.

Smallest steps or command that reproduce it

  1. Install Strata 0.2.3 and set the desktop interface language to 中文(简体) (zh).
  2. Open a chat (no model needs to be loaded).
  3. Type / in the composer.
  4. Look at the /tune, /serve, /model and /skills rows.

Reproduction status

Unconfirmed static analysis (I read code or ran a scanner; I did not see it fail)

The behavior was reported from the installed 0.2.3 app. I confirmed the same code and the exact tr() result against commit 5c8dd322528cc84f68f461ad54a506b9da8fa8d4 (origin/main at filing time), but I did not run separate GUI automation.

Strata version

Strata 0.2.3, commit 5c8dd322528cc84f68f461ad54a506b9da8fa8d4 (installed Windows build).

Graphics card, memory and system

NVIDIA GeForce RTX 3080 Ti Laptop GPU · 64 GB RAM · Windows 11 Pro, build 26300.

Model, size and settings

Not applicable: the slash menu opens without a loaded model.

Logs

Not applicable: this is visible interface text; no engine log is involved.

Root cause and suggested fix

apps/host/src/lib/commands.ts builds the hint for commands without an explicit hint:

hint: c.hint ?? `Open ${c.label}`

at line 78. The four labels come from:

  • /tune — Model settings (commands.ts:50, slash alias tune)
  • /serve — Serving (commands.ts:35)
  • /model — Models (commands.ts:36)
  • /skills — Skills (commands.ts:38)

Chat.tsx:484 renders the hint with tr(c.hint) and passes no interpolation values. tr() first looks for an exact English string in en.json; “Open Model settings”, “Open Serving”, “Open Models” and “Open Skills” are not exact keys. It then matches the generic template Open {0} (s1242, en.json/zh.json line 1260). The Chinese value is 打开 {0}.

apps/host/src/lib/i18n.ts:48 defines the slots that are themselves translated:

const localizedTemplateSlots: Record<string, number[]> = {
  s2473: [1, 2], s0825: [0, 1], s2455: [0], s2456: [0], s7400: [1]
};

s1242 is not in that list, so the captured label is substituted unchanged; the result is 打开 Model settings rather than 打开模型设置.

The exact-key path already works for two neighbouring commands: s1221 is Open Monitor → 打开监控 and s1222 is Open Tasks → 打开任务 (en.json/zh.json lines 1239-1240). They bypass the template.

Suggested fix, smallest and safest:

  1. Add exact en/zh keys for the four generated hints: Open Model settings → 打开模型设置, Open Serving → 打开 API 服务, Open Models → 打开模型, Open Skills → 打开技能. Because tr() resolves exact values first, no rendering change is needed.
  2. Alternatively, translate the known label before composing the hint, for example build the hint with tr("Open {0}", [tr(c.label)]) and render it with the already-translated value. This keeps the substitution explicit.

Avoid the broad fix of adding {0} to s1242 in localizedTemplateSlots. Open {0} is a shared template that is also used with user-provided artifact and media titles (components/ArtifactCard.tsx:45, components/ChatMedia.tsx:20). Making its slot localized would apply tr() to any text captured by the generic Open (.*) pattern, not just these four command labels, so it risks translating user content. Keep the change scoped to exact command-hint keys or translate the known label before interpolation.

I searched open and closed issues and PRs for slash, command, i18n, localization, Chinese, 翻译, 中文, 命令, untranslated, not localized, Open Model settings, Open Serving, Open Models, Open Skills, s1242 and localizedTemplateSlots. No report covers these four hints or the s1242 / localizedTemplateSlots path. #3479 is the closest match, but it covers strings missing from en.json (including /plan, /research, /new), not an existing Open {0} translation with an untranslated slot; its body and comments do not mention /tune, /serve, /model, /skills, s1242, Open {0} or localizedTemplateSlots.

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3825 ## Area [GUI] (the desktop app) ## Desktop app, Terminal or source? Desktop app (Windows, Linux or Mac) ## What happened With the desktop UI language set to 中文(简体) (`zh`), typing `/` in the chat composer shows four command hints that mix a translated template with an untranslated label: | Command | Actual hint in the Chinese UI | Expected hint | | --- | --- | --- | | `/tune` | 打开 Model settings | 打开模型设置 | | `/serve` | 打开 Serving | 打开 API 服务 | | `/model` | 打开 Models | 打开模型 | | `/skills` | 打开 Skills | 打开技能 | The slash tokens themselves (`/tune`, `/serve`, `/model`, `/skills`) should stay in English; this report is only about the hint text. The rest of the slash menu is translated: the section label is 命令, the “Slash commands” label is 斜杠命令, the empty state is 没有命令匹配“/, and the other command hints (including `/monitor` → 打开监控 and `/tasks` → 打开任务) are in Chinese. Related but separate: #3479 reports 48 strings that never reached `en.json`, including the fully English `/plan`, `/research` and `/new` hints. Those three are tracked there. This issue is only about the four hints above, whose template (`打开 {0}`) is translated but whose slot value remains English. ## Smallest steps or command that reproduce it 1. Install Strata 0.2.3 and set the desktop interface language to 中文(简体) (`zh`). 2. Open a chat (no model needs to be loaded). 3. Type `/` in the composer. 4. Look at the `/tune`, `/serve`, `/model` and `/skills` rows. ## Reproduction status Unconfirmed static analysis (I read code or ran a scanner; I did not see it fail) The behavior was reported from the installed 0.2.3 app. I confirmed the same code and the exact `tr()` result against commit `5c8dd322528cc84f68f461ad54a506b9da8fa8d4` (`origin/main` at filing time), but I did not run separate GUI automation. ## Strata version Strata 0.2.3, commit `5c8dd322528cc84f68f461ad54a506b9da8fa8d4` (installed Windows build). ## Graphics card, memory and system NVIDIA GeForce RTX 3080 Ti Laptop GPU · 64 GB RAM · Windows 11 Pro, build 26300. ## Model, size and settings Not applicable: the slash menu opens without a loaded model. ## Logs Not applicable: this is visible interface text; no engine log is involved. ## Root cause and suggested fix `apps/host/src/lib/commands.ts` builds the hint for commands without an explicit `hint`: ```ts hint: c.hint ?? `Open ${c.label}` ``` at line 78. The four labels come from: - `/tune` — `Model settings` (`commands.ts:50`, slash alias `tune`) - `/serve` — `Serving` (`commands.ts:35`) - `/model` — `Models` (`commands.ts:36`) - `/skills` — `Skills` (`commands.ts:38`) `Chat.tsx:484` renders the hint with `tr(c.hint)` and passes no interpolation values. `tr()` first looks for an exact English string in `en.json`; “Open Model settings”, “Open Serving”, “Open Models” and “Open Skills” are not exact keys. It then matches the generic template `Open {0}` (`s1242`, `en.json`/`zh.json` line 1260). The Chinese value is `打开 {0}`. `apps/host/src/lib/i18n.ts:48` defines the slots that are themselves translated: ```ts const localizedTemplateSlots: Record<string, number[]> = { s2473: [1, 2], s0825: [0, 1], s2455: [0], s2456: [0], s7400: [1] }; ``` `s1242` is not in that list, so the captured label is substituted unchanged; the result is `打开 Model settings` rather than `打开模型设置`. The exact-key path already works for two neighbouring commands: `s1221` is `Open Monitor` → `打开监控` and `s1222` is `Open Tasks` → `打开任务` (`en.json`/`zh.json` lines 1239-1240). They bypass the template. Suggested fix, smallest and safest: 1. Add exact `en`/`zh` keys for the four generated hints: `Open Model settings` → `打开模型设置`, `Open Serving` → `打开 API 服务`, `Open Models` → `打开模型`, `Open Skills` → `打开技能`. Because `tr()` resolves exact values first, no rendering change is needed. 2. Alternatively, translate the known label before composing the hint, for example build the hint with `tr("Open {0}", [tr(c.label)])` and render it with the already-translated value. This keeps the substitution explicit. Avoid the broad fix of adding `{0}` to `s1242` in `localizedTemplateSlots`. `Open {0}` is a shared template that is also used with user-provided artifact and media titles (`components/ArtifactCard.tsx:45`, `components/ChatMedia.tsx:20`). Making its slot localized would apply `tr()` to any text captured by the generic `Open (.*)` pattern, not just these four command labels, so it risks translating user content. Keep the change scoped to exact command-hint keys or translate the known label before interpolation. ## Duplicate search I searched open and closed issues and PRs for `slash`, `command`, `i18n`, `localization`, `Chinese`, `翻译`, `中文`, `命令`, `untranslated`, `not localized`, `Open Model settings`, `Open Serving`, `Open Models`, `Open Skills`, `s1242` and `localizedTemplateSlots`. No report covers these four hints or the `s1242` / `localizedTemplateSlots` path. #3479 is the closest match, but it covers strings missing from `en.json` (including `/plan`, `/research`, `/new`), not an existing `Open {0}` translation with an untranslated slot; its body and comments do not mention `/tune`, `/serve`, `/model`, `/skills`, `s1242`, `Open {0}` or `localizedTemplateSlots`.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Fixed in 0.2.5: /tune, /serve, /model and /skills hints are translated in all eight languages. Please update and check the Chinese UI.

<!-- gh-comment-id:6423323501 --> @Niko1221 commented on GitHub (Oct 26, 2026): Fixed in 0.2.5: /tune, /serve, /model and /skills hints are translated in all eight languages. Please update and check the Chinese UI.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1618
No description provided.