Repository navigation
fix(console,plugin-form,i18n): the public form page and the master-detail form chrome speak the user's language (objectui#11071) - #11129
Conversation
…tail form chrome speak the user's language (objectui#11071) The console form page rendered its submit button (Submit / Submitting… / Uploading…), the pending-redirect line and the frame of the required refusal from English literals; plugin-form's master-detail form did the same for its totals stack, collection placeholder, row editor and in-flight Save label, and ObjectForm for the locked-field hint. They now read the locale packs, in all ten. Only defaults move: an authored value still wins. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Inputs: card #11071 (body, triage Check-runs on the head (the gate verdicts): 43 latest runs, all completed — 40 ① Derived judgmentsConsole form page (
plugin-form (through the family's
Keys and packs. 11 new keys ( Measured-before-changing (the source-read-only half). The dev measured every listed site under zh at the parent commit and reports each rendered English; the pins encode the same measurement (every zh case red in the ablation, the already-localised Pins. Five console test harnesses ( Public surface and accept-set. No export of ② Semver level
Clause-②: no — confirmed. Chrome strings move to pack keys; no schema, prop, type or accepted set moves. ③ Boundary flagsDev Deviation 1 — five console test harnesses outside the claim's file surface. Right, accepted as a named harness-only extension. Cause is mechanical and downstream of the directed change (the button now reads the catalogue; these files click it by its English name and mount no instance, so it rendered a raw key — 15 red). Each change is one Deviation 2 — Deviation 3 — commit trailers. Not a deviation: the model-free pair is what objectui AGENTS.md prescribes; the harness reminder's model-named line is the one the rule says not to use. Out-of-scope note (a) — Out-of-scope note (b) — Out-of-scope note (c) — Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #11071
Clause-②: no
What
objectui#11039 moved the form family's feedback chrome onto the locale packs and left two halves behind. Under a zh session the console form page's action chrome and plugin-form's master-detail chrome still rendered English literals. They now read the catalogue, in all ten packs. Only defaults move: every authored value still wins where it did, and English output is byte-identical to the literals it replaces.
Where each string goes
Console form page (
apps/console/src/components/FormPage.tsx, throughuseObjectTranslation):SubmitpublicForm.submitSubmitting…publicForm.submittingUploading…fields.file.uploadingRedirecting…publicForm.redirectPendingpublicForm.redirectingis the embeddable form's countdown and carries a seconds hole this page has no value forRequired: …publicForm.requiredFieldsvalidation.formInvalidJoiner, so colon, spacing, separator and word order are the locale'swizard.missingRequiredwas the other candidate for the refusal. It is a different sentence ("Please complete the required fields: …"): reusing it would rewrite the page's English wording and the existingRequired: Prioritypin, so the refusal takes its own key.plugin-form (through the form family's
createSafeTranslationtables):Loading columns…,Subtotal,Tax (N%),Total,Line item,Line item — row N,Applyform.masterDetail.*titlestill fills the title)Add(in-form collection default)detail.addClose(row editor)common.closeSaving…(Save button in flight)detail.savingModalFormmaster-detail sr-only descriptionform.masterDetail.editorDescriptionObjectFormlocked-field hintform.deniedDescriptionNew keys: 11 in each of the ten packs (
enfirst, the nine translations in the same change). The rows of the plugin-form defaults tables repeat theenvalues, whichcheck:i18n-keysholds them to.Measured under zh before changing (the source-read-only half)
At the parent commit, under a zh session, every site rendered English: the totals stack read
Subtotal/Tax (0%)/Total; the in-form add buttonAdd; the row editorLine item — row 1withCloseandApply(beside an already-localised 取消, which is untouched); the placeholderLoading columns…; the Save button in flightSaving…; the master-detail dialog's accessible description and the read-only field's hint were the English sentences. No string among them was already localised, so none was left standing.Pins
apps/console/src/components/FormPage.chromeI18n-11071.test.tsx: zh render of the submit button, the in-flight button, the button during an upload, the pending redirect, the required refusal (page and toast), two labels joined with the pack separator;CONTROLauthored field label inside the localised frame;encase.packages/plugin-form/src/formChrome.i18n-11071.test.tsx: zh render of the totals stack, the columns placeholder, the in-form Add and the row editor (title, Apply, Close), the in-flight Save, the modal description, the locked-field hint;CONTROLauthoredtitleandaddLabel, authored dialogdescription, authored fielddescription.FormPage.chromeI18n-11039.test.tsx) now submits through the button's localised name (提交in zh,Submitin en) instead of the/Submit/query.Reverse verification (fix committed first, consumer files put back to the pinned base commit, restored with
git checkout HEADand proven by an emptygit diff HEADand equal blob hashes): the three pin files went 17 failed, 5 passed of 22. The direction is the ordinary one: every zh case red, the five that stay green are theencases, the loading line that was already localised, and the two authored-value controls that never depended on the change.Deviations, stated
FormPage.avatarUpload-10785,.fileField,.recordObject,.serverDefaults,.sharedWidgets-10179) gained the samecreateI18nline inbeforeEachthat objectui#11066 gave its siblings. They click the submit button by its English name and mount no i18n instance, so the button now rendered its raw key (15 tests red before the line). This is outside the claim's declared file surface; it is harness-only.Closeon the row editor was not in the card's list. It sits in the same card asLine item — row NandApply, in a declared file, is the same defect class, a mechanical move onto the existingcommon.close, has no other claim on the file, and is pinned by the zh row-editor case.Acceptance notes
LineItemsPanel.tsx(therecord:line_itemspanel) carries the same class and is outside this card's file surface. Measured with a temporary probe under zh at this head:Save,Saving…and the default titleLine Itemsrender English, and so doesAdd linefrom the fields package's grid. Left for the family close-out.¥;formFaces.displayLocale-9909.test.tsxpins it as it is. Untouched.Local verification
Run in the foreground at head ae11666 (exit codes read from the runs):
pnpm exec vitest run packages/plugin-form/ packages/i18n/: 219 files, 2944 passed, 14 skipped.apps/console/src/components/FormPage*plussubmitRedirect,createdRecordPath,formPageRequiredMarker-10178,internalFormShell,App.uploadAltitude-10131,App.docsPortalLazy,formViewFeaturesRootRefused-6262: 33 files, 354 passed. Neighbouring renderers of plugin-form (ObjectCalendar.expandGate-6453,ObjectView.expandGate,catalog-gallery-render,RecordFormPage): 6 files, 634 passed.type-checkfor@object-ui/plugin-form,@object-ui/i18nand@object-ui/console(their dependency closures built first with turbo): exit 0 each; both new test files are in their test programs.check:i18n-keys,check:i18n-drift,check:control-bytes,check:new-line-citations,node scripts/check-changeset-presence.mjs,changeset:check: exit 0.check-governed-queue-guardanswers NOT GOVERNED for the 24 changed paths.eslinton the 23 changed ts and tsx files: 0 errors, 118 warnings.Generated by Claude Code