Repository navigation
fix(i18n): join the remaining dashboard name lists the locale's way - #35643
Conversation
|
[operator: bolichen97] The red Backend Tests (Windows) (2) and (4) shards are main's red, not this diff's. The same node ids are red on main's own push run https://github.com/kirodotdev/KiroCrew/actions/runs/43117490567 (d80dd05), tracked in #35660:
This PR changes only how the dashboard joins name lists, its locale catalogs and two frontend tests, so it waits for those two fixes to merge, then re-syncs onto main and re-runs CI. No push or override for this red until then. The review lanes, CodeQL (actions), PR Policy and the Dependency License Gate on this head stopped on a GitHub API rate limit before reaching a verdict; those runs are re-run once. |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: every site is a name list passed into a translated sentence, the fix goes through the existing What this change shipsInventory (5 items) — 5 justifiedIntent: Japanese and Chinese readers see their own list separator inside sentences that name several things. FIX (#34103).
[FIRST-PRINCIPLES-REVIEWED] c94cf9e Description read[DESCRIPTION-READ] 80cad47cce3e6d26f2fda48b80304dab96eeb3b14f00f60c8da0101d5e928205 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the only take-away, Notes
[DESIGN-REVIEWED] c94cf9e Description read[DESCRIPTION-READ] 80834e1005f7387b461050160aac17bb8e84db9562d7bb98f9de8610eab32093 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The change only swaps list separators, and the screenshots show the theme editor's skipped-names line before and after in Japanese and English, plus German after. Notes
[UX-REVIEWED] c94cf9e Description read[DESCRIPTION-READ] 42e5aa72c0159898b583c0839f30d6b1ef5d1ac35d16187e1509416779fec81d That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Swaps fixed ', ' joins for the existing fmtList narrow conjunction at each site where the list goes into a translated sentence. English output is unchanged because narrow English uses commas only, and CJK gets 、. The theme editor's capped list now treats "N more" as the last list item, and css_more_count replaces css_more_names in all 13 catalogs. No reader of the old key is left. All imports are present, existing English tests (including formatRanges) still hold, and the new Japanese tests would fail without the change. The failing CI jobs are unrelated Windows Python ratchet tests and API rate-limit failures. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
Sentences whose name list was joined with a fixed ", " on a line of its
own, or into a variable or helper first, still showed an ASCII comma
between the names in a Japanese or Chinese dashboard. Each of those
lists now goes through fmtList(items, { style: 'narrow' }), which keeps
English as "a, b". The theme editor's capped CSS-name list closes with
its own "and N more", so it now formats its ten names and a new "N more"
item as one list: each language gets its own separator and at most one
conjunction.
Closes #34103
5ea51ea to
c94cf9e
Compare
|
Rebased: main moved in website/src/i18n/locales/{bn,de,en-XA,en.manual,es,fr,hi,it,ja,ko,pt,ru,zh-CN}.json since this head went green (0ccfa58 -> cf4578c); CI re-running. The rebase also picks up #35625 (merged), which clears the two Backend Tests (Windows) (2) and (4) reds that were main's (tracked in #35660, now closed). Same patch, no conflicts; the only shared files are the catalogs, where main added unrelated keys. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head the review checked every .join(', ') swapped for fmtList(..., { style: 'narrow' }) and followed each one to its downstream reader. All of them feed display text only, and the AppDetailPage API call still uses the staged arrays. We also probed the narrow list output for every shipped locale: English stays "a, b, c", Japanese and zh-CN use "、", and de/es/it/ko/hi place exactly one conjunction. css_more_count exists in all 13 catalogs that held css_more_names, and no reader of the old key remains. Both new locale tests fail when their hunk is reverted, and both restore the language afterwards.
Security: The Slack manifest file was flagged by its path only. Its hunk formats the disabled_features labels for display and changes no OAuth scope and no manifest content. There are no HTML sinks.
Done well: the theme editor puts "N more" inside the list as its own translated item. A plain swap there would have produced two conjunctions in German, Spanish, Italian and Hindi.
Optional:
- English, French, Portuguese, Russian and Bengali now read "--x9, 3 more" without "and". The UX note on this has no reply. You could reply to it, or give
css_more_countits own "and" in those locales. - McpToolsPanel.tsx:348 now joins the bare "+N" token with the locale conjunction ("srvA, srvB und +2"). A translated "N more" item, like the theme editor uses, would read better.
- 16 of the 18 converted sites have no locale test. A ja case for
formatRanges, or the semgrep rule your Pattern harvest proposes, would guard them as a class.
Problem / Motivation
Goal: In a Japanese or Chinese dashboard, the remaining sentences that name several things (missing components, unreadable sections, changed fields, removed profiles, folders, sites, files, grants, weekdays, and the theme editor's capped list of skipped CSS names) separate them the way the language does, with at most one conjunction per list in every language.
#33727 fixed the sentences that joined their name list with
.join(', ')on the same line as the translated message. The same fixed English comma sits in sentences whose list is joined on a line of its own, or into a variable or helper first, and then passed to the message, so a Japanese or Chinese sentence still carriesa, bbetween the names. The theme editor's list of more than ten skipped CSS names has the same ASCII comma, in a second shape: its sentence closes the list with its own "and N more", so the plain swap would make German, Spanish, Italian and Hindi read two conjunctions ("a, b und c und 5 weitere").Why it matters
Every Japanese or Chinese user who meets one of these sentences (an agent harness's missing components, a provider's partial or failed sections, a remote instance's changed fields, removed session-environment profiles, gone or refused workspace folders, remote media sites, restored or removed attachments, approved app grants) reads a foreign separator in the middle of an otherwise native sentence. The same holds for the theme editor's skipped-names line after a long stylesheet is pasted.
Not a goal
What changed (motivation → approach → change)
Japanese and Chinese dashboards now separate the names in these sentences with
、, like the rest of the sentence; English keepsa, b.The cause was the separator: each list was joined with a fixed
.join(', ')before it reached the translated message. Each of those lists now goes throughfmtList(items, { style: 'narrow' })fromwebsite/src/i18n/format, which joins the way the active language does. That covers the sites #34103 lists acrosscomponents/andpages/, plus four its table did not name: the failed-sections notice incomponents/IssuePanel.tsx, the gone and refused folder notices inpierre/PierreWorkspaceTreeImpl.tsx, the disabled-features line on the settings manifest panel, and the session summary's turn ranges (types/sessionSummary.ts,formatRanges).The theme editor formats its ten names and an "N more" item as one list: a new
components.themeEditor.css_more_countkey ({{extra}} more, one value per language, taken from the old sentence's own wording; Korean reads기타 3개so it fits after및) replacescss_more_names. So Japanese reads "--x0、…、--x9、ほか 3 件", German still reads "--x0, …, --x9 und 3 weitere" with one "und", and English reads "--x0, …, --x9, 3 more", the way its list of ten or fewer already reads.Backwards compatibility
Compatible: English renders the same
a, b; other languages get their own list separator; no prop, API or setting changes. The theme editor's capped list loses its "and" before "N more" in the languages whose short list has none (English, French, Portuguese, Russian, Bengali), matching its uncapped list.Reader: website/src/components/themeEditor.tsx:nameList -- crew page -- the only reader of
components.themeEditor.css_more_names(Settings, Display, theme editor), switched tocss_more_counthere; ThemeEditorCoverage.test.tsxcaps a long ignored-name list to one readable lineTests
website/src/test/scheduleCadence.test.ts—separates the days the way Japanese doesexpects毎週 · 月、水;keeps the English commaexpectsWeekly · Mon, Wed. With theutils/scheduleCadence.tshunk reverted, the Japanese case fails.website/src/test/ThemeEditorCoverage.test.tsx—separates a capped name list the way Japanese does (#34103)pastes thirteen unknown names in Japanese and expects the line to end--x8、--x9、ほか 3 件with no,;caps a long ignored-name list to one readable linenow expects English--x9, 3 more. With thecomponents/themeEditor.tsxhunk and the catalogs reverted, both fail.Ten back-to-back runs of both files pass, and so does a shuffled order (
--sequence.shuffle --sequence.seed=34103, withThemeEditorA11yI18n.test.tsx).Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Opened the theme editor (Settings → Display → New Theme → Paste CSS) in the built dashboard from this branch on an isolated gateway, pasted thirteen unknown color names, and read the skipped-names line in German, Japanese and English, on the built base and on this branch (screenshots below).
Screenshots / video
The theme editor's skipped-names line with thirteen unknown names pasted (Settings → Display → New Theme → Paste CSS). Every other changed sentence goes through the same
fmtListcall.German after, one
undas before:Related Issues
Closes #34103
Sibling sweep
Swept: git grep -nE ".join(', ?')" -- website/src (tests and built-in apps left out), each hit read for whether its list reaches a translated sentence.
Sibling: website/src/utils/trustPatterns.ts:39 -- not affected -- shell command names from a trust pattern, a technical list
Sibling: website/src/pages/overview/SkillContextBudget.tsx:330 -- not affected -- the list sits beside a separate fragment and is never passed into a message
Sibling: website/src/pages/settings/McpManagement.tsx:1139 -- not affected -- the names are shown on their own line, outside any sentence
Sibling: website/src/pages/chat/SkillLoadCard.tsx:136 -- not affected -- the names are shown on their own, outside any sentence
Sibling: website/src/components/IssuePanel.tsx:621 -- not affected -- the assignees are shown on their own, outside any sentence
Sibling: website/src/pages/members/MembersPageRoster.tsx:969 -- tracked in #35583
Pattern harvest
Rule candidate: semgrep
Pattern: a list joined with
.join(', '), on the same line or into a variable or helper first, whose result is passed as a value intoi18nT(...)ort(...)Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)