Skip to content

[Maintainer] i18n: migrate the cabinet inspectors - #1181

Merged
Aymericr merged 7 commits into
mainfrom
cursor/i18n-cabinet-inspector-8160
Oct 27, 2026
Merged

Aymericr merged 7 commits into
mainfrom
cursor/i18n-cabinet-inspector-8160

Conversation

@Aymericr

@Aymericr Aymericr commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Localizes the cabinet inspectors: the module panel, the kitchen run panel, the compartment cards, item options, and the kitchen "Add beside / Replace with" dialog. Part of #621. main (87ec430, with #1180) is merged in with a normal merge commit. Its conflicts were in the compiled en and en-XA catalogs, the literal baseline and i18n/pseudo-surfaces.ts. The catalogs and baseline were regenerated with i18n:extract, i18n:literals update and i18n:compile, and the surfaces file keeps both sides. Reviewed entries stay at 85 per locale, and release-check finds no draft compiled in. Stored scene data is unchanged.

  • Option arrays (front style, overlay, handles, handle position, cabinet tier, top finish, compartment types, fridge, cooktop, sink and rack styles, door types) become lazy descriptors, translated where the controls render. Labels that are numbers or units ("2", "60/40", "300 mm") stay as written.
  • Whole messages:
    • "This {width} item cannot fit…";
    • "Finished height extends {overflow} mm above the ceiling.", now using formatFixed instead of toFixed;
    • "Inserts on the left/right of the selected item." as an ICU select;
    • each change line in the replace preview ("{name}: {before} → {after}", "{name}: moves {distance}");
    • "Module {number}" and "Use {name} as array source";
    • the array button title, as an ICU plural, which replaces the English cop${y|ies} logic. Its count is written ungrouped, as in [Maintainer] i18n: room-name and count follow-ups #1179;
    • the equalize-widths titles;
    • the module summary ("{number} compartments", plus the compartment type).
  • Preset names. CABINET_PRESETS keep their English labels, because agents and MCP read them. The kitchen picker, the replace dialog and the module panel title use new display-time descriptors (KITCHEN_ITEM_LABELS, KITCHEN_GROUP_TITLES).
  • Kitchen search. It also matches the name the picker shows, through a new optional label argument on kitchenItemMatches, so a translated tile name finds its item. The English names and keywords still match. A test covers it.
  • Module panel title. A wall cabinet attached above a base module is now titled "Wall cabinet". kitchenPresetForModule reads it as a base cabinet, because its parent isn't a wall run, so the title now uses the panel's own wall-cabinet check.
  • Accessibility. The compartment move up/down/remove buttons, the stepper −/+ buttons ("Decrease/Increase {label}") and the module delete button ("Delete {name}") now have accessible names.
  • Audit. New cabinet-module-panel and cabinet-run-panel surfaces on the two-bedroom project with a seeded two-module kitchen run. Module names that presets write ("Base Cabinet", "Sink Base") are scene data and listed as data.
  • Catalogs. 240 new messages. zh-CN, fr, es and ja drafts are fuzzy with Review: required, so they show English until reviewed. The literal baseline drops by 230, from 1,369 on main to 1,139.

Display changes from main

  • An upper cabinet attached to a module now shows as "Wall cabinet": in its panel title, in kitchen search and in the command palette. Before, it showed as "Base cabinet".
  • A single-compartment module summary in the run panel now shows a label (for example "Drawer" or "Gas cooktop") instead of the raw type (drawer, cooktop-gas).

How to test

  1. bun run i18n:check passes after the merge, with 2,804 entries per locale awaiting review. bun scripts/i18n.ts release-check --base origin/main passes too: no reviewed translation regressed, and no draft is compiled in.
  2. Run bun dev with ?lang=en-XA and place a kitchen run. Select the run, then a module, then add a wall cabinet above it. The inspectors are bracketed and accented, and the upper cabinet's title is the localized "Wall cabinet".
  3. bun run i18n:pseudo-audit -- cabinet-module-panel cabinet-run-panel: both pass. I ran this. The Next app loads @pascal-app/nodes from dist, so run bunx turbo run build --filter=@pascal-app/nodes first.
  4. Tests I ran after the merge, with core and nodes rebuilt first:
    • packages/nodes: 5,027 pass, 1 skip.
    • packages/editor bun test src: 2,704 pass.
    • apps/editor bun test lib: 74 pass.
    • bun test scripts/: 131 pass.
    • The editor, nodes and app type checks are clean, and bun run check reports no errors.

Still English after this PR

Screenshots / screen recording

en-XA, captured by i18n:pseudo-audit (UTC, metric). The images are served from the image-only branch cursor/i18n-audit-screenshots-8160, which is never merged.

Cabinet module (Base cabinet):
Cabinet module panel en-XA

Kitchen run:
Kitchen run panel en-XA

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch
Open in Web Open in Cursor 

Note

Medium Risk
Broad UI string migration with new preset-resolution and search/command-registration behavior; low data-model risk but many user-facing kitchen flows to regression-test across locales.

Reviewed by Cursor Bugbot for commit b522b2d. Bugbot is set up for automated code reviews on this repo. Configure here.

Option arrays become lazy descriptors; split sentences, the array title and
the compartment summary are whole ICU messages; counts stay ungrouped; the
compartment and module icon buttons get names. Preset names are translated
at display time and stay English in the presets. New audit surfaces
cabinet-module-panel and cabinet-run-panel on a seeded kitchen run.
@Aymericr Aymericr added the bot:maintainer label Oct 27, 2026 — with Cursor
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T16:15:38.763481Z 3628fd1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3628fd1b8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tone="neutral"
iconSrc={`/icons/kitchen/${item.id}.webp`}
label={item.label}
label={i18n._(KITCHEN_ITEM_LABELS[item.id])}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include localized labels in kitchen search

Once a non-English preset translation is approved, the picker renders that translated label here, but filtering still calls kitchenItemMatches, whose searchable text contains only the English preset label and English keywords. A user typing the visible translated name—for example the localized word for “Fridge”—therefore gets no results. Include i18n._(KITCHEN_ITEM_LABELS[item.id]) in the searchable text, while retaining the English aliases if desired.

Useful? React with 👍 / 👎.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/nodes/src/cabinet/panel.tsx
Comment thread packages/nodes/src/cabinet/kitchen-catalog.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/nodes/src/cabinet/run-panel.tsx
Comment thread packages/nodes/src/cabinet/run-panel.tsx
Comment thread packages/nodes/src/cabinet/kitchen-catalog.ts
Comment thread packages/nodes/src/cabinet/kitchen-module-actions.tsx
- The module summary names every single-compartment type (cooktops, fridges,
  pull-out pantry, hoods), not the raw id.
- The wall-filler plan reads 'Left: 120 mm' in the UI language.
- findKitchenItems takes the shown preset name, so Find in this project and
  the kitchen command palette match and show translated preset names.
- The replace dialog's 'kitchen changed' error is translated.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cc4ff7d. Configure here.

Comment thread apps/editor/components/kitchen-browser.tsx
Comment thread packages/nodes/src/cabinet/kitchen-catalog.ts
…gister on a locale change

kitchenPresetForPlacedModule reads a module's parent the way the panel does,
so Find and the command palette name an attached upper as a wall cabinet and
match its shown name. The palette's kitchen commands depend on the catalog
version, so their labels follow a locale switch.

Copy link
Copy Markdown
Member Author

Tooling cross-review at cb975a1: APPROVE

No P0/P1/P2.

  • Stored data: CABINET_PRESETS labels stay English, and new modules still come from preset.createPatch. Each KITCHEN_ITEM_LABELS English message matches its preset label exactly. Option values are unchanged and only the labels are messages. No translated text reaches updateNode, insertion/replace, or MCP.
  • Search: kitchenItemMatches and findKitchenItems now match the English label, the keywords and the shown label. KitchenCommands re-registers on i18n.getVersion(), and the component re-renders on a locale change through usePascalI18n.
  • Numbers: toFixed becomes formatFixed(..., locale), which doesn't group, so English output is unchanged. Counts use {number} strings with no #.
  • Catalogs: +243 entries per locale, all fuzzy with Review: required. Reviewed stays at 85 per locale and drafts are 2769 for each locale.
  • No Security areas are touched. The apps/editor change is the kitchen browser UI only.

Findings

Checks run locally (Node 22; core and nodes dist rebuilt at this head, since the new tests import @pascal-app/nodes):

  • Tests: editor 2704 pass; nodes 5028 run, 0 fail (the two new kitchen tests pass); scripts/i18n*.test.ts 56 pass.
  • tsc clean for editor, nodes and apps/editor. Biome clean.
  • i18n:check PASS, catalogs in sync. release-check --base origin/main shows no reviewed regression and no draft compiled in. i18n-literals check reports no new literals.

CI at this SHA: Changed paths, quality, cli-smoke and Cursor Bugbot all succeeded.

Conflicts in the compiled en and en-XA catalogs are regenerated with
i18n:extract and i18n:compile; the literal baseline with i18n:literals
update. i18n/pseudo-surfaces.ts keeps both sides' surfaces.

Copy link
Copy Markdown
Member Author

Tooling cross-review at b522b2d: APPROVE

This is a delta check since cb975a1. No findings.

  • The head is a single merge commit with parents cb975a1 and 87ec430 (origin/main, the [Maintainer] i18n: editor-side inspector panels and 3D overlay scope #1180 squash).
  • Compared with a clean git merge-tree of the two parents, only the three conflicted files differ:
    • en messages.ts and en-XA messages.ts: regenerated.
    • i18n/pseudo-surfaces.ts: both lists kept (cabinet-module-panel, cabinet-run-panel, node-action-menu), 36 surfaces with no duplicates.
  • The .po files and literal-baseline.json are the clean auto-merge. A fresh i18n:extract leaves git status clean.
  • i18n:check passes, with 2804 drafts for each locale. Reviewed stays at 85 per locale. release-check --base origin/main shows no reviewed regression and no draft compiled in. i18n-literals check reports no new literals.
  • Local checks (Node 22; core and nodes rebuilt at this head):
    • Tests: nodes 5028 run, 0 fail, including both new kitchen tests; editor 2704 pass.
    • tsc clean for editor, nodes and apps/editor.
  • CI at this SHA: Changed paths, quality, cli-smoke and Cursor Bugbot all succeeded.

@Aymericr
Aymericr merged commit 4772056 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants