mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3825] [GUI] Four slash-command hints show English labels in the Chinese UI (/tune, /serve, /model, /skills) #1618
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1618
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:/tune/serve/model/skillsThe 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,/researchand/newhints. 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
zh)./in the composer./tune,/serve,/modeland/skillsrows.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 commit5c8dd322528cc84f68f461ad54a506b9da8fa8d4(origin/mainat 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.tsbuilds the hint for commands without an explicithint:at line 78. The four labels come from:
/tune—Model settings(commands.ts:50, slash aliastune)/serve—Serving(commands.ts:35)/model—Models(commands.ts:36)/skills—Skills(commands.ts:38)Chat.tsx:484renders the hint withtr(c.hint)and passes no interpolation values.tr()first looks for an exact English string inen.json; “Open Model settings”, “Open Serving”, “Open Models” and “Open Skills” are not exact keys. It then matches the generic templateOpen {0}(s1242,en.json/zh.jsonline 1260). The Chinese value is打开 {0}.apps/host/src/lib/i18n.ts:48defines the slots that are themselves translated:s1242is not in that list, so the captured label is substituted unchanged; the result is打开 Model settingsrather than打开模型设置.The exact-key path already works for two neighbouring commands:
s1221isOpen Monitor→打开监控ands1222isOpen Tasks→打开任务(en.json/zh.jsonlines 1239-1240). They bypass the template.Suggested fix, smallest and safest:
en/zhkeys for the four generated hints:Open Model settings→打开模型设置,Open Serving→打开 API 服务,Open Models→打开模型,Open Skills→打开技能. Becausetr()resolves exact values first, no rendering change is needed.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}tos1242inlocalizedTemplateSlots.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 applytr()to any text captured by the genericOpen (.*)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,s1242andlocalizedTemplateSlots. No report covers these four hints or thes1242/localizedTemplateSlotspath. #3479 is the closest match, but it covers strings missing fromen.json(including/plan,/research,/new), not an existingOpen {0}translation with an untranslated slot; its body and comments do not mention/tune,/serve,/model,/skills,s1242,Open {0}orlocalizedTemplateSlots.@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.