diff --git a/i18n/pseudo-surfaces.ts b/i18n/pseudo-surfaces.ts index 4d36484968..dcb392a7f1 100644 --- a/i18n/pseudo-surfaces.ts +++ b/i18n/pseudo-surfaces.ts @@ -90,6 +90,16 @@ async function openLayer( english: string | RegExp, options: { exact?: boolean } = {}, ) { + await expandLayers(page) + const name = + typeof english !== 'string' || options.exact === false ? english : englishOrPseudo(english) + await page.getByText(name, { exact: true }).first().click() + await page.waitForTimeout(1200) + await expandInspector(page) +} + +/** Opens the Scene panel and expands every row. */ +async function expandLayers(page: Page) { await openScenePanel(page) // Expand every row: the tree's chevrons are the small square buttons beside each name. for (let pass = 0; pass < 3; pass++) { @@ -102,11 +112,6 @@ async function openLayer( } await page.waitForTimeout(700) } - const name = - typeof english !== 'string' || options.exact === false ? english : englishOrPseudo(english) - await page.getByText(name, { exact: true }).first().click() - await page.waitForTimeout(1200) - await expandInspector(page) } /** The inspector opens collapsed to its header on small viewports. */ @@ -336,6 +341,24 @@ export const surfaces: PseudoSurface[] = [ scope: '[data-surface="site-panel"]', data: apartmentData, }, + { + name: 'layer-room-rename', + path: apartmentPath, + steps: async (page) => { + await expandLayers(page) + // The template's "Bedroom 1" shows, and edits, as the catalog name in the UI language. + const row = page.getByText(`${pseudo('Bedroom')} 1`, { exact: true }).first() + await row.hover() + await row + .locator('xpath=..') + .getByRole('button', { name: pseudo('Rename'), exact: true }) + .click() + await page.locator('[data-surface="site-panel"] input[type="text"]').first().waitFor() + await page.waitForTimeout(500) + }, + scope: '[data-surface="site-panel"]', + data: apartmentData, + }, { name: 'level-selector', path: apartmentPath, diff --git a/packages/editor/src/components/editor/floating-action-menu.tsx b/packages/editor/src/components/editor/floating-action-menu.tsx index d305412157..eb0fc791d4 100644 --- a/packages/editor/src/components/editor/floating-action-menu.tsx +++ b/packages/editor/src/components/editor/floating-action-menu.tsx @@ -815,8 +815,8 @@ function SystemSummaryPill({ {formatMeasurement(summary.runLengthM, unit, metricNotation)} ·{' '} {i18n._({ id: 'editor.floatingActionMenu.runCount', - message: '{count, plural, one {# run} other {# runs}}', - values: { count: summary.runCount }, + message: '{count, plural, one {{number} run} other {{number} runs}}', + values: { count: summary.runCount, number: String(summary.runCount) }, })} diff --git a/packages/editor/src/components/ui/panels/floor-foundation-panel.tsx b/packages/editor/src/components/ui/panels/floor-foundation-panel.tsx index b4e9d65ced..98c45d2731 100644 --- a/packages/editor/src/components/ui/panels/floor-foundation-panel.tsx +++ b/packages/editor/src/components/ui/panels/floor-foundation-panel.tsx @@ -311,16 +311,16 @@ type Notice = { } export function moveTogetherLabel(count: number, lower: boolean, i18n: PascalI18n) { - const values = { count } + const values = { count, number: String(count) } return lower ? i18n._({ id: 'editor.panels.floorFoundationPanel.lowerTogether', - message: '{count, plural, =2 {Lower both} other {Lower all #}}', + message: '{count, plural, =2 {Lower both} other {Lower all {number}}}', values, }) : i18n._({ id: 'editor.panels.floorFoundationPanel.raiseTogether', - message: '{count, plural, =2 {Raise both} other {Raise all #}}', + message: '{count, plural, =2 {Raise both} other {Raise all {number}}}', values, }) } diff --git a/packages/editor/src/components/ui/panels/room-construction-rows.tsx b/packages/editor/src/components/ui/panels/room-construction-rows.tsx index 18720a72a3..197662605a 100644 --- a/packages/editor/src/components/ui/panels/room-construction-rows.tsx +++ b/packages/editor/src/components/ui/panels/room-construction-rows.tsx @@ -700,13 +700,18 @@ export function RoomConstructionRows({ room }: { room: RoomSelectionRecord }) { ? i18n._({ id: 'editor.panels.roomConstructionRows.partialWalls', message: - 'Partial · {walls, plural, one {# wall} other {# walls}}, {openSides, plural, one {# open side} other {# open sides}}', - values: { walls: wallIds.length, openSides }, + 'Partial · {walls, plural, one {{wallCount} wall} other {{wallCount} walls}}, {openSides, plural, one {{openSideCount} open side} other {{openSideCount} open sides}}', + values: { + walls: wallIds.length, + openSides, + wallCount: String(wallIds.length), + openSideCount: String(openSides), + }, }) : i18n._({ id: 'editor.panels.roomConstructionRows.wallCount', - message: '{walls, plural, one {# wall} other {# walls}}', - values: { walls: wallIds.length }, + message: '{walls, plural, one {{wallCount} wall} other {{wallCount} walls}}', + values: { walls: wallIds.length, wallCount: String(wallIds.length) }, }) const locked = roomOutsideFacesLocked(nodes, wallIds) @@ -763,8 +768,9 @@ export function RoomConstructionRows({ room }: { room: RoomSelectionRecord }) {