From 9f296b7357b99ecfd93bc638f7d94ef2e7412ec3 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Wed, 25 Mar 2026 18:40:17 +0300 Subject: [PATCH] Translate chat setup and code panel strings --- packages/vue/src/i18n/messages.ts | 8 ++++++++ packages/vue/src/locales/ru.json | 8 ++++++++ src/components/ChatPanel.vue | 4 +++- src/components/chat/ChatInput.vue | 8 +++++--- src/components/chat/ProviderSetup.vue | 10 ++++++---- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/vue/src/i18n/messages.ts b/packages/vue/src/i18n/messages.ts index c0e858315..177d8f865 100644 --- a/packages/vue/src/i18n/messages.ts +++ b/packages/vue/src/i18n/messages.ts @@ -149,6 +149,14 @@ export const dialogMessages = i18n('dialogs', { localVariables: 'Local variables', noVariableCollections: 'No variable collections', selectLayerForJSX: 'Select a layer to see its JSX code', + connectAIProvider: 'Connect an AI provider to start chatting.', + connect: 'Connect', + getAPIKey: params('Get an {provider} API key →'), + oneKeyManyModels: 'One key for 100+ models from all providers.', + describeChange: 'Describe a change…', + describeCreateOrChange: 'Describe what you want to create or change.', + stopGenerating: 'Stop generating', + sendMessage: 'Send message', search: 'Search…', noResults: 'No results', share: 'Share' diff --git a/packages/vue/src/locales/ru.json b/packages/vue/src/locales/ru.json index aa5340445..bbd419a85 100644 --- a/packages/vue/src/locales/ru.json +++ b/packages/vue/src/locales/ru.json @@ -130,6 +130,14 @@ "localVariables": "Локальные переменные", "noVariableCollections": "Нет коллекций переменных", "selectLayerForJSX": "Выберите слой, чтобы увидеть его JSX-код", + "connectAIProvider": "Подключите AI-провайдера, чтобы начать чат.", + "connect": "Подключить", + "getAPIKey": "Получить API-ключ {provider} →", + "oneKeyManyModels": "Один ключ для 100+ моделей от разных провайдеров.", + "describeChange": "Опишите изменение…", + "describeCreateOrChange": "Опишите, что вы хотите создать или изменить.", + "stopGenerating": "Остановить генерацию", + "sendMessage": "Отправить сообщение", "search": "Поиск…", "noResults": "Ничего не найдено", "share": "Поделиться" diff --git a/src/components/ChatPanel.vue b/src/components/ChatPanel.vue index 89087ec83..f5a5ad6b7 100644 --- a/src/components/ChatPanel.vue +++ b/src/components/ChatPanel.vue @@ -10,6 +10,7 @@ import ChatInput from '@/components/chat/ChatInput.vue' import ChatMessage from '@/components/chat/ChatMessage.vue' import ProviderSetup from '@/components/chat/ProviderSetup.vue' import { useAIChat } from '@/composables/use-chat' +import { useI18n } from '@open-pencil/vue' import type { Chat } from '@ai-sdk/vue' import type { UIMessage } from 'ai' @@ -17,6 +18,7 @@ import type { UIMessage } from 'ai' const IS_DEV = import.meta.env.DEV const { isConfigured, ensureChat, resetChat } = useAIChat() +const { dialogs } = useI18n() const chat = ref | null>(null) @@ -120,7 +122,7 @@ function handleClearChat() { class="flex h-full flex-col items-center justify-center gap-3 text-muted" > -

Describe what you want to create or change.

+

{{ dialogs.describeCreateOrChange }}

diff --git a/src/components/chat/ChatInput.vue b/src/components/chat/ChatInput.vue index ade195572..94aa04436 100644 --- a/src/components/chat/ChatInput.vue +++ b/src/components/chat/ChatInput.vue @@ -8,10 +8,12 @@ import Tip from '@/components/ui/Tip.vue' import { uiButton } from '@/components/ui/button' import { uiInput } from '@/components/ui/input' import { useAIChat } from '@/composables/use-chat' +import { useI18n } from '@open-pencil/vue' import { ACP_AGENTS } from '@open-pencil/core' const { providerID, providerDef, modelID, customModelID } = useAIChat() +const { dialogs } = useI18n() const { status } = defineProps<{ status: 'ready' | 'submitted' | 'streaming' | 'error' @@ -83,14 +85,14 @@ function handleSubmit(e: Event) { v-model="input" type="text" data-test-id="chat-input" - placeholder="Describe a change…" + :placeholder="dialogs.describeChange" :class="uiInput({ ui: { base: 'min-w-0 flex-1 placeholder:text-muted' } })" :disabled="isStreaming" @paste.stop @copy.stop @cut.stop /> - + - +