fix: extract hardcoded English strings to i18n system with Russian translations

- Extract ~40 hardcoded strings from project detail, deploy, settings, credentials, registries, auth, env editor pages
- Add corresponding Russian translations
- Replace native confirm() default labels with i18n keys in ConfirmDialog
- Fix InstanceCard pluralization to use i18n
This commit is contained in:
2026-04-04 13:03:05 +03:00
parent 3f6858513f
commit 04c1411f5d
12 changed files with 129 additions and 55 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
open,
title,
message,
confirmLabel = 'Confirm',
confirmLabel = $t('common.confirm'),
confirmVariant = 'primary',
onconfirm,
oncancel
+1 -1
View File
@@ -155,7 +155,7 @@
open={confirmAction !== null}
title={confirmAction ? $t(`confirm.${confirmAction}Instance`) : ''}
message={confirmAction ? $t(`instance.${confirmAction}Confirm`) : ''}
confirmLabel={confirmAction ? confirmAction.charAt(0).toUpperCase() + confirmAction.slice(1) : ''}
confirmLabel={confirmAction ? $t(`confirm.${confirmAction}Action`) : ''}
confirmVariant={confirmAction === 'remove' ? 'danger' : 'primary'}
onconfirm={() => { if (confirmAction) handleAction(confirmAction); }}
oncancel={() => { confirmAction = null; }}
+45 -8
View File
@@ -55,7 +55,10 @@
"selectImage": "Select an image",
"noImages": "No images found",
"loadingImages": "Loading images...",
"imageLoadFailed": "Failed to load images"
"imageLoadFailed": "Failed to load images",
"alreadyAdded": "Already added",
"portHelpText": "Auto-detected from EXPOSE if empty",
"healthcheckHelpText": "Auto-detected from image if empty"
},
"projectDetail": {
"deleteProject": "Delete Project",
@@ -86,7 +89,29 @@
"deleteConfirmMessage": "This will permanently delete the project '{name}' and all its stages, instances, and deploy history. This cannot be undone.",
"loadFailed": "Failed to load project",
"deleteFailed": "Failed to delete project",
"deployFailed": "Deploy failed"
"deployFailed": "Deploy failed",
"nameLabel": "Name *",
"imageLabel": "Image *",
"portLabel": "Port",
"healthcheckLabel": "Healthcheck Path",
"saving": "Saving...",
"addStage": "Add Stage",
"tagPattern": "Tag Pattern",
"tagPatternHelp": "Glob pattern (e.g., dev-*, v*)",
"maxInstances": "Max Instances",
"autoDeployLabel": "Auto Deploy",
"npmProxy": "NPM Proxy",
"creating": "Creating...",
"createStage": "Create Stage",
"noProxy": "No Proxy",
"deleteStage": "Delete stage",
"deleteStageConfirm": "Delete stage \"{name}\"?",
"stageCreated": "Stage \"{name}\" created",
"stageDeleted": "Stage \"{name}\" deleted",
"projectUpdated": "Project updated",
"updateFailed": "Failed to update project",
"stageCreateFailed": "Failed to create stage",
"stageDeleteFailed": "Failed to delete stage"
},
"envEditor": {
"title": "Environment Variables",
@@ -117,7 +142,8 @@
"addFailed": "Failed to add env var",
"updateFailed": "Failed to update env var",
"deleteFailed": "Failed to delete env var",
"loadEnvFailed": "Failed to load env vars"
"loadEnvFailed": "Failed to load env vars",
"leaveEmptyToKeep": "Leave empty to keep current"
},
"volumeEditor": {
"title": "Volume Mounts",
@@ -196,7 +222,8 @@
"selectImage": "Select an image from a registry",
"noImages": "No images found",
"loadingImages": "Loading...",
"imageLoadFailed": "Failed to load images"
"imageLoadFailed": "Failed to load images",
"lowercaseHint": "Lowercase with hyphens"
},
"settings": {
"title": "Settings",
@@ -264,7 +291,9 @@
"testConnection": "Test Connection",
"testingConnection": "Testing...",
"connectionSuccess": "Connection successful",
"connectionFailed": "Connection failed"
"connectionFailed": "Connection failed",
"baseVolumePath": "Base Volume Path",
"baseVolumePathHelp": "Prepended to relative volume sources (e.g., /data + my-app/uploads = /data/my-app/uploads)"
},
"settingsRegistries": {
"title": "Container Registries",
@@ -300,7 +329,10 @@
"deleteFailed": "Failed to delete registry",
"testFailed": "Connection test failed",
"loadFailed": "Failed to load registries",
"deleteConfirm": "Delete registry \"{name}\"? This cannot be undone."
"deleteConfirm": "Delete registry \"{name}\"? This cannot be undone.",
"healthChecking": "Checking...",
"healthConnected": "Connected",
"healthUnreachable": "Unreachable"
},
"settingsCredentials": {
"title": "Credentials",
@@ -324,7 +356,8 @@
"registryTokens": "Registry Tokens",
"registryTokensDesc": "Registry authentication tokens are managed per-registry in the",
"registriesLink": "Registries",
"registryTokensSuffix": "section. Each registry stores its token encrypted in the database."
"registryTokensSuffix": "section. Each registry stores its token encrypted in the database.",
"notSet": "Not set"
},
"settingsBackup": {
"title": "Backup Management",
@@ -395,6 +428,7 @@
"deleteFailed": "Failed to delete user",
"deleteConfirm": "Are you sure you want to delete this user?",
"usernameRequired": "Username and password are required",
"networkError": "Network error",
"password": "Password"
},
"login": {
@@ -486,7 +520,10 @@
"stopInstance": "Stop Instance",
"startInstance": "Start Instance",
"restartInstance": "Restart Instance",
"removeInstance": "Remove Instance"
"removeInstance": "Remove Instance",
"stopAction": "Stop",
"restartAction": "Restart",
"removeAction": "Remove"
},
"theme": {
"light": "Light",
+45 -8
View File
@@ -55,7 +55,10 @@
"selectImage": "Выберите образ",
"noImages": "Образы не найдены",
"loadingImages": "Загрузка образов...",
"imageLoadFailed": "Не удалось загрузить образы"
"imageLoadFailed": "Не удалось загрузить образы",
"alreadyAdded": "Уже добавлен",
"portHelpText": "Автоопределение из EXPOSE, если пусто",
"healthcheckHelpText": "Автоопределение из образа, если пусто"
},
"projectDetail": {
"deleteProject": "Удалить проект",
@@ -86,7 +89,29 @@
"deleteConfirmMessage": "Это безвозвратно удалит проект '{name}' и все его стадии, экземпляры и историю деплоев.",
"loadFailed": "Не удалось загрузить проект",
"deleteFailed": "Не удалось удалить проект",
"deployFailed": "Деплой не удался"
"deployFailed": "Деплой не удался",
"nameLabel": "Название *",
"imageLabel": "Образ *",
"portLabel": "Порт",
"healthcheckLabel": "Путь проверки",
"saving": "Сохранение...",
"addStage": "Добавить стадию",
"tagPattern": "Шаблон тега",
"tagPatternHelp": "Glob-шаблон (напр., dev-*, v*)",
"maxInstances": "Макс. экземпляров",
"autoDeployLabel": "Авто-деплой",
"npmProxy": "NPM прокси",
"creating": "Создание...",
"createStage": "Создать стадию",
"noProxy": "Без прокси",
"deleteStage": "Удалить стадию",
"deleteStageConfirm": "Удалить стадию \"{name}\"?",
"stageCreated": "Стадия \"{name}\" создана",
"stageDeleted": "Стадия \"{name}\" удалена",
"projectUpdated": "Проект обновлён",
"updateFailed": "Не удалось обновить проект",
"stageCreateFailed": "Не удалось создать стадию",
"stageDeleteFailed": "Не удалось удалить стадию"
},
"envEditor": {
"title": "Переменные окружения",
@@ -117,7 +142,8 @@
"addFailed": "Не удалось добавить переменную",
"updateFailed": "Не удалось обновить переменную",
"deleteFailed": "Не удалось удалить переменную",
"loadEnvFailed": "Не удалось загрузить переменные"
"loadEnvFailed": "Не удалось загрузить переменные",
"leaveEmptyToKeep": "Оставьте пустым, чтобы сохранить текущее"
},
"volumeEditor": {
"title": "Тома",
@@ -196,7 +222,8 @@
"selectImage": "Выберите образ из реестра",
"noImages": "Образы не найдены",
"loadingImages": "Загрузка...",
"imageLoadFailed": "Не удалось загрузить образы"
"imageLoadFailed": "Не удалось загрузить образы",
"lowercaseHint": "Строчные буквы и дефисы"
},
"settings": {
"title": "Настройки",
@@ -264,7 +291,9 @@
"testConnection": "Проверить соединение",
"testingConnection": "Проверка...",
"connectionSuccess": "Соединение успешно",
"connectionFailed": "Ошибка соединения"
"connectionFailed": "Ошибка соединения",
"baseVolumePath": "Базовый путь томов",
"baseVolumePathHelp": "Добавляется к относительным путям источников (напр., /data + my-app/uploads = /data/my-app/uploads)"
},
"settingsRegistries": {
"title": "Реестры контейнеров",
@@ -300,7 +329,10 @@
"deleteFailed": "Не удалось удалить реестр",
"testFailed": "Тест подключения не удался",
"loadFailed": "Не удалось загрузить реестры",
"deleteConfirm": "Удалить реестр «{name}»? Это действие необратимо."
"deleteConfirm": "Удалить реестр «{name}»? Это действие необратимо.",
"healthChecking": "Проверка...",
"healthConnected": "Подключено",
"healthUnreachable": "Недоступно"
},
"settingsCredentials": {
"title": "Учётные данные",
@@ -324,7 +356,8 @@
"registryTokens": "Токены реестров",
"registryTokensDesc": "Токены аутентификации реестров управляются для каждого реестра в разделе",
"registriesLink": "Реестры",
"registryTokensSuffix": ". Каждый реестр хранит свой токен в зашифрованном виде."
"registryTokensSuffix": ". Каждый реестр хранит свой токен в зашифрованном виде.",
"notSet": "Не задано"
},
"settingsBackup": {
"title": "Управление резервными копиями",
@@ -395,6 +428,7 @@
"deleteFailed": "Не удалось удалить пользователя",
"deleteConfirm": "Вы уверены, что хотите удалить этого пользователя?",
"usernameRequired": "Имя пользователя и пароль обязательны",
"networkError": "Ошибка сети",
"password": "Пароль"
},
"login": {
@@ -486,7 +520,10 @@
"stopInstance": "Остановить экземпляр",
"startInstance": "Запустить экземпляр",
"restartInstance": "Перезапустить экземпляр",
"removeInstance": "Удалить экземпляр"
"removeInstance": "Удалить экземпляр",
"stopAction": "Остановить",
"restartAction": "Перезапустить",
"removeAction": "Удалить"
},
"theme": {
"light": "Светлая",