Repository navigation
[Maintainer] i18n: room-name and count follow-ups - #1179
Conversation
…me edits the shown name - roomNameOptions takes the room's stored name: a label two catalog names share is the exact match for that room's own entry, so Enter on a Lounge keeps Lounge. - The layer tree's room rename shows displayRoomName while editing and commits through commitRoomNameEdit (updateNode, trimmed, cleared as before). - The rename input and the snap-target badge get accessible names. - New pseudo-audit surface layer-room-rename.
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 64fe370: APPROVE No P0/P1/P2. All four #1174 follow-ups verified locally at this SHA.
Findings
Checks run locally (Node 22): editor 2704 pass; core 6165 tests, 0 fail; nodes 5026 tests, 0 fail; mcp 1338 pass; CI at this SHA: Changed paths, quality, cli-smoke and Cursor Bugbot all succeeded; mergeable_state is clean. |
What does this PR do?
Fixes the four P3 follow-ups from Tooling's review of #1174. Part of #621. Stored scene data is unchanged: in every UI language the scene stores exactly what
mainstores.(a) Shared labels on Enter. Two catalog names can share a translation; in French, Living room and Lounge are both "Salon".
roomNameOptionsnow takes the room's stored name. When the typed text matches a shared label, the room's own entry becomes the active row, so typing "Salon" on a Lounge and pressing Enter keeps Lounge. Any other room still falls back to the first suggestion. Tests:roomNameOptions: the shared-labelactiverow for a Lounge, a Lounge 2, a Living room, and another room.room-name-storage: Enter on a shared label stores the same English in French as in English.(b) Exact English wins on Enter. This is a behaviour change from
main, and it is kept. Typing "Closet" (or "closet") and pressing Enter picks Closet.mainpicked Walk-in closet, the first name containing the text. A test covers it.(c) Ungrouped counts. Lingui formats
#with grouping (1,234), butmainwrote these counts as 1234. The plural counts added in [Maintainer] i18n: migrate properties and inspector panels #1174 now use a plain{number}value inside the plural, the same pattern as the openings count. That covers:The existing drafts were rewritten with the same substitution, so no translation changed wording.
(d) Layer-tree rename. A new
RoomRenameInputis used for room and zone rows. While you edit, it shows the name asdisplayRoomNamedoes ("Chambre 1" for "Bedroom 1" in French). It commits throughcommitRoomNameEdit, via a newcommitTreeRoomRename. That keeps the tree's own write path (updateNode, trimmed text,undefinedwhen cleared), so "Salon 3" on a Lounge 2 stores "Lounge 3", free text is stored as typed, and an English UI writes exactly whatmainwrites. A test checks renumbering, a padded name, free text and clearing in French against English.Accessibility found by the new surface:
alttext.Audit. New
layer-room-renamesurface: it expands the Scene panel and opens the rename field on "Bedroom 1".openLayernow shares the expansion step (expandLayers).Catalogs. 3 new messages, 11 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,526 entries per locale awaiting review.bun devand open the two-bedroom project with?lang=en-XA. In the Scene panel, click the pencil on "Bedroom 1": the field shows the bracketed, accented name plus "1". Change the number and press Enter. The stored name, as seen in English or through MCPget_zones, is "Bedroom 3".bun run i18n:pseudo-audit -- layer-room-rename layers-panel room-panel floor-foundation-panel: all four pass. 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 new findings.Still English after this PR
Unchanged from #1174: the remaining inspectors (cabinets, column, chimney, elevator, vents, dormer, skylight, solar panel, fences, MEP), which are the next PRs; external plugin copy; command messages; material names; unit suffixes.
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.Layer-tree rename on "Bedroom 1" (the field edits the localized name):

Room panel (walls count):

Floor & foundation:

Layers panel:

Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Changes how room names are resolved on Enter and how layer-tree renames are committed, which can alter stored names in localized UIs; plural message shape is broad but display-only.
Reviewed by Cursor Bugbot for commit 64fe370. Bugbot is set up for automated code reviews on this repo. Configure here.