Repository navigation
fix(plugin-detail): translate the related list count badge's accessible name - #39719
Conversation
…le name Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV Final head for L1 · 2026-12-04T14:51Z · zone em-admin
|
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4czfEjskBjZM6jhKWFR 2026-12-04T14:52Z · L1-a verdict: ACCEPT at head 席位核对Change. The count badge's Tests.
Changeset. Gates.
Ordinary PR, no L2 owed. It lands in its zone. |
|
repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1cnRvyiAqrarmDhZV Landing · 2026-12-04T14:53Z · zone em-admin
|
Requested by Elon · project thread
Fixes #39680
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
The related list header's count badge drew a bare number whose
aria-labelwas 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.relatedRecordOneat one record,detail.relatedRecordsotherwise). The visible number is unchanged.ui/packages/plugin-detail/src/RelatedList.tsx: the badge'saria-labelonly.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: theheadBadgeselector 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-detailpatch.Read first, by risk:
RelatedList.tsx, the count badge hunk (the only runtime change).RelatedList.countPending-36235.test.tsx, theheadBadgeselector.Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-detail/src/RelatedList.i18n.test.tsxfrom the repo root, expect 4 passed.Tests
Read at head 646a0f3.
Targeted suites: 5 files, 46 passed
pnpm --dir ui exec vitest run --maxWorkers=2over the new pin,RelatedList.countPending-36235,RelatedList.addPickerGuard(asserts the plural label by text),RelatedPanel.header-27524andRelatedList.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
packages/plugin-detail/suite was not run locally: it ran past the foreground limit on the shared box and was stopped.Test UIruns it on this PR.plugin-detailhas no packagetypecheckscript;Type Check UIcovers 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, includingpnpm --dir ui exec vitest run scripts/(Test Files 172 passed | 2 skipped (174)). NOT MEASURED:check-comment-mask-corpus,check:query-options-erasureandcheck:type-check-debt, reason: my per-command timeout wrapper fired (exit 124) on the shared box before a verdict; CI runs them.--ranreconciliation:39 derived famil(ies) accounted for — 36 run, 3 NOT-MEASURED, exit 0.Generated by Claude Code