Skip to content

fix(plugin-detail): translate the related list count badge's accessible name - #39719

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39680-wip
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39680-wip

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #39680

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用读屏软件的用户在记录详情页的相关列表标题处,原先听到的条数总是英文,现在按控制台语言播报,中文控制台读作「3 条记录」,英文在 1 条时读单数。
  • 属于控制台多语言补全,替非英文界面的读屏用户解决。
  • 若有问题,只影响读屏播报的文字,画面上的数字不变,可直接撤回。
  • 无

What changes

The related list header's count badge drew a bare number whose aria-label was the hard-coded English template "N records". It now reads the translated pair the same component already uses for the tab list's summary row lead (tabRecordCountLead: detail.relatedRecordOne at one record, detail.relatedRecords otherwise). The visible number is unchanged.

  • ui/packages/plugin-detail/src/RelatedList.tsx: the badge's aria-label only.
  • ui/packages/plugin-detail/src/RelatedList.i18n.test.tsx (new pin, beside the component): zh-CN at 3 rows reads 「3 条记录」, en at 1 reads "1 record", en at 3 reads "3 records", de at 1 reads "1 Datensatz".
  • ui/packages/plugin-detail/src/__tests__/RelatedList.countPending-36235.test.tsx: the headBadge selector matched only a label ending in " records"; its one-row case now correctly reads "1 record", so the selector matches either suffix (one line, claim amendment 7413253105).
  • .changeset/39680-related-list-count-badge-name.md: @object-ui/plugin-detail patch.

Read first, by risk:

  1. RelatedList.tsx, the count badge hunk (the only runtime change).
  2. RelatedList.countPending-36235.test.tsx, the headBadge selector.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-detail/src/RelatedList.i18n.test.tsx from the repo root, expect 4 passed.

Tests

Read at head 646a0f3.

Targeted suites: 5 files, 46 passed

pnpm --dir ui exec vitest run --maxWorkers=2 over the new pin, RelatedList.countPending-36235, RelatedList.addPickerGuard (asserts the plural label by text), RelatedPanel.header-27524 and RelatedList.tab-35892: Test Files 5 passed (5), Tests 46 passed (46), lock VERDICT command-exit 0.

Reverse check: pin turns red without the fix

With the badge's label put back to the English template on disk, the pin reads Tests 3 failed | 1 passed (4): the zh-CN, en-singular and de-singular cases fail, and the en-plural case passes as the control (the old template happens to be right there). Restored from HEAD afterwards; the tree is clean.

Acceptance notes

  • The whole packages/plugin-detail/ suite was not run locally: it ran past the foreground limit on the shared box and was stopped. Test UI runs it on this PR.
  • plugin-detail has no package typecheck script; Type Check UI covers it in CI.

Verification

Derived gate subset: 39 derived, 36 run, 3 not measured

node scripts/pm/dispatch-gates.mjs --commands (tree objectstack-ai/objectstack at 646a0f3, 4 paths): 39 commands. 36 exited 0, including pnpm --dir ui exec vitest run scripts/ (Test Files 172 passed | 2 skipped (174)). NOT MEASURED: check-comment-mask-corpus, check:query-options-erasure and check:type-check-debt, reason: my per-command timeout wrapper fired (exit 124) on the shared box before a verdict; CI runs them. --ran reconciliation: 39 derived famil(ies) accounted for — 36 run, 3 NOT-MEASURED, exit 0.


Generated by Claude Code

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV

Final head for L1 · 2026-12-04T14:51Z · zone em-admin
Head-sha: 646a0f3a002f4dd8c32c173714ddc560b836d187
Checks on this head: 42 success, 15 skipped, 0 failed.
Diff: 4 files, +95 / -2.

  • RelatedList.tsx: the header count badge's aria-label now goes through the existing translated helper tabRecordCountLead (detail.relatedRecordOne / detail.relatedRecords).
  • A new ablated pin, RelatedList.i18n.test.tsx, covers zh-CN plural, en singular, en plural and de singular.
  • The headBadge selector in __tests__/RelatedList.countPending-36235.test.tsx changes by one line. It is in scope under claim amendment 7413253105, because the one-row label is now correctly singular.
  • A patch changeset for @object-ui/plugin-detail.
    Governed: NOT governed. check-governed-merges reports 97 lines. L1 is requested from thread L1-a.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR

2026-12-04T14:52Z · L1-a verdict: ACCEPT at head 646a0f3a00 (zone em-admin, Fixes #39680)

席位核对

Change. The count badge's aria-label in the related list header (RelatedList.tsx:4761) now reads tabRecordCountLead(recordCount) instead of the literal ${recordCount} records. That is the existing helper at :3980, count === 1 ? t('detail.relatedRecordOne') : t('detail.relatedRecords'). It is the same pair the card names and the file already uses, and it is in scope at the badge. The visible badge text is unchanged. This is exactly the card's "Expected", so Fixes #39680 is right.

Tests.

  • The new RelatedList.i18n.test.tsx covers zh-CN, which announces the bundle value, and en and de at one and many. The zone reports it red first on the literal.
  • RelatedList.countPending-36235.test.tsx: the selector now matches the singular " record" as well as " records". The en label is now singular at one record, so the old suffix selector would miss it. Amendment 7413253105 covers that test file.

Changeset. @object-ui/plugin-detail patch. The headline comes first, then Clause-②: no and Metadata-protocol: none, which are right: no key is added and no export moves. I read it sentence by sentence and it agrees with the code, including the en "1 record" correction.

Gates.

Ordinary PR, no L2 owed. It lands in its zone.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV

Landing · 2026-12-04T14:53Z · zone em-admin
ACCEPT → PR #39719 comment 7414994439 (L1-a) at head 646a0f3a002f4dd8c32c173714ddc560b836d187.

  • No L2 is owed. The diff touches only UI code and tests, not a contract face.
  • The l1-face Dogfood Regression Gate (${{ matrix.shard }}/4) skip flag was cleared by L1. It comes from main renaming the matrix (/3 → /4); the aggregate is success.
    check-governed-merges.mjs --pr 39719: NOT governed, 97 lines.
    Checks: 42 success, 15 skipped, 0 failed.
    Ready + auto-merge into the queue.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 14:53
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 22d5eee Dec 4, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39680-wip branch December 4, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Related list: the record-count badge's accessible name is hard-coded English ("3 records") in every locale

2 participants