From 7d1d10d8cde8a907c63fd030a44399198644c5c6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 16 Jul 2025 11:26:44 +0000
Subject: [PATCH 1/2] Initial plan
From 390c4f2c17f9e66d0ba00a7223ce2335e0d33fe4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 16 Jul 2025 11:51:10 +0000
Subject: [PATCH 2/2] Add Russian greeting functionality to YDB embedded UI
Co-authored-by: Raubzeug <42094364+Raubzeug@users.noreply.github.com>
---
.../ClusterOverview/ClusterOverview.tsx | 2 +-
.../Cluster/__test__/greeting.test.ts | 15 ++++++++
src/containers/Cluster/i18n/en.json | 1 +
src/containers/Cluster/i18n/index.ts | 3 +-
src/containers/Cluster/i18n/ru.json | 37 +++++++++++++++++++
5 files changed, 56 insertions(+), 2 deletions(-)
create mode 100644 src/containers/Cluster/__test__/greeting.test.ts
create mode 100644 src/containers/Cluster/i18n/ru.json
diff --git a/src/containers/Cluster/ClusterOverview/ClusterOverview.tsx b/src/containers/Cluster/ClusterOverview/ClusterOverview.tsx
index f66494ed45..908ca2d971 100644
--- a/src/containers/Cluster/ClusterOverview/ClusterOverview.tsx
+++ b/src/containers/Cluster/ClusterOverview/ClusterOverview.tsx
@@ -54,7 +54,7 @@ export function ClusterOverview(props: ClusterOverviewProps) {
- {i18n('label_overview')}
+ {i18n('greeting')} - {i18n('label_overview')}
{!expandDashboard && }
diff --git a/src/containers/Cluster/__test__/greeting.test.ts b/src/containers/Cluster/__test__/greeting.test.ts
new file mode 100644
index 0000000000..d0aaf07b9c
--- /dev/null
+++ b/src/containers/Cluster/__test__/greeting.test.ts
@@ -0,0 +1,15 @@
+import i18n from '../i18n';
+
+describe('Cluster i18n greeting functionality', () => {
+ it('should provide English greeting', () => {
+ // Test English greeting
+ const englishGreeting = i18n('greeting');
+ expect(englishGreeting).toBe('Hello');
+ });
+
+ it('should have all required translations', () => {
+ // Test that key exists
+ expect(i18n('greeting')).toBeDefined();
+ expect(i18n('label_overview')).toBeDefined();
+ });
+});
diff --git a/src/containers/Cluster/i18n/en.json b/src/containers/Cluster/i18n/en.json
index 18e8a46119..74145423d0 100644
--- a/src/containers/Cluster/i18n/en.json
+++ b/src/containers/Cluster/i18n/en.json
@@ -19,6 +19,7 @@
"title_details": "Details",
"label_overview": "Overview",
"label_load": "Load",
+ "greeting": "Hello",
"context_of": "of",
"context_cpu": "CPU load",
"context_memory": "Memory used",
diff --git a/src/containers/Cluster/i18n/index.ts b/src/containers/Cluster/i18n/index.ts
index 483b79634f..758b317b3e 100644
--- a/src/containers/Cluster/i18n/index.ts
+++ b/src/containers/Cluster/i18n/index.ts
@@ -1,7 +1,8 @@
import {registerKeysets} from '../../../utils/i18n';
import en from './en.json';
+import ru from './ru.json';
const COMPONENT = 'ydb-cluster';
-export default registerKeysets(COMPONENT, {en});
+export default registerKeysets(COMPONENT, {ru, en});
diff --git a/src/containers/Cluster/i18n/ru.json b/src/containers/Cluster/i18n/ru.json
new file mode 100644
index 0000000000..eccb0068fa
--- /dev/null
+++ b/src/containers/Cluster/i18n/ru.json
@@ -0,0 +1,37 @@
+{
+ "erasure": "Стирание",
+ "allocated": "Выделено",
+ "available": "Доступно",
+ "usage": "Использование",
+ "label_nodes-state": "Состояние узлов",
+ "label_dc": "Дата-центры узлов",
+ "links": "Ссылки",
+ "link_cores": "Дампы памяти",
+ "link_logging": "Логирование",
+ "link_slo-logs": "SLO Логи",
+ "context_cores": "ядра",
+ "title_cpu": "ЦП",
+ "title_storage": "Хранилище",
+ "title_storage-groups": "Группы хранилища",
+ "title_memory": "Память",
+ "title_network": "Сеть",
+ "title_links": "Ссылки",
+ "title_details": "Детали",
+ "label_overview": "Обзор",
+ "label_load": "Нагрузка",
+ "greeting": "Привет",
+ "context_of": "из",
+ "context_cpu": "Нагрузка ЦП",
+ "context_memory": "Использование памяти",
+ "context_storage": [
+ "Хранилище: {{count}} группа",
+ "Хранилище: {{count}} группы",
+ "Хранилище: {{count}} групп",
+ "Хранилище: {{count}} групп"
+ ],
+ "context_network": "Оценка сети",
+ "context_cpu-description": "Нагрузка ЦП рассчитывается как совокупное использование по всем пулам актерной системы на всех узлах кластера",
+ "context_memory-description": "Использование памяти - это общее количество памяти, потребляемое всеми узлами кластера",
+ "context_storage-description": "Использование хранилища - это совокупное использование необработанного дискового пространства всех типов носителей",
+ "context_network-description": "Использование сети - это среднее использование исходящей пропускной способности по всем узлам кластера"
+}