diff --git a/web/frontend/src/__tests__/ssh-labels-i18n.test.ts b/web/frontend/src/__tests__/ssh-labels-i18n.test.ts deleted file mode 100644 index 723e0c9..0000000 --- a/web/frontend/src/__tests__/ssh-labels-i18n.test.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * KIN-UI-014: Тесты i18n-рефакторинга SSH-лейблов в ProjectView - * - * Проверяет: - * 1. Ключи settings.ssh_host/ssh_user/ssh_key_path/ssh_proxy_jump присутствуют в en.json - * 2. Ключи settings.ssh_host/ssh_user/ssh_key_path/ssh_proxy_jump присутствуют в ru.json - * 3. Значения английских ключей корректны - * 4. Значения русских ключей корректны - */ - -import { describe, it, expect } from 'vitest' -import enJson from '../locales/en.json' -import ruJson from '../locales/ru.json' - -describe('KIN-UI-014: SSH-лейблы в en.json', () => { - it('settings.ssh_host присутствует в en.json', () => { - expect((enJson.settings as Record).ssh_host).toBeDefined() - }) - - it('settings.ssh_user присутствует в en.json', () => { - expect((enJson.settings as Record).ssh_user).toBeDefined() - }) - - it('settings.ssh_key_path присутствует в en.json', () => { - expect((enJson.settings as Record).ssh_key_path).toBeDefined() - }) - - it('settings.ssh_proxy_jump присутствует в en.json', () => { - expect((enJson.settings as Record).ssh_proxy_jump).toBeDefined() - }) - - it('settings.ssh_host имеет корректное английское значение', () => { - expect((enJson.settings as Record).ssh_host).toBe('SSH Host') - }) - - it('settings.ssh_user имеет корректное английское значение', () => { - expect((enJson.settings as Record).ssh_user).toBe('SSH User') - }) - - it('settings.ssh_key_path имеет корректное английское значение', () => { - expect((enJson.settings as Record).ssh_key_path).toBe('SSH Key Path') - }) - - it('settings.ssh_proxy_jump имеет корректное английское значение', () => { - expect((enJson.settings as Record).ssh_proxy_jump).toBe('SSH ProxyJump') - }) -}) - -describe('KIN-UI-014: SSH-лейблы в ru.json', () => { - it('settings.ssh_host присутствует в ru.json', () => { - expect((ruJson.settings as Record).ssh_host).toBeDefined() - }) - - it('settings.ssh_user присутствует в ru.json', () => { - expect((ruJson.settings as Record).ssh_user).toBeDefined() - }) - - it('settings.ssh_key_path присутствует в ru.json', () => { - expect((ruJson.settings as Record).ssh_key_path).toBeDefined() - }) - - it('settings.ssh_proxy_jump присутствует в ru.json', () => { - expect((ruJson.settings as Record).ssh_proxy_jump).toBeDefined() - }) - - it('settings.ssh_host имеет корректное русское значение', () => { - expect((ruJson.settings as Record).ssh_host).toBe('SSH Хост') - }) - - it('settings.ssh_user имеет корректное русское значение', () => { - expect((ruJson.settings as Record).ssh_user).toBe('SSH Пользователь') - }) - - it('settings.ssh_key_path имеет корректное русское значение', () => { - expect((ruJson.settings as Record).ssh_key_path).toBe('Путь к SSH ключу') - }) - - it('settings.ssh_proxy_jump имеет корректное русское значение', () => { - expect((ruJson.settings as Record).ssh_proxy_jump).toBe('SSH ProxyJump') - }) -}) - -describe('KIN-UI-014: ProjectView.vue не содержит хардкод SSH-лейблов', () => { - it('все 4 SSH-ключа отсутствуют как хардкод — ключи локалей совпадают между en и ru', () => { - const en = enJson.settings as Record - const ru = ruJson.settings as Record - // Оба файла содержат одинаковый набор SSH-ключей - expect(Object.keys(en)).toContain('ssh_host') - expect(Object.keys(en)).toContain('ssh_user') - expect(Object.keys(en)).toContain('ssh_key_path') - expect(Object.keys(en)).toContain('ssh_proxy_jump') - expect(Object.keys(ru)).toContain('ssh_host') - expect(Object.keys(ru)).toContain('ssh_user') - expect(Object.keys(ru)).toContain('ssh_key_path') - expect(Object.keys(ru)).toContain('ssh_proxy_jump') - }) - - it('SSH-ключи в ru.json не совпадают с английскими (переведены)', () => { - const en = enJson.settings as Record - const ru = ruJson.settings as Record - // ssh_host, ssh_user, ssh_key_path — переведены, не совпадают - expect(ru.ssh_host).not.toBe(en.ssh_host) - expect(ru.ssh_user).not.toBe(en.ssh_user) - expect(ru.ssh_key_path).not.toBe(en.ssh_key_path) - // ssh_proxy_jump — бренд, одинаков в обоих языках - expect(ru.ssh_proxy_jump).toBe(en.ssh_proxy_jump) - }) -}) diff --git a/web/frontend/src/locales/en.json b/web/frontend/src/locales/en.json index 4dab6a4..2aee55f 100644 --- a/web/frontend/src/locales/en.json +++ b/web/frontend/src/locales/en.json @@ -129,11 +129,7 @@ "saving_link": "Saving...", "cancel_link": "Cancel", "delete_link_confirm": "Delete link?", - "select_project_error": "Select a project", - "ssh_host": "SSH Host", - "ssh_user": "SSH User", - "ssh_key_path": "SSH Key Path", - "ssh_proxy_jump": "SSH ProxyJump" + "select_project_error": "Select a project" }, "taskDetail": { "pipeline_already_running": "Pipeline already running", diff --git a/web/frontend/src/locales/ru.json b/web/frontend/src/locales/ru.json index a8a9b65..caca3a5 100644 --- a/web/frontend/src/locales/ru.json +++ b/web/frontend/src/locales/ru.json @@ -129,11 +129,7 @@ "saving_link": "Сохраняем...", "cancel_link": "Отмена", "delete_link_confirm": "Удалить связь?", - "select_project_error": "Выберите проект", - "ssh_host": "SSH Хост", - "ssh_user": "SSH Пользователь", - "ssh_key_path": "Путь к SSH ключу", - "ssh_proxy_jump": "SSH ProxyJump" + "select_project_error": "Выберите проект" }, "taskDetail": { "pipeline_already_running": "Pipeline уже запущен", diff --git a/web/frontend/src/views/ProjectView.vue b/web/frontend/src/views/ProjectView.vue index 46051f8..28bb0d0 100644 --- a/web/frontend/src/views/ProjectView.vue +++ b/web/frontend/src/views/ProjectView.vue @@ -1639,22 +1639,22 @@ async function addDecision() {
- +
- +
- +
- +
diff --git a/web/frontend/src/views/SettingsView.vue b/web/frontend/src/views/SettingsView.vue index ffd2ec5..3b59070 100644 --- a/web/frontend/src/views/SettingsView.vue +++ b/web/frontend/src/views/SettingsView.vue @@ -242,7 +242,7 @@ async function deleteLink(projectId: string, linkId: number) { > {{ savingTest[project.id] ? t('settings.saving_test') : t('settings.save_test') }} - + {{ saveTestStatus[project.id] }} @@ -307,7 +307,7 @@ async function deleteLink(projectId: string, linkId: number) { > {{ savingDeployConfig[project.id] ? t('settings.saving_deploy') : t('settings.save_deploy_config') }} - + {{ saveDeployConfigStatus[project.id] }} @@ -393,7 +393,7 @@ async function deleteLink(projectId: string, linkId: number) { {{ t('settings.auto_test') }} {{ t('settings.auto_test_hint') }} - + {{ saveAutoTestStatus[project.id] }} @@ -410,7 +410,7 @@ async function deleteLink(projectId: string, linkId: number) { {{ t('settings.worktrees') }} {{ t('settings.worktrees_hint') }} - + {{ saveWorktreesStatus[project.id] }} @@ -432,7 +432,7 @@ async function deleteLink(projectId: string, linkId: number) { {{ syncing[project.id] ? t('settings.syncing') : t('settings.sync_obsidian') }} - + {{ saveStatus[project.id] }}