Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions apps/editor/components/build-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,13 @@ export function BuildTab() {
<>
<BuildToolGrid columns={4}>
{buildTypes
.filter((type) =>
i18n._(type.label).toLocaleLowerCase().includes(buildSearch.toLocaleLowerCase()),
)
.filter((type) => {
// The English name matches too, so shared or remembered terms work in any UI language.
const query = buildSearch.toLocaleLowerCase()
return [i18n._(type.label), type.label.message ?? ''].some((name) =>
name.toLocaleLowerCase().includes(query),
)
})
.map(renderTile)}
</BuildToolGrid>
<KitchenBrowser query={buildSearch} />
Expand Down
9 changes: 1 addition & 8 deletions i18n/literal-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
"Extrusion height"
],
"packages/editor/src/components/editor-2d/floorplan-open-wall-ends-layer.tsx": [
"Wall end not joined",
"{?}{opacity:0.4}"
"Wall end not joined"
],
"packages/editor/src/components/editor-2d/renderers/floorplan-dimension-edit-overlay.tsx": [
"Cannot read \"{?}\""
Expand Down Expand Up @@ -365,9 +364,6 @@
"Undo anyway",
"You've changed the scene since. Undoing also removes those changes."
],
"packages/editor/src/components/point-ask/point-ask-layer.tsx": [
"{?}{?}\n.pa-layer[data-calm] .pa-hlabel{transform:none;transition-property:opacity}\n.pa-layer[data-calm] .pa-send,.pa-layer[data-calm] .pa-dict,.pa-layer[data-calm] .pa-btn,.pa-layer[data-calm] .pa-hold{transform:none;transition-property:opacity,color,background}\n.pa-layer[data-calm] .pa-pk,.pa-layer[data-calm] .pa-edgemark{transition:none}\n"
],
"packages/editor/src/components/procedural-items/inspector.tsx": [
"Adjust design",
"Back",
Expand Down Expand Up @@ -1088,9 +1084,6 @@
"Update snapshot",
"View snapshot"
],
"packages/editor/src/components/ui/sidebar/panels/site-panel/tree-node-drag.tsx": [
"* { cursor: grabbing !important; }"
],
"packages/editor/src/components/ui/sidebar/panels/site-panel/unit-tree-node.tsx": [
"Delete unit",
"Focused",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ function ReferenceFloorControl() {
)}
/>
<span className="min-w-0 flex-1 truncate">{levelName}</span>
<span className="text-[10px] text-muted-foreground">{index + 1}{' '}{i18n._({ id: 'editor.actionMenu.viewToggles.below', message: 'below' })}</span>
<span className="text-[10px] text-muted-foreground">{i18n._({ id: 'editor.actionMenu.viewToggles.levelsBelow', message: '{count} below', values: { count: index + 1 } })}</span>
</button>
)
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,25 @@ function PaintScopeChip() {
const paintMode = usePaintRegionMode((s) => s.mode)
const paintEraser = paintMode === 'erase'
const picking = paintMode === 'pick'
const verb = picking ? 'Pick' : paintEraser ? 'Erase' : 'Paint'
const verb = picking ? 'pick' : paintEraser ? 'erase' : 'paint'
const scopeText = (scope: PaintScope) =>
({
pick: i18n._({
id: 'editor.helpers.contextualHelperPanel.pickScope',
message: 'Pick: {scope}',
values: { scope: paintScopeLabel(scope, paintHover!) },
}),
erase: i18n._({
id: 'editor.helpers.contextualHelperPanel.eraseScope',
message: 'Erase: {scope}',
values: { scope: paintScopeLabel(scope, paintHover!) },
}),
paint: i18n._({
id: 'editor.helpers.contextualHelperPanel.paintScope',
message: 'Paint: {scope}',
values: { scope: paintScopeLabel(scope, paintHover!) },
}),
})[verb]

// Nothing to paint with yet (no material picked, not erasing) → the first step
// is choosing a material, so say that before anything about scope or hovering.
Expand Down Expand Up @@ -408,19 +426,27 @@ function PaintScopeChip() {
return (
<ChipRow
icon={picking ? 'lucide:pipette' : PAINT_SCOPE_ICONS[effective]}
label={`${verb}: ${paintScopeLabel(picking ? 'single' : effective, paintHover)}`}
label={scopeText(picking ? 'single' : effective)}
/>
)
}

return (
<ChipRow
ariaLabel={`${verb} scope: ${paintScopeLabel(effective, paintHover)}`}
ariaLabel={
paintEraser
? i18n._({ id: 'editor.helpers.contextualHelperPanel.eraseScopeLabel', message: 'Erase scope: {scope}', values: { scope: paintScopeLabel(effective, paintHover) } })
: i18n._({ id: 'editor.helpers.contextualHelperPanel.paintScopeLabel', message: 'Paint scope: {scope}', values: { scope: paintScopeLabel(effective, paintHover) } })
}
icon={PAINT_SCOPE_ICONS[effective]}
label={`${verb}: ${paintScopeLabel(effective, paintHover)}`}
label={scopeText(effective)}
onClick={() => cyclePaintScope()}
shortcut="Shift"
tooltip={i18n._({ id: 'editor.helpers.contextualHelperPanel.verbScopeClickOrPressShift', message: '{verb} scope — click or press Shift to cycle', values: { verb } })}
tooltip={
paintEraser
? i18n._({ id: 'editor.helpers.contextualHelperPanel.eraseScopeClickOrPressShift', message: 'Erase scope — click or press Shift to cycle' })
: i18n._({ id: 'editor.helpers.contextualHelperPanel.paintScopeClickOrPressShift', message: 'Paint scope — click or press Shift to cycle' })
}
/>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/i18n/locales/en-XA/messages.ts

Large diffs are not rendered by default.

Loading
Loading