Repository navigation
[Maintainer] i18n: migrate properties and inspector panels - #1174
Conversation
…log projects Outside an I18N_ROOT test project a missing packages/nodes/src/index.ts now fails extract and check instead of silently dropping the definition copy.
…tList floorFootprintName keeps its English for MCP and agents; the editor words the same parts (named, "<room> floor", Shared floor, Floor area) in the UI language. formatList joins names with the locale's separators.
Group and action labels, the field names prettified from keys and enum options get editor.inspector.* IDs (slug + hash), shared across kinds; the definition-messages generator emits them for every built-in kind.
Room, floor & foundation, floor opening, reference, multi-selection and mobile panels, and the wall, curtain wall, slab, ceiling, door, window, roof, roof segment, glazing, stair, stair segment, site, unit, zone quantities and system check inspectors. Floor footprint names, level names and room-name suggestions show in the UI language; English plural helpers become ICU plurals and split sentences become whole messages.
Floor top, hole rows, flight measurements, curtain-wall cells, contour summary, the roof's storey note, glazing grid counts and "Currently …" readouts are whole messages with values and ICU plurals.
…the literal baseline
…anels render Stair railing and construction controls, roof glazing controls, item script parameters and wall actions are converted. Door and window style and type cards, wall reference options and stair diagnostics get display-time descriptors (core's English stays for chips and agents); the room subline is an ICU plural; the panel's back, reset and close buttons and the finish swatch are named; the shape-choice row wraps instead of overflowing.
|
This PR is too large for Bugbot to review. It changes 93,089 lines and 3,728,980 characters. Split the change into smaller pull requests to get a review. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Tooling cross-review at c43f071: APPROVE I reviewed the code outside the catalogs in a local checkout and checked the catalogs by script. Required CI is green: quality, cli-smoke, Changed paths, plus ci and mcp-ci. Bugbot skipped the PR as too large, so it has no automated code review. Catalogs (checked by script against main c0284b6)
(a) Core change (published package), compared with @pascal-app/core@1.0.6
(b) My P2s from #1172 and #1173
(c) Lingui migration and the audit are real
(d) Behaviour and tests
(e) Depends on #1173: rebase needed after it merges
P2 (don't block)
Split recommendation. The code outside the catalogs is about 4.4k insertions and 2.5k deletions across 66 files, and it has no Bugbot review. The catalogs are mechanical and checked by script, so they don't hide risk. The code is where an automated second pass is missing. For the next inspector PR (about 580 strings), split it into the core and script changes, the editor panels, and the node inspectors, each with its own extraction, so Bugbot can review them. I don't recommend re-splitting this one now that it has been reviewed by hand. Security isn't needed: no auth, secrets, schema or migration changes. See P2 2 on stored room names. |
…language
Codex P1: picking a translated suggestion saved the translation (French
"Chambre", unnumbered next to an existing Bedroom). Sections keep English
names with translated labels; the combobox shows and searches labels, a pick
stores pickedRoomName (English, numbered), typed text stays as written.
displayRoomName shows catalog names translated with their number
("Bedroom 2" → "Chambre 2") without touching stored data.
slab-tree-node keeps both sides (localized footprint name and slab default name); the audit manifest keeps both surface sets. Catalogs and the literal baseline are regenerated with i18n:extract and i18n:literals update, with #1173's drafts carried over by ID.
…named displayRoomName is applied at the display boundary only: the room panel title, field and mezzanine kicker, the layers rows (as display names; editing still edits the stored name), unit and zone lists, 2D/3D room pills, viewer chrome (breadcrumb, sidebar, hover), the walkthrough HUD, node display, footprint names, the floor-opening kicker, shared-wall notes, unit members and zone quantities. Unnamed openings read "in Room" again (Codex nit). Floor-plan builders, exports and agent context keep the stored English.
…s (Codex P2s) - Window-merge refusals select on the blocking node's type with one sentence per kind; English reads "There is an item between them." again. - Run lengths, hole areas, curtain-wall spacing and effective thickness use formatNumber with the UI locale instead of toFixed. - Room opening counts are one ICU plural, keeping "No openings". - "1 custom panel is outside this grid. It returns…" (nit).
English stays "Kitchen, Hall" as before; other locales use Intl.ListFormat for their own separators. The doc comment says so, with a test.
…tric everywhere The editor picks imperial from an American timezone; run from New York the audit saw 430.56ft² where the surfaces list metric data.
…ral layer rows by prefix
…ey lookups Editing a translated name (with or without a number) maps back to the English catalog name and skips the write when unchanged. Filtering also matches English names, an exact match is the active row, and the typed row is always offered. Prototype keys like constructor are free text. Adds a French-UI test that every room-name write path stores the same English as main.
Drops the reverse lookup across all translations. An edit of the room panel's field stores English only when the room's stored name is a catalog name and the edit is that name's translated label with the number changed, added or removed (in French, 'Salon 3' on a Lounge stores 'Lounge 3'). Everything else, a click on 'Use "…"' and an exact translation such as 'Cuisine' included, is stored exactly as typed, surrounding spaces too. The 'Use' row is hidden again for an exact English name, as on main, and Enter on it commits like blur. The storage test drives the panel's commit and pick functions.
|
Tooling cross-review at b563163: APPROVE I reviewed this from scratch at this SHA (main 23bdaf4 merged in). I looked at the code outside the catalogs and checked the catalogs by script. P1: none. P2: none. What I verified
On the three accepted choices
P3 (non-blocking follow-ups)
Not verified locally: the en-XA pseudo-audit (TZ=America/New_York). The furnished audit scene never finished loading in headless Chrome on my box, so Security: not needed. No path stores localized text, and no existing scene data is rewritten. |
What does this PR do?
Localizes the properties and inspector panels: the shared panel shell, the editor's own panels, the auto inspector, the building-structure inspectors and the floor footprint names. Part of #621.
main(23bdaf4) is merged in.Codex round 3 (at 585db60): room-name edits, new design
The reverse lookup across all translations is gone.
room-name-storage.test.tsdrives the panel's owncommitRoomNameEditandcommitRoomNamePick(moved out ofRoomName, which calls them, unchanged-field guard included), and compares French with the same keystrokes in English. It covers Lounge/Salon and Study/Bureau, the 'Use' click, "Cuisine", trailing and surrounding spaces, and unchanged fields.mainat 23bdaf4 is merged in.i18n:extractand the literal baseline needed no changes.Verify round (Codex at 6e727bf, Tooling)
Object.hasOwn, so rooms namedconstructor,toString,__proto__,hasOwnPropertyorvalueOf 3are free text. Each has a test.formatFixedrounds liketoFixedand shows -0 as 0. Opening and hidden-panel counts are ungrouped ("1000 openings"). The pseudo-audit roof and stair row matches are anchored regexes.Review round (Codex audit and Tooling)
displayRoomName()shows catalog names translated with their number ("Bedroom 2" → "Chambre 2") wherever a room is named: room panel title, field and kickers; layers rows; unit and zone lists; 2D/3D room pills; viewer breadcrumb, sidebar and hover; walkthrough HUD; node display; footprint names; floor-opening kicker; shared-wall notes; unit members; zone quantities.mainwrites today. Nothing migrates or rewrites existing scenes:toFixed.formatList. English keeps the original comma list ("Kitchen, Hall"). Other locales useIntl.ListFormatfor their own separators (Japanese 、, French "et"). The doc comment says so, with a test.TZ=America/New_York.main.slab-tree-node.tsxkeeps both sides, and the audit manifest keeps both surface sets. Catalogs and the literal baseline are regenerated withi18n:extractandi18n:literals update, with [Maintainer] i18n: migrate left rail, level selector and layers panel #1173's drafts carried over by ID.Tooling follow-ups (from the first round)
packages/nodes/src/index.tsonly in the tests' temporary catalog projects (I18N_ROOT). In a real checkout it fails extract and check. Covered by a test.Inspector migration
floorFootprintNamingreturns the name's parts.floorFootprintNamebuilds the same English from them, so MCP, agents and core messages don't change.def.parametrics).editor.inspector.*IDs.messageWithSlot.fuzzywithReview: required, so they show English until reviewed.How to test
bun run i18n:checkpasses and reports 2,523 entries per locale awaiting review, and 1,399 legacy literal candidates.bun devwith?lang=en-XA.TZ=America/New_York bun run i18n:pseudo-audit. Every migrated surface passes: navbar through MEP tools, the nine inspectors, and [Maintainer] i18n: migrate left rail, level selector and layers panel #1173's six left-panel surfaces.home,settingsand the whole-editorsweep still fail on pages not migrated yet. I ran this.packages/editor: 2,700 pass.packages/nodes: 5,025 pass.packages/core: 6,162 pass.apps/editor: 74 pass.bun test scripts/: 131 pass.Still English after this PR
displayRoomNamewhen its copy is migrated.Screenshots
en-XA, captured byi18n:pseudo-auditat 1440×900 (UTC, metric). The images are served from the image-only branchcursor/i18n-audit-screenshots-6d7c, which is never merged.Room (layers rows show catalog names translated with their number):

Floor & foundation (title is the localized footprint name):

Wall:

Door:

Window:

Roof:

Roof segment:

Stair:

Stair segment:

Layers panel after the merge with #1173:

Roof-segment row × confirmation, English then en-XA:


Checklist
bun devbun checkto verify)mainbranch