Skip to content

fix(i18n): pick the singular for seven count labels at a count of 1 - #25811

Merged
iamwhatever merged 1 commit into
mainfrom
crew/conductor/i18n-plural-counts
Nov 3, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
crew/conductor/i18n-plural-counts

Conversation

@RohanK6

@RohanK6 RohanK6 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Seven count labels read in the singular at a count of 1 ("1 tool", "Peeked 1 time"), in English and in every shipped language's own plural forms.

Seven English values put a plural noun after {{count}} and had no _one / _other forms:

Key Showed for 1
pages.sessionBreakdown.tool_count 1 tools
pages.sessionStorage.refused_heading 1 sessions could not be moved
apps.mochi.stats.drags Dragged 1 times
apps.mochi.stats.peeks Peeked 1 times
apps.mochi.stats.screenshots Looked at your screen 1 times
apps.mochi.stats.walks 1 steps
apps.mochi.stats.longest_chat Longest chat: 1 messages

Each one renders whenever its count is above 0, so a count of 1 is reachable on every site. The call sites also passed count: fmtNumber(n), a string.

Why it matters

Anyone with one sub-agent tool call, one refused session, or one Mochi walk, peek, drag, screen look or chat message sees broken English. Passing formatted text as count also breaks plural choice in other languages: Russian groups 1,001 as "1 001", which parses as NaN and lands on the wrong form.

Not a goal

What changed (motivation → approach → change)

The noun's form was fixed in one string, and i18next was handed text instead of a number. So:

  • Each key is split into the plural categories its language selects (Intl.PluralRules): _one/_other in English, German, Hindi and Bengali; _one/_many/_other in Spanish, French, Italian and Portuguese; _one/_few/_many/_other in Russian; _other only in Japanese, Korean and Chinese. en-XA is regenerated with gen-pseudolocale.mjs.
  • The seven keys are appended to src/i18n/pluralKeys.json. i18n-plural-codemod.mjs only rewrites + 's' glue at call sites, and these sites have none, so the keys are registered by hand, as other feature PRs do.
  • All 12 call sites (pages/SessionBreakdownTree.tsx, pages/system/SessionStorageScreen.tsx, five each in apps/mochi/MochiPage.tsx and apps/mochi/src/renderer/SettingsPanel.tsx) pass the raw number as count and the fmtNumber text as n, and the values show {{n}}. That is the pattern pages.telemetryPanel.startups_recorded already uses. i18next's built-in formatter could do {{count, number}}, but no shipped key uses a format spec, and i18n-catalog.md routes numbers through fmtNumber.
  • refused_heading is the title of a hand-written refusal box in SessionStorageScreen.tsx. Editing its message brings it under errors-use-error-notice, so the box is now an ErrorNotice: the heading as message, one row per refused session in its footer as before, askAgent on, and a report recorded when the refusal arrives (source: 'system', the trash endpoint, and each session's uid and reason code as detail) so the hand-off tells the agent which sessions failed and why. The same mutation had no surface at all when the request itself failed, so a second ErrorNotice (askAgent on) now renders errMessage(trashMut.error) beside it (the selection is already cleared when it shows, and the one text box is a search filter).
  • Translations follow each style guide: ты in Russian, tu and U+202F in French, তোমার in Bengali.

Backwards compatibility

Compatible: the seven keys are read only at the 12 call sites changed here, and i18next resolves the base key to its plural forms.

Reader: website/src/i18n/locales/*.json:the seven base keys -- app -- every reader is one of the 12 call sites in this diff; deadKeys.test.ts and catalogParity.test.ts pass

Tests

  • website/src/i18n/countPlurals.test.ts: one test per key, English, count 1 and count 2 ("1 tool" / "2 tools" and so on).
  • src/test/SessionBreakdownTree.test.tsx: a node with one tool call renders "1 tool"; in Russian, 1,001 tool calls render "1 001 инструмент", which needs the raw number.
  • src/test/SessionStorageScreen.test.tsx: one refused session renders "1 session could not be moved" inside an element with role="alert" (that check fails on the old hand-written box); two refusals render "2 sessions could not be moved" with one li row per session in the alert. A third test presses "Ask the agent" and asserts the staged prompt carries the endpoint and both uid: reason lines; it fails on the previous head, whose prompt held only the heading. A fourth test rejects the move request and asserts an alert with the error text and the hand-off; it fails on the previous head, which showed nothing.
  • src/test/MochiPageCoverage.test.tsx: stats of 1 render "1 step", "Looked at your screen 1 time", "Peeked 1 time", "Dragged 1 time", "Longest chat: 1 message".

All 11 fail on origin/main. The Russian one also fails with only the new catalogs and the old string count. All pass on this head, and ran 3 times with --sequence.shuffle. catalogParity, deadKeys and every locale style gate are in src/i18n (102 files, 1500 tests with src/apps/mochi): green. i18n-check.mjs, i18n-plural-codemod.mjs --check, tsc -p tsconfig.app.json and eslint on the touched files: clean.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

node website/scripts/capture-session-storage-refused.mjs renders the real SessionStorageScreen (via website/capture/session-storage-refused.html, with a stubbed inventory), selects rows, presses Move to Trash, and asserts before each PNG that the heading uses the right plural form, sits in a role="alert" element, and lists every refused session with its reason. All four scenes passed.

The Mochi stats and the sub-agent tool count change only the noun's form; the render tests above assert their exact text.

Screenshots / video

The refusal notice is now an ErrorNotice (red alert, with the agent hand-off) instead of a neutral box. Each refused session keeps its own row. Captured at this head:

One refused session:

One refused session, dark

One refused session, light

Several refused sessions:

Two refused sessions, dark

Two refused sessions, light

Related Issues

Part of #25809

Refs #27342 -- the five remaining {{count}} <noun>s keys (apps.mochi.stats.busiest_day, both critique_this_flow_count_screens keys, pages.membersPage.member_count_filtered, pages.telemetryPanel.daily_trend_point).

Sibling sweep

Swept: en.json values matching {{count}} followed by a plural noun, outside pluralKeys.json
Sibling: website/src/apps/mochi/MochiPage.tsx -- tracked in #27342
Sibling: website/src/apps/mochi/src/renderer/SettingsPanel.tsx -- tracked in #27342
Sibling: website/src/apps/design-critique/Composer.tsx -- tracked in #27342
Sibling: website/src/apps/design-critique/ScopingPicker.tsx -- tracked in #27342
Sibling: website/src/pages/members/MembersPageRoster.tsx -- tracked in #27342
Sibling: website/src/pages/TelemetryPanel.tsx -- tracked in #27342

Pattern harvest

Rule candidate: lint
Pattern: a catalog value with a plural noun after {{count}} whose key is not in pluralKeys.json, or a count option passed through fmtNumber

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

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners October 29, 2026 16:36
@RohanK6
RohanK6 requested a review from cruisercohen October 29, 2026 16:36
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: all seven renamed keys are read only at the 12 call sites this diff changes, and four committed screenshots show the reshaped refusal notice.

Notes

[DESIGN-REVIEWED] 5c5227f

Description read

[DESCRIPTION-READ] b147ffe9edcf39f6633928e660822e5faea47fd72e7ab504a6e0ee8a32037cdf

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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing the new "move request failed" notice. The PR adds a second ErrorNotice for that case, and none of the four screenshots shows it.

Evidence gaps

  • "Move request failed" notice (testId="session-storage-trash-failed", which shows errMessage(trashMut.error) with "Ask the agent"). This surface did not exist before the PR. The screenshot list has only the four refused-session scenes (one-dark, one-light, several-dark, several-light), so nobody has seen the error text, its placement or the hand-off. To close the gap, add a screenshot from capture-session-storage-refused.mjs with the trash endpoint rejected, in dark and light.

Notes

  • The heading doesn't say where the sessions were going. The blind reader wrote: "I can't tell what 'moved' means: moved where, and why?" Since every locale value of pages.sessionStorage.refused_heading is being rewritten anyway, change it to "{{n}} session could not be moved to Trash" / "{{n}} sessions could not be moved to Trash".

[UX-REVIEWED] 5c5227f

Description read

[DESCRIPTION-READ] 517f05d8f016753a07528a283990913b8c165b959fab82f134b104939879a850

That sha256 names everything this verdict read: the PR description, plus the 7 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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 5c5227fb63bc0f7708753165b5901d8eefe086e4 — 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

One rider sits outside the Goal: a new failure notice for the Move to Trash request. Everything else is the plural fix, or the ErrorNotice conversion that website/AGENTS.md requires.

Notes

  • Item 6 — rides along, oversized: the Goal is "Seven count labels read in the singular at a count of 1", but the diff adds <ErrorNotice askAgent testId="session-storage-trash-failed" message={trashMut.isError ? errMessage(trashMut.error) : null} />. That is a new failure surface on the trash mutation, which no count label needs. Subtraction: delete that second ErrorNotice and its test, and ship it in its own fix PR. Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (8 items) — 7 justified

Intent: when a count is 1, seven labels should read "1 tool" or "Peeked 1 time" in every shipped language. This is a FIX.

  1. Sub-agent tool count reads "1 tool" at a count of 1 — justified
  2. Refused-sessions heading reads "1 session could not be moved" — justified
  3. Five Mochi stats (steps, screen looks, peeks, drags, longest chat) use the singular at a count of 1 — justified
  4. Plural form is picked from the raw number, so Russian 1,001 gets the right form — justified
  5. The refusal box becomes a red ErrorNotice alert with "Ask the agent", whose hand-off carries each session's uid and reason — justified
  6. A failed Move to Trash request now shows an error alert where it used to show nothing — rides along, oversized
  7. Seven keys added by hand to pluralKeys.json — justified
  8. A capture page, a capture script and four screenshots for the refusal notice — justified

[FIRST-PRINCIPLES-REVIEWED] 5c5227f

Description read

[DESCRIPTION-READ] 7c95e13ac34b91d04d70c26b0cfd0d7d4f95ccfc6aa0ea5743d6529269b0c4e8

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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 5c5227f

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

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

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 5c5227f

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

@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from e8dbe7e to 799d9a3 Compare October 29, 2026 17:04
@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

span=57949b222f59 disposition=fixed sha=799d9a303a79

  • Use ErrorNotice for the touched refusal surface

Fixed in 799d9a303a: the refusal box in SessionStorageScreen.tsx is now an ErrorNotice, with the heading as title and the per-session reasons as message.
askAgent is on: the selection is already cleared when the notice shows (invalidate() runs in trashMut.onSuccess), and the screen's one text box is a search filter, not a draft.
Class sweep: of the 12 call sites this PR edits, this is the only error surface. The other 11 are stat and count labels.
SessionStorageScreen.test.tsx now asserts the heading renders inside role="alert"; that check fails on the old box.

self-added: no
mechanism: migrated the refusal box to ErrorNotice

@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 799d9a3 to 5203d17 Compare October 29, 2026 17:37
@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

span=e7ade05b465a disposition=fixed sha=5203d17d3e94

  • The refusal notice is a reshaped surface with no rendered evidence

Fixed in 5203d17d3e: four screenshots of the SessionStorageScreen refusal notice at this head are committed under temp-screenshots/25809-session-storage-refused/ (one and two refusals, dark and light) and shown in the description.
They come from website/scripts/capture-session-storage-refused.mjs, which renders the real screen and asserts the plural heading, the role="alert" wrapper and every refused session's reason before each PNG is written.
The description no longer claims no visual delta; it says the neutral box became an ErrorNotice and the reasons are joined into one message.

self-added: yes
mechanism: committed rendered evidence for the ErrorNotice migration

@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

span=c0269ce7e36d disposition=fixed sha=5203d17d3e94

  • The refusal notice changes form, but the PR says no visual change

Fixed in 5203d17d3e: four screenshots of the SessionStorageScreen refusal notice at this head are committed under temp-screenshots/25809-session-storage-refused/ (one and two refusals, dark and light) and shown in the description.
They come from website/scripts/capture-session-storage-refused.mjs, which renders the real screen and asserts the plural heading, the role="alert" wrapper and every refused session's reason before each PNG is written.
The description no longer claims no visual delta; it says the neutral box became an ErrorNotice and the reasons are joined into one message.

self-added: yes
mechanism: committed rendered evidence for the ErrorNotice migration

@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 5203d17 to 550c607 Compare October 29, 2026 18:08
@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Reply to the notes on 5203d17d3e.

Refusal reasons joined on one line (Design, UX, First Principles): fixed in 550c607e47. The comma join was mine and made it hard to tell which reason belongs to which session. The heading is now the notice's message, and each refused session gets its own row in the footer slot, as before the migration. A new test asserts one li per session inside the alert, and the screenshots are recaptured.

"session is too recent" leaves the reader asking how long (UX): left as is. pages.sessionStorage.refused_too_fresh is not touched by this PR, and changing it is new copy work outside its goal. Worth a separate change.

@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 550c607 to 67968a9 Compare October 29, 2026 18:50
@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

span=e6d21834438d disposition=fixed sha=67968a90d06a

  • The refusal hand-off carries only the heading

Fixed in 67968a90d0: trashMut.onSuccess now records a report when refusals arrive (recordError, source: 'system', endpoint /api/system/session-storage/trash, detail = one uid: reason line per refused session). The report is kept in state and passed to the notice as report.
Class sweep: this is the one hand-off this PR adds. The other 11 edited sites are labels with no notice.
SessionStorageScreen.test.tsx presses "Ask the agent" and asserts the staged prompt carries the endpoint and both uid: reason lines; it fails on the previous head.

self-added: yes
mechanism: recorded a system-source report for the refusal notice

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 29, 2026
@RohanK6

RohanK6 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Reply to the notes on 67968a90d0.

Red styling for the refusal box (Design): this is required, not a choice. Editing the heading brought the box under errors-use-error-notice in website/AUTOSDE.yaml, which says a diff that edits a hand-written error site migrates it. The refusals come from a failed request (refused in the trash reply), which is what that rule scopes on. A maintainer can still rule otherwise.

Formal-to-informal switch in three screenshots_* values (First Principles): required by the style gates. ruStyle, frStyle and bnStyle each fail a changed value that uses вы / vous / আপনার, and splitting the key changes every value under it.

No close button, and "too recent" not saying how long (UX): both predate this PR. The old box had no close button either, and refused_too_fresh is untouched here. Worth a separate change.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 29, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 67968a9 to ce6fd52 Compare October 29, 2026 20:55
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Oct 29, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 1, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 19c6e6c to b7193ca Compare November 1, 2026 20:40
@RohanK6

RohanK6 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/ (19 overlapping files, same-file) since this head went green (c32037e -> 14f5a48); CI re-running. No conflicts; src/i18n, src/apps/mochi and SessionStorageScreen tests, tsc and the plural codemod check pass locally.

@iamwhatever on your blocker: fixed in the description. Opened #27342 for the five remaining {{count}} <noun>s keys. Related Issues now says Part of #25809 plus Refs #27342, and every Sibling sweep line points at #27342. Not a goal is left as written, since it is frozen.

@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 1, 2026
@RohanK6

RohanK6 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@iamwhatever your r139 point, against head b7193ca:

  1. Closes i18n: seven count labels read '1 tools', '1 sessions', 'Peeked 1 times' #25809 would close the only tracker: fixed in the description. It says Part of i18n: seven count labels read '1 tools', '1 sessions', 'Peeked 1 times' #25809, and i18n: five more count labels read '1 screens', '1 msgs', '1 mates', '1 starts' at a count of 1 #27342 tracks the five remaining count keys (Refs line and every sibling sweep line).
    Re-requesting your review.

@RohanK6
RohanK6 requested a review from iamwhatever November 2, 2026 03:04

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes at b7193ca for one translation defect inside this PR's goal.

Our r139 tracking blocker is cleared: the description says Part of #25809 and links #27342 for the five remaining keys. The call-site change is right, and checks are green.

Defect (Opus note, unanswered). The new Hindi singular keeps the plural verb: refused_heading_one is {{n}} सत्र नहीं ले जाए जा सके (hi.json#L16619). At a count of 1 a Hindi user still sees a plural sentence, the same bug this PR fixes in English. The catalog already uses the singular नहीं ले जाया जा सका elsewhere (hi.json#L13788). Smallest fix: set refused_heading_one to {{n}} सत्र नहीं ले जाया जा सका.

AI findings judged non-blocking

  • Opus (note): fr/ru/bn screenshots_* use the informal pronoun. The locale style guides require tu/ты/তুমি for changed values (website/src/i18n/style/fr.md, ru.md, bn.md); the formal neighbours are older strings.
  • UX evidence gaps: the failed-move notice is the shared ErrorNotice, and the test asserts its alert, text and hand-off (SessionStorageScreen.tsx#L473-L478). The Mochi and tool labels change only the noun form, and render tests assert the exact text.
  • UX notes: the 'Ask the agent' label and the missing dismiss predate this PR.
  • Design (note): recording a partial refusal builds a local report that the hand-off reads only on demand (SessionStorageScreen.tsx#L142-L148). A shared helper is optional.
  • First Principles items 5 and 6: the failed-move notice replaces a silent failure on the mutation this PR edits, and the capture harness is evidence tooling.

— crew-pr-reviewer (r140)

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 2, 2026
@RohanK6

RohanK6 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@iamwhatever your r140 points:

  1. Hindi singular kept the plural verb: fixed in 13f568d. refused_heading_one now reads "{{n}} सत्र नहीं ले जाया जा सका". The other six Hindi pairs have no verb that agrees with the count. Rebased onto main 79a5b87 in the same push; i18n:check, tsc, eslint and 111 related vitest files pass.
  2. fr/ru/bn informal pronoun (non-blocking note): left as is. The changed values follow the style guides (tu / ты / তুমি).
    Re-requesting your review.

@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from b7193ca to 13f568d Compare November 2, 2026 04:29
@RohanK6
RohanK6 requested a review from iamwhatever November 2, 2026 04:29
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 2, 2026
Seven English values put a plural noun after {{count}} with no
_one/_other forms, so a count of 1 read "1 tools", "1 sessions could
not be moved", "Peeked 1 times". The call sites also passed
fmtNumber() text as count, which i18next reads as NaN for grouped
numbers such as Russian "1 001" and so lands on the wrong form.

Split each key into the plural forms its locale selects, register them
in pluralKeys.json, and pass the raw number as count with the
formatted text as n, the pattern telemetryPanel already uses.

The session-storage refusal heading is one of the edited messages, so
that hand-written box moves to ErrorNotice with the agent hand-off,
as errors-use-error-notice requires for a touched error surface.

Closes #25809
@RohanK6
RohanK6 force-pushed the crew/conductor/i18n-plural-counts branch from 13f568d to 5c5227f Compare November 2, 2026 17:11
@RohanK6

RohanK6 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/pluralKeys.json (#21995 appended two keys at the same spot), so the PR conflicted (13f568d -> 5c5227f). Kept both key sets; no other change. Locally: src/i18n, src/apps/mochi and the three touched test files (115 files, 1698 tests) pass with I18N_BASE_REF=origin/main; i18n-check, check-i18n-keys, plural codemod --check, a clean en-XA regen, tsc and eslint all clean.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 2, 2026

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

APPROVE at 5c5227fb63bc0f7708753165b5901d8eefe086e4.

Our r140 blocker is fixed: the Hindi singular now reads {{n}} सत्र नहीं ले जाया जा सका (hi.json#L16693-L16694). The rest of the head is a rebase that keeps both key sets in pluralKeys.json. Each call site passes the raw number as count and the formatted text as n (MochiPage.tsx#L780), the five remaining keys are tracked in #27342, every AI lane passed on this head, and CI is green.

AI findings judged non-blocking

  • UX: no capture of the failed-move notice. It is the shared ErrorNotice, empty unless the request fails (SessionStorageScreen.tsx#L474-L478), and the test asserts its alert, text and hand-off.
  • UX: heading does not say "to Trash". A wording nit; the notice sits on the Trash action.
  • First Principles item 6: the failed-move notice is outside the Goal. It replaces a silent failure on the mutation this PR edits; no user harm.
  • Design: the ErrorNotice conversion would read better as its own commit, and later Mochi fixes belong in the app's repo after #26967. Commit-shape and routing advice only.

— crew-pr-reviewer (r142)

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.

2 participants