Repository navigation
Studio: translate the live generation figures, the reply timing tooltip and the weight placement row - #16452
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review record for #16452, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#690. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
A review of #14909 reported that in another language its new strings stay English, while the Generation details setting itself is translated.
Problem
With the UI in German, a GGUF chat shows "Processing prompt 15% · 4s left · 2.049 / 13.626 tokens · 2.710 tok/s": German digits, English words. The same goes for "Working...", the live line under a streaming reply, every row of the reply's timing tooltip including the new "Stop reason" values, and the "Weight placement" row in Run settings.
Cause
#14909 kept these strings in the code, as its description says ("The live strings are English, like the 'Working...' they replace").
generation-progress.tsandpartial-offload.tsbuild the sentences around numbers already passed throughtoLocaleString.message-timing.tsxhad no translation at all before #14909, which added "Stop reason" and "Draft accepted" to it.Fix
generationStatsnamespace inen.tsholds whole templates with placeholders ("{count} tokens", "{eta} left", "{gpu} of {total} layers on the GPU, {cpu} on the CPU"), so each language can order the words around the numbers.formatPrefillDetails,formatPrefillTimeLeft,formatLiveDecodeanddescribePlacementtake thetfunction fromuseT(), asscheduled-tasks/results.tsdoes, so they stay plain functions for the tests. The Run settings panel passes the memory pool as"unified"/"shared"instead of English words.Behavior boundaries
generation-details.test.tspass as they were.Verification
Live A/B with Playwright on fresh Studio homes, gemma-3-270m-it UD-Q4_K_XL on the CPU, a 13.6K-token prompt, Generation details on, UI in German; main was
d8efd157abfor the run below and6401ceda29for the screenshot. With this PR the prompt line reads "Prompt-Verarbeitung 15% · noch 4s · 2.049 / 13.645 Tokens · 2.520 tok/s", the live line "130 Tokens · 115,1 tok/s · Draft 107/128 akzeptiert (84%)", and the placement row "Platzierung der Gewichte · Alle 19 Schichten auf der CPU". The same four places render in Japanese, and the tooltip keeps its layout with the longer German labels.Tests:
generation-progress.tsno longer hold the English sentences; in Russian, Ukrainian, Polish, Czech and Arabic no count stands before a noun.i18n:check:strictpasses with no missing keys. The 830 tests in files touching these formatters, components or the locale files pass. Typecheck passes; ESLint has no new findings.Not checked by a native speaker: the 24 overlays.
Screenshots
UI in German on both sides:
Verified before and after
Separate Studio installs at base
ac7229860eand integrated head7cdeff4ae7, with German selected and identical recorded progress frames. The fitted estimate from #16450 stays at 20s on both sides; the prompt-progress and draft-acceptance labels become German while all numbers remain identical. These pictures verify presentation, not model throughput.Validation at this head: 26 focused generation-details tests pass, full frontend suite 14,644 passed and zero failed, production build passes, and strict parity passes for all 25 catalogs. The merge resolution explicitly checks the fitted estimate renders as "noch 20s".