From 216f6da79ecbdd00f40a1c873c8068b97795dd2b Mon Sep 17 00:00:00 2001
From: MACHINSOFT <110278369+machinsoft@users.noreply.github.com>
Date: Mon, 13 Nov 2023 04:49:12 +0300
Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90:=20Add=20Russian=20Translations=20?=
=?UTF-8?q?(#1169)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Add translation for the button and some elements.
* Make changes for tests.
---
.../components/Input/Generations/Continue.tsx | 5 ++++-
.../components/Input/Generations/Regenerate.tsx | 5 ++++-
.../src/components/Input/Generations/Stop.tsx | 5 ++++-
.../Generations/__tests__/Continue.spec.tsx | 2 +-
.../Generations/__tests__/Regenerate.spec.tsx | 2 +-
.../Input/Generations/__tests__/Stop.spec.tsx | 2 +-
client/src/localization/languages/Eng.tsx | 3 ++-
client/src/localization/languages/Ru.tsx | 17 +++++++++++++++--
8 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/client/src/components/Input/Generations/Continue.tsx b/client/src/components/Input/Generations/Continue.tsx
index ccf20358b2..c37a9ee49f 100644
--- a/client/src/components/Input/Generations/Continue.tsx
+++ b/client/src/components/Input/Generations/Continue.tsx
@@ -1,12 +1,15 @@
import type { TGenButtonProps } from '~/common';
import { ContinueIcon } from '~/components/svg';
import Button from './Button';
+import { useLocalize } from '~/hooks';
export default function Continue({ onClick }: TGenButtonProps) {
+ const localize = useLocalize();
+
return (
);
}
diff --git a/client/src/components/Input/Generations/Regenerate.tsx b/client/src/components/Input/Generations/Regenerate.tsx
index 2ee50a20aa..718c0bdbeb 100644
--- a/client/src/components/Input/Generations/Regenerate.tsx
+++ b/client/src/components/Input/Generations/Regenerate.tsx
@@ -1,12 +1,15 @@
import type { TGenButtonProps } from '~/common';
import { RegenerateIcon } from '~/components/svg';
import Button from './Button';
+import { useLocalize } from '~/hooks';
export default function Regenerate({ onClick }: TGenButtonProps) {
+ const localize = useLocalize();
+
return (
);
}
diff --git a/client/src/components/Input/Generations/Stop.tsx b/client/src/components/Input/Generations/Stop.tsx
index 73459168f6..6113960f22 100644
--- a/client/src/components/Input/Generations/Stop.tsx
+++ b/client/src/components/Input/Generations/Stop.tsx
@@ -1,12 +1,15 @@
import type { TGenButtonProps } from '~/common';
import { StopGeneratingIcon } from '~/components/svg';
import Button from './Button';
+import { useLocalize } from '~/hooks';
export default function Stop({ onClick }: TGenButtonProps) {
+ const localize = useLocalize();
+
return (
);
}
diff --git a/client/src/components/Input/Generations/__tests__/Continue.spec.tsx b/client/src/components/Input/Generations/__tests__/Continue.spec.tsx
index e9ac7beebb..3ea01a15f4 100644
--- a/client/src/components/Input/Generations/__tests__/Continue.spec.tsx
+++ b/client/src/components/Input/Generations/__tests__/Continue.spec.tsx
@@ -1,4 +1,4 @@
-import { render, fireEvent } from '@testing-library/react';
+import { render, fireEvent } from 'test/layout-test-utils';
import Continue from '../Continue';
describe('Continue', () => {
diff --git a/client/src/components/Input/Generations/__tests__/Regenerate.spec.tsx b/client/src/components/Input/Generations/__tests__/Regenerate.spec.tsx
index 7cf4f5b1d5..a65526cc92 100644
--- a/client/src/components/Input/Generations/__tests__/Regenerate.spec.tsx
+++ b/client/src/components/Input/Generations/__tests__/Regenerate.spec.tsx
@@ -1,4 +1,4 @@
-import { render, fireEvent } from '@testing-library/react';
+import { render, fireEvent } from 'test/layout-test-utils';
import Regenerate from '../Regenerate';
describe('Regenerate', () => {
diff --git a/client/src/components/Input/Generations/__tests__/Stop.spec.tsx b/client/src/components/Input/Generations/__tests__/Stop.spec.tsx
index fd85c60b79..e475fc88fb 100644
--- a/client/src/components/Input/Generations/__tests__/Stop.spec.tsx
+++ b/client/src/components/Input/Generations/__tests__/Stop.spec.tsx
@@ -1,4 +1,4 @@
-import { render, fireEvent } from '@testing-library/react';
+import { render, fireEvent } from 'test/layout-test-utils';
import Stop from '../Stop';
describe('Stop', () => {
diff --git a/client/src/localization/languages/Eng.tsx b/client/src/localization/languages/Eng.tsx
index f1e21c33b6..5b690fa051 100644
--- a/client/src/localization/languages/Eng.tsx
+++ b/client/src/localization/languages/Eng.tsx
@@ -22,6 +22,7 @@ export default {
com_ui_use_prompt: 'Use prompt',
com_ui_prev: 'Prev',
com_ui_next: 'Next',
+ com_ui_stop: 'Stop',
com_ui_prompt_templates: 'Prompt Templates',
com_ui_hide_prompt_templates: 'Hide Prompt Templates',
com_ui_showing: 'Showing',
@@ -43,7 +44,7 @@ export default {
com_ui_all: 'all',
com_ui_clear: 'Clear',
com_ui_revoke: 'Revoke',
- com_ui_revoke_info: 'Revoke all user provided credentials.',
+ com_ui_revoke_info: 'Revoke all user provided credentials',
com_ui_confirm_action: 'Confirm Action',
com_ui_chats: 'chats',
com_ui_delete: 'Delete',
diff --git a/client/src/localization/languages/Ru.tsx b/client/src/localization/languages/Ru.tsx
index 4606e7c1ea..970f560da8 100644
--- a/client/src/localization/languages/Ru.tsx
+++ b/client/src/localization/languages/Ru.tsx
@@ -2,7 +2,7 @@
export default {
com_ui_examples: 'Примеры',
- com_ui_new_chat: 'Новый чат',
+ com_ui_new_chat: 'Создать чат',
com_ui_example_quantum_computing: 'Объясните квантовые вычисления простыми словами',
com_ui_example_10_year_old_b_day:
'У вас есть креативные идеи для дня рождения 10-летнего ребенка?',
@@ -18,11 +18,21 @@ export default {
com_ui_limitation_limited_2021: 'Ограниченные знания о мире и событиях после 2021 года',
com_ui_input: 'Ввод',
com_ui_close: 'Закрыть',
+ com_ui_clear: 'Очистить',
+ com_ui_revoke: 'Отозвать',
+ com_ui_revoke_info: 'Отозвать все предоставленные пользователем учетные данные',
com_ui_model: 'Модель',
com_ui_select_model: 'Выберите модель',
com_ui_use_prompt: 'Использовать подсказку',
com_ui_prev: 'Предыдущий',
com_ui_next: 'Следующий',
+ com_ui_cancel: 'Отмена',
+ com_ui_delete: 'Удалить',
+ com_ui_delete_conversation: 'Удалить чат?',
+ com_ui_delete_conversation_confirm: 'Будет удален следующий чат: ',
+ com_ui_regenerate: 'Повторная генерация',
+ com_ui_stop: 'Остановить генерацию',
+ com_ui_continue: 'Продолжить',
com_ui_prompt_templates: 'Шаблоны подсказок',
com_ui_hide_prompt_templates: 'Скрыть шаблоны подсказок',
com_ui_showing: 'Показано',
@@ -189,9 +199,11 @@ export default {
com_nav_theme_system: 'Системная',
com_nav_theme_dark: 'Темная',
com_nav_theme_light: 'Светлая',
+ com_nav_language: 'Локализация (Альфа)',
com_nav_clear: 'Очистить',
com_nav_clear_all_chats: 'Очистить все чаты',
com_nav_confirm_clear: 'Подтвердить очистку',
+ com_nav_auto_scroll: 'Автоматическая прокрутка к новым сообщениям в режиме открытия',
com_nav_close_sidebar: 'Закрыть боковую панель',
com_nav_open_sidebar: 'Открыть боковую панель',
com_nav_log_out: 'Выйти',
@@ -199,7 +211,8 @@ export default {
com_nav_clear_conversation: 'Очистить разговоры',
com_nav_clear_conversation_confirm_message:
'Вы уверены, что хотите очистить все разговоры? Это действие нельзя отменить.',
- com_nav_help_faq: 'Помощь и Часто задаваемые вопросы',
+ com_nav_help_faq: 'Помощь и часто задаваемые вопросы',
+ com_nav_setting_data: 'Управление данными',
com_nav_settings: 'Настройки',
com_nav_search_placeholder: 'Поиск сообщений',
com_nav_setting_general: 'Общие',