Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 4a1adb7

Browse files
fix(i18n): every count label a word agrees with is an i18next count family in all ten packs — no === 1 key switch, no *Plural / *One pair (objectui#11445) (#11456)
Fixes #11445 Clause-②: no ## What this changes Every count label a word must agree with is now an i18next count family, in all ten packs. No component chooses a plural key itself any more. - **68 keys become families.** 15 code-selected pairs (`xxxCountOne` / `xxxCountPlural`, chosen on `=== 1`) and 53 single-form count keys. Each pack spells every CLDR category its language selects: `en` `_one` / `_other`, `ru` `_one` / `_few` / `_many` / `_other`, `ar` all six, and the others whatever `Intl.PluralRules` selects. Base values are unchanged, so `check:i18n-drift` reads 0 `en` values changed, and the base still answers a call made without a count. - **The 15 siblings leave all ten packs.** The components call `t(key, { count })`, and every `=== 1` key switch is gone. Eight call sites passed `count: String(n)`, which i18next does not plural-select; they pass the number now. These are the four collaboration count labels, the three collaboration relative timestamps, and the import wizard's auto-match summary. The `page:tabs` badge passes the number below 1000; a shortened `1.2k` stays a string, so it reads the count-invariant base key. - **The provider-less paths read families the way i18next does.** `createSafeTranslation`'s `fallbackT`, and the gantt and import-wizard hand-rolled fallbacks, look up `key_CATEGORY` (English rules) for a numeric `count`, then the base row. Without this, retiring the pairs would have regressed provider-less hosts from "1 reply" to "1 replies". The defaults tables carry each converted family's `_one` / `_other` rows where English differs. - **The pin.** The new `packages/i18n/src/__tests__/count-families-11445.test.ts` sits beside the objectui#11432 pin. It fails in two cases: - (a) any pack holds a `…Plural` key; - (b) any `{{count}}` leaf, in any pack, is outside a family and not on its count-neutral list. Each list entry carries its reason. The list can only shrink: every entry must still exist, still interpolate `{{count}}` and still sit outside a family. objectui#11432's two pins judge the 68 new families by construction, for slot existence and i18next selection. ## Premise check, on current `main` The card's measurement reproduces at `89cad75d5`, the first cut, and again at `37140f4f5` after merging `main` (plain i18next 26.4.0 over the shipped packs, emulating each call site's `=== 1` switch): - `ru` `detail.attachmentCount`: `3 вложений`, `21 вложений`. `ru` `detail.replyCount`: `21 ответов`. - `ar` `detail.attachmentCount`: `2 مرفقات`, `100 مرفقات`. `ar` `detail.replyCount`: `11 ردود`. - `ru` at 3: `Согласовать 3 запросов?`, `Импортировать 3 строк`, `3 строк изменено`, `3 ожидающих утверждений`. `en`: `2 row modified`. The card's "the defective set needs a per-key read" held, and the population is larger than its sample. At the merge base, 130 `{{count}}` leaves sat outside the 14 families. Read pack by pack, with each call site's reachable range: - 68 needed a family. A word agreed with the number in at least one pack, often `de`, `es`, `pt` or `fr` at 1, or `ar` with a full noun. - 48 are count-neutral. - 15 were siblings that retire. - 1 is not a count. The census enumerates every `t(…, { count })` call site: 158 literal-key sites. 109 now reach a family and 47 reach a count-neutral key. The other 2 are scanner false matches: a variable named `count` passed as `total`, and a key named `report.aggregate.count`. No call site passes `count` to a key without a hole or a family. ## Census — every count label, by key #### 1. Code-selected sibling pairs — 15 converted, 1 not a count, 1 unreached | Family key | Retired sibling | Call site(s), now `t(key, { count })` | |---|---|---| | `lookup.recordCount` | `lookup.recordCountOne` | `RecordPickerDialog.tsx` | | `common.itemCount` | `common.itemCountOne` | `containers.tsx` | | `list.recordCount` | `list.recordCountOne` | `ListView.tsx` | | `detail.reactionCount` | `detail.reactionCountOne` | `ReactionPicker.tsx` | | `detail.attachmentCount` | `detail.attachmentCountPlural` | `CommentAttachment.tsx` | | `detail.replyCount` | `detail.replyCountPlural` | `ThreadedReplies.tsx` | | `console.objectView.recordCount` | `console.objectView.recordCountOne` | `ObjectView.tsx` | | `search.resultsCount` | `search.resultsCountPlural` | `SearchResultsPage.tsx` | | `search.itemsAvailable` | `search.itemsAvailableOne` | `SearchResultsPage.tsx` | | `ai.formAssist.suggestionCount` | `ai.formAssist.suggestionCountOne` | `AIFormAssist.tsx` | | `ai.formAssist.appliedCount` | `ai.formAssist.appliedCountOne` | `AIFormAssist.tsx` | | `collaboration.commentCount` | `collaboration.commentCountOne` | `CommentThread.tsx` (the call passed a string count; now a number) | | `collaboration.reactionCount` | `collaboration.reactionCountOne` | `CommentThread.tsx` (the call passed a string count; now a number) | | `collaboration.presentUserCount` | `collaboration.presentUserCountOne` | `PresenceAvatars.tsx` (the call passed a string count; now a number) | | `collaboration.moreUserCount` | `collaboration.moreUserCountOne` | `PresenceAvatars.tsx` (the call passed a string count; now a number) | | `fields.location.refusedResidue` | `…One` kept | NOT a count: the two values interpolate different holes (one half, or both halves), selected by which halves exist; no `{{count}}` | | `detail.relatedRecords` | `detail.relatedRecordOne` kept | unreached: no `t()` caller (`check:i18n-dead-keys` lists both); on the count-neutral list as `unreached` | #### 2. Single-form count keys — 53 converted | Key | Pack(s) whose single form disagreed with the number | Call site(s) | |---|---|---| | `fields.relativeDate.overdue` | ar (3-7 days need the plural noun) | date-display.ts (core, `options.t`) | | `table.modified` | en, de, es, ru | `data-table.tsx` | | `table.selected` | es (`1 seleccionados`) | `data-table.tsx`, `LookupField.tsx`, `PeoplePicker.tsx`, `RecordPickerDialog.tsx` | | `grid.bulkSelected` | es, pt | `BulkActionBar.tsx` | | `grid.bulkAllOnPage` | en, de, fr, es, pt, ru at a page size of 1 | `BulkActionBar.tsx` | | `grid.import.autoMatchedSummary` | ar | `ImportWizard.tsx` (string count → number) | | `grid.import.rowsWithErrors` | ru | `ImportWizard.tsx` | | `grid.import.rowsCorrected` | ru | `ImportWizard.tsx` | | `grid.import.resultsTruncated` | ar (`صفًا` agrees only with 11-99; the cap is the server's) | `ImportWizard.tsx` | | `grid.import.createdCount` | es, pt | `ImportWizard.tsx` | | `grid.import.updatedCount` | es, pt | `ImportWizard.tsx` | | `grid.import.moreErrors` | en, de, ru | `ImportWizard.tsx` | | `grid.import.errorCount` | en, fr, es, pt | `ImportWizard.tsx` | | `grid.import.importNRows` | en, de, fr, es, pt, ru, ar | `ImportWizard.tsx` | | `grid.bulk.confirmDefault` | de | `BulkActionDialog.tsx` | | `grid.bulk.skippedIneligible` | de, fr, es, pt, ru (verb agreement) | `BulkActionDialog.tsx`, `ListView.tsx` | | `gantt.conflict.body` | de | `GanttView.tsx` | | `gantt.autoScheduleDlg.body` | de, ru (`задач(и)`) | `GanttView.tsx` | | `gantt.autoScheduleDlg.skipped` | de, ru | `GanttView.tsx` | | `detail.minutesAgo` | ar | `AiPendingActionsInbox.tsx`, `ActivityTimeline.tsx`, `RecordActivityTimeline.tsx`, `RecordComments.tsx`, `RecordMetaFooter.tsx`, `ThreadedReplies.tsx` | | `detail.hoursAgo` | ar | `AiPendingActionsInbox.tsx`, `ActivityTimeline.tsx`, `RecordActivityTimeline.tsx`, `RecordComments.tsx`, `RecordMetaFooter.tsx`, `ThreadedReplies.tsx` | | `detail.daysAgo` | ar | `AiPendingActionsInbox.tsx`, `ActivityTimeline.tsx`, `RecordActivityTimeline.tsx`, `RecordComments.tsx`, `RecordMetaFooter.tsx`, `ThreadedReplies.tsx` | | `detail.showEmptyFields` | en, de, fr, es, pt, ru | `DetailSection.tsx` | | `console.saveAdvisoryTitle` | ar | `saveAdvisoryToast.ts` | | `console.publishAdvisoryTitle` | ar | `saveAdvisoryToast.ts` | | `console.objectView.importedToast` | ru | `ObjectView.tsx` | | `console.objectView.bulkDeleteConfirm` | en, de, fr, es, pt, ru | `ObjectView.tsx` | | `home.pendingDrafts.message` | ru | `HomePage.tsx` | | `preview.changes.confirmNote` | en, de, fr, es, pt, ru | `DraftChangesPanel.tsx` | | `preview.changes.securityBlockTitle` | ru (`элемент(ов)`) | `DraftChangesPanel.tsx` | | `objectActions.bulkDeleteSuccess` | ru (rendered at 2 or more) | `recordDelete.ts` | | `notifications.groupUnread` | fr, pt | `InboxPopover.tsx` | | `notifications.approvalsPending` | en, de, fr, es, pt, ru, ar | `HomeRail.tsx`, `InboxPopover.tsx` | | `notifications.arrivalMany` | ar (rendered at 2 or more) | `useInboxArrivalNotifier.ts` | | `notifications.arrivalRepeats` | ar (rendered at 2 or more) | `useInboxArrivalNotifier.ts` | | `excelImport.imported` | ar | `ExcelImportBar.tsx` | | `marketplace.detail.purgeSuccess` | ar | `MarketplacePackagePage.tsx` | | `marketplace.detail.reseedPartialErrors` | ar | `MarketplacePackagePage.tsx` | | `marketplace.relativeTime.monthsAgo` | de, es, pt | `MarketplacePage.tsx` | | `marketplace.relativeTime.yearsAgo` | de, fr, es, pt, ru | `MarketplacePage.tsx` | | `approvalsInbox.remindSuccess` | ar | `RecordApprovalsPanel.tsx` | | `approvalsInbox.progressEligible` | de, ar | `ApprovalsInboxPage.tsx`, `RecordApprovalsPanel.tsx` | | `approvalsInbox.actionableCount` | fr, es, pt | `ApprovalsInboxPage.tsx` | | `approvalsInbox.bulkApproveTitle` | en, de, fr, es, pt, ru, ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.bulkRejectTitle` | en, de, fr, es, pt, ru, ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.bulkApproved` | en, de, fr, es, pt, ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.bulkRejected` | en, de, fr, es, pt, ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.minutesAgo` | ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.hoursAgo` | ar | `ApprovalsInboxPage.tsx` | | `approvalsInbox.daysAgo` | de, fr, es, pt, ar | `ApprovalsInboxPage.tsx` | | `collaboration.minutesAgo` | ar | `CommentThread.tsx` (string count → number) | | `collaboration.hoursAgo` | ar | `CommentThread.tsx` (string count → number) | | `collaboration.daysAgo` | ar | `CommentThread.tsx` (string count → number) | #### 3. `{{count}}` outside a family — 48, each on the pin's count-neutral list | Reason | Keys (call sites) | |---|---| | `tally` | `perm.facet.more` (`PermissionFacetLink.tsx`); `lookup.showAllResults` (`LookupField.tsx`); `fields.textarea.characterCount` (`character-count.tsx`); `fields.textarea.charactersRemaining` (`character-count.tsx`); `table.totalRecords` (none (a `data-table.tsx` defaults row only)); `table.saveAll` (`data-table.tsx`); `grid.bulk.overLimit` (`BulkActionDialog.tsx`); `grid.bulk.affectedRecords` (`BulkActionDialog.tsx`); `grid.bulk.andMore` (`BulkActionDialog.tsx`); `grid.bulk.processed` (`BulkActionDialog.tsx`); `grid.bulk.processedFailed` (`BulkActionDialog.tsx`); `grid.bulk.succeeded` (`BulkActionDialog.tsx`); `grid.bulk.resultFailed` (`BulkActionDialog.tsx`); `calendar.moreEvents` (`CalendarView.tsx`); `calendar.unscheduled` (`ObjectCalendar.tsx`); `view.moreViews` (`ViewTabBar.tsx`); `detail.showDiscussion` (`RecordChatterPanel.tsx`); `console.ai.buildDoctorDrawer.timeline` (`BuildDebugDrawer.tsx`); `marketplace.installedCount` (`MarketplacePage.tsx`); `approvalsInbox.approveN` (`ApprovalsInboxPage.tsx`); `approvalsInbox.rejectN` (`ApprovalsInboxPage.tsx`) | | `invariant` | `grid.import.imported` (`ImportWizard.tsx`); `grid.import.skippedCount` (`ImportWizard.tsx`); `console.ai.pendingDrafts.count` (`PendingDraftsBar.tsx`); `console.ai.buildDoctorDrawer.allLive` (`BuildDebugDrawer.tsx`); `console.ai.buildDoctorDrawer.discrepancies` (`BuildDebugDrawer.tsx`); `console.ai.buildDoctorDrawer.issueCount` (`BuildDebugDrawer.tsx`); `console.ai.buildDoctorDrawer.platformNoise` (`BuildDebugDrawer.tsx`); `home.pendingDrafts.publishedVerified` (`usePublishAllDrafts.ts`); `home.pendingDrafts.capabilityWarn` (`usePublishAllDrafts.ts`); `preview.history.items` (`CommitTimeline.tsx`) | | `abbreviated` | `console.ai.minutesAgo` (`ConversationsSidebar.tsx`); `console.ai.hoursAgo` (`ConversationsSidebar.tsx`); `console.ai.daysAgo` (`ConversationsSidebar.tsx`); `layout.activityFeed.relativeSecondsAgo` (`ActivityFeed.tsx`); `layout.activityFeed.relativeMinutesAgo` (`ActivityFeed.tsx`); `layout.activityFeed.relativeHoursAgo` (`ActivityFeed.tsx`); `layout.activityFeed.relativeDaysAgo` (`ActivityFeed.tsx`); `marketplace.relativeTime.daysAgo` (`MarketplacePage.tsx`) | | `twoOrMore` | `grid.bulkSelectedAllMatches` (`BulkActionBar.tsx`); `grid.bulkSelectAllMatching` (`BulkActionBar.tsx`); `grid.bulkAllMatchingSelected` (`BulkActionBar.tsx`); `notifications.groupCount` (`InboxPopover.tsx`) | | `unreached` | `detail.relatedRecords` (none); `detail.relatedRecordOne` (none); `appDesigner.objectManager.fieldCount` (none); `console.objectView.toolbarEnabledCount` (none); `layout.appSwitcher.appsAvailable` (none) | #### 4. Families since objectui#11432 — 14, unchanged `calendar.a11y.dayCell`, `chatbot.plan.countDashboards`, `chatbot.plan.countObjects`, `chatbot.plan.countViews`, `console.ai.usage.resetsWeeklyDays`, `console.ai.usage.resetsWeeklyHours`, `console.settingsView.unsavedCount`, `detail.fileCount`, `detail.repeaterItemCount`, `detail.showEmptyRelated`, `perm.facet.fields`, `perm.facet.objects`, `perm.facet.rls`, `perm.facet.tabs` — their call sites already pass a numeric `count`. The count-neutral reasons, as the pin states them: - `tally`: the number stands alone, so nothing agrees with it. It sits in parentheses, after `+`, beside `/ {{total}}`, or after a label or verb. - `invariant`: every pack phrases the label count-invariantly. That means an `(s)` marker in en/de/fr/es/pt (the convention `perm-home-namespace-3546.test.tsx` pins), a label, partitive or impersonal form in ru/ar, and a counter in zh/ja/ko. - `abbreviated`: a relative time with an abbreviated unit in every pack. - `twoOrMore`: the call site renders the label only at 2 or more. Every pack's form is right at every such count: the cross-page banner needs `totalMatching` above `pageSize`, and the inbox group header needs a group of two. - `unreached`: no `t()` caller; `check:i18n-dead-keys` lists each one. ## Before / after, measured Plain i18next 26.4.0 over the packs. BEFORE emulates today's call sites (`=== 1` switch for the pairs); AFTER is `t(key, { count })`. | Key | lang | before | after | |---|---|---|---| | `detail.attachmentCount` | ru 3 / 21 | `3 вложений` / `21 вложений` | `3 вложения` / `21 вложение` | | `detail.attachmentCount` | ar 2 / 11 / 100 | `2 مرفقات` / `11 مرفقات` / `100 مرفقات` | `مرفقان (2)` / `11 مرفقًا` / `100 مرفق` | | `detail.replyCount` | ru 2 / 21 | `2 ответов` / `21 ответов` | `2 ответа` / `21 ответ` | | `detail.replyCount` | ar 2 / 11 | `2 ردود` / `11 ردود` | `ردّان (2)` / `11 ردًّا` | | `approvalsInbox.bulkApproveTitle` | ru 3 / 21 | `Согласовать 3 запросов?` / `… 21 запросов?` | `Согласовать 3 запроса?` / `Согласовать 21 запрос?` | | `grid.import.importNRows` | ru 3 / ar 2 | `Импортировать 3 строк` / `استيراد 2 صف` | `Импортировать 3 строки` / `استيراد صفين (2)` | | `table.modified` | en 2 / ru 3 | `2 row modified` / `3 строк изменено` | `2 rows modified` / `Изменено 3 строки` | | `notifications.approvalsPending` | ru 3 / en 1 | `3 ожидающих утверждений` / `1 pending approvals` | `3 ожидающих утверждения` / `1 pending approval` | ## Reverse verification and ablation Each prediction was written before its run. - **The fix at the merge base, this branch's tests at HEAD.** The 31 source files were set to their `37140f4f5` blobs (31 of 31 confirmed by hash), and 7 test files were run. - Predicted 65 failing tests in 5 files: count-families 3, `useSafeTranslation` 5, countLabels-10242 16, countLabels-10425 29, SearchResultsPage-10024 12. Predicted `plural-categories-11432` and `all-locales-key-parity` green. - Observed `Test Files 5 failed | 2 passed (7)`, `Tests 65 failed | 123 passed (188)`, split exactly as predicted. - The pin printed `` 30 `…Plural` key(s) `` (3 keys in 10 packs), `82 count label(s) outside any family` (68 bases and the 14 siblings that interpolate `{{count}}`), and `expected 14 to be greater than or equal to 82`. - Restore: each blob equals HEAD, and `git diff HEAD` is empty with 0 porcelain lines. - **Ablations at HEAD**, through `ablation-replace.mjs`: each anchor must hit once, each write is verified on disk, and each restore is proven by blob hash. - B, `ru` `detail.attachmentCount_few` deleted. Predicted 2 failing. Observed `Tests 2 failed | 60 passed (62)`: parity's `ru: 1 plural slot(s) missing: [ 'detail.attachmentCount_few' ]`, and the i18next pin's `ru: 1 slot(s) not selected`. The new pin stayed green, as predicted. - C1, `perm.facet.more` taken off the count-neutral list. Predicted 1 failing. Observed `Tests 1 failed | 61 passed`: `1 count label(s) outside any family`. - C2, `detail.attachmentCountPlural` planted back into `en`. Predicted 11 failing. Observed `Tests 11 failed | 51 passed`: the pin's `` 1 `…Plural` key(s): [ 'en:detail.attachmentCountPlural' ] ``, its outside-a-family case, and parity's "defines every en key" for 9 packs. - Every leg restored (blob == HEAD, `git diff HEAD` empty), and the tree reads 0 porcelain lines afterwards. Every subject resolves to `src` through relative imports or the vitest `@object-ui/*` aliases, so no `dist` build or preflight applies. ## Gates The vitest union is every test file that names a converted or retired key, asserts a changed English string, or names a touched component, plus `packages/i18n/` in full. It ran in four lock-held batches: - B, C and D ran at `558168c53`. - A ran again at `b6800f9b5`. The only change since `558168c53` is the body of `.changeset/11445-i18n-count-families.md`. - Patch round 1 (head `6343a6e77`) changes changeset prose only: no source, test or locale byte moves, so the vitest, build and type-check rows below stand for this head. The changeset gates were re-run there (rows marked *patch round 1*). | Check | Verdict line | |---|---| | vitest A: `packages/i18n/` plus console and `scripts` tests | `Test Files 113 passed (113)` · `Tests 2363 passed \| 13 skipped (2376)` · VERDICT command-exit 0 | | vitest B: the other packages' tests | `Test Files 200 passed (200)` · `Tests 2824 passed (2824)` · VERDICT command-exit 0 | | vitest C: app-shell, first half | `Test Files 90 passed (90)` · `Tests 786 passed (786)` · VERDICT command-exit 0 | | vitest D: app-shell, second half | `Test Files 91 passed (91)` · `Tests 1011 passed \| 1 skipped (1012)` · VERDICT command-exit 0 | | `turbo run build --concurrency=2` over the app-shell and plugin-chatbot dependency closures | `Tasks: 28 successful, 28 total` | | `type-check` (`tsc --noEmit && tsc -p tsconfig.test.json`): i18n, collaboration, components, fields, plugin-ai, plugin-chatbot, plugin-detail, plugin-gantt, plugin-grid, plugin-list, plugin-view | each `type-check: Done` | | `type-check`: app-shell | VERDICT command-exit 0 | | `pnpm check:i18n-keys` | `Every in-scope call-site key resolves against the en pack (3263 keys), every literal inline defaultValue matches the value the pack serves …` | | `pnpm check:i18n-drift` | `0 en value(s) changed (136 key(s) added, 15 removed — those are all-locales-key-parity's)` · `No en value changed in this range.` | | `pnpm check:i18n-designer-parity` | `Every en row has a zh row, and every shared row carries the same placeholders.` | | `pnpm check:i18n-dead-keys` (report-only census) | exit 0 · see the Acceptance notes | | `pnpm check:control-bytes` | `check-control-bytes: OK (scanned 10016 tracked text file(s); skipped 85 binary).` | | `pnpm check:new-line-citations` | `VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only → exit 0` | | `node scripts/check-changeset-presence.mjs` (*patch round 1*) | exit 0 · `54 source file(s) of 12 released package(s) changed, and this change declares 11 changeset(s)` | | `node scripts/check-changeset-no-major.mjs` (*patch round 1*) | exit 0 · `No changeset declares a major bump.` | | `pnpm check:changeset-claims` (report-only, *patch round 1*) | exit 0 · corpus 16 changesets this change adds or modifies, every declared package un-negated. The pending notes it lists name files this branch edits; none is falsified. The `ru` / `ar` count-label notes it does not name (9664, 10024, 10242, 10425, 10636) now each end in a dated note naming the count family that replaced their `…One` / `…Plural` switch | | `node scripts/check-changeset-overwrite.mjs` (report-only, *patch round 1*) | exit 0 · `11 changeset(s) added, 5 modified, 0 deleted`: the five dated-note appends, each with `declared at base` equal to `declares now` | | `check-governed-queue-guard --test` | `NOT GOVERNED — 66 path(s) checked against 5 governed surface(s); none matched.` | The type-check ran over the 11 packages at `e8d09bfda`. Its outer `timeout` then cut the app-shell leg, which was re-run alone and exited 0. The TypeScript tree is byte-identical at the head. `--listFiles` counts all 9 changed i18n test files in that package's test program. **eslint over the 54 changed lintable files.** With the packages' own `eslint .` (inline config honoured): 0 errors and 611 warnings, none of them on a line this branch adds (cross-checked against `git diff -U0`). With `--no-inline-config`: 1 error, `react-hooks/static-components` in `data-table.tsx`, on a line this branch does not touch. Linting the base blob through `--stdin` gives the same error, from an `eslint-disable-next-line` the flag ignores. The narrowing is proven three ways: 1. Every file is in the linted population: eslint's JSON reports 54 files and no "File ignored" message. 2. The file count comes from that JSON. 3. `eslint.config.js` turns on no type-aware linting (no `project` / `projectService` / `TypeChecked`), and no local rule reads another file. So this diff cannot move a verdict on an untouched file. ## Mechanism assumptions, measured 1. **The measured renders.** CONFIRMED: the card's renders reproduce on current `main`; before/after above. 2. **Count-neutral needs a per-key read.** CONFIRMED, and wider. The enumeration is the census above, and the defective set is 68 keys, not the card's measured sample of six. Many single forms were wrong outside `ru` / `ar`: `es` / `pt` participles at 1, `de` adjectives and verbs at 1, `ar` full nouns in relative times. 3. **The pin.** DONE, as a sibling test, not a gate script. ⚠️ FALSIFIED: "the list stays small". The count-neutral list holds 48 keys under 5 reasons. Each reason is true in all ten packs, and converting any one of those keys would only repeat one string across its slots. 4. **Callers.** CONFIRMED and fixed: 8 call sites passed a string `count`, which i18next does not plural-select; they now pass a number. No caller used another name. The defaults maps carry the families' rows, and `createSafeTranslation` and the two hand-rolled fallbacks read them. 5. **`en` single-form values.** DONE. Each converted `en` value gets real `_one` / `_other` forms (`2 rows modified`, `1 pending approval`). The base is unchanged, so `check:i18n-drift` sees no `en` value move. ## Acceptance notes (not filed) - **`check:i18n-dead-keys` lists six new slot keys as `[confirmed]`.** They are `fields.relativeDate.overdue_one` / `_other`, `notifications.arrivalMany_one` / `_other` and `notifications.arrivalRepeats_one` / `_other`, and all six are false positives. The census adds suffix spellings only for a call site it parses as a pack `t()`. These two families are reached through `translate(…)` (`useInboxArrivalNotifier.ts`) and `options.t?.(key, …)` with the key in a const (`date-display.ts`); their base keys were already found by the text probe. Deleting any of the six would turn `all-locales-key-parity`, `plural-categories-11432` and `count-families-11445` red. Owner: none. - **Five `unreached` keys stay in the packs.** They are `detail.relatedRecords` / `detail.relatedRecordOne` (a dead `…One` pair), `appDesigner.objectManager.fieldCount`, `console.objectView.toolbarEnabledCount` and `layout.appSwitcher.appsAvailable`. No `t()` caller reaches them, and the dead-key census lists each one. Retiring them is that census's work; a family for strings nobody renders would be dead weight. When one is retired, its count-neutral entry fails the pin's liveness case, which forces the entry out. Owner: none. - **The metadata-admin `engine.*` table** (`packages/app-shell/src/views/metadata-admin/i18n.ts`) has its own code-selected `…One` / `…Other` labels. That table is `en` / `zh` only by its declared carve-out, and a `=== 1` switch is right for both, so it is outside this card. Owner: none. - **The base keys of converted families keep their pre-family values.** For the `*Plural` pairs the base is the singular, and some single-form bases keep `(s)` markers. Under a numeric count a base is reached only when the count is not a number. Changing an `en` base would force a nine-pack follow under `check:i18n-drift` for a string no call site renders. - **Arabic forms follow objectui#11432's shape.** Zero and other take the singular, two the dual with the numeral in parentheses, few the plural, and many the accusative singular. Long sentences whose `ar` form was already count-invariant (a partitive `N من …` or a label) keep that one form in every slot. A native review is welcome; the pins guarantee each category answers from its own slot, not that the words are idiomatic. ## Deviations - **Install.** `pnpm install --config.engine-strict=false`: node v22.22.0 is below `jsdom@30`'s engines floor. No tracked file changed. - **File surface beyond the claim's list.** All of it follows from the triage shape: - (a) `packages/i18n/src/useSafeTranslation.ts`, plus `README.md` (a "Count labels are i18next count families" section), and the gantt and import-wizard hand-rolled fallbacks, so provider-less hosts keep the singular. - (b) Call sites and comments the enumeration found: `ListView.tsx`, `ObjectView.tsx` in both app-shell and plugin-view, `AIFormAssist.tsx`, `CommentThread.tsx`, `PresenceAvatars.tsx`, `ReactionPicker.tsx`, `RecordPickerDialog.tsx`, `containers.tsx`, and `LocationField.tsx` (a comment that cited the retired convention as precedent). - (c) Earlier pins whose assertions this change made false, updated to the families' forms: countLabels 10242 / 10425, SearchResultsPage 10024 / 9664, the ObjectView footer 10636, the collaboration mirrors, the `ar` relative-time pins (ActivityTimeline 7149, RecordComments 7163, AiPendingActionsInbox 7173), DetailSection 8376 / 8474 (`Show 1 empty fields` was the English defect itself), the i18n parity siblings (i18n, objectView-config-keys-retired-4730, de-quote-pairing-3876, showEmptyRelated-plural-base-3863, searchItemsAvailable-plural-9664) and the machine-locale census, which gained two declared `new Intl.PluralRules('en')` sites. - **One merge of `main`** (`37140f4f5`, after objectui#11451 landed): clean, no conflicts. - **Patch round 1: dated notes on five pending entries.** `.changeset/9664-search-items-available-plural.md`, `10024-search-results-count-plural-forms.md`, `10242-ru-ar-count-labels.md`, `10425-ru-ar-count-labels.md` and `10636-objectview-record-count-singular.md` each gain a pure-append `Dated note, 2026-10-02 — superseded in this release — objectui#11445` paragraph; frontmatter and existing bodies are byte-identical to their base (0 deleted lines). The i18n note's Supersedes paragraph now points at those notes and says the count labels stay only on the base key. - **Commits** end with the model-free trailer pair per objectui `AGENTS.md`, which takes precedence over the harness's model-named trailer. --- _Generated by [Claude Code](https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ad1785c commit 4a1adb7

71 files changed

Lines changed: 3116 additions & 763 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/10024-search-results-count-plural-forms.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ the device both packs already use where two slots are all there are — Russian'
2121
two-key convention. The singular half, the call site, the key set and the other
2222
eight packs are unchanged; `zh`, `ja` and `ko` keep one string in both halves
2323
because their languages have a single plural category.
24+
25+
⚠️ **Dated note, 2026-10-02 — superseded in this release — objectui#11445.**
26+
Later in this same release the `search.resultsCount` / `search.resultsCountPlural`
27+
switch gave way to a `search.resultsCount` count family in all ten packs:
28+
`ru` and `ar` now write a noun form for each CLDR category instead of the count
29+
label above (`2 результата`, `21 результат`), and `search.resultsCountPlural` left
30+
every pack. The rest of this entry is kept as the reading of this change.

‎.changeset/10242-ru-ar-count-labels.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,12 @@ That is the device objectui#10024 used for `search.resultsCountPlural`, and the
2828
Russian's `collaboration.commentCount` and `collaboration.reactionCount` already
2929
use. The singular halves, the key set, the call sites and the other eight packs are
3030
unchanged.
31+
32+
⚠️ **Dated note, 2026-10-02 — superseded in this release — objectui#11445.**
33+
Later in this same release the `…One` / plain-key switch on `common.itemCount`,
34+
`detail.reactionCount`, `collaboration.commentCount` and
35+
`collaboration.reactionCount` gave way to one count family per key in all ten
36+
packs: a numeric count picks the noun form its CLDR category needs (`ru`
37+
`2 элемента`, `21 элемент`), the `…One` siblings left every pack, and the count
38+
labels above remain only on the base key, which answers a call made without a
39+
count. The rest of this entry is kept as the reading of this change.

‎.changeset/10425-ru-ar-count-labels.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ correctly at any number:
2929
That is the device objectui#10024 and objectui#10242 used, and the one Russian's
3030
`lookup.recordCount` already uses. The singular halves, the key set, the call sites
3131
and the other eight packs are unchanged.
32+
33+
⚠️ **Dated note, 2026-10-02 — superseded in this release — objectui#11445.**
34+
Later in this same release the `…One` / plain-key switch on `list.recordCount`,
35+
`lookup.recordCount`, `detail.reactionCount`, `collaboration.presentUserCount`,
36+
`collaboration.moreUserCount` and `search.itemsAvailable` gave way to one count
37+
family per key in all ten packs: a numeric count picks the noun form its CLDR
38+
category needs (`ru` `2 записи`, `ar` `3 سجلات`), the `…One` siblings left every
39+
pack, and the count labels above remain only on the base key, which answers a
40+
call made without a count. The rest of this entry is kept as the reading of this change.

‎.changeset/10636-objectview-record-count-singular.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ value held one noun form: Russian read `2 записей` at two and `21 зап
2020
twenty-one, and Arabic used the singular noun at every count. Both now use the
2121
count label their list bar already uses, `Записей: N` and `عدد السجلات: N`,
2222
which is right at any number. At one record they read `1 запись` and `1 سجل`.
23+
24+
⚠️ **Dated note, 2026-10-02 — superseded in this release — objectui#11445.**
25+
Later in this same release the `console.objectView.recordCountOne` /
26+
`console.objectView.recordCount` switch gave way to a
27+
`console.objectView.recordCount` count family in all ten packs, worded like
28+
`list.recordCount`'s: the footer calls the family key with `{ count }`,
29+
`console.objectView.recordCountOne` left every pack, and `ru` and `ar` read a
30+
noun form at each count (`2 записи`, `3 سجلات`) where the count label stood. The rest of this entry is kept as the reading of this change.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
The search results line and the object view's record-count footer read the right noun form in every language at every count (objectui#11445). Each passes `count` to one i18next count family instead of choosing between a `…One` / `…Plural` key on `=== 1`, which gave Russian and Arabic only two forms: Russian now reads `2 результата` and `21 запись`, and Arabic uses its dual at 2.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@object-ui/collaboration': patch
3+
---
4+
5+
The comment thread's header, its reaction tooltip and the presence stack's labels read the right noun form in every language at every count (objectui#11445). Each passes `count` to one i18next count family as a number — not a string, which i18next does not plural-select — instead of choosing between a `…CountOne` key and its pair on `=== 1`. The relative comment timestamps pass a number too, so Arabic reads `قبل 5 دقائق` rather than `قبل 5 دقيقة`. `COLLAB_DEFAULT_TRANSLATIONS` carries each family's `_one` / `_other` rows, mirroring the `en` pack.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
The data table's "N rows modified" line and the `page:tabs` count badge's accessible name read the right noun form in every language at every count (objectui#11445): both are i18next count families now, so English no longer reads `3 row modified` and Russian reads `2 элемента` rather than a count label. The tab badge passes its number as `count` below 1000; a shortened `1.2k` is passed as the string the badge shows, which i18next does not plural-select, so the base key — count-invariant in every pack — answers it.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@object-ui/fields': patch
3+
---
4+
5+
The record picker's record count reads the right noun form in every language at every count (objectui#11445): it passes `count` to the `lookup.recordCount` count family instead of choosing `lookup.recordCountOne` on `=== 1`, so Russian reads `2 записи` and Arabic uses its dual at 2. The provider-less defaults table carries the family's `_one` / `_other` rows.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
Count labels read the right noun form in every language at every count: each label a word must agree with is now an i18next count family in all ten packs (objectui#11445).
6+
7+
**What was wrong.** objectui#11432 gave every count family every CLDR category its language selects. Two other spellings of the same defect sat outside that rule. Fifteen labels were code-selected pairs (`detail.attachmentCount` / `detail.attachmentCountPlural`, `common.itemCount` / `common.itemCountOne`, and thirteen more): the component chose between two keys on `=== 1`, which gives a language two forms, so Russian read `3 вложений` and Arabic `2 مرفقات`. Fifty-three labels were one string at every count, so Russian read `Согласовать 3 запросов?`, Arabic `منذ 5 دقيقة`, Spanish `1 seleccionados` and English `3 row modified`.
8+
9+
**What changes.** Each of those 68 keys is a family: `en` `_one` / `_other`, `ru` `_one` / `_few` / `_many` / `_other`, `ar` all six categories, and each other pack the categories its language selects. The base key keeps its value and answers a call made without a count.
10+
11+
**Removed keys.** The fifteen code-selected siblings leave all ten packs: `lookup.recordCountOne`, `common.itemCountOne`, `list.recordCountOne`, `detail.reactionCountOne`, `detail.attachmentCountPlural`, `detail.replyCountPlural`, `console.objectView.recordCountOne`, `search.resultsCountPlural`, `search.itemsAvailableOne`, `ai.formAssist.suggestionCountOne`, `ai.formAssist.appliedCountOne`, `collaboration.commentCountOne`, `collaboration.reactionCountOne`, `collaboration.presentUserCountOne` and `collaboration.moreUserCountOne`. A host that looked one up itself now gets the key back instead of a label: call the family key with `{ count }` instead (`t('detail.replyCount', { count: n })`), and i18next picks the form.
12+
13+
**Provider-less fallback.** `createSafeTranslation` now reads a count family's `_one` / `_other` row for a numeric `count` before the base row, in the order i18next reads the `en` pack, so a host with no `I18nProvider` keeps rendering "1 reply" / "3 replies". A string `count` still reads the base row, as it does in i18next.
14+
15+
**Supersedes, in this release.** The notes for objectui#9664, objectui#10024, objectui#10242, objectui#10425 and objectui#10636 describe the `…One` / `…Plural` switch these families replace; each now carries a dated note saying so. Their `ru` / `ar` count labels (`Записей: N`, `عدد السجلات: N`) stay only on the base key, which answers a call made without a count.
16+
17+
**Pinned.** `count-families-11445.test.ts` fails on any `…Plural` key in a pack and on any `{{count}}` value outside a family unless its count-neutral list names the key with the reason no word agrees with the number.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@object-ui/plugin-ai': patch
3+
---
4+
5+
The AI form assistant's suggestion and applied counts read the right noun form in every language at every count (objectui#11445): each passes `count` to one i18next count family instead of choosing a `…CountOne` key on `=== 1`, so Arabic reads `3 اقتراحات` rather than a count label and Russian `2 предложения`.

0 commit comments

Comments
 (0)