Skip to content

fix(i18n): join the remaining dashboard name lists the locale's way - #35643

Merged
bolichen97 merged 1 commit into
mainfrom
fix/34103-fmtlist-sibling-sites
Nov 12, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/34103-fmtlist-sibling-sites

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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 carries a, b between 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

  • Built-in app pages.
  • A list shown on its own, outside any translated sentence.
  • Shell command names in the trust prompts: a technical list that keeps its literal separator.
  • How numbers are written inside these sentences (the "N more" count, turn numbers).
  • Any other wording or punctuation inside these sentences.

What changed (motivation → approach → change)

Japanese and Chinese dashboards now separate the names in these sentences with 、, like the rest of the sentence; English keeps a, 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 through fmtList(items, { style: 'narrow' }) from website/src/i18n/format, which joins the way the active language does. That covers the sites #34103 lists across components/ and pages/, plus four its table did not name: the failed-sections notice in components/IssuePanel.tsx, the gone and refused folder notices in pierre/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_count key ({{extra}} more, one value per language, taken from the old sentence's own wording; Korean reads 기타 3개 so it fits after 및) replaces css_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 to css_more_count here; ThemeEditorCoverage.test.tsx caps a long ignored-name list to one readable line

Tests

  • website/src/test/scheduleCadence.test.ts — separates the days the way Japanese does expects 毎週 · 月、水; keeps the English comma expects Weekly · Mon, Wed. With the utils/scheduleCadence.ts hunk 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 line now expects English --x9, 3 more. With the components/themeEditor.tsx hunk 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, with ThemeEditorA11yI18n.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 fmtList call.

Before After
Japanese before, Japanese after, Japanese
English before, English after, English

German after, one und as before:

after, German

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 into i18nT(...) or t(...)

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 11, 2026 23:06
@bolichen97
bolichen97 requested a review from Zedmor November 11, 2026 23:06
@bolichen97
bolichen97 enabled auto-merge (squash) November 11, 2026 23:17
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 11, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[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.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of c94cf9e744e8f2cb35be7b184331ed1c6b30e357 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: every site is a name list passed into a translated sentence, the fix goes through the existing fmtList at the separator itself, and the catalog key is swapped with its only reader.

What this change ships

Inventory (5 items) — 5 justified

Intent: Japanese and Chinese readers see their own list separator inside sentences that name several things. FIX (#34103).

  1. Sentences that name several things (missing components, sections, fields, profiles, folders, sites, files, grants, weekdays) now use the language's own list separator — justified
  2. The theme editor's list of more than ten skipped names now treats "N more" as the last list item, so English reads "…, --x9, 3 more" with no "and" — justified
  3. The catalog key css_more_names is replaced by css_more_count in all 13 locales; its one reader moves in the same change — justified
  4. The session summary's turn ranges are joined the locale's way — justified
  5. Japanese tests for the weekday cadence and the capped theme-editor list — justified

[FIRST-PRINCIPLES-REVIEWED] c94cf9e

Description read

[DESCRIPTION-READ] 80cad47cce3e6d26f2fda48b80304dab96eeb3b14f00f60c8da0101d5e928205

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of c94cf9e744e8f2cb35be7b184331ed1c6b30e357 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the only take-away, css_more_names, has one reader, and the PR switches it to css_more_count.

Notes

  • The English capped list now reads "…, --x9, 3 more" where it used to read "…and 3 more". The edited test still checks the cap, not the "and", so this is a wording change the description states, not a reversed pin.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of c94cf9e744e8f2cb35be7b184331ed1c6b30e357 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • English css_more_count "{{extra}} more" drops the "and", so the line now reads "--x9, 3 more". The blind reader said "', 3 more' looks like '3 more' could be the name of a colour." Use "and {{extra}} more" in English, or keep a conjunction before the count wherever the locale's list format has none (en, fr, pt, ru, bn).

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed c94cf9e744e8f2cb35be7b184331ed1c6b30e357 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c94cf9e

Verdict parsed from the review's SHA-scoped output markers for commit c94cf9e744e8f2cb35be7b184331ed1c6b30e357.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c94cf9e744e8f2cb35be7b184331ed1c6b30e357 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of c94cf9e744e8f2cb35be7b184331ed1c6b30e357 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c94cf9e

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c94cf9e744e8f2cb35be7b184331ed1c6b30e357 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: 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 5ea51ea8a8 · 125 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

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
@bolichen97
bolichen97 force-pushed the fix/34103-fmtlist-sibling-sites branch from 5ea51ea to c94cf9e Compare November 12, 2026 09:43
@bolichen97

Copy link
Copy Markdown
Contributor Author

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.
[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 12, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_count its 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.

@bolichen97
bolichen97 merged commit 1313195 into main Nov 12, 2026
99 checks passed
@bolichen97
bolichen97 deleted the fix/34103-fmtlist-sibling-sites branch November 12, 2026 11:15
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: name lists joined on their own line before a translated sentence use an English comma

2 participants