[GH-ISSUE #5068] [GUI] chat speed chip shows {0}{1} braces and English "last reply" in the Chinese interface, with the number after the words #2356

Open
opened 2026-11-04 01:58:40 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5068

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows, Linux or Mac)

What happened

The chat telemetry strip's first chip (the speed gauge) shows raw placeholders and untranslated English in the Chinese interface:

{0}{1} 词元/秒 · last reply  46

It should read 46 词元/秒 · 上次回复. Three things are wrong in that one string: the literal {0}{1} braces are visible, · last reply is English inside a 中文 interface, and the number sits after the words. The chip beside it in the same row is correct (8.6M 个总词元), so the intended shape is right there next to it.

The strip, as rendered (the screenshot is from the person at the keyboard; the exact characters, read off a 6x zoom of the 463x34 strip, are):

the three chips, left to right (speed / tokens / context):
  {0}{1} 词元/秒 · last reply 46      8.6M 个总词元      55 % 的上下文
  ^^^^^^ literal braces, visible    ^ no braces, number first, correct

The speed chip's characters are {, 0, }, {, 1, }, , 词, 元, /, 秒, , ·, , l, a, s, t, , r, e, p, l, y, then the live number. The number 46 is the <Num> element, appended after the words.

Cause, read from the source at v0.2.10 (ffa80d7) — read, not run in a debugger:

  • apps/host/src/components/TelemetryPopover.tsx:53 renders the visible chip through around(m.streaming ? "{0}{1} tok/s" : "{0}{1} tok/s · last reply", approx, <Num value={speed} format={int}/>), and around is TelemetryPopover.tsx:49: const [head, tail = ''] = tr(template, [before, PLACE]).split(PLACE), where PLACE is the single character U+0001 (I read the codepoint out of the file, so the sentinel is real and the split is not the bug).
  • Neither template the caller passes is a catalog string. I checked every *-en.json merged in the order of i18n.ts:132: the catalog contains s2542 = "{0}{1} tok/s{2}" and s2496 = "· last reply", not "{0}{1} tok/s" and not "{0}{1} tok/s · last reply". TelemetryPopover.tsx:54 passes "{0}{1} total tokens", which is a catalog string — and that chip is the one that renders correctly.
  • With no exact key, tr() falls into the pattern path at i18n.ts:158: it matches the caller's raw, untranslated template against the regex compiled from s2542, so the "slot values" it captures are the literal texts {0} and {1}, and · last reply for slot 2. i18n.ts:160 substitutes those captures into the Chinese template s2542 = "{0}{1} 词元/秒{2}" and produces {0}{1} 词元/秒 · last reply — character for character what is on screen.
  • The tail stays English because localizedTemplateSlots (i18n.ts:150) lists s1242, s2473, s0825, s2455, s2456, s7400 and not s2542, so the captured · last reply is never re-translated. The Chinese string exists (s2496 = "· 上次回复") and is never consulted.
  • The PLACE sentinel never reaches the localized text (the fallback discards the caller's [before, PLACE] values), so split finds nothing: head is the whole string, tail is empty, and the <Num> element is appended after the words — which is exactly the ordering the comment on TelemetryPopover.tsx:48 says the around helper exists to avoid ("the words around the number keep the language's own order").
  • The assistive-technology text on the same line comes from the other path, tr("{0}{1} tok/s{2}", [approx, Math.round(speed), …]), which does hit s2542 and composes 46词元/秒 · 上次回复. So a screen reader is given the correct sentence while the eye is given the braces.
  • Read from the same code, the English interface shows the braces as well (the lookup fails there too, and English has no tail translation to hide it). I observed the Chinese only.

Shape of the fix, for scope: the two templates the caller passes have to exist as catalog strings in the locales, and s2542's tail slot belongs in localizedTemplateSlots. The working chip on TelemetryPopover.tsx:54 is the working example. I am not sending a patch.

Smallest steps or command that reproduce it

  1. Settings → Language → 中文(简体).
  2. Load a model, send one prompt, and watch the gauge chip in the chat telemetry strip, first while the answer streams and then after it ends.
  3. The chip reads {0}{1} 词元/秒 · last reply <number> in both states.
  4. The tokens chip next to it reads 8.6M 个总词元: number first, no braces, no English — the control case.

Reproduction status

Reproduced locally — seen by the person at the keyboard in the desktop app, the rendering above; the screenshot itself is from the person at the keyboard and is available on request. The causal chain is read from the source at v0.2.10 and is marked as read-from-code above.

Strata version

Strata 0.2.10 (desktop app, Windows x64) · engine 0.1.56-windows-x86_64-cuda-cuda13 · UI language 中文(简体)

Graphics card, memory and system

NVIDIA GeForce RTX 3080 Ti Laptop GPU · 64 GB RAM · Windows 11 专业版 (build 26300). Win32_VideoController.AdapterRAM reports 4 GB for this laptop part, so I am not recording a VRAM figure.

Model, size and settings

Swift 1.5 Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S (IQ3_S, two shards) with the picture reader mmproj-Swift-Qwen3.8-Flash-Next-BF16.gguf. The strip is visible with the model loaded; the defect is interface copy and shows whatever model is running.

Logs

Not relevant: a string-composition defect in the interface, with no engine involvement, and nothing in the logs.

Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5068 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows, Linux or Mac) ### What happened The chat telemetry strip's first chip (the speed gauge) shows raw placeholders and untranslated English in the Chinese interface: ``` {0}{1} 词元/秒 · last reply 46 ``` It should read `46 词元/秒 · 上次回复`. Three things are wrong in that one string: the literal `{0}{1}` braces are visible, `· last reply` is English inside a 中文 interface, and the number sits after the words. The chip beside it in the same row is correct (`8.6M 个总词元`), so the intended shape is right there next to it. The strip, as rendered (the screenshot is from the person at the keyboard; the exact characters, read off a 6x zoom of the 463x34 strip, are): ``` the three chips, left to right (speed / tokens / context): {0}{1} 词元/秒 · last reply 46 8.6M 个总词元 55 % 的上下文 ^^^^^^ literal braces, visible ^ no braces, number first, correct ``` The speed chip's characters are `{`, `0`, `}`, `{`, `1`, `}`, ` `, `词`, `元`, `/`, `秒`, ` `, `·`, ` `, `l`, `a`, `s`, `t`, ` `, `r`, `e`, `p`, `l`, `y`, then the live number. The number `46` is the `<Num>` element, appended after the words. **Cause, read from the source at `v0.2.10` (`ffa80d7`) — read, not run in a debugger:** - `apps/host/src/components/TelemetryPopover.tsx:53` renders the visible chip through `around(m.streaming ? "{0}{1} tok/s" : "{0}{1} tok/s · last reply", approx, <Num value={speed} format={int}/>)`, and `around` is `TelemetryPopover.tsx:49`: `const [head, tail = ''] = tr(template, [before, PLACE]).split(PLACE)`, where `PLACE` is the single character U+0001 (I read the codepoint out of the file, so the sentinel is real and the split is not the bug). - **Neither template the caller passes is a catalog string.** I checked every `*-en.json` merged in the order of `i18n.ts:132`: the catalog contains `s2542 = "{0}{1} tok/s{2}"` and `s2496 = "· last reply"`, not `"{0}{1} tok/s"` and not `"{0}{1} tok/s · last reply"`. `TelemetryPopover.tsx:54` passes `"{0}{1} total tokens"`, which **is** a catalog string — and that chip is the one that renders correctly. - With no exact key, `tr()` falls into the pattern path at `i18n.ts:158`: it matches the caller's **raw, untranslated template** against the regex compiled from `s2542`, so the "slot values" it captures are the literal texts `{0}` and `{1}`, and ` · last reply` for slot 2. `i18n.ts:160` substitutes those captures into the Chinese template `s2542 = "{0}{1} 词元/秒{2}"` and produces `{0}{1} 词元/秒 · last reply` — character for character what is on screen. - The tail stays English because `localizedTemplateSlots` (`i18n.ts:150`) lists `s1242, s2473, s0825, s2455, s2456, s7400` and **not `s2542`**, so the captured ` · last reply` is never re-translated. The Chinese string exists (`s2496 = "· 上次回复"`) and is never consulted. - The `PLACE` sentinel never reaches the localized text (the fallback discards the caller's `[before, PLACE]` values), so `split` finds nothing: `head` is the whole string, `tail` is empty, and the `<Num>` element is appended **after** the words — which is exactly the ordering the comment on `TelemetryPopover.tsx:48` says the `around` helper exists to avoid ("the words around the number keep the language's own order"). - The assistive-technology text on the same line comes from the other path, `tr("{0}{1} tok/s{2}", [approx, Math.round(speed), …])`, which does hit `s2542` and composes `46词元/秒 · 上次回复`. So a screen reader is given the correct sentence while the eye is given the braces. - Read from the same code, the English interface shows the braces as well (the lookup fails there too, and English has no tail translation to hide it). I observed the Chinese only. Shape of the fix, for scope: the two templates the caller passes have to exist as catalog strings in the locales, and `s2542`'s tail slot belongs in `localizedTemplateSlots`. The working chip on `TelemetryPopover.tsx:54` is the working example. I am not sending a patch. ### Smallest steps or command that reproduce it 1. Settings → Language → 中文(简体). 2. Load a model, send one prompt, and watch the gauge chip in the chat telemetry strip, first while the answer streams and then after it ends. 3. The chip reads `{0}{1} 词元/秒 · last reply <number>` in both states. 4. The tokens chip next to it reads `8.6M 个总词元`: number first, no braces, no English — the control case. ### Reproduction status Reproduced locally — seen by the person at the keyboard in the desktop app, the rendering above; the screenshot itself is from the person at the keyboard and is available on request. The causal chain is read from the source at `v0.2.10` and is marked as read-from-code above. ### Strata version Strata 0.2.10 (desktop app, Windows x64) · engine `0.1.56-windows-x86_64-cuda-cuda13` · UI language 中文(简体) ### Graphics card, memory and system NVIDIA GeForce RTX 3080 Ti Laptop GPU · 64 GB RAM · Windows 11 专业版 (build 26300). `Win32_VideoController.AdapterRAM` reports 4 GB for this laptop part, so I am not recording a VRAM figure. ### Model, size and settings Swift 1.5 `Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S` (IQ3_S, two shards) with the picture reader `mmproj-Swift-Qwen3.8-Flash-Next-BF16.gguf`. The strip is visible with the model loaded; the defect is interface copy and shows whatever model is running. ### Logs Not relevant: a string-composition defect in the interface, with no engine involvement, and nothing in the logs.
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#2356
No description provided.