Repository navigation
[Maintainer] i18n: editor-side inspector panels and 3D overlay scope - #1180
Conversation
Html renders its children in a separate React root, so components inside it (the node action menu, room pills, the selection summary) translated with the default English scope. Html from localized-html re-provides the caller's scope.
…-editor-panels-8160
Door and window counts, stair risers, surveyed lines, 'shared with # room(s)' and 'The floor's # roofs' render 1234, not 1,234.
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 913961e: APPROVE No P0/P1/P2.
Findings
Checks run locally (Node 22; core and nodes dist rebuilt at this head):
CI at this SHA: Changed paths, quality, cli-smoke and Cursor Bugbot all succeeded. After this merges, the compiled |
What does this PR do?
This is the first of the remaining inspector PRs: the editor-side panels, plus one editor fix the node inspectors depend on. Part of #621.
main(with #1179) is merged in with a normal merge commit. Stored scene data is unchanged.i18n scope inside 3D overlays (fix). drei's
<Html>renders its children in a separate React root, which sees none of the surrounding context. Any component inside it that calledusePascalI18n()got the default English scope instead of the?lang=or<Editor locale>scope. That affected the node action menu, the 3D room pills, the selection summary and the cursor HUDs.components/editor/localized-html.tsxis a drop-inHtmlthat re-provides the caller's scope. The editor's 23 dreiHtmlimports switch to it; the usages themselves don't change.LocalizedHtml. The node packages' ownHtmllabels (cabinet, dormer, fence, MEP) switch to it in their inspector PRs.Htmllabels by element type now matchLocalizedHtml.Node action menu. All buttons: Move, Duplicate, Delete, Group/Ungroup, Rotate, Curve, Cut out, Find in catalog, Edit mesh. The door and window Open/Close and the Play/Stop button are one ICU select. Shortcut key names in its tooltips ("Backspace") use the existing key messages.
Riser diagram. Title, legend, empty state, and the close button, which now has an accessible name. Core's marker labels (
2" P-trap,2" VTR, raw fitting types) stay English in core, where MCP reads them. The panel words them at display time, and fittings use the sharededitor.inspector.option.*names ("Sanitary tee" rather thansanitary-tee).Procedural item inspector. Header, back, parts, position, and the fallback error copy. Recipe and part labels are authored data and stay as written.
MEP run HUD. "Length: {field} m" is one message around the input (
messageWithSlot), plus the placeholder and the Tab hint.Tooling P3 from [Maintainer] i18n: room-name and count follow-ups #1179: ungrouped counts. The remaining [Maintainer] i18n: migrate properties and inspector panels #1174 counts now use a plain
{…Count}value inside the plural, as [Maintainer] i18n: room-name and count follow-ups #1179 did, so they read 1234 likemainrather than 1,234:The existing drafts were rewritten with the same substitution.
Audit. New
node-action-menusurface: a door's action menu with the Delete tooltip. The riser diagram has no surface, because the standalone app's toolbar doesn't include its toggle (hosts that useViewTogglesdo).Catalogs. 35 new messages, 5 changed. zh-CN, fr, es and ja drafts are
fuzzywithReview: required, so they show English until reviewed.How to test
bun run i18n:checkpasses, with 2,561 entries per locale awaiting review.bun dev, open a project with?lang=en-XA, and select a door. The floating action menu, its tooltips (including the key name) and the door's Open button are bracketed and accented. Before this PR they were English.bun run i18n:pseudo-auditover every migrated surface (all excepthome,settingsand the whole-editorsweep): all 30 pass, including the newnode-action-menu. I ran this.packages/editorbun test src: 2,704 pass.packages/nodes: 5,025 pass, 1 skip.bun test scripts/: 131 pass.bun run checkreports no errors.Still English after this PR
Screenshots / screen recording
en-XA, captured byi18n:pseudo-audit(UTC, metric). The images are served from the image-only branchcursor/i18n-audit-screenshots-8160, which is never merged.Node action menu on a door, with the Delete tooltip and its key name:

Room panel (door and window counts, action menu inside the 3D overlay):

Roof panel:

Stair panel (riser counts):

Checklist
bun devbun checkto verify)mainbranch