Skip to content

AI-native design editor. Open-source Figma alternative.

fix(vue): localize static canvas menu labels

Danila Poyarkov52149e5771d1
diff --git a/src/components/CanvasMenu.vue b/src/components/CanvasMenu.vue
index 9fbb48dbd..e034940c4 100644
--- a/src/components/CanvasMenu.vue
+++ b/src/components/CanvasMenu.vue
@@ -84,7 +84,8 @@ function contextCommandTestId(id: EditorCommandId | undefined): string | undefin
:disabled="!hasSelection"
@select="getCommand('selection.duplicate').run()"
>
- <span>Duplicate</span><span class="text-[11px] text-muted">{{ formatShortcut('MOD+D') }}</span>
+ <span>{{ getCommand('selection.duplicate').label }}</span
+ ><span class="text-[11px] text-muted">{{ formatShortcut('MOD+D') }}</span>
</ContextMenuItem>
<ContextMenuItem
data-test-id="context-delete"
@@ -92,7 +93,8 @@ function contextCommandTestId(id: EditorCommandId | undefined): string | undefin
:disabled="!hasSelection"
@select="getCommand('selection.delete').run()"
>
- <span>Delete</span><span class="text-[11px] text-muted">⌫</span>
+ <span>{{ getCommand('selection.delete').label }}</span
+ ><span class="text-[11px] text-muted">{{ editorCommandMetadata('selection.delete').shortcut }}</span>
</ContextMenuItem>
<template v-for="(item, i) in canvasMenu" :key="`menu-${i}`">