From 4ddb0dc9779e7cd89ee3e08e5cc7067fde268d54 Mon Sep 17 00:00:00 2001 From: SMKRV Date: Tue, 19 Nov 2024 16:59:42 +0300 Subject: [PATCH] Translation fixes --- .../ha_text_ai/translations/en.json | 67 +++---------------- .../ha_text_ai/translations/ru.json | 65 +++--------------- 2 files changed, 19 insertions(+), 113 deletions(-) diff --git a/custom_components/ha_text_ai/translations/en.json b/custom_components/ha_text_ai/translations/en.json index 83740f4..db8d786 100644 --- a/custom_components/ha_text_ai/translations/en.json +++ b/custom_components/ha_text_ai/translations/en.json @@ -5,30 +5,12 @@ "title": "Set up HA Text AI", "description": "Configure your OpenAI integration", "data": { - "api_key": { - "name": "API Key", - "description": "Your OpenAI API key" - }, - "model": { - "name": "Model", - "description": "AI model to use for responses" - }, - "temperature": { - "name": "Temperature", - "description": "Temperature for response generation (0-2)" - }, - "max_tokens": { - "name": "Max Tokens", - "description": "Maximum tokens in response (1-4096)" - }, - "api_endpoint": { - "name": "API Endpoint", - "description": "API endpoint URL" - }, - "request_interval": { - "name": "Request Interval", - "description": "Minimum time between API requests (seconds)" - } + "api_key": "Your OpenAI API key", + "model": "AI model to use for responses", + "temperature": "Temperature for response generation (0-2)", + "max_tokens": "Maximum tokens in response (1-4096)", + "api_endpoint": "API endpoint URL", + "request_interval": "Minimum time between API requests (seconds)" } } } @@ -38,18 +20,9 @@ "init": { "title": "HA Text AI Options", "data": { - "temperature": { - "name": "Temperature", - "description": "Response temperature (0-2)" - }, - "max_tokens": { - "name": "Max Tokens", - "description": "Maximum response length" - }, - "request_interval": { - "name": "Request Interval", - "description": "Time between requests" - } + "temperature": "Response temperature (0-2)", + "max_tokens": "Maximum response length", + "request_interval": "Time between requests" } } } @@ -58,7 +31,7 @@ "ask_question": { "name": "Ask Question", "description": "Send a question to the AI model", - "fields": { + "fields": { "question": { "name": "Question", "description": "Your question for the AI" @@ -77,25 +50,5 @@ "name": "Set System Prompt", "description": "Set system behavior instructions" } - }, - "error": { - "invalid_api_key": "Invalid API key", - "cannot_connect": "Cannot connect to the API", - "unknown_error": "Unknown error", - "invalid_model": "Invalid model", - "rate_limit_exceeded": "Rate limit exceeded", - "context_length_exceeded": "Context length exceeded", - "api_error": "API error", - "timeout_error": "Timeout error", - "queue_full": "Queue full", - "invalid_prompt": "Invalid prompt" - }, - "state": { - "ready": "Ready", - "processing": "Processing", - "error": "Error", - "disconnected": "Disconnected", - "rate_limited": "Rate limited", - "initializing": "Initializing" } } diff --git a/custom_components/ha_text_ai/translations/ru.json b/custom_components/ha_text_ai/translations/ru.json index 009bed8..afa37fd 100644 --- a/custom_components/ha_text_ai/translations/ru.json +++ b/custom_components/ha_text_ai/translations/ru.json @@ -5,30 +5,12 @@ "title": "Настройка HA Text AI", "description": "Настройка интеграции с OpenAI", "data": { - "api_key": { - "name": "API Ключ", - "description": "Ваш ключ API OpenAI" - }, - "model": { - "name": "Модель", - "description": "Модель ИИ для генерации ответов" - }, - "temperature": { - "name": "Температура", - "description": "Температура генерации ответов (0-2)" - }, - "max_tokens": { - "name": "Макс. токенов", - "description": "Максимальное количество токенов в ответе (1-4096)" - }, - "api_endpoint": { - "name": "API Endpoint", - "description": "URL конечной точки API" - }, - "request_interval": { - "name": "Интервал запросов", - "description": "Минимальное время между запросами к API (секунды)" - } + "api_key": "Ваш ключ API OpenAI", + "model": "Модель ИИ для генерации ответов", + "temperature": "Температура генерации ответов (0-2)", + "max_tokens": "Максимальное количество токенов в ответе (1-4096)", + "api_endpoint": "URL конечной точки API", + "request_interval": "Минимальное время между запросами к API (секунды)" } } } @@ -38,18 +20,9 @@ "init": { "title": "Настройки HA Text AI", "data": { - "temperature": { - "name": "Температура", - "description": "Температура ответов (0-2)" - }, - "max_tokens": { - "name": "Макс. токенов", - "description": "Максимальная длина ответа" - }, - "request_interval": { - "name": "Интервал запросов", - "description": "Время между запросами" - } + "temperature": "Температура ответов (0-2)", + "max_tokens": "Максимальная длина ответа", + "request_interval": "Время между запросами" } } } @@ -77,25 +50,5 @@ "name": "Установить системный промпт", "description": "Установить инструкции поведения системы" } - }, - "error": { - "invalid_api_key": "Недействительный API ключ", - "cannot_connect": "Не удается подключиться к API", - "unknown_error": "Неизвестная ошибка", - "invalid_model": "Недопустимая модель", - "rate_limit_exceeded": "Превышен лимит запросов", - "context_length_exceeded": "Превышена длина контекста", - "api_error": "Ошибка API", - "timeout_error": "Ошибка тайм-аута", - "queue_full": "Очередь заполнена", - "invalid_prompt": "Недопустимый промпт" - }, - "state": { - "ready": "Готов", - "processing": "Обработка", - "error": "Ошибка", - "disconnected": "Отключено", - "rate_limited": "Превышен лимит", - "initializing": "Инициализация" } }