Repository navigation
fix(plugin-grid): the bulk confirm sentence formats numbers and dates in the display locale - #26358
Conversation
The bulk confirm sentence formats its numbers and dates in en-US for every viewer. This pin is red until BulkActionDialog passes the display locale through bulkConfirmText to fillTemplateHoles. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…cale BulkActionDialog reads useDisplayLocale(), the locale the console's action runners already install, and passes it through bulkConfirmText to fillTemplateHoles's locale parameter. The bulk confirm sentence's currency, number and date holes render in the viewer's locale instead of en-US. No second locale resolution: absent, the engine keeps en-US. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
node scripts/gen-sdui-manifest-node.mjs on the fixed tree; the artefact did not move (manifestSha256 unchanged), only plugin-grid's sources digest. node scripts/check-sdui-manifest.mjs exit 0. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…lk-confirm-locale # Conflicts: # scripts/sdui-manifest.sources/plugin-grid.json
After merging origin/main (main's record taken at the merge), node scripts/gen-sdui-manifest-node.mjs re-recorded plugin-grid alone; the artefact did not move. node scripts/check-sdui-manifest.mjs exit 0. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
findByText normalises the no-break space Intl writes before a de-DE currency sign in the node text but not in the matcher string, so the right German sentence did not match. Read the dialog description's textContent instead. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…lk-confirm-locale # Conflicts: # scripts/sdui-manifest.sources/plugin-grid.json
Merged origin/main (main's record taken at the merge); node scripts/gen-sdui-manifest-node.mjs re-recorded plugin-grid alone, the artefact did not move. node scripts/check-sdui-manifest.mjs exit 0. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
维护者速读改了什么:批量操作的确认句(带 currency、number、date 格式化的模板洞)现在按查看者的显示语言格式化数字、金额和日期;德语用户看到 席位核对seat 2 · 2026-10-27T00:06Z · head
|
Main re-recorded six registry packages under scripts/sdui-manifest.sources/ (#26274, #26358) while the manifest's bytes stayed the same: six modify/delete conflicts against this PR's deletion of those records, resolved by deleting them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6SEitNngAMugGbuJHWsDS
Fixes #26307
Clause-②: no
Metadata-protocol: none
What changed
A bulk action's confirm sentence formatted its numbers and dates in
en-USfor every viewer, while the same action's single-record confirm formats them in the viewer's language since PR #26282.BulkActionDialogcalledbulkConfirmText(def.confirmText, { count, params, values, lookupLabels })with no locale, sofillTemplateHolesfell back toen-US.ui/packages/plugin-grid/src/components/BulkActionDialog.tsx: readsuseDisplayLocale()from@object-ui/i18n, the same hook the console's action runners install (useActionRunnerDisplayLocaleinui/packages/react/src/context/actionRunnerTranslator.ts), and passes it tobulkConfirmText.ui/packages/plugin-grid/src/components/bulkConfirmText.ts:bulkConfirmText(confirmText, scope, locale?)handslocaletofillTemplateHoles's third parameter, the locale channel apart from the template roots, so a param namedlocalestays a value the sentence prints. No second locale resolution: with no locale handed, the engine keepsen-US.scripts/sdui-manifest.sources/plugin-grid.json: re-recorded withnode scripts/gen-sdui-manifest-node.mjsunder the verify lock, on the tree after mergingorigin/main(PR refactor(plugin-grid): move ObjectGrid's module-level helpers into sibling modules (slice 1) #26323 had moved the same record; main's record was taken at the merge, then re-recorded). Only plugin-grid's sources digest moved; the artefact did not (manifestSha256unchanged).node scripts/check-sdui-manifest.mjs: exit 0..changeset/26307-bulk-confirm-locale.md:@object-ui/plugin-gridpatch.Red first
New pin
ui/packages/plugin-grid/src/__tests__/bulkConfirmLocale-26307.test.tsx: the helper overde-DEandzh-CN, and the realBulkActionDialogunder a realI18nProvider+LocalizationProvider. Expected strings are computed withIntlin the test, so a newer ICU cannot drift them.Red leg: the two source files restored to
a70aa00b(the unfixed base versions) in the working tree only, at head64e9dbc5, under the verify lock:The two passing cases are the
en-USones (no locale handed; no tenant locale under an English UI), which hold before and after. Restored fromHEAD(blob hashes compared,git diff HEADempty), green leg:Tests 5 passed (5).Tests and gates
64e9dbc5: red 3 failed / 2 passed, then green 5 / 5 (above).pnpm exec vitest run packages/plugin-grid --maxWorkers=2fromui/, under the lock ate42274e0(the merge; same sources as64e9dbc5, which changes only the pin's matcher): 251 of 252 files, 2251 of 2252 tests passed. The one failure was this pin's dialog case matching withfindByText, whose normaliser turns the no-break spaceIntlwrites before a de-DE€into a plain space in the node text but not in the matcher string;64e9dbc5reads the dialog description'stextContentinstead, and the pin is 5 / 5 at that head.@object-ui/plugin-gridtype-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0 ate42274e0.node scripts/check-sdui-manifest.mjs: exit 0 ate42274e0after the re-record.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, head64e9dbc5): 45 derived; 44 run, each exit 0;pnpm check:type-check-debtexit 3 (PREREQUISITE NOT MET: it was queued on the shared verify lock for its closure build), so NOT MEASURED locally, and CI'sLint & Repo Gatesruns it.--ranreconciliation: "45 derived famil(ies) accounted for — 44 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)", 0 UNRUN.origin/main(3 gate scripts changed across that range). Main was merged once before opening, as required; it is not merged again unless a conflict, a main-caused red or a queue removal calls for it.Acceptance notes
useDisplayLocale()with no providers mounted resolvesen, so every existing bulk dialog suite (rendered without providers) keeps itsen-USsentences; the full plugin-grid run above confirms it.Generated by Claude Code