AI-native design editor. Open-source Figma alternative.
Translate visible panel chrome for Russian locale
Danila Poyarkov77032ab092fe
diff --git a/packages/vue/src/i18n/messages.ts b/packages/vue/src/i18n/messages.tsindex a4a008b8f..ffc8b6fa6 100644--- a/packages/vue/src/i18n/messages.ts+++ b/packages/vue/src/i18n/messages.ts@@ -81,10 +81,13 @@ export const toolMessages = i18n('tools', {export const panelMessages = i18n('panels', {layers: 'Layers',+ pages: 'Pages',design: 'Design',code: 'Code',+ ai: 'AI',assets: 'Assets',+ page: 'Page',position: 'Position',layout: 'Layout',appearance: 'Appearance',@@ -107,7 +110,13 @@ export const panelMessages = i18n('panels', {backgroundBlur: 'Background blur',noSelection: 'No selection',+ noLocalVariables: 'No local variables',+ openVariables: 'Open variables',+ addPage: 'Add page',mixed: 'Mixed',+ layersCount: params('{count} layers'),+ goToMainComponent: 'Go to Main Component',+ detachInstance: 'Detach Instance',solid: 'Solid',linearGradient: 'Linear',diff --git a/packages/vue/src/locales/ru.json b/packages/vue/src/locales/ru.jsonindex c3248cd78..8fdb8a869 100644--- a/packages/vue/src/locales/ru.json+++ b/packages/vue/src/locales/ru.json@@ -70,9 +70,12 @@},"panels": {"layers": "Слои",+ "pages": "Страницы","design": "Дизайн","code": "Код",+ "ai": "AI","assets": "Ассеты",+ "page": "Страница","position": "Позиция","layout": "Раскладка","appearance": "Внешний вид",@@ -92,7 +95,13 @@"layerBlur": "Размытие слоя","backgroundBlur": "Размытие фона","noSelection": "Ничего не выделено",+ "noLocalVariables": "Нет локальных переменных",+ "openVariables": "Открыть переменные",+ "addPage": "Добавить страницу","mixed": "Смешанное",+ "layersCount": "{count} слоёв",+ "goToMainComponent": "Перейти к главному компоненту",+ "detachInstance": "Отвязать экземпляр","solid": "Сплошной","linearGradient": "Линейный","radialGradient": "Радиальный",diff --git a/src/components/DesignPanel.vue b/src/components/DesignPanel.vueindex 7931313eb..e913a7348 100644--- a/src/components/DesignPanel.vue+++ b/src/components/DesignPanel.vue@@ -1,7 +1,7 @@<script setup lang="ts">import { computed, ref } from 'vue'-import { useSelectionState, useEditorCommands } from '@open-pencil/vue'+import { useI18n, useSelectionState, useEditorCommands } from '@open-pencil/vue'import VariablesDialog from './VariablesDialog.vue'import AppearanceSection from './properties/AppearanceSection.vue'@@ -24,6 +24,7 @@ const isComponentType = computed(() => {const t = node.value?.typereturn t === 'COMPONENT' || t === 'COMPONENT_SET' || t === 'INSTANCE'})+const { panels } = useI18n()</script><template>@@ -37,8 +38,8 @@ const isComponentType = computed(() => {data-test-id="design-multi-header"class="flex items-center gap-1.5 border-b border-border px-3 py-2">- <span class="text-[11px] text-muted">Mixed</span>- <span class="text-xs font-semibold">{{ multiCount }} layers</span>+ <span class="text-[11px] text-muted">{{ panels.mixed }}</span>+ <span class="text-xs font-semibold">{{ panels.layersCount({ count: String(multiCount) }) }}</span></div><PositionSection /><AppearanceSection />@@ -73,14 +74,14 @@ const isComponentType = computed(() => {class="rounded bg-component/10 px-2 py-1 text-left text-[11px] text-component hover:bg-component/20"@click="goToMainComponent.run()">- Go to Main Component+ {{ panels.goToMainComponent }}</button><buttondata-test-id="design-detach-instance"class="rounded px-2 py-1 text-left text-[11px] text-muted hover:bg-hover"@click="detachInstance.run()">- Detach Instance+ {{ panels.detachInstance }}</button></div>diff --git a/src/components/LayersPanel.vue b/src/components/LayersPanel.vueindex 003876206..ebb390861 100644--- a/src/components/LayersPanel.vue+++ b/src/components/LayersPanel.vue@@ -1,9 +1,13 @@<script setup lang="ts">import { SplitterGroup, SplitterPanel, SplitterResizeHandle } from 'reka-ui'+import { useI18n } from '@open-pencil/vue'+import AppMenu from './AppMenu.vue'import LayerTree from './LayerTree.vue'import PagesPanel from './PagesPanel.vue'++const { panels } = useI18n()</script><template>@@ -32,7 +36,7 @@ import PagesPanel from './PagesPanel.vue'data-test-id="layers-header"class="shrink-0 px-3 py-2 text-[11px] tracking-wider text-muted uppercase">- Layers+ {{ panels.layers }}</header><LayerTree data-test-id="layers-tree" /></SplitterPanel>diff --git a/src/components/PagesPanel.vue b/src/components/PagesPanel.vueindex c489c2094..17c7d789c 100644--- a/src/components/PagesPanel.vue+++ b/src/components/PagesPanel.vue@@ -1,13 +1,14 @@<script setup lang="ts">import { ref } from 'vue'-import { PageListRoot, useInlineRename } from '@open-pencil/vue'+import { PageListRoot, useI18n, useInlineRename } from '@open-pencil/vue'import Tip from '@/components/ui/Tip.vue'const pageInputRefs = new Map<string, HTMLInputElement>()const activeRenameId = ref<string | null>(null)const rename = useInlineRename((id, name) => pageActions.value?.renamePage(id, name))+const { panels } = useI18n()const pageActions = ref<{renamePage: (pageId: string, name: string) => void@@ -46,9 +47,9 @@ function handlePageDblClick(<div data-test-id="pages-panel" class="flex min-h-0 flex-1 flex-col"><div class="flex shrink-0 items-center justify-between px-3 py-1.5"><span data-test-id="pages-header" class="text-[11px] tracking-wider text-muted uppercase"- >Pages</span+ >{{ panels.pages }}</span>- <Tip label="Add page">+ <Tip :label="panels.addPage"><buttondata-test-id="pages-add"class="cursor-pointer rounded border-none bg-transparent px-1 text-base leading-none text-muted hover:bg-hover hover:text-surface"diff --git a/src/components/PropertiesPanel.vue b/src/components/PropertiesPanel.vueindex 31a2bf0a8..9e33f24a1 100644--- a/src/components/PropertiesPanel.vue+++ b/src/components/PropertiesPanel.vue@@ -1,6 +1,7 @@<script setup lang="ts">import { TabsContent, TabsList, TabsRoot, TabsTrigger } from 'reka-ui'+import { useI18n } from '@open-pencil/vue'import { useAIChat } from '@/composables/use-chat'import { useEditorStore } from '@/stores/editor'@@ -10,6 +11,7 @@ import DesignPanel from './DesignPanel.vue'const store = useEditorStore()const { activeTab } = useAIChat()+const { panels } = useI18n()</script><template>@@ -25,7 +27,7 @@ const { activeTab } = useAIChat()data-test-id="properties-tab-design"class="rounded px-2.5 py-1 text-xs text-muted hover:text-surface data-[state=active]:font-semibold data-[state=active]:text-surface">- Design+ {{ panels.design }}</TabsTrigger><TabsTriggervalue="code"@@ -33,7 +35,7 @@ const { activeTab } = useAIChat()class="flex items-center gap-1 rounded px-2.5 py-1 text-xs text-muted hover:text-surface data-[state=active]:font-semibold data-[state=active]:text-surface"><icon-lucide-code class="size-3" />- Code+ {{ panels.code }}</TabsTrigger><TabsTriggervalue="ai"@@ -41,7 +43,7 @@ const { activeTab } = useAIChat()class="flex items-center gap-1 rounded px-2.5 py-1 text-xs text-muted hover:text-surface data-[state=active]:font-semibold data-[state=active]:text-surface"><icon-lucide-sparkles class="size-3" />- AI+ {{ panels.ai }}</TabsTrigger><spanv-if="activeTab === 'design'"diff --git a/src/components/properties/PageSection.vue b/src/components/properties/PageSection.vueindex 4992d56e4..3f2dc70e6 100644--- a/src/components/properties/PageSection.vue+++ b/src/components/properties/PageSection.vue@@ -1,6 +1,7 @@<script setup lang="ts">import { computed } from 'vue'+import { useI18n } from '@open-pencil/vue'import ColorInput from '@/components/ColorInput.vue'import { sectionWrapper } from '@/components/ui/section'@@ -8,11 +9,12 @@ import { useEditorStore } from '@/stores/editor'const editor = useEditorStore()const pageColor = computed(() => editor.state.pageColor)+const { panels } = useI18n()</script><template><div data-test-id="page-section" :class="sectionWrapper()">- <label class="mb-1.5 block text-[11px] text-muted">Page</label>+ <label class="mb-1.5 block text-[11px] text-muted">{{ panels.page ?? 'Page' }}</label><ColorInput :color="pageColor" editable @update="editor.setPageColor($event)" /></div></template>diff --git a/src/components/properties/VariablesSection.vue b/src/components/properties/VariablesSection.vueindex 7241c9cca..bbd94fac5 100644--- a/src/components/properties/VariablesSection.vue+++ b/src/components/properties/VariablesSection.vue@@ -3,7 +3,7 @@ import { computed } from 'vue'import Tip from '@/components/ui/Tip.vue'import { sectionWrapper } from '@/components/ui/section'-import { useSceneComputed } from '@open-pencil/vue'+import { useI18n, useSceneComputed } from '@open-pencil/vue'import { useEditorStore } from '@/stores/editor'@@ -19,13 +19,14 @@ const variableCount = useSceneComputed(() => {return editor.getVariableCount()})const hasVariables = computed(() => variableCount.value > 0)+const { panels } = useI18n()</script><template><div data-test-id="variables-section" :class="sectionWrapper()"><div class="flex items-center justify-between">- <label class="text-[11px] font-medium text-surface">Variables</label>- <Tip label="Open variables">+ <label class="text-[11px] font-medium text-surface">{{ panels.variables }}</label>+ <Tip :label="panels.openVariables"><buttondata-test-id="variables-section-open"class="flex size-5 cursor-pointer items-center justify-center rounded border-none bg-transparent text-muted hover:bg-hover hover:text-surface"@@ -36,9 +37,8 @@ const hasVariables = computed(() => variableCount.value > 0)</Tip></div><div v-if="hasVariables" class="mt-1 text-[11px] text-muted">- {{ variableCount }} variable{{ variableCount !== 1 ? 's' : '' }} in- {{ collectionCount }} collection{{ collectionCount !== 1 ? 's' : '' }}+ {{ variableCount }} / {{ collectionCount }}</div>- <div v-else class="mt-1 text-[11px] text-muted">No local variables</div>+ <div v-else class="mt-1 text-[11px] text-muted">{{ panels.noLocalVariables }}</div></div></template>