PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (frontend): Translate the interface into Russian, Spanish, Portuguese, Chinese and French
Rostislav Dugin26090d6b6969
diff --git a/frontend/AGENTS.md b/frontend/AGENTS.mdindex 48bc2cd2..4cb84fad 100644--- a/frontend/AGENTS.md+++ b/frontend/AGENTS.md@@ -13,6 +13,7 @@ For project-wide engineering philosophy, see the root `AGENTS.md`.- [Clipboard operations](#clipboard-operations)- [Forms](#forms)- [User-facing copy](#user-facing-copy)+- [Interface languages (i18n)](#interface-languages-i18n)- [FSD (Feature-Sliced Design)](#fsd-feature-sliced-design)- [Refactoring](#refactoring)@@ -100,7 +101,42 @@ Always use `ClipboardHelper` (`shared/lib/ClipboardHelper.ts`) for clipboard ope## User-facing copy-Use a plain hyphen `-` in any string the user will see — labels, descriptions, notifications, modal bodies, error messages. Reserve em dashes (`—`) and en dashes (`–`) for markdown docs and code comments only.+In the English dictionary (`shared/i18n/locales/en.ts`), use a plain hyphen `-` in any string the user will see — labels, descriptions, notifications, modal bodies, error messages. Reserve em dashes (`—`) and en dashes (`–`) for markdown docs and code comments only.++The other dictionaries follow their language's own typography instead, as set out in [`website/AGENTS.md` - Translation quality](../website/AGENTS.md#translation-quality): Russian keeps «—» where its grammar wants it, French puts a space before `: ; ! ?` and `%`, Chinese uses full-width punctuation. The same section lists the canonical interface terms per language.++---++## Interface languages (i18n)++The interface ships in English, Russian, Spanish, Portuguese (Brazilian), Chinese (Simplified) and French, through `i18next` and `react-i18next`. Everything lives in `shared/i18n`.++### Dictionaries++- English (`locales/en.ts`) is the source of truth for the set of keys. Every other dictionary is typed `typeof en`, so a missing or leftover key fails `pnpm build`. A language cannot ship partly translated.+- Each dictionary is one object literal in one file. TypeScript's check for leftover keys only works on a literal written in place; a nested object passed in through a variable or a spread escapes it.+- Keys are grouped by domain (`backups`, `databases`, `storages`, `status`, `errors`, `common`, ...), not by file path, so moving a component does not rename its keys.+- `dictionaries.test.ts` checks that every translation uses the same `{{placeholders}}` and `Trans` tags as English.+- Translations are written in the target language, not rendered word for word. Follow [`website/AGENTS.md` - Translation quality](../website/AGENTS.md#translation-quality).++### Rules for code++- No user-facing string literal in `src`. The `i18next/no-literal-string` lint rule enforces it, SCREAMING_SNAKE constants and default parameter values included. Technical strings stay literal: commands, code blocks, connection strings, cron expressions, engine and tool names, file paths, `localStorage` keys. A technical string the rule reports takes `// eslint-disable-next-line i18next/no-literal-string -- <reason>`; in JSX, make it an expression on its own line (`{'pg_dump'}`) so the directive applies to it. A file that holds nothing but technical strings, such as a shell command builder, may disable the rule once at the top with the reason.+- Components read text with `const { t } = useTranslation()` from `react-i18next`.+- Code outside components holds keys, not text. A module-level constant, a label table or a parser that called `t()` would freeze the language that was active when it ran. Such code stores a `TranslationKey`, or a `LocalizedText` (`{ key, params }`) when the message has parameters, and the component translates it while rendering (`t(key)`, `translateLocalizedText(text, t)`). The same goes for state: keep an error or a key in state, not a translated string.+- Every enum shown to the user has a label table `<TYPE>_LABEL_KEYS: Record<Enum, TranslationKey>` next to the type it labels, exported through the slice's `index.ts`. Never build a key from a value (``t(`status.${value}`)``): adding an enum member must fail the build.+- Sentences stay whole. A sentence with inline markup is one key rendered through `<Trans i18nKey="..." components={{ code: <InlineCodeComponent />, bold: <strong />, docsLink: <a href={...} /> }} />` (`<TransByKey>` from `shared/i18n` when the key is held in a variable: `Trans` cannot type-check the whole key union), with named tags in the dictionary (`Run <code>pg_dump</code> first`). Values are interpolated into a whole sentence (`'Delete {{name}}?'`), never concatenated with translated fragments. When the inserted word would inflect in other languages, each value gets its own sentence key.+- A user-entered value (a workspace, database or user name) in a `Trans` sentence is a self-closing tag whose supplied element holds the value: dictionary `Delete <workspaceName/>?`, component `components={{ workspaceName: <strong>{name}</strong> }}`. Never pass it through `values`: `Trans` would expand placeholder syntax inside it.+- Inline code in prose, inside a `Trans` sentence or not, goes through `InlineCodeComponent` from `shared/ui`, not a bare `<code>`: a monospace font alone doesn't set code apart from the text around it.+- Counts are phrased so one string fits every number: `Members: {{count}}`, not `{{count}} members`. The dictionaries have no plural forms, because Russian's `_few` would be a stray key under `typeof en`.+- Translated text is never rendered as HTML. No `dangerouslySetInnerHTML`.+- Locale-dependent output comes from hooks, so a language switch re-renders it: `useTranslation` for text, `useLocale()` for `formatNumber` (instead of `toLocaleString()`) and `formatRelativeTime` (instead of dayjs `fromNow()`).+- API errors reach the user only through `translateApiError(error, t)`: a known error code gives its translation, otherwise the backend's message, otherwise a general message. Never show `error.message` directly.+- Links to databasus.com pages go through `getWebsitePageUrl(pageId, locale)` with a page from `WEBSITE_PAGES`, which opens the page in the selected language when the website publishes it.++### Clock format and date order++`shared/time/getUserTimeFormat.ts` and `shared/time/utils.ts` read `navigator.language` on purpose. The 12- or 24-hour clock and the day/month order are regional conventions, not properties of a language: English is written with both clocks. The browser reports the user's region, while the language selection only says which words to use. Those reads stay; a bare `toLocaleString()` does not, because digit grouping follows the selected language.---diff --git a/frontend/eslint.config.js b/frontend/eslint.config.jsindex 9d6e1479..f91322ae 100644--- a/frontend/eslint.config.js+++ b/frontend/eslint.config.js@@ -1,10 +1,180 @@import js from '@eslint/js';+import i18next from 'eslint-plugin-i18next';+import i18nextDefaults from 'eslint-plugin-i18next/lib/options/defaults.js';import react from 'eslint-plugin-react';import reactHooks from 'eslint-plugin-react-hooks';import reactRefresh from 'eslint-plugin-react-refresh';import globals from 'globals';import tseslint from 'typescript-eslint';+// eslint-plugin-i18next exempts every literal inside a SCREAMING_SNAKE variable and every default+// parameter value, and no option turns that off. Module-level label tables are exactly where copy+// hides, so both node types are routed through the handler the plugin uses for an ordinary+// lower-case variable, which checks its literals.+const pluginNoLiteralString = i18next.rules['no-literal-string'];+const i18nextPlugin = {+ ...i18next,+ rules: {+ ...i18next.rules,+ 'no-literal-string': {+ ...pluginNoLiteralString,+ create(context) {+ const visitor = pluginNoLiteralString.create(context);+ const checkLikeLowerCaseVariable = () =>+ visitor.VariableDeclarator({ id: { name: 'checked' } });++ return {+ ...visitor,+ VariableDeclarator: checkLikeLowerCaseVariable,+ AssignmentPattern: checkLikeLowerCaseVariable,+ };+ },+ },+ },+};++// Options for i18next/no-literal-string. `all` mode checks every string literal and template, not+// only JSX text, because copy also lives in attributes, option arrays, message.* calls and .ts+// files. Structural strings are excluded by recurring class; a one-off technical string takes an+// inline suppression with a reason instead of a new entry here.+const i18nextLiteralStringOptions = {+ mode: 'all',+ 'should-validate-template': true,+ 'jsx-components': {+ exclude: ['Trans'],+ },+ // Props that never carry copy. An exclude-list rather than an include-list: a copy prop missing+ // from an include-list would go unchecked unnoticed, while a non-copy prop missing here shows up+ // as a lint error someone fixes.+ 'jsx-attributes': {+ exclude: [+ ...i18nextDefaults['jsx-attributes'].exclude,+ '\\w*ClassName',+ 'data-[\\w-]+',+ 'accept',+ 'align',+ 'autoComplete',+ 'color',+ 'dataIndex',+ 'direction',+ 'format',+ 'href',+ 'htmlType',+ 'i18nKey',+ 'inputMode',+ 'justify',+ 'labelAlign',+ 'lang',+ 'layout',+ 'mode',+ 'name',+ 'optionFilterProp',+ 'path',+ 'picker',+ 'placement',+ 'rel',+ 'role',+ 'rowKey',+ 'shape',+ 'size',+ 'src',+ 'status',+ 'target',+ 'theme',+ 'trigger',+ 'value',+ 'variant',+ ],+ },+ words: {+ exclude: [+ // digits, punctuation and whitespace only, e.g. "0 2 * * *" or "********"+ '[\\s0-9!-/:-@[-`{-~]+',+ ...i18nextDefaults.words.exclude.filter((pattern) => pattern !== '[0-9!-/:-@[-`{-~]+'),+ // URLs and connection strings+ '(https?|wss?|s?ftp|s3|mongodb(\\+srv)?|postgres(ql)?|mysql|mariadb|jdbc:\\w+)://\\S*',+ // absolute and relative paths+ '\\.{0,2}/\\S*',+ // CSS values+ '#[0-9a-fA-F]{3,8}',+ '-?\\d+(\\.\\d+)?(px|rem|em|%|vh|vw|ms|s|fr)',+ // e-mail addresses used as examples+ '[\\w.+-]+@[\\w-]+(\\.[\\w-]+)+',+ // BCP 47 language tags such as en-US+ '[a-z]{2}-[A-Z]{2}',+ ],+ },+ callees: {+ exclude: [+ ...i18nextDefaults.callees.exclude,+ 'console\\.\\w+',+ 'addHeader',+ 'setMethod',+ 'setCredentials',+ 'document\\.\\w+',+ '(local|session)Storage\\.\\w+',+ 'URLSearchParams',+ 'searchParams\\.\\w+',+ // Map, Set and URLSearchParams lookups+ 'get(All)?',+ 'has',+ 'dayjs(\\.\\w+)?',+ 'format',+ 'split',+ 'join',+ 'replace(All)?',+ 'match(All)?',+ 'test',+ 'matchMedia',+ 'querySelector(All)?',+ '(set|get|remove)Attribute',+ 'classList\\.\\w+',+ // Error text never reaches the user: translateApiError shows only an ApiError's backend+ // message and a translated message otherwise.+ 'Error',+ 'TypeError',+ ],+ },+ 'object-properties': {+ exclude: [+ ...i18nextDefaults['object-properties'].exclude,+ 'align',+ 'anchor',+ 'path',+ // CSS properties set on DOM elements+ 'border\\w*',+ 'boxShadow',+ 'cursor',+ 'display',+ 'fontWeight',+ 'overflow\\w*',+ 'position',+ 'textAlign',+ 'transition',+ 'whiteSpace',+ 'cache',+ 'className',+ 'color',+ 'credentials',+ 'dataIndex',+ 'defaultSortOrder',+ 'fixed',+ 'format',+ 'headers',+ 'icon',+ 'key',+ 'method',+ 'mode',+ 'okType',+ 'placement',+ 'size',+ 'type',+ 'value',+ 'width',+ ],+ },+};+export default tseslint.config({ ignores: ['dist'] },{@@ -32,4 +202,18 @@ export default tseslint.config('react-hooks/exhaustive-deps': 'off',},},+ {+ files: ['src/**/*.{ts,tsx}'],+ ignores: ['**/*.test.{ts,tsx}', '**/api/**', 'src/shared/i18n/locales/**'],+ languageOptions: {+ // The contextual types from the TypeScript program let the rule skip a literal whose type is+ // a union of string literals, such as a TranslationKey or a prop typed 'small' | 'large'.+ parserOptions: {+ project: ['./tsconfig.app.json'],+ tsconfigRootDir: import.meta.dirname,+ },+ },+ plugins: { i18next: i18nextPlugin },+ rules: { 'i18next/no-literal-string': ['error', i18nextLiteralStringOptions] },+ },);diff --git a/frontend/package.json b/frontend/package.jsonindex f79c2199..9f44f930 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -19,8 +19,10 @@"antd": "^5.29.3","cron-parser": "^5.5.0","dayjs": "^1.11.20",+ "i18next": "^26.4.2","react": "^19.2.6","react-dom": "^19.2.6",+ "react-i18next": "^17.0.14","react-router": "^7.15.0","recharts": "^3.8.1","tailwindcss": "^4.3.0"@@ -33,6 +35,7 @@"@vitejs/plugin-react": "^4.7.0","@vitest/coverage-v8": "^3.2.4","eslint": "^9.39.4",+ "eslint-plugin-i18next": "^6.1.5","eslint-plugin-react": "^7.37.5","eslint-plugin-react-hooks": "^5.2.0","eslint-plugin-react-refresh": "^0.4.26",diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex 02bceee9..8f72f845 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -23,12 +23,18 @@ importers:dayjs:specifier: ^1.11.20version: 1.11.20+ i18next:+ specifier: ^26.4.2+ version: 26.4.2([email protected])react:specifier: ^19.2.6version: 19.2.6react-dom:specifier: ^19.2.6version: 19.2.6([email protected])+ react-i18next:+ specifier: ^17.0.14+ version: 17.0.14([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])react-router:specifier: ^7.15.0@@ -60,6 +66,9 @@ importers:eslint:specifier: ^9.39.4version: 9.39.4([email protected])+ eslint-plugin-i18next:+ specifier: ^6.1.5+ version: 6.1.5eslint-plugin-react:specifier: ^7.37.5version: 7.37.5([email protected]([email protected]))@@ -206,6 +215,10 @@ packages:resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==}engines: {node: '>=6.9.0'}@@ -1293,6 +1306,10 @@ packages:resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}engines: {node: '>=10'}+ resolution: {integrity: sha512-xCTfstbK9ZpQ6UFT5S1s6zbZMhKn2o2jRSQYiU2UkV7wt8y1m3WjkUYGkGlipgRdFInYI9+LAqE+JQU/L73HmA==}+ engines: {node: '>=18.10.0'}+resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==}engines: {node: '>=10'}@@ -1500,6 +1517,17 @@ packages:resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}+ resolution: {integrity: sha512-0zHsZJrK7S3K2aucXWL6ycoYJ/iNtIcFHC/nYQgFklPtrv5LpJctIiSCroWZWeuoXvuyFdzp6KzjJQ+OT5MfFw==}++ resolution: {integrity: sha512-RX+R0VLg13IbvRuJSxnqykUFS9vQZTl8wYpWPCIUDWVrSGjsQywB5Y+pjzrkboxGAuYfJZVH1InFTdgBdxq6ug==}+ peerDependencies:+ typescript: ^5 || ^6 || ^7+ peerDependenciesMeta:+ typescript:+ optional: true+resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}engines: {node: '>= 4'}@@ -2254,6 +2282,22 @@ packages:peerDependencies:react: ^19.2.6+ resolution: {integrity: sha512-ZpMBfJL3BiXPuYHj5QMY1GwvKJNhE1vCxOJQ8BoMBdHP5XONTfi/Qss1nuRlnFdIl72PKo2jPmw+fxuLjRFgaQ==}+ peerDependencies:+ i18next: '>= 26.2.0'+ react: '>= 16.8.0'+ react-dom: '*'+ react-native: '*'+ typescript: ^5 || ^6 || ^7+ peerDependenciesMeta:+ react-dom:+ optional: true+ react-native:+ optional: true+ typescript:+ optional: true+resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}@@ -2314,6 +2358,10 @@ packages:resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-LBnkqsDE7BZKvqylbmn7lTIVdpx4K/QCduRATpO5R+wtPmky/a8pN1bO2D6wXppn1497AJF9mNjqAXr6bdl9jg==}+ engines: {node: '>=0.10.5'}+resolution: {integrity: sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==}@@ -2844,6 +2892,8 @@ snapshots:'@babel/[email protected]': {}+ '@babel/[email protected]': {}+'@babel/[email protected]':dependencies:'@babel/code-frame': 7.29.0@@ -4014,6 +4064,10 @@ snapshots:+ dependencies:+ requireindex: 1.1.0+dependencies:eslint: 9.39.4([email protected])@@ -4251,6 +4305,12 @@ snapshots:+ [email protected]: {}++ optionalDependencies:+ typescript: 5.8.3+@@ -5017,6 +5077,17 @@ snapshots:react: 19.2.6scheduler: 0.27.0+ [email protected]([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected]):+ dependencies:+ '@babel/runtime': 7.29.7+ html-parse-stringify: 4.0.1+ i18next: 26.4.2([email protected])+ react: 19.2.6+ use-sync-external-store: 1.6.0([email protected])+ optionalDependencies:+ react-dom: 19.2.6([email protected])+ typescript: 5.8.3+@@ -5088,6 +5159,8 @@ snapshots:gopd: 1.2.0set-function-name: 2.0.2+ [email protected]: {}+diff --git a/frontend/src/App.tsx b/frontend/src/App.tsxindex 575e7b3c..cbd0a95a 100644--- a/frontend/src/App.tsx+++ b/frontend/src/App.tsx@@ -9,12 +9,14 @@ import { userApi } from './entity/users';import { AuthPageComponent } from './pages/AuthPageComponent';import { OAuthCallbackPage } from './pages/OAuthCallbackPage';import { OauthStorageComponent } from './pages/OauthStorageComponent';+import { LocaleProvider, useLocale } from './shared/i18n';import { ThemeProvider, useTheme } from './shared/theme';import { MainScreenComponent } from './widgets/main/MainScreenComponent';function AppContent() {const [isAuthorized, setIsAuthorized] = useState(false);const { resolvedTheme } = useTheme();+ const { antdLocale } = useLocale();useVersionCheck();@@ -29,6 +31,7 @@ function AppContent() {return (<ConfigProvider+ locale={antdLocale}theme={{algorithm: resolvedTheme === 'dark' ? theme.darkAlgorithm : theme.defaultAlgorithm,token: {@@ -55,7 +58,9 @@ function AppContent() {function App() {return (<ThemeProvider>- <AppContent />+ <LocaleProvider>+ <AppContent />+ </LocaleProvider></ThemeProvider>);}diff --git a/frontend/src/constants.ts b/frontend/src/constants.tsindex 729b9c79..8163454e 100644--- a/frontend/src/constants.ts+++ b/frontend/src/constants.ts@@ -25,6 +25,7 @@ export function getApplicationServer() {}}+// eslint-disable-next-line i18next/no-literal-string -- version identifier of a development buildexport const APP_VERSION = (import.meta.env.VITE_APP_VERSION as string) || 'dev';export const GITHUB_CLIENT_ID =@@ -42,8 +43,9 @@ export const CLOUDFLARE_TURNSTILE_SITE_KEY =import.meta.env.VITE_CLOUDFLARE_TURNSTILE_SITE_KEY ||'';+// eslint-disable-next-line i18next/no-literal-string -- CPU architecture identifiersconst archMap: Record<string, string> = { amd64: 'x64', arm64: 'arm64' };-const rawArch = window.__RUNTIME_CONFIG__?.CONTAINER_ARCH || 'unknown';+const rawArch = window.__RUNTIME_CONFIG__?.CONTAINER_ARCH ?? '';export const CONTAINER_ARCH = archMap[rawArch] || rawArch;export function getOAuthRedirectUri(): string {diff --git a/frontend/src/entity/backups/logical/index.ts b/frontend/src/entity/backups/logical/index.tsindex e66655d3..2c4055bd 100644--- a/frontend/src/entity/backups/logical/index.ts+++ b/frontend/src/entity/backups/logical/index.ts@@ -8,3 +8,7 @@ export { LogicalBackupNotificationType } from './model/LogicalBackupNotificationexport { RestoreVerificationStatus } from './model/RestoreVerificationStatus';export { LogicalRetentionPolicyType } from './model/LogicalRetentionPolicyType';export type { GetLogicalBackupsResponse } from './model/GetLogicalBackupsResponse';+export { LOGICAL_BACKUP_STATUS_LABEL_KEYS } from './model/LogicalBackupStatusLabelKeys';+export { RESTORE_VERIFICATION_STATUS_LABEL_KEYS } from './model/RestoreVerificationStatusLabelKeys';+export { LOGICAL_RETENTION_POLICY_TYPE_LABEL_KEYS } from './model/LogicalRetentionPolicyTypeLabelKeys';+export { LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS } from './model/LogicalBackupNotificationTypeLabelKeys';diff --git a/frontend/src/entity/backups/logical/model/LogicalBackupNotificationTypeLabelKeys.ts b/frontend/src/entity/backups/logical/model/LogicalBackupNotificationTypeLabelKeys.tsnew file mode 100644index 00000000..075927bf--- /dev/null+++ b/frontend/src/entity/backups/logical/model/LogicalBackupNotificationTypeLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { LogicalBackupNotificationType } from './LogicalBackupNotificationType';++export const LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS: Record<+ LogicalBackupNotificationType,+ TranslationKey+> = {+ [LogicalBackupNotificationType.BackupSuccess]: 'backups.logical.notificationTypes.backupSuccess',+ [LogicalBackupNotificationType.BackupFailed]: 'backups.logical.notificationTypes.backupFailed',+};diff --git a/frontend/src/entity/backups/logical/model/LogicalBackupStatusLabelKeys.ts b/frontend/src/entity/backups/logical/model/LogicalBackupStatusLabelKeys.tsnew file mode 100644index 00000000..7e1ace0a--- /dev/null+++ b/frontend/src/entity/backups/logical/model/LogicalBackupStatusLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { LogicalBackupStatus } from './LogicalBackupStatus';++export const LOGICAL_BACKUP_STATUS_LABEL_KEYS: Record<LogicalBackupStatus, TranslationKey> = {+ [LogicalBackupStatus.IN_PROGRESS]: 'status.logicalBackup.inProgress',+ [LogicalBackupStatus.COMPLETED]: 'status.logicalBackup.completed',+ [LogicalBackupStatus.FAILED]: 'status.logicalBackup.failed',+ [LogicalBackupStatus.DELETED]: 'status.logicalBackup.deleted',+ [LogicalBackupStatus.CANCELED]: 'status.logicalBackup.canceled',+};diff --git a/frontend/src/entity/backups/logical/model/LogicalRetentionPolicyTypeLabelKeys.ts b/frontend/src/entity/backups/logical/model/LogicalRetentionPolicyTypeLabelKeys.tsnew file mode 100644index 00000000..681872ec--- /dev/null+++ b/frontend/src/entity/backups/logical/model/LogicalRetentionPolicyTypeLabelKeys.ts@@ -0,0 +1,11 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { LogicalRetentionPolicyType } from './LogicalRetentionPolicyType';++export const LOGICAL_RETENTION_POLICY_TYPE_LABEL_KEYS: Record<+ LogicalRetentionPolicyType,+ TranslationKey+> = {+ [LogicalRetentionPolicyType.GFS]: 'backups.logical.retentionPolicyTypes.gfs',+ [LogicalRetentionPolicyType.TimePeriod]: 'backups.logical.retentionPolicyTypes.timePeriod',+ [LogicalRetentionPolicyType.Count]: 'backups.logical.retentionPolicyTypes.count',+};diff --git a/frontend/src/entity/backups/logical/model/RestoreVerificationStatusLabelKeys.ts b/frontend/src/entity/backups/logical/model/RestoreVerificationStatusLabelKeys.tsnew file mode 100644index 00000000..3f18f0c7--- /dev/null+++ b/frontend/src/entity/backups/logical/model/RestoreVerificationStatusLabelKeys.ts@@ -0,0 +1,13 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { RestoreVerificationStatus } from './RestoreVerificationStatus';++// NOT_VERIFIED has no label: a backup that was never restore-verified shows no tag at all.+// It is an explicit null rather than a missing entry, so adding a status still fails the build.+export const RESTORE_VERIFICATION_STATUS_LABEL_KEYS: Record<+ RestoreVerificationStatus,+ TranslationKey | null+> = {+ [RestoreVerificationStatus.NOT_VERIFIED]: null,+ [RestoreVerificationStatus.VERIFIED_SUCCESSFUL]: 'status.restoreVerification.verifiedSuccessful',+ [RestoreVerificationStatus.VERIFICATION_FAILED]: 'status.restoreVerification.verificationFailed',+};diff --git a/frontend/src/entity/backups/physical/index.ts b/frontend/src/entity/backups/physical/index.tsindex 054c89fb..79f3968a 100644--- a/frontend/src/entity/backups/physical/index.ts+++ b/frontend/src/entity/backups/physical/index.ts@@ -13,3 +13,8 @@ export type { ChainsRetention } from './model/ChainsRetention';export type { FullBackupsRetention } from './model/FullBackupsRetention';export type { PhysicalBackupConfig } from './model/PhysicalBackupConfig';export type { PhysicalRestoreTokenResponse } from './model/PhysicalRestoreTokenResponse';+export { PHYSICAL_BACKUP_STATUS_LABEL_KEYS } from './model/PhysicalBackupStatusLabelKeys';+export { PHYSICAL_RETENTION_LABEL_KEYS } from './model/PhysicalRetentionLabelKeys';+export { PHYSICAL_BACKUP_TYPE_LABEL_KEYS } from './model/PhysicalBackupTypeLabelKeys';+export { PHYSICAL_FULL_BACKUPS_POLICY_LABEL_KEYS } from './model/PhysicalFullBackupsPolicyLabelKeys';+export { PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS } from './model/PhysicalBackupNotificationTypeLabelKeys';diff --git a/frontend/src/entity/backups/physical/model/PhysicalBackupNotificationTypeLabelKeys.ts b/frontend/src/entity/backups/physical/model/PhysicalBackupNotificationTypeLabelKeys.tsnew file mode 100644index 00000000..a498579c--- /dev/null+++ b/frontend/src/entity/backups/physical/model/PhysicalBackupNotificationTypeLabelKeys.ts@@ -0,0 +1,13 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PhysicalBackupNotificationType } from './PhysicalBackupNotificationType';++export const PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS: Record<+ PhysicalBackupNotificationType,+ TranslationKey+> = {+ [PhysicalBackupNotificationType.BACKUP_SUCCESS]:+ 'backups.physical.notificationTypes.backupSuccess',+ [PhysicalBackupNotificationType.BACKUP_FAILED]: 'backups.physical.notificationTypes.backupFailed',+ [PhysicalBackupNotificationType.CHAIN_BROKEN]: 'backups.physical.notificationTypes.chainBroken',+ [PhysicalBackupNotificationType.WAL_GAP]: 'backups.physical.notificationTypes.walGap',+};diff --git a/frontend/src/entity/backups/physical/model/PhysicalBackupStatusLabelKeys.ts b/frontend/src/entity/backups/physical/model/PhysicalBackupStatusLabelKeys.tsnew file mode 100644index 00000000..70481bcf--- /dev/null+++ b/frontend/src/entity/backups/physical/model/PhysicalBackupStatusLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PhysicalBackupStatus } from './PhysicalBackupStatus';++export const PHYSICAL_BACKUP_STATUS_LABEL_KEYS: Record<PhysicalBackupStatus, TranslationKey> = {+ [PhysicalBackupStatus.COMPLETED]: 'status.physicalBackup.completed',+ [PhysicalBackupStatus.IN_PROGRESS]: 'status.physicalBackup.inProgress',+ [PhysicalBackupStatus.ERROR]: 'status.physicalBackup.error',+ [PhysicalBackupStatus.CHAIN_BROKEN]: 'status.physicalBackup.chainBroken',+ [PhysicalBackupStatus.CANCELED]: 'status.physicalBackup.canceled',+};diff --git a/frontend/src/entity/backups/physical/model/PhysicalBackupTypeLabelKeys.ts b/frontend/src/entity/backups/physical/model/PhysicalBackupTypeLabelKeys.tsnew file mode 100644index 00000000..8ddf5564--- /dev/null+++ b/frontend/src/entity/backups/physical/model/PhysicalBackupTypeLabelKeys.ts@@ -0,0 +1,8 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PhysicalBackupType } from './PhysicalBackupType';++export const PHYSICAL_BACKUP_TYPE_LABEL_KEYS: Record<PhysicalBackupType, TranslationKey> = {+ [PhysicalBackupType.FULL]: 'backups.physical.types.full',+ [PhysicalBackupType.INCREMENTAL]: 'backups.physical.types.incremental',+ [PhysicalBackupType.WAL]: 'backups.physical.types.wal',+};diff --git a/frontend/src/entity/backups/physical/model/PhysicalFullBackupsPolicyLabelKeys.ts b/frontend/src/entity/backups/physical/model/PhysicalFullBackupsPolicyLabelKeys.tsnew file mode 100644index 00000000..08ab992a--- /dev/null+++ b/frontend/src/entity/backups/physical/model/PhysicalFullBackupsPolicyLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PhysicalFullBackupsPolicy } from './PhysicalFullBackupsPolicy';++export const PHYSICAL_FULL_BACKUPS_POLICY_LABEL_KEYS: Record<+ PhysicalFullBackupsPolicy,+ TranslationKey+> = {+ [PhysicalFullBackupsPolicy.LAST_N]: 'backups.physical.fullBackupsPolicies.lastN',+ [PhysicalFullBackupsPolicy.GFS]: 'backups.physical.fullBackupsPolicies.gfs',+};diff --git a/frontend/src/entity/backups/physical/model/PhysicalRetentionLabelKeys.ts b/frontend/src/entity/backups/physical/model/PhysicalRetentionLabelKeys.tsnew file mode 100644index 00000000..799059b8--- /dev/null+++ b/frontend/src/entity/backups/physical/model/PhysicalRetentionLabelKeys.ts@@ -0,0 +1,8 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PhysicalRetention } from './PhysicalRetention';++export const PHYSICAL_RETENTION_LABEL_KEYS: Record<PhysicalRetention, TranslationKey> = {+ [PhysicalRetention.CHAINS]: 'backups.physical.retentions.chains',+ [PhysicalRetention.FULL_BACKUPS]: 'backups.physical.retentions.fullBackups',+ [PhysicalRetention.CHAINS_AND_FULL_BACKUPS]: 'backups.physical.retentions.chainsAndFullBackups',+};diff --git a/frontend/src/entity/backups/shared/index.ts b/frontend/src/entity/backups/shared/index.tsindex 30667eff..dc163900 100644--- a/frontend/src/entity/backups/shared/index.ts+++ b/frontend/src/entity/backups/shared/index.ts@@ -1,2 +1,4 @@export { BackupEncryption } from './model/BackupEncryption';export type { TransferDatabaseRequest } from './model/TransferDatabaseRequest';+export { BACKUP_ENCRYPTION_LABEL_KEYS } from './model/BackupEncryptionLabelKeys';+export { BACKUP_ENCRYPTION_OPTION_LABEL_KEYS } from './model/BackupEncryptionOptionLabelKeys';diff --git a/frontend/src/entity/backups/shared/model/BackupEncryptionLabelKeys.ts b/frontend/src/entity/backups/shared/model/BackupEncryptionLabelKeys.tsnew file mode 100644index 00000000..67541396--- /dev/null+++ b/frontend/src/entity/backups/shared/model/BackupEncryptionLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { BackupEncryption } from './BackupEncryption';++export const BACKUP_ENCRYPTION_LABEL_KEYS: Record<BackupEncryption, TranslationKey> = {+ [BackupEncryption.NONE]: 'backups.encryption.none',+ [BackupEncryption.ENCRYPTED]: 'backups.encryption.encrypted',+};diff --git a/frontend/src/entity/backups/shared/model/BackupEncryptionOptionLabelKeys.ts b/frontend/src/entity/backups/shared/model/BackupEncryptionOptionLabelKeys.tsnew file mode 100644index 00000000..23eee22e--- /dev/null+++ b/frontend/src/entity/backups/shared/model/BackupEncryptionOptionLabelKeys.ts@@ -0,0 +1,9 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { BackupEncryption } from './BackupEncryption';++// The choice as offered in a config form ("Encrypt backup files"). BACKUP_ENCRYPTION_LABEL_KEYS holds+// the resulting state shown on a read-only config ("Enabled"); several languages word the two apart.+export const BACKUP_ENCRYPTION_OPTION_LABEL_KEYS: Record<BackupEncryption, TranslationKey> = {+ [BackupEncryption.NONE]: 'backups.encryptionOptions.none',+ [BackupEncryption.ENCRYPTED]: 'backups.encryptionOptions.encrypted',+};diff --git a/frontend/src/entity/databases/index.ts b/frontend/src/entity/databases/index.tsindex 4fdef8bf..37e422a1 100644--- a/frontend/src/entity/databases/index.ts+++ b/frontend/src/entity/databases/index.ts@@ -2,26 +2,26 @@ export { databaseApi } from './api/databaseApi';export { type Database } from './model/Database';export { DatabaseType } from './model/DatabaseType';export { getDatabaseLogoFromType } from './model/getDatabaseLogoFromType';-export { getDatabaseTypeLabel } from './model/getDatabaseTypeLabel';export { isPostgresType } from './model/isPostgresType';export { initializeDatabaseTypeData } from './model/initializeDatabaseTypeData';export { Period } from './model/Period';export { PostgresSslMode } from './model/postgresql/PostgresSslMode';+export { POSTGRES_SSL_MODE_LABEL_KEYS } from './model/postgresql/PostgresSslModeLabelKeys';export { quotePostgresqlIdentifier } from './model/postgresql/quotePostgresqlIdentifier';+export { POSTGRESQL_SHORT_NAME } from './model/postgresql/postgresqlShortName';export { type PostgresqlLogicalDatabase } from './model/postgresql/PostgresqlLogicalDatabase';export { type PostgresqlPhysicalDatabase } from './model/postgresql/physical/PostgresqlPhysicalDatabase';export { PhysicalDatabaseBackupType } from './model/postgresql/physical/PhysicalDatabaseBackupType';+export { PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS } from './model/postgresql/physical/PhysicalDatabaseBackupTypeLabelKeys';export { ConnectionErrorCode } from './model/postgresql/physical/ConnectionErrorCode';export {type PhysicalConnectionErrorContent,type PhysicalConnectionErrorStep,- type PhysicalConnectionErrorTextRun,physicalConnectionErrorContent,} from './model/postgresql/physical/physicalConnectionErrorContent';export { PostgresqlVersion } from './model/postgresql/PostgresqlVersion';export { type SshTunnelConfig } from './model/sshtunnel/SshTunnelConfig';export { SshTunnelAuthType } from './model/sshtunnel/SshTunnelAuthType';-export { SSH_TUNNEL_AUTH_TYPE_LABELS } from './model/sshtunnel/sshTunnelAuthTypeLabels';export {DEFAULT_SSH_PORT,createEmptySshTunnelConfig,@@ -39,3 +39,7 @@ export { disableSrvWhenTunneled } from './model/mongodb/disableSrvWhenTunneled';export { type ShouldSuggestReadOnlyUserResponse } from './model/ShouldSuggestReadOnlyUserResponse';export { type CreateReadOnlyUserResponse } from './model/CreateReadOnlyUserResponse';export { type CreateReplicationOnlyUserResponse } from './model/CreateReplicationOnlyUserResponse';+export { HEALTH_STATUS_LABEL_KEYS } from './model/HealthStatusLabelKeys';+export { DATABASE_TYPE_LABEL_KEYS } from './model/DatabaseTypeLabelKeys';+export { PERIOD_LABEL_KEYS } from './model/PeriodLabelKeys';+export { SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS } from './model/sshtunnel/SshTunnelAuthTypeLabelKeys';diff --git a/frontend/src/entity/databases/model/DatabaseTypeLabelKeys.ts b/frontend/src/entity/databases/model/DatabaseTypeLabelKeys.tsnew file mode 100644index 00000000..cdb3c341--- /dev/null+++ b/frontend/src/entity/databases/model/DatabaseTypeLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../shared/i18n';+import { DatabaseType } from './DatabaseType';++export const DATABASE_TYPE_LABEL_KEYS: Record<DatabaseType, TranslationKey> = {+ [DatabaseType.POSTGRES_LOGICAL]: 'databases.types.postgresql',+ [DatabaseType.POSTGRES_PHYSICAL]: 'databases.types.postgresql',+ [DatabaseType.MYSQL]: 'databases.types.mysql',+ [DatabaseType.MARIADB]: 'databases.types.mariadb',+ [DatabaseType.MONGODB]: 'databases.types.mongodb',+};diff --git a/frontend/src/entity/databases/model/HealthStatusLabelKeys.ts b/frontend/src/entity/databases/model/HealthStatusLabelKeys.tsnew file mode 100644index 00000000..24a51f7b--- /dev/null+++ b/frontend/src/entity/databases/model/HealthStatusLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../shared/i18n';+import { HealthStatus } from './HealthStatus';++export const HEALTH_STATUS_LABEL_KEYS: Record<HealthStatus, TranslationKey> = {+ [HealthStatus.AVAILABLE]: 'status.health.available',+ [HealthStatus.UNAVAILABLE]: 'status.health.unavailable',+};diff --git a/frontend/src/entity/databases/model/PeriodLabelKeys.ts b/frontend/src/entity/databases/model/PeriodLabelKeys.tsnew file mode 100644index 00000000..185a333e--- /dev/null+++ b/frontend/src/entity/databases/model/PeriodLabelKeys.ts@@ -0,0 +1,16 @@+import type { TranslationKey } from '../../../shared/i18n';+import { Period } from './Period';++export const PERIOD_LABEL_KEYS: Record<Period, TranslationKey> = {+ [Period.DAY]: 'intervals.periods.day',+ [Period.WEEK]: 'intervals.periods.week',+ [Period.MONTH]: 'intervals.periods.month',+ [Period.THREE_MONTH]: 'intervals.periods.threeMonths',+ [Period.SIX_MONTH]: 'intervals.periods.sixMonths',+ [Period.YEAR]: 'intervals.periods.year',+ [Period.TWO_YEARS]: 'intervals.periods.twoYears',+ [Period.THREE_YEARS]: 'intervals.periods.threeYears',+ [Period.FOUR_YEARS]: 'intervals.periods.fourYears',+ [Period.FIVE_YEARS]: 'intervals.periods.fiveYears',+ [Period.FOREVER]: 'intervals.periods.forever',+};diff --git a/frontend/src/entity/databases/model/getDatabaseTypeLabel.ts b/frontend/src/entity/databases/model/getDatabaseTypeLabel.tsdeleted file mode 100644index 138b9105..00000000--- a/frontend/src/entity/databases/model/getDatabaseTypeLabel.ts+++ /dev/null@@ -1,17 +0,0 @@-import { DatabaseType } from './DatabaseType';--export const getDatabaseTypeLabel = (type: DatabaseType): string => {- switch (type) {- case DatabaseType.POSTGRES_LOGICAL:- case DatabaseType.POSTGRES_PHYSICAL:- return 'PostgreSQL';- case DatabaseType.MYSQL:- return 'MySQL';- case DatabaseType.MARIADB:- return 'MariaDB';- case DatabaseType.MONGODB:- return 'MongoDB';- default:- return 'database';- }-};diff --git a/frontend/src/entity/databases/model/mariadb/MariadbConnectionStringParser.ts b/frontend/src/entity/databases/model/mariadb/MariadbConnectionStringParser.tsindex 182ae398..555ee72e 100644--- a/frontend/src/entity/databases/model/mariadb/MariadbConnectionStringParser.ts+++ b/frontend/src/entity/databases/model/mariadb/MariadbConnectionStringParser.ts@@ -1,3 +1,5 @@+import type { LocalizedText } from '../../../../shared/i18n';+export type ParseResult = {host: string;port: number;@@ -8,7 +10,7 @@ export type ParseResult = {};export type ParseError = {- error: string;+ error: LocalizedText;format?: string;};@@ -29,7 +31,7 @@ export class MariadbConnectionStringParser {const trimmed = connectionString.trim();if (!trimmed) {- return { error: 'Connection string is empty' };+ return { error: { key: 'databases.connectionString.errors.empty' } };}// Try JDBC format first (starts with jdbc:)@@ -48,7 +50,7 @@ export class MariadbConnectionStringParser {}return {- error: 'Unrecognized connection string format',+ error: { key: 'databases.connectionString.errors.unrecognizedFormat' },};}@@ -92,19 +94,19 @@ export class MariadbConnectionStringParser {const isHttps = this.checkSslMode(url.search);if (!host) {- return { error: 'Host is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.hostMissing' } };}if (!username) {- return { error: 'Username is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.usernameMissing' } };}if (!password) {- return { error: 'Password is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.passwordMissing' } };}if (!database) {- return { error: 'Database name is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.databaseMissing' } };}return {@@ -115,9 +117,9 @@ export class MariadbConnectionStringParser {database,isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.parseFailed' },format: 'URI',};}@@ -130,8 +132,10 @@ export class MariadbConnectionStringParser {if (!match) {return {- error:- 'Invalid JDBC connection string format. Expected: jdbc:mariadb://host:port/database?user=x&password=y',+ error: {+ key: 'databases.connectionString.errors.jdbc.invalidFormat',+ params: { expectedFormat: 'jdbc:mariadb://host:port/database?user=x&password=y' },+ },format: 'JDBC',};}@@ -140,7 +144,7 @@ export class MariadbConnectionStringParser {if (!queryString) {return {- error: 'JDBC connection string is missing query parameters (user and password)',+ error: { key: 'databases.connectionString.errors.jdbc.queryParametersMissing' },format: 'JDBC',};}@@ -152,14 +156,14 @@ export class MariadbConnectionStringParser {if (!username) {return {- error: 'Username (user parameter) is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.usernameMissing' },format: 'JDBC',};}if (!password) {return {- error: 'Password parameter is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.passwordMissing' },format: 'JDBC',};}@@ -172,9 +176,9 @@ export class MariadbConnectionStringParser {database: decodeURIComponent(database),isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse JDBC connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.jdbc.parseFailed' },format: 'JDBC',};}@@ -202,28 +206,28 @@ export class MariadbConnectionStringParser {if (!host) {return {- error: 'Host is missing from connection string. Use host=hostname',+ error: { key: 'databases.connectionString.errors.keyValue.hostMissing' },format: 'key-value',};}if (!username) {return {- error: 'Username is missing from connection string. Use user=username',+ error: { key: 'databases.connectionString.errors.keyValue.usernameMissing' },format: 'key-value',};}if (!password) {return {- error: 'Password is missing from connection string. Use password=yourpassword',+ error: { key: 'databases.connectionString.errors.keyValue.passwordMissing' },format: 'key-value',};}if (!database) {return {- error: 'Database name is missing from connection string. Use database=database',+ error: { key: 'databases.connectionString.errors.keyValue.databaseMissing' },format: 'key-value',};}@@ -238,9 +242,9 @@ export class MariadbConnectionStringParser {database,isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse key-value connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.keyValue.parseFailed' },format: 'key-value',};}@@ -272,6 +276,7 @@ export class MariadbConnectionStringParser {if (!sslValue) return false;const lowercased = sslValue.toLowerCase();+ // eslint-disable-next-line i18next/no-literal-string -- connection string parameter valuesconst enabledValues = ['true', 'required', 'verify_ca', 'verify_identity', 'yes', '1'];return enabledValues.includes(lowercased);}diff --git a/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.test.ts b/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.test.tsindex 1e78e4fb..289fc07c 100644--- a/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.test.ts+++ b/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.test.ts@@ -305,7 +305,7 @@ describe('MongodbConnectionStringParser', () => {MongodbConnectionStringParser.parse('port=27017 database=mydb user=admin password=secret'),);- expect(result.error).toContain('Host');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.hostMissing');expect(result.format).toBe('key-value');});@@ -314,7 +314,7 @@ describe('MongodbConnectionStringParser', () => {MongodbConnectionStringParser.parse('host=localhost database=mydb password=secret'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.usernameMissing');expect(result.format).toBe('key-value');});@@ -334,19 +334,19 @@ describe('MongodbConnectionStringParser', () => {it('should return error for empty string', () => {const result = expectError(MongodbConnectionStringParser.parse(''));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for whitespace-only string', () => {const result = expectError(MongodbConnectionStringParser.parse(' '));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for unrecognized format', () => {const result = expectError(MongodbConnectionStringParser.parse('some random text'));- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});it('should return error for missing username in URI', () => {@@ -354,7 +354,7 @@ describe('MongodbConnectionStringParser', () => {MongodbConnectionStringParser.parse('mongodb://:password@host:27017/db'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.usernameMissing');});it('should allow missing password in URI (returns empty password)', () => {@@ -373,7 +373,7 @@ describe('MongodbConnectionStringParser', () => {MongodbConnectionStringParser.parse('mysql://user:pass@host:3306/db'),);- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});it('should return error for postgresql:// format (wrong database type)', () => {@@ -381,7 +381,7 @@ describe('MongodbConnectionStringParser', () => {MongodbConnectionStringParser.parse('postgresql://user:pass@host:5432/db'),);- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});});diff --git a/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.ts b/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.tsindex ff19e7cf..a9a83d87 100644--- a/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.ts+++ b/frontend/src/entity/databases/model/mongodb/MongodbConnectionStringParser.ts@@ -1,3 +1,5 @@+import type { LocalizedText } from '../../../../shared/i18n';+export type ParseResult = {host: string;port: number;@@ -11,10 +13,13 @@ export type ParseResult = {};export type ParseError = {- error: string;+ error: LocalizedText;format?: string;};+// eslint-disable-next-line i18next/no-literal-string -- MongoDB's built-in authentication database+const DEFAULT_AUTH_DATABASE = 'admin';+export class MongodbConnectionStringParser {/*** Parses a MongoDB connection string in various formats.@@ -29,7 +34,7 @@ export class MongodbConnectionStringParser {const trimmed = connectionString.trim();if (!trimmed) {- return { error: 'Connection string is empty' };+ return { error: { key: 'databases.connectionString.errors.empty' } };}// Try key-value format (contains key=value pairs without ://)@@ -43,7 +48,7 @@ export class MongodbConnectionStringParser {}return {- error: 'Unrecognized connection string format',+ error: { key: 'databases.connectionString.errors.unrecognizedFormat' },};}@@ -68,16 +73,16 @@ export class MongodbConnectionStringParser {const rawPassword = decodeURIComponent(url.password);const password = this.isPasswordPlaceholder(rawPassword) ? '' : rawPassword;const database = decodeURIComponent(url.pathname.slice(1));- const authDatabase = this.getAuthSource(url.search) || 'admin';+ const authDatabase = this.getAuthSource(url.search) || DEFAULT_AUTH_DATABASE;const useTls = isSrv ? true : this.checkTlsMode(url.search);const isDirectConnection = this.checkDirectConnection(url.search);if (!host) {- return { error: 'Host is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.hostMissing' } };}if (!username) {- return { error: 'Username is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.usernameMissing' } };}return {@@ -91,9 +96,9 @@ export class MongodbConnectionStringParser {isSrv,isDirectConnection,};- } catch (e) {+ } catch {return {- error: `Failed to parse connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.parseFailed' },format: 'URI',};}@@ -118,19 +123,19 @@ export class MongodbConnectionStringParser {const username = params['user'] || params['username'];const rawPassword = params['password'];const password = this.isPasswordPlaceholder(rawPassword) ? '' : rawPassword || '';- const authDatabase = params['authSource'] || params['authDatabase'] || 'admin';+ const authDatabase = params['authSource'] || params['authDatabase'] || DEFAULT_AUTH_DATABASE;const tls = params['tls'] || params['ssl'];if (!host) {return {- error: 'Host is missing from connection string. Use host=hostname',+ error: { key: 'databases.connectionString.errors.keyValue.hostMissing' },format: 'key-value',};}if (!username) {return {- error: 'Username is missing from connection string. Use user=username',+ error: { key: 'databases.connectionString.errors.keyValue.usernameMissing' },format: 'key-value',};}@@ -149,9 +154,9 @@ export class MongodbConnectionStringParser {isSrv: false,isDirectConnection,};- } catch (e) {+ } catch {return {- error: `Failed to parse key-value connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.keyValue.parseFailed' },format: 'key-value',};}@@ -197,6 +202,7 @@ export class MongodbConnectionStringParser {if (!tlsValue) return false;const lowercased = tlsValue.toLowerCase();+ // eslint-disable-next-line i18next/no-literal-string -- connection string parameter valuesconst enabledValues = ['true', 'yes', '1'];return enabledValues.includes(lowercased);}diff --git a/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.test.ts b/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.test.tsindex 354b273a..5f1a04cc 100644--- a/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.test.ts+++ b/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.test.ts@@ -183,7 +183,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('jdbc:mysql://host:3306/db?password=secret'),);- expect(result.error).toContain('user');+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.usernameMissing');expect(result.format).toBe('JDBC');});@@ -192,7 +192,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('jdbc:mysql://host:3306/db?user=admin'),);- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.passwordMissing');expect(result.format).toBe('JDBC');});});@@ -351,7 +351,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('port=3306 database=mydb user=admin password=secret'),);- expect(result.error).toContain('Host');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.hostMissing');expect(result.format).toBe('key-value');});@@ -360,7 +360,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('host=localhost database=mydb password=secret'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.usernameMissing');expect(result.format).toBe('key-value');});@@ -369,7 +369,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('host=localhost database=mydb user=admin'),);- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.passwordMissing');expect(result.format).toBe('key-value');});@@ -378,7 +378,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('host=localhost user=admin password=secret'),);- expect(result.error).toContain('Database');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.databaseMissing');expect(result.format).toBe('key-value');});});@@ -387,19 +387,19 @@ describe('MySqlConnectionStringParser', () => {it('should return error for empty string', () => {const result = expectError(MySqlConnectionStringParser.parse(''));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for whitespace-only string', () => {const result = expectError(MySqlConnectionStringParser.parse(' '));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for unrecognized format', () => {const result = expectError(MySqlConnectionStringParser.parse('some random text'));- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});it('should return error for missing username in URI', () => {@@ -407,24 +407,25 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('mysql://:password@host:3306/db'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.usernameMissing');});it('should return error for missing password in URI', () => {const result = expectError(MySqlConnectionStringParser.parse('mysql://user@host:3306/db'));- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.passwordMissing');});it('should return error for missing database in URI', () => {const result = expectError(MySqlConnectionStringParser.parse('mysql://user:pass@host:3306/'));- expect(result.error).toContain('Database');+ expect(result.error.key).toBe('databases.connectionString.errors.databaseMissing');});it('should return error for invalid JDBC format', () => {const result = expectError(MySqlConnectionStringParser.parse('jdbc:mysql://invalid'));+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.invalidFormat');expect(result.format).toBe('JDBC');});@@ -433,7 +434,7 @@ describe('MySqlConnectionStringParser', () => {MySqlConnectionStringParser.parse('postgresql://user:pass@host:5432/db'),);- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});});diff --git a/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.ts b/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.tsindex c244b197..657994c7 100644--- a/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.ts+++ b/frontend/src/entity/databases/model/mysql/MySqlConnectionStringParser.ts@@ -1,3 +1,5 @@+import type { LocalizedText } from '../../../../shared/i18n';+export type ParseResult = {host: string;port: number;@@ -8,7 +10,7 @@ export type ParseResult = {};export type ParseError = {- error: string;+ error: LocalizedText;format?: string;};@@ -31,7 +33,7 @@ export class MySqlConnectionStringParser {const trimmed = connectionString.trim();if (!trimmed) {- return { error: 'Connection string is empty' };+ return { error: { key: 'databases.connectionString.errors.empty' } };}// Try JDBC format first (starts with jdbc:)@@ -50,7 +52,7 @@ export class MySqlConnectionStringParser {}return {- error: 'Unrecognized connection string format',+ error: { key: 'databases.connectionString.errors.unrecognizedFormat' },};}@@ -98,19 +100,19 @@ export class MySqlConnectionStringParser {// Validate required fieldsif (!host) {- return { error: 'Host is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.hostMissing' } };}if (!username) {- return { error: 'Username is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.usernameMissing' } };}if (!password) {- return { error: 'Password is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.passwordMissing' } };}if (!database) {- return { error: 'Database name is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.databaseMissing' } };}return {@@ -121,9 +123,9 @@ export class MySqlConnectionStringParser {database,isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.parseFailed' },format: 'URI',};}@@ -137,8 +139,10 @@ export class MySqlConnectionStringParser {if (!match) {return {- error:- 'Invalid JDBC connection string format. Expected: jdbc:mysql://host:port/database?user=x&password=y',+ error: {+ key: 'databases.connectionString.errors.jdbc.invalidFormat',+ params: { expectedFormat: 'jdbc:mysql://host:port/database?user=x&password=y' },+ },format: 'JDBC',};}@@ -147,7 +151,7 @@ export class MySqlConnectionStringParser {if (!queryString) {return {- error: 'JDBC connection string is missing query parameters (user and password)',+ error: { key: 'databases.connectionString.errors.jdbc.queryParametersMissing' },format: 'JDBC',};}@@ -159,14 +163,14 @@ export class MySqlConnectionStringParser {if (!username) {return {- error: 'Username (user parameter) is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.usernameMissing' },format: 'JDBC',};}if (!password) {return {- error: 'Password parameter is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.passwordMissing' },format: 'JDBC',};}@@ -179,9 +183,9 @@ export class MySqlConnectionStringParser {database: decodeURIComponent(database),isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse JDBC connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.jdbc.parseFailed' },format: 'JDBC',};}@@ -212,28 +216,28 @@ export class MySqlConnectionStringParser {if (!host) {return {- error: 'Host is missing from connection string. Use host=hostname',+ error: { key: 'databases.connectionString.errors.keyValue.hostMissing' },format: 'key-value',};}if (!username) {return {- error: 'Username is missing from connection string. Use user=username',+ error: { key: 'databases.connectionString.errors.keyValue.usernameMissing' },format: 'key-value',};}if (!password) {return {- error: 'Password is missing from connection string. Use password=yourpassword',+ error: { key: 'databases.connectionString.errors.keyValue.passwordMissing' },format: 'key-value',};}if (!database) {return {- error: 'Database name is missing from connection string. Use database=database',+ error: { key: 'databases.connectionString.errors.keyValue.databaseMissing' },format: 'key-value',};}@@ -248,9 +252,9 @@ export class MySqlConnectionStringParser {database,isHttps,};- } catch (e) {+ } catch {return {- error: `Failed to parse key-value connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.keyValue.parseFailed' },format: 'key-value',};}@@ -285,6 +289,7 @@ export class MySqlConnectionStringParser {const lowercased = sslValue.toLowerCase();// These values indicate SSL is enabled+ // eslint-disable-next-line i18next/no-literal-string -- connection string parameter valuesconst enabledValues = ['true', 'required', 'verify_ca', 'verify_identity', 'yes', '1'];return enabledValues.includes(lowercased);}diff --git a/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.test.ts b/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.test.tsindex 8354e5fa..97c46203 100644--- a/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.test.ts+++ b/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.test.ts@@ -156,7 +156,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('jdbc:postgresql://host:5432/db?password=secret'),);- expect(result.error).toContain('user');+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.usernameMissing');expect(result.format).toBe('JDBC');});@@ -165,7 +165,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('jdbc:postgresql://host:5432/db?user=admin'),);- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.passwordMissing');expect(result.format).toBe('JDBC');});});@@ -428,7 +428,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('port=5432 dbname=mydb user=admin password=secret'),);- expect(result.error).toContain('Host');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.hostMissing');expect(result.format).toBe('libpq');});@@ -437,7 +437,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('host=localhost dbname=mydb password=secret'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.usernameMissing');expect(result.format).toBe('libpq');});@@ -446,7 +446,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('host=localhost dbname=mydb user=admin'),);- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.keyValue.passwordMissing');expect(result.format).toBe('libpq');});@@ -455,7 +455,7 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('host=localhost user=admin password=secret'),);- expect(result.error).toContain('Database');+ expect(result.error.key).toBe('databases.connectionString.errors.libpq.databaseMissing');expect(result.format).toBe('libpq');});});@@ -464,19 +464,19 @@ describe('ConnectionStringParser', () => {it('should return error for empty string', () => {const result = expectError(ConnectionStringParser.parse(''));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for whitespace-only string', () => {const result = expectError(ConnectionStringParser.parse(' '));- expect(result.error).toContain('empty');+ expect(result.error.key).toBe('databases.connectionString.errors.empty');});it('should return error for unrecognized format', () => {const result = expectError(ConnectionStringParser.parse('some random text'));- expect(result.error).toContain('Unrecognized');+ expect(result.error.key).toBe('databases.connectionString.errors.unrecognizedFormat');});it('should return error for missing username in URI', () => {@@ -484,24 +484,34 @@ describe('ConnectionStringParser', () => {ConnectionStringParser.parse('postgresql://:password@host:5432/db'),);- expect(result.error).toContain('Username');+ expect(result.error.key).toBe('databases.connectionString.errors.usernameMissing');});it('should return error for missing password in URI', () => {const result = expectError(ConnectionStringParser.parse('postgresql://user@host:5432/db'));- expect(result.error).toContain('Password');+ expect(result.error.key).toBe('databases.connectionString.errors.passwordMissing');});it('should return error for missing database in URI', () => {const result = expectError(ConnectionStringParser.parse('postgresql://user:pass@host:5432/'));- expect(result.error).toContain('Database');+ expect(result.error.key).toBe('databases.connectionString.errors.databaseMissing');+ });++ it('should return the parse failure without the thrown error text', () => {+ const result = expectError(+ ConnectionStringParser.parse('postgresql://user:pass@host:notaport/db'),+ );++ expect(result.error).toEqual({ key: 'databases.connectionString.errors.parseFailed' });+ expect(result.format).toBe('URI');});it('should return error for invalid JDBC format', () => {const result = expectError(ConnectionStringParser.parse('jdbc:postgresql://invalid'));+ expect(result.error.key).toBe('databases.connectionString.errors.jdbc.invalidFormat');expect(result.format).toBe('JDBC');});});diff --git a/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.ts b/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.tsindex d3432e28..38239873 100644--- a/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.ts+++ b/frontend/src/entity/databases/model/postgresql/ConnectionStringParser.ts@@ -1,3 +1,4 @@+import type { LocalizedText } from '../../../../shared/i18n';import { PostgresSslMode } from './PostgresSslMode';const IPV4_PATTERN = /^\d{1,3}(\.\d{1,3}){3}$/;@@ -12,7 +13,7 @@ export type ParseResult = {};export type ParseError = {- error: string;+ error: LocalizedText;format?: string;};@@ -42,7 +43,7 @@ export class ConnectionStringParser {const trimmed = connectionString.trim();if (!trimmed) {- return { error: 'Connection string is empty' };+ return { error: { key: 'databases.connectionString.errors.empty' } };}// Try JDBC format first (starts with jdbc:)@@ -61,7 +62,7 @@ export class ConnectionStringParser {}return {- error: 'Unrecognized connection string format',+ error: { key: 'databases.connectionString.errors.unrecognizedFormat' },};}@@ -109,19 +110,19 @@ export class ConnectionStringParser {// Validate required fieldsif (!host) {- return { error: 'Host is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.hostMissing' } };}if (!username) {- return { error: 'Username is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.usernameMissing' } };}if (!password) {- return { error: 'Password is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.passwordMissing' } };}if (!database) {- return { error: 'Database name is missing from connection string' };+ return { error: { key: 'databases.connectionString.errors.databaseMissing' } };}return {@@ -132,9 +133,9 @@ export class ConnectionStringParser {database,sslMode,};- } catch (e) {+ } catch {return {- error: `Failed to parse connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.parseFailed' },format: 'URI',};}@@ -148,8 +149,10 @@ export class ConnectionStringParser {if (!match) {return {- error:- 'Invalid JDBC connection string format. Expected: jdbc:postgresql://host:port/database?user=x&password=y',+ error: {+ key: 'databases.connectionString.errors.jdbc.invalidFormat',+ params: { expectedFormat: 'jdbc:postgresql://host:port/database?user=x&password=y' },+ },format: 'JDBC',};}@@ -158,7 +161,7 @@ export class ConnectionStringParser {if (!queryString) {return {- error: 'JDBC connection string is missing query parameters (user and password)',+ error: { key: 'databases.connectionString.errors.jdbc.queryParametersMissing' },format: 'JDBC',};}@@ -170,14 +173,14 @@ export class ConnectionStringParser {if (!username) {return {- error: 'Username (user parameter) is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.usernameMissing' },format: 'JDBC',};}if (!password) {return {- error: 'Password parameter is missing from JDBC connection string',+ error: { key: 'databases.connectionString.errors.jdbc.passwordMissing' },format: 'JDBC',};}@@ -190,9 +193,9 @@ export class ConnectionStringParser {database: decodeURIComponent(database),sslMode,};- } catch (e) {+ } catch {return {- error: `Failed to parse JDBC connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.jdbc.parseFailed' },format: 'JDBC',};}@@ -223,28 +226,28 @@ export class ConnectionStringParser {if (!host) {return {- error: 'Host is missing from connection string. Use host=hostname',+ error: { key: 'databases.connectionString.errors.keyValue.hostMissing' },format: 'libpq',};}if (!username) {return {- error: 'Username is missing from connection string. Use user=username',+ error: { key: 'databases.connectionString.errors.keyValue.usernameMissing' },format: 'libpq',};}if (!password) {return {- error: 'Password is missing from connection string. Use password=yourpassword',+ error: { key: 'databases.connectionString.errors.keyValue.passwordMissing' },format: 'libpq',};}if (!database) {return {- error: 'Database name is missing from connection string. Use dbname=database',+ error: { key: 'databases.connectionString.errors.libpq.databaseMissing' },format: 'libpq',};}@@ -259,9 +262,9 @@ export class ConnectionStringParser {database,sslMode,};- } catch (e) {+ } catch {return {- error: `Failed to parse libpq connection string: ${(e as Error).message}`,+ error: { key: 'databases.connectionString.errors.libpq.parseFailed' },format: 'libpq',};}diff --git a/frontend/src/entity/databases/model/postgresql/PostgresSslModeLabelKeys.ts b/frontend/src/entity/databases/model/postgresql/PostgresSslModeLabelKeys.tsnew file mode 100644index 00000000..768b3660--- /dev/null+++ b/frontend/src/entity/databases/model/postgresql/PostgresSslModeLabelKeys.ts@@ -0,0 +1,9 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { PostgresSslMode } from './PostgresSslMode';++export const POSTGRES_SSL_MODE_LABEL_KEYS: Record<PostgresSslMode, TranslationKey> = {+ [PostgresSslMode.Disable]: 'databases.sslModes.disable',+ [PostgresSslMode.Require]: 'databases.sslModes.require',+ [PostgresSslMode.VerifyCa]: 'databases.sslModes.verifyCa',+ [PostgresSslMode.VerifyFull]: 'databases.sslModes.verifyFull',+};diff --git a/frontend/src/entity/databases/model/postgresql/physical/PhysicalDatabaseBackupTypeLabelKeys.ts b/frontend/src/entity/databases/model/postgresql/physical/PhysicalDatabaseBackupTypeLabelKeys.tsnew file mode 100644index 00000000..20fbf150--- /dev/null+++ b/frontend/src/entity/databases/model/postgresql/physical/PhysicalDatabaseBackupTypeLabelKeys.ts@@ -0,0 +1,12 @@+import type { TranslationKey } from '../../../../../shared/i18n';+import { PhysicalDatabaseBackupType } from './PhysicalDatabaseBackupType';++export const PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS: Record<+ PhysicalDatabaseBackupType,+ TranslationKey+> = {+ [PhysicalDatabaseBackupType.FULL]: 'databases.physicalBackupTypes.full',+ [PhysicalDatabaseBackupType.FULL_INCREMENTAL]: 'databases.physicalBackupTypes.fullIncremental',+ [PhysicalDatabaseBackupType.FULL_INCREMENTAL_WAL_STREAM]:+ 'databases.physicalBackupTypes.fullIncrementalWalStream',+};diff --git a/frontend/src/entity/databases/model/postgresql/physical/physicalConnectionErrorContent.ts b/frontend/src/entity/databases/model/postgresql/physical/physicalConnectionErrorContent.tsindex 311dd962..5c368610 100644--- a/frontend/src/entity/databases/model/postgresql/physical/physicalConnectionErrorContent.ts+++ b/frontend/src/entity/databases/model/postgresql/physical/physicalConnectionErrorContent.ts@@ -1,27 +1,26 @@+import type { LocalizedText, TranslationKey } from '../../../../../shared/i18n';import { quotePostgresqlIdentifier } from '../quotePostgresqlIdentifier';import { ConnectionErrorCode } from './ConnectionErrorCode';-export interface PhysicalConnectionErrorTextRun {- text: string;- isBold?: boolean;-}-+// A note is one dictionary sentence rendered through Trans, with <bold> marking the emphasized+// words. Commands are technical strings and stay literal in every language.export type PhysicalConnectionErrorStep =| { type: 'command'; command: string }- | { type: 'note'; runs: PhysicalConnectionErrorTextRun[] };+ | { type: 'note'; key: TranslationKey };export interface PhysicalConnectionErrorContent {- title: string;- summary: string;+ titleKey: TranslationKey;+ summaryKey: TranslationKey;buildSteps?: (ctx: { username: string }) => PhysicalConnectionErrorStep[];// Note about managed PostgreSQL (RDS / Azure / GCP). Rendered below the steps, since on managed// providers the commands do not apply and the operator uses the provider console instead.- managedNote?: string | ((ctx: { username: string }) => string);+ buildManagedNote?: (ctx: { username: string }) => LocalizedText;}// pg_hba.conf accepts the literal "all" in the address field to match every host. We use it because// the exact IP Databasus connects from lives only in the server-side rejection, which the backend no// longer forwards - the operator can narrow it to a CIDR range afterwards if they want.+// eslint-disable-next-line i18next/no-literal-string -- pg_hba.conf address keywordconst REPLICATION_HBA_ADDRESS = 'all';export const physicalConnectionErrorContent: Record<@@ -29,140 +28,121 @@ export const physicalConnectionErrorContent: Record<PhysicalConnectionErrorContent> = {[ConnectionErrorCode.PgHbaNoEntry]: {- title: 'Replication is not allowed from this host',- summary:- 'PostgreSQL has no pg_hba.conf entry that permits a replication connection from Databasus. Physical backups stream via replication, which needs a "host replication" rule - an ordinary "host all" rule does not cover it.',+ titleKey: 'databases.physicalConnectionErrors.pgHbaNoEntry.title',+ summaryKey: 'databases.physicalConnectionErrors.pgHbaNoEntry.summary',buildSteps: () => [- {- type: 'note',- runs: [- {- text: 'Add the line below to pg_hba.conf. The first "all" matches any user and the second any host - narrow the user to the specific replication role and/or the host to a CIDR range if you want to restrict it.',- },- ],- },+ { type: 'note', key: 'databases.physicalConnectionErrors.pgHbaNoEntry.addLineNote' },{type: 'command',+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every languagecommand: `host replication all ${REPLICATION_HBA_ADDRESS} scram-sha-256`,},- {- type: 'note',- runs: [- { text: 'After updating pg_hba.conf, ' },- { text: 'reload PG', isBold: true },- { text: '.' },- ],- },+ { type: 'note', key: 'databases.physicalConnectionErrors.pgHbaNoEntry.reloadNote' },],- managedNote:- 'On managed PostgreSQL (RDS / Azure / GCP) you cannot edit pg_hba.conf - enable external or replication access in the provider console instead.',+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.pgHbaNoEntry.managedNote',+ }),},[ConnectionErrorCode.BadCredentials]: {- title: 'Wrong username or password',- summary:- 'PostgreSQL rejected the credentials. Double-check the username and password for this database.',+ titleKey: 'databases.physicalConnectionErrors.badCredentials.title',+ summaryKey: 'databases.physicalConnectionErrors.badCredentials.summary',},[ConnectionErrorCode.NoReplicationPrivilege]: {- title: 'User cannot run replication',- summary:- 'The user connected but lacks the REPLICATION privilege that physical backups require.',- buildSteps: ({ username }) => {- const quotedUsername = quotePostgresqlIdentifier(username);-- return [- { type: 'note', runs: [{ text: 'Grant it with the command below (run as a superuser).' }] },- { type: 'command', command: `ALTER ROLE ${quotedUsername} REPLICATION;` },- ];- },- managedNote: ({ username }) =>- `On AWS RDS use GRANT rds_replication TO ${quotePostgresqlIdentifier(username)}; on Azure / GCP enable replication for the role in the provider console.`,+ titleKey: 'databases.physicalConnectionErrors.noReplicationPrivilege.title',+ summaryKey: 'databases.physicalConnectionErrors.noReplicationPrivilege.summary',+ buildSteps: ({ username }) => [+ { type: 'note', key: 'databases.physicalConnectionErrors.grantAsSuperuserNote' },+ {+ type: 'command',+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language+ command: `ALTER ROLE ${quotePostgresqlIdentifier(username)} REPLICATION;`,+ },+ ],+ buildManagedNote: ({ username }) => ({+ key: 'databases.physicalConnectionErrors.noReplicationPrivilege.managedNote',+ params: { username: quotePostgresqlIdentifier(username) },+ }),},[ConnectionErrorCode.NoWalSwitchPrivilege]: {- title: 'User cannot force a WAL segment switch',- summary:- 'Continuous WAL streaming only uploads a segment once the source closes it, so on a rarely-written database the newest WAL stays on the source until the 16 MB segment fills. Forcing a switch on a timer is what keeps the recovery point between backups close to the present, and it needs EXECUTE on pg_switch_wal(). Full and incremental backups do not need it: they restore to the point each backup finished and replay no archived WAL.',- buildSteps: ({ username }) => {- const quotedUsername = quotePostgresqlIdentifier(username);-- return [- { type: 'note', runs: [{ text: 'Grant it with the command below (run as a superuser).' }] },- {- type: 'command',- command: `GRANT EXECUTE ON FUNCTION pg_switch_wal() TO ${quotedUsername};`,- },- {- type: 'note',- runs: [- { text: 'Or switch the backup type to ' },- { text: 'Full + incremental', isBold: true },- { text: ', which does not replay archived WAL.' },- ],- },- ];- },- managedNote:- 'On managed PostgreSQL (RDS / Azure / GCP) the function belongs to the platform superuser and a customer role cannot be granted EXECUTE on it, so continuous WAL streaming is unavailable there - use full + incremental backups instead.',- },- [ConnectionErrorCode.WalLevelInvalid]: {- title: 'wal_level is too low',- summary:- 'wal_level must be "replica" or "logical" for physical backups. It is currently set lower.',- buildSteps: () => [+ titleKey: 'databases.physicalConnectionErrors.noWalSwitchPrivilege.title',+ summaryKey: 'databases.physicalConnectionErrors.noWalSwitchPrivilege.summary',+ buildSteps: ({ username }) => [+ { type: 'note', key: 'databases.physicalConnectionErrors.grantAsSuperuserNote' },+ {+ type: 'command',+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language+ command: `GRANT EXECUTE ON FUNCTION pg_switch_wal() TO ${quotePostgresqlIdentifier(username)};`,+ },{type: 'note',- runs: [- {- text: 'Apply the change below, then restart PostgreSQL (wal_level only takes effect after a restart).',- },- ],+ key: 'databases.physicalConnectionErrors.noWalSwitchPrivilege.switchBackupTypeNote',},+ ],+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.noWalSwitchPrivilege.managedNote',+ }),+ },+ [ConnectionErrorCode.WalLevelInvalid]: {+ titleKey: 'databases.physicalConnectionErrors.walLevelInvalid.title',+ summaryKey: 'databases.physicalConnectionErrors.walLevelInvalid.summary',+ buildSteps: () => [+ { type: 'note', key: 'databases.physicalConnectionErrors.walLevelInvalid.applyNote' },+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language{ type: 'command', command: 'ALTER SYSTEM SET wal_level = replica;' },],- managedNote: 'On managed PostgreSQL set wal_level in the provider parameter group.',+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.walLevelInvalid.managedNote',+ }),},[ConnectionErrorCode.NoWalSenders]: {- title: 'No WAL sender processes available',- summary: 'max_wal_senders is 0, so PostgreSQL cannot stream WAL for backups.',+ titleKey: 'databases.physicalConnectionErrors.noWalSenders.title',+ summaryKey: 'databases.physicalConnectionErrors.noWalSenders.summary',buildSteps: () => [- { type: 'note', runs: [{ text: 'Apply the change below, then restart PostgreSQL.' }] },+ { type: 'note', key: 'databases.physicalConnectionErrors.applyAndRestartNote' },+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language{ type: 'command', command: 'ALTER SYSTEM SET max_wal_senders = 10;' },],- managedNote: 'On managed PostgreSQL set max_wal_senders in the provider parameter group.',+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.noWalSenders.managedNote',+ }),},[ConnectionErrorCode.NoReplicationSlots]: {- title: 'No replication slots available',- summary: 'max_replication_slots is 0, so PostgreSQL cannot allocate a slot for backups.',+ titleKey: 'databases.physicalConnectionErrors.noReplicationSlots.title',+ summaryKey: 'databases.physicalConnectionErrors.noReplicationSlots.summary',buildSteps: () => [- { type: 'note', runs: [{ text: 'Apply the change below, then restart PostgreSQL.' }] },+ { type: 'note', key: 'databases.physicalConnectionErrors.applyAndRestartNote' },+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language{ type: 'command', command: 'ALTER SYSTEM SET max_replication_slots = 10;' },],- managedNote: 'On managed PostgreSQL set max_replication_slots in the provider parameter group.',+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.noReplicationSlots.managedNote',+ }),},[ConnectionErrorCode.WalSummaryDisabled]: {- title: 'WAL summarization is off',- summary:- 'summarize_wal must be on for incremental backups. It is currently off on this server.',+ titleKey: 'databases.physicalConnectionErrors.walSummaryDisabled.title',+ summaryKey: 'databases.physicalConnectionErrors.walSummaryDisabled.summary',buildSteps: () => [- { type: 'note', runs: [{ text: 'Apply the change below (no restart needed).' }] },+ { type: 'note', key: 'databases.physicalConnectionErrors.walSummaryDisabled.applyNote' },+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language{ type: 'command', command: 'ALTER SYSTEM SET summarize_wal = on;' },- { type: 'note', runs: [{ text: 'and then' }] },+ { type: 'note', key: 'databases.physicalConnectionErrors.walSummaryDisabled.thenNote' },+ // eslint-disable-next-line i18next/no-literal-string -- a command, shown verbatim in every language{ type: 'command', command: 'SELECT pg_reload_conf();' },],- managedNote: 'On managed PostgreSQL set summarize_wal in the provider parameter group.',+ buildManagedNote: () => ({+ key: 'databases.physicalConnectionErrors.walSummaryDisabled.managedNote',+ }),},[ConnectionErrorCode.CustomTablespaces]: {- title: 'Custom tablespaces are not supported',- summary:- 'This cluster has tablespaces outside pg_default / pg_global, which physical backups cannot stream. Drop the custom tablespaces, or switch this database to logical backups.',+ titleKey: 'databases.physicalConnectionErrors.customTablespaces.title',+ summaryKey: 'databases.physicalConnectionErrors.customTablespaces.summary',},[ConnectionErrorCode.SystemIdentifierMismatch]: {- title: 'This is a different cluster',- summary:- 'The cluster at this address has a different system identifier than the one this backup was set up for. Point Databasus at the original cluster, or create a new database entry.',+ titleKey: 'databases.physicalConnectionErrors.systemIdentifierMismatch.title',+ summaryKey: 'databases.physicalConnectionErrors.systemIdentifierMismatch.summary',},[ConnectionErrorCode.ConnectionFailed]: {- title: 'Could not connect',- summary:- 'Databasus could not open a replication connection. Check the host, port, SSL mode and that a firewall is not blocking the connection.',+ titleKey: 'databases.physicalConnectionErrors.connectionFailed.title',+ summaryKey: 'databases.physicalConnectionErrors.connectionFailed.summary',},};diff --git a/frontend/src/entity/databases/model/postgresql/postgresqlShortName.ts b/frontend/src/entity/databases/model/postgresql/postgresqlShortName.tsnew file mode 100644index 00000000..4e4a78cb--- /dev/null+++ b/frontend/src/entity/databases/model/postgresql/postgresqlShortName.ts@@ -0,0 +1 @@+export const POSTGRESQL_SHORT_NAME = 'PG';diff --git a/frontend/src/entity/databases/model/sshtunnel/SshTunnelAuthTypeLabelKeys.ts b/frontend/src/entity/databases/model/sshtunnel/SshTunnelAuthTypeLabelKeys.tsnew file mode 100644index 00000000..b6e516c1--- /dev/null+++ b/frontend/src/entity/databases/model/sshtunnel/SshTunnelAuthTypeLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { SshTunnelAuthType } from './SshTunnelAuthType';++export const SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS: Record<SshTunnelAuthType, TranslationKey> = {+ [SshTunnelAuthType.PASSWORD]: 'databases.sshTunnel.authTypes.password',+ [SshTunnelAuthType.PRIVATE_KEY]: 'databases.sshTunnel.authTypes.privateKey',+};diff --git a/frontend/src/entity/databases/model/sshtunnel/sshTunnelAuthTypeLabels.ts b/frontend/src/entity/databases/model/sshtunnel/sshTunnelAuthTypeLabels.tsdeleted file mode 100644index 96d874b5..00000000--- a/frontend/src/entity/databases/model/sshtunnel/sshTunnelAuthTypeLabels.ts+++ /dev/null@@ -1,6 +0,0 @@-import { SshTunnelAuthType } from './SshTunnelAuthType';--export const SSH_TUNNEL_AUTH_TYPE_LABELS: Record<SshTunnelAuthType, string> = {- [SshTunnelAuthType.PASSWORD]: 'Password',- [SshTunnelAuthType.PRIVATE_KEY]: 'Private key',-};diff --git a/frontend/src/entity/intervals/index.ts b/frontend/src/entity/intervals/index.tsindex 6022b34a..de1f77b2 100644--- a/frontend/src/entity/intervals/index.ts+++ b/frontend/src/entity/intervals/index.ts@@ -1,2 +1,5 @@export { type Interval } from './model/Interval';export { IntervalType } from './model/IntervalType';+export { INTERVAL_TYPE_LABEL_KEYS } from './model/IntervalTypeLabelKeys';+export { type Weekday, WEEKDAYS } from './model/Weekday';+export { WEEKDAY_LABEL_KEYS } from './model/WeekdayLabelKeys';diff --git a/frontend/src/entity/intervals/model/IntervalTypeLabelKeys.ts b/frontend/src/entity/intervals/model/IntervalTypeLabelKeys.tsnew file mode 100644index 00000000..d63061be--- /dev/null+++ b/frontend/src/entity/intervals/model/IntervalTypeLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../shared/i18n';+import { IntervalType } from './IntervalType';++export const INTERVAL_TYPE_LABEL_KEYS: Record<IntervalType, TranslationKey> = {+ [IntervalType.HOURLY]: 'intervals.types.hourly',+ [IntervalType.DAILY]: 'intervals.types.daily',+ [IntervalType.WEEKLY]: 'intervals.types.weekly',+ [IntervalType.MONTHLY]: 'intervals.types.monthly',+ [IntervalType.CRON]: 'intervals.types.cron',+};diff --git a/frontend/src/entity/intervals/model/Weekday.ts b/frontend/src/entity/intervals/model/Weekday.tsnew file mode 100644index 00000000..665910ec--- /dev/null+++ b/frontend/src/entity/intervals/model/Weekday.ts@@ -0,0 +1,4 @@+// ISO weekday number as stored in Interval.weekday: 1 is Monday, 7 is Sunday.+export type Weekday = 1 | 2 | 3 | 4 | 5 | 6 | 7;++export const WEEKDAYS: Weekday[] = [1, 2, 3, 4, 5, 6, 7];diff --git a/frontend/src/entity/intervals/model/WeekdayLabelKeys.ts b/frontend/src/entity/intervals/model/WeekdayLabelKeys.tsnew file mode 100644index 00000000..3fb0c3cb--- /dev/null+++ b/frontend/src/entity/intervals/model/WeekdayLabelKeys.ts@@ -0,0 +1,14 @@+import type { TranslationKey } from '../../../shared/i18n';+import type { Weekday } from './Weekday';++// Short weekday names. Not taken from Intl or dayjs: several languages return them in lower case or+// with a trailing period, which would need a casing fix-up per language.+export const WEEKDAY_LABEL_KEYS: Record<Weekday, TranslationKey> = {+ 1: 'intervals.weekdays.mon',+ 2: 'intervals.weekdays.tue',+ 3: 'intervals.weekdays.wed',+ 4: 'intervals.weekdays.thu',+ 5: 'intervals.weekdays.fri',+ 6: 'intervals.weekdays.sat',+ 7: 'intervals.weekdays.sun',+};diff --git a/frontend/src/entity/notifiers/index.ts b/frontend/src/entity/notifiers/index.tsindex cf1f1aca..0ff65357 100644--- a/frontend/src/entity/notifiers/index.ts+++ b/frontend/src/entity/notifiers/index.ts@@ -25,4 +25,7 @@ export { validateTeamsNotifier } from './models/teams/validateTeamsNotifier';export type { MattermostNotifier } from './models/mattermost/MattermostNotifier';export { MattermostDeliveryMode } from './models/mattermost/MattermostDeliveryMode';+export { MATTERMOST_DELIVERY_MODE_LABEL_KEYS } from './models/mattermost/MattermostDeliveryModeLabelKeys';export { validateMattermostNotifier } from './models/mattermost/validateMattermostNotifier';+export { NOTIFIER_TYPE_LABEL_KEYS } from './models/NotifierTypeLabelKeys';+export { NOTIFICATION_TYPE_LABEL_KEYS } from './models/NotificationTypeLabelKeys';diff --git a/frontend/src/entity/notifiers/models/NotificationTypeLabelKeys.ts b/frontend/src/entity/notifiers/models/NotificationTypeLabelKeys.tsnew file mode 100644index 00000000..a09dd936--- /dev/null+++ b/frontend/src/entity/notifiers/models/NotificationTypeLabelKeys.ts@@ -0,0 +1,12 @@+import type { TranslationKey } from '../../../shared/i18n';+import { NotificationType } from './NotificationType';++export const NOTIFICATION_TYPE_LABEL_KEYS: Record<NotificationType, TranslationKey> = {+ [NotificationType.ALL]: 'notifiers.notificationTypes.all',+ [NotificationType.BACKUP_SUCCESS]: 'notifiers.notificationTypes.backupSuccess',+ [NotificationType.BACKUP_FAILED]: 'notifiers.notificationTypes.backupFailed',+ [NotificationType.HEALTHCHECK_SUCCESS]: 'notifiers.notificationTypes.healthcheckSuccess',+ [NotificationType.HEALTHCHECK_FAILED]: 'notifiers.notificationTypes.healthcheckFailed',+ [NotificationType.VERIFICATION_SUCCESS]: 'notifiers.notificationTypes.verificationSuccess',+ [NotificationType.VERIFICATION_FAILED]: 'notifiers.notificationTypes.verificationFailed',+};diff --git a/frontend/src/entity/notifiers/models/NotifierTypeLabelKeys.ts b/frontend/src/entity/notifiers/models/NotifierTypeLabelKeys.tsnew file mode 100644index 00000000..44a14039--- /dev/null+++ b/frontend/src/entity/notifiers/models/NotifierTypeLabelKeys.ts@@ -0,0 +1,12 @@+import type { TranslationKey } from '../../../shared/i18n';+import { NotifierType } from './NotifierType';++export const NOTIFIER_TYPE_LABEL_KEYS: Record<NotifierType, TranslationKey> = {+ [NotifierType.EMAIL]: 'notifiers.types.email',+ [NotifierType.TELEGRAM]: 'notifiers.types.telegram',+ [NotifierType.WEBHOOK]: 'notifiers.types.webhook',+ [NotifierType.SLACK]: 'notifiers.types.slack',+ [NotifierType.DISCORD]: 'notifiers.types.discord',+ [NotifierType.TEAMS]: 'notifiers.types.teams',+ [NotifierType.MATTERMOST]: 'notifiers.types.mattermost',+};diff --git a/frontend/src/entity/notifiers/models/getNotifierNameFromType.ts b/frontend/src/entity/notifiers/models/getNotifierNameFromType.tsdeleted file mode 100644index 6b1674db..00000000--- a/frontend/src/entity/notifiers/models/getNotifierNameFromType.ts+++ /dev/null@@ -1,22 +0,0 @@-import { NotifierType } from './NotifierType';--export const getNotifierNameFromType = (type: NotifierType) => {- switch (type) {- case NotifierType.EMAIL:- return 'Email';- case NotifierType.TELEGRAM:- return 'Telegram';- case NotifierType.WEBHOOK:- return 'Webhook';- case NotifierType.SLACK:- return 'Slack';- case NotifierType.DISCORD:- return 'Discord';- case NotifierType.TEAMS:- return 'Teams';- case NotifierType.MATTERMOST:- return 'Mattermost';- default:- return '';- }-};diff --git a/frontend/src/entity/notifiers/models/mattermost/MattermostDeliveryModeLabelKeys.ts b/frontend/src/entity/notifiers/models/mattermost/MattermostDeliveryModeLabelKeys.tsnew file mode 100644index 00000000..90aaaeba--- /dev/null+++ b/frontend/src/entity/notifiers/models/mattermost/MattermostDeliveryModeLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { MattermostDeliveryMode } from './MattermostDeliveryMode';++export const MATTERMOST_DELIVERY_MODE_LABEL_KEYS: Record<MattermostDeliveryMode, TranslationKey> = {+ [MattermostDeliveryMode.WEBHOOK]: 'notifiers.mattermostDeliveryModes.webhook',+ [MattermostDeliveryMode.BOT]: 'notifiers.mattermostDeliveryModes.bot',+};diff --git a/frontend/src/entity/notifiers/models/telegram/validateTelegramNotifier.ts b/frontend/src/entity/notifiers/models/telegram/validateTelegramNotifier.tsindex 304c198f..5647d7c7 100644--- a/frontend/src/entity/notifiers/models/telegram/validateTelegramNotifier.ts+++ b/frontend/src/entity/notifiers/models/telegram/validateTelegramNotifier.ts@@ -1,5 +1,6 @@import type { TelegramNotifier } from './TelegramNotifier';+// eslint-disable-next-line i18next/no-literal-string -- URL protocols, not copyconst allowedProxyProtocols = ['http:', 'https:', 'socks5:', 'socks5h:'];const isValidProxyUrl = (rawProxyUrl: string): boolean => {diff --git a/frontend/src/entity/restores/index.ts b/frontend/src/entity/restores/index.tsindex f6c18390..39695793 100644--- a/frontend/src/entity/restores/index.ts+++ b/frontend/src/entity/restores/index.ts@@ -1,3 +1,4 @@export { restoreApi } from './api/restoreApi';export { RestoreStatus } from './model/RestoreStatus';export type { Restore } from './model/Restore';+export { RESTORE_STATUS_LABEL_KEYS } from './model/RestoreStatusLabelKeys';diff --git a/frontend/src/entity/restores/model/RestoreStatusLabelKeys.ts b/frontend/src/entity/restores/model/RestoreStatusLabelKeys.tsnew file mode 100644index 00000000..33a4ef6d--- /dev/null+++ b/frontend/src/entity/restores/model/RestoreStatusLabelKeys.ts@@ -0,0 +1,9 @@+import type { TranslationKey } from '../../../shared/i18n';+import { RestoreStatus } from './RestoreStatus';++export const RESTORE_STATUS_LABEL_KEYS: Record<RestoreStatus, TranslationKey> = {+ [RestoreStatus.IN_PROGRESS]: 'status.restore.inProgress',+ [RestoreStatus.COMPLETED]: 'status.restore.completed',+ [RestoreStatus.FAILED]: 'status.restore.failed',+ [RestoreStatus.CANCELED]: 'status.restore.canceled',+};diff --git a/frontend/src/entity/storages/index.ts b/frontend/src/entity/storages/index.tsindex 70415b51..ebb3cede 100644--- a/frontend/src/entity/storages/index.ts+++ b/frontend/src/entity/storages/index.ts@@ -3,12 +3,14 @@ export { type Storage } from './models/Storage';export { StorageType } from './models/StorageType';export { type LocalStorage } from './models/LocalStorage';export { type S3Storage } from './models/S3Storage';-export { S3StorageClass, S3StorageClassLabels } from './models/S3StorageClass';+export { S3StorageClass } from './models/S3StorageClass';+export { S3_STORAGE_CLASS_LABEL_KEYS } from './models/S3StorageClassLabelKeys';export { type NASStorage } from './models/NASStorage';export { getStorageLogoFromType } from './models/getStorageLogoFromType';-export { getStorageNameFromType } from './models/getStorageNameFromType';export { type GoogleDriveStorage } from './models/GoogleDriveStorage';-export { type AzureBlobStorage } from './models/AzureBlobStorage';+export { type AzureBlobAuthMethod, type AzureBlobStorage } from './models/AzureBlobStorage';+export { AZURE_BLOB_AUTH_METHOD_LABEL_KEYS } from './models/AzureBlobAuthMethodLabelKeys';export { type FTPStorage } from './models/FTPStorage';export { type SFTPStorage } from './models/SFTPStorage';export { type RcloneStorage } from './models/RcloneStorage';+export { STORAGE_TYPE_LABEL_KEYS } from './models/StorageTypeLabelKeys';diff --git a/frontend/src/entity/storages/models/AzureBlobAuthMethodLabelKeys.ts b/frontend/src/entity/storages/models/AzureBlobAuthMethodLabelKeys.tsnew file mode 100644index 00000000..bba266db--- /dev/null+++ b/frontend/src/entity/storages/models/AzureBlobAuthMethodLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../shared/i18n';+import type { AzureBlobAuthMethod } from './AzureBlobStorage';++export const AZURE_BLOB_AUTH_METHOD_LABEL_KEYS: Record<AzureBlobAuthMethod, TranslationKey> = {+ ACCOUNT_KEY: 'storages.azureBlobAuthMethods.accountKey',+ CONNECTION_STRING: 'storages.azureBlobAuthMethods.connectionString',+};diff --git a/frontend/src/entity/storages/models/AzureBlobStorage.ts b/frontend/src/entity/storages/models/AzureBlobStorage.tsindex 788f72ef..540eb0f9 100644--- a/frontend/src/entity/storages/models/AzureBlobStorage.ts+++ b/frontend/src/entity/storages/models/AzureBlobStorage.ts@@ -1,5 +1,7 @@+export type AzureBlobAuthMethod = 'CONNECTION_STRING' | 'ACCOUNT_KEY';+export interface AzureBlobStorage {- authMethod: 'CONNECTION_STRING' | 'ACCOUNT_KEY';+ authMethod: AzureBlobAuthMethod;connectionString: string;accountName: string;accountKey: string;diff --git a/frontend/src/entity/storages/models/S3StorageClass.ts b/frontend/src/entity/storages/models/S3StorageClass.tsindex 7816edee..5fd999ce 100644--- a/frontend/src/entity/storages/models/S3StorageClass.ts+++ b/frontend/src/entity/storages/models/S3StorageClass.ts@@ -7,13 +7,3 @@ export enum S3StorageClass {REDUCED_REDUNDANCY = 'REDUCED_REDUNDANCY',GLACIER_IR = 'GLACIER_IR',}--export const S3StorageClassLabels: Record<S3StorageClass, string> = {- [S3StorageClass.DEFAULT]: 'Default (Standard)',- [S3StorageClass.STANDARD]: 'Standard',- [S3StorageClass.STANDARD_IA]: 'Standard - Infrequent Access',- [S3StorageClass.ONEZONE_IA]: 'One Zone - Infrequent Access',- [S3StorageClass.INTELLIGENT_TIERING]: 'Intelligent Tiering',- [S3StorageClass.REDUCED_REDUNDANCY]: 'Reduced Redundancy',- [S3StorageClass.GLACIER_IR]: 'Glacier Instant Retrieval',-};diff --git a/frontend/src/entity/storages/models/S3StorageClassLabelKeys.ts b/frontend/src/entity/storages/models/S3StorageClassLabelKeys.tsnew file mode 100644index 00000000..0c7cf347--- /dev/null+++ b/frontend/src/entity/storages/models/S3StorageClassLabelKeys.ts@@ -0,0 +1,12 @@+import type { TranslationKey } from '../../../shared/i18n';+import { S3StorageClass } from './S3StorageClass';++export const S3_STORAGE_CLASS_LABEL_KEYS: Record<S3StorageClass, TranslationKey> = {+ [S3StorageClass.DEFAULT]: 'storages.s3StorageClasses.default',+ [S3StorageClass.STANDARD]: 'storages.s3StorageClasses.standard',+ [S3StorageClass.STANDARD_IA]: 'storages.s3StorageClasses.standardIa',+ [S3StorageClass.ONEZONE_IA]: 'storages.s3StorageClasses.onezoneIa',+ [S3StorageClass.INTELLIGENT_TIERING]: 'storages.s3StorageClasses.intelligentTiering',+ [S3StorageClass.REDUCED_REDUNDANCY]: 'storages.s3StorageClasses.reducedRedundancy',+ [S3StorageClass.GLACIER_IR]: 'storages.s3StorageClasses.glacierIr',+};diff --git a/frontend/src/entity/storages/models/StorageTypeLabelKeys.ts b/frontend/src/entity/storages/models/StorageTypeLabelKeys.tsnew file mode 100644index 00000000..a3c37d6c--- /dev/null+++ b/frontend/src/entity/storages/models/StorageTypeLabelKeys.ts@@ -0,0 +1,13 @@+import type { TranslationKey } from '../../../shared/i18n';+import { StorageType } from './StorageType';++export const STORAGE_TYPE_LABEL_KEYS: Record<StorageType, TranslationKey> = {+ [StorageType.LOCAL]: 'storages.types.local',+ [StorageType.S3]: 'storages.types.s3',+ [StorageType.GOOGLE_DRIVE]: 'storages.types.googleDrive',+ [StorageType.NAS]: 'storages.types.nas',+ [StorageType.AZURE_BLOB]: 'storages.types.azureBlob',+ [StorageType.FTP]: 'storages.types.ftp',+ [StorageType.SFTP]: 'storages.types.sftp',+ [StorageType.RCLONE]: 'storages.types.rclone',+};diff --git a/frontend/src/entity/storages/models/getStorageNameFromType.ts b/frontend/src/entity/storages/models/getStorageNameFromType.tsdeleted file mode 100644index c54dc9d4..00000000--- a/frontend/src/entity/storages/models/getStorageNameFromType.ts+++ /dev/null@@ -1,24 +0,0 @@-import { StorageType } from './StorageType';--export const getStorageNameFromType = (type: StorageType) => {- switch (type) {- case StorageType.LOCAL:- return 'local storage';- case StorageType.S3:- return 'S3';- case StorageType.GOOGLE_DRIVE:- return 'Google Drive';- case StorageType.NAS:- return 'NAS';- case StorageType.AZURE_BLOB:- return 'Azure Blob Storage';- case StorageType.FTP:- return 'FTP';- case StorageType.SFTP:- return 'SFTP';- case StorageType.RCLONE:- return 'Rclone';- default:- return '';- }-};diff --git a/frontend/src/entity/users/index.ts b/frontend/src/entity/users/index.tsindex fd8a7f3b..9a132a9b 100644--- a/frontend/src/entity/users/index.ts+++ b/frontend/src/entity/users/index.ts@@ -22,3 +22,5 @@ export type { SendResetPasswordCodeRequest } from './model/SendResetPasswordCodeexport type { ResetPasswordRequest } from './model/ResetPasswordRequest';export { UserRole } from './model/UserRole';export { WorkspaceRole } from './model/WorkspaceRole';+export { USER_ROLE_LABEL_KEYS } from './model/UserRoleLabelKeys';+export { WORKSPACE_ROLE_LABEL_KEYS } from './model/WorkspaceRoleLabelKeys';diff --git a/frontend/src/entity/users/model/UserRoleLabelKeys.ts b/frontend/src/entity/users/model/UserRoleLabelKeys.tsnew file mode 100644index 00000000..04207705--- /dev/null+++ b/frontend/src/entity/users/model/UserRoleLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../shared/i18n';+import { UserRole } from './UserRole';++export const USER_ROLE_LABEL_KEYS: Record<UserRole, TranslationKey> = {+ [UserRole.ADMIN]: 'users.roles.admin',+ [UserRole.MEMBER]: 'users.roles.member',+};diff --git a/frontend/src/entity/users/model/WorkspaceRoleLabelKeys.ts b/frontend/src/entity/users/model/WorkspaceRoleLabelKeys.tsnew file mode 100644index 00000000..883d14fa--- /dev/null+++ b/frontend/src/entity/users/model/WorkspaceRoleLabelKeys.ts@@ -0,0 +1,9 @@+import type { TranslationKey } from '../../../shared/i18n';+import { WorkspaceRole } from './WorkspaceRole';++export const WORKSPACE_ROLE_LABEL_KEYS: Record<WorkspaceRole, TranslationKey> = {+ [WorkspaceRole.OWNER]: 'workspaces.roles.owner',+ [WorkspaceRole.ADMIN]: 'workspaces.roles.admin',+ [WorkspaceRole.MEMBER]: 'workspaces.roles.member',+ [WorkspaceRole.VIEWER]: 'workspaces.roles.viewer',+};diff --git a/frontend/src/entity/verification/config/index.ts b/frontend/src/entity/verification/config/index.tsindex 617563f3..d1aab52d 100644--- a/frontend/src/entity/verification/config/index.ts+++ b/frontend/src/entity/verification/config/index.ts@@ -1,4 +1,5 @@export { verificationConfigApi } from './api/verificationConfigApi';export type { BackupVerificationConfig } from './models/BackupVerificationConfig';export { VerificationNotificationType } from './models/VerificationNotificationType';+export { VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS } from './models/VerificationNotificationTypeLabelKeys';export { VerificationScheduleType } from './models/VerificationScheduleType';diff --git a/frontend/src/entity/verification/config/models/VerificationNotificationTypeLabelKeys.ts b/frontend/src/entity/verification/config/models/VerificationNotificationTypeLabelKeys.tsnew file mode 100644index 00000000..49aae221--- /dev/null+++ b/frontend/src/entity/verification/config/models/VerificationNotificationTypeLabelKeys.ts@@ -0,0 +1,12 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { VerificationNotificationType } from './VerificationNotificationType';++export const VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS: Record<+ VerificationNotificationType,+ TranslationKey+> = {+ [VerificationNotificationType.VerificationSuccess]:+ 'verification.notificationTypes.verificationSuccess',+ [VerificationNotificationType.VerificationFailed]:+ 'verification.notificationTypes.verificationFailed',+};diff --git a/frontend/src/entity/verification/runs/index.ts b/frontend/src/entity/verification/runs/index.tsindex 962adf37..ed4503bc 100644--- a/frontend/src/entity/verification/runs/index.ts+++ b/frontend/src/entity/verification/runs/index.ts@@ -4,3 +4,5 @@ export type { RestoreVerification } from './models/RestoreVerification';export type { RestoreVerificationTableStat } from './models/RestoreVerificationTableStat';export { VerificationStatus } from './models/VerificationStatus';export { VerificationTrigger } from './models/VerificationTrigger';+export { VERIFICATION_STATUS_LABEL_KEYS } from './models/VerificationStatusLabelKeys';+export { VERIFICATION_TRIGGER_LABEL_KEYS } from './models/VerificationTriggerLabelKeys';diff --git a/frontend/src/entity/verification/runs/models/VerificationStatusLabelKeys.ts b/frontend/src/entity/verification/runs/models/VerificationStatusLabelKeys.tsnew file mode 100644index 00000000..f22a5f24--- /dev/null+++ b/frontend/src/entity/verification/runs/models/VerificationStatusLabelKeys.ts@@ -0,0 +1,10 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { VerificationStatus } from './VerificationStatus';++export const VERIFICATION_STATUS_LABEL_KEYS: Record<VerificationStatus, TranslationKey> = {+ [VerificationStatus.PENDING]: 'status.verification.pending',+ [VerificationStatus.RUNNING]: 'status.verification.running',+ [VerificationStatus.COMPLETED]: 'status.verification.completed',+ [VerificationStatus.FAILED]: 'status.verification.failed',+ [VerificationStatus.CANCELED]: 'status.verification.canceled',+};diff --git a/frontend/src/entity/verification/runs/models/VerificationTriggerLabelKeys.ts b/frontend/src/entity/verification/runs/models/VerificationTriggerLabelKeys.tsnew file mode 100644index 00000000..2e7ecb60--- /dev/null+++ b/frontend/src/entity/verification/runs/models/VerificationTriggerLabelKeys.ts@@ -0,0 +1,7 @@+import type { TranslationKey } from '../../../../shared/i18n';+import { VerificationTrigger } from './VerificationTrigger';++export const VERIFICATION_TRIGGER_LABEL_KEYS: Record<VerificationTrigger, TranslationKey> = {+ [VerificationTrigger.MANUAL]: 'verification.triggers.manual',+ [VerificationTrigger.SCHEDULED]: 'verification.triggers.scheduled',+};diff --git a/frontend/src/features/backups/logical/model/restoreVerificationStatus.ts b/frontend/src/features/backups/logical/model/restoreVerificationStatus.tsindex eed589a3..c42cb0f5 100644--- a/frontend/src/features/backups/logical/model/restoreVerificationStatus.ts+++ b/frontend/src/features/backups/logical/model/restoreVerificationStatus.ts@@ -1,3 +1,4 @@+/* eslint-disable i18next/no-literal-string -- Tailwind class names */import { RestoreVerificationStatus } from '../../../../entity/backups/logical';interface RestoreVerificationBadgeStyle {@@ -21,10 +22,3 @@ export const RESTORE_VERIFICATION_STATUS_BADGE_STYLES: Partial<dotClasses: 'bg-rose-500 dark:bg-rose-400',},};--export const RESTORE_VERIFICATION_STATUS_LABELS: Partial<- Record<RestoreVerificationStatus, string>-> = {- [RestoreVerificationStatus.VERIFIED_SUCCESSFUL]: 'Verified',- [RestoreVerificationStatus.VERIFICATION_FAILED]: 'Verification failed',-};diff --git a/frontend/src/features/backups/logical/ui/EditLogicalBackupConfigComponent.tsx b/frontend/src/features/backups/logical/ui/EditLogicalBackupConfigComponent.tsxindex b02c7f40..5a0e5c07 100644--- a/frontend/src/features/backups/logical/ui/EditLogicalBackupConfigComponent.tsx+++ b/frontend/src/features/backups/logical/ui/EditLogicalBackupConfigComponent.tsx@@ -14,18 +14,30 @@ import {import { CronExpressionParser } from 'cron-parser';import dayjs, { Dayjs } from 'dayjs';import { useEffect, useMemo, useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS,+ LOGICAL_RETENTION_POLICY_TYPE_LABEL_KEYS,type LogicalBackupConfig,LogicalBackupNotificationType,LogicalRetentionPolicyType,logicalBackupConfigApi,} from '../../../../entity/backups/logical';-import { BackupEncryption } from '../../../../entity/backups/shared';-import type { Database } from '../../../../entity/databases';-import { Period } from '../../../../entity/databases/model/Period';-import { type Interval, IntervalType } from '../../../../entity/intervals';+import {+ BACKUP_ENCRYPTION_OPTION_LABEL_KEYS,+ BackupEncryption,+} from '../../../../entity/backups/shared';+import { type Database, PERIOD_LABEL_KEYS, Period } from '../../../../entity/databases';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ type Interval,+ IntervalType,+ WEEKDAYS,+ WEEKDAY_LABEL_KEYS,+} from '../../../../entity/intervals';import { type Storage, getStorageLogoFromType, storageApi } from '../../../../entity/storages';+import { translateApiError, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -51,23 +63,10 @@ interface Props {onSaved: (backupConfig: LogicalBackupConfig) => void;}-const weekdayOptions = [- { value: 1, label: 'Mon' },- { value: 2, label: 'Tue' },- { value: 3, label: 'Wed' },- { value: 4, label: 'Thu' },- { value: 5, label: 'Fri' },- { value: 6, label: 'Sat' },- { value: 7, label: 'Sun' },-];--const retentionPolicyOptions = [- {- label: 'GFS (keep last N hourly, daily, weekly, monthly and yearly backups)',- value: LogicalRetentionPolicyType.GFS,- },- { label: 'Time period (last N days)', value: LogicalRetentionPolicyType.TimePeriod },- { label: 'Count (N last backups)', value: LogicalRetentionPolicyType.Count },+const RETENTION_POLICY_TYPE_ORDER = [+ LogicalRetentionPolicyType.GFS,+ LogicalRetentionPolicyType.TimePeriod,+ LogicalRetentionPolicyType.Count,];export const EditLogicalBackupConfigComponent = ({@@ -82,6 +81,8 @@ export const EditLogicalBackupConfigComponent = ({isSaveToApi,onSaved,}: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const [backupConfig, setBackupConfig] = useState<LogicalBackupConfig>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);@@ -131,7 +132,7 @@ export const EditLogicalBackupConfigComponent = ({await logicalBackupConfigApi.saveBackupConfig(backupConfig);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);}@@ -144,7 +145,7 @@ export const EditLogicalBackupConfigComponent = ({const storages = await storageApi.getStorages(database.workspaceId);setStorages(storages);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}};@@ -184,7 +185,7 @@ export const EditLogicalBackupConfigComponent = ({await loadStorages();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {setIsLoading(false);}@@ -246,6 +247,31 @@ export const EditLogicalBackupConfigComponent = ({}})();+ const weekdayOptions = WEEKDAYS.map((weekday) => ({+ value: weekday,+ label: t(WEEKDAY_LABEL_KEYS[weekday]),+ }));++ const intervalTypeOptions = Object.values(IntervalType).map((intervalType) => ({+ value: intervalType,+ label: t(INTERVAL_TYPE_LABEL_KEYS[intervalType]),+ }));++ const retentionPolicyOptions = RETENTION_POLICY_TYPE_ORDER.map((policyType) => ({+ value: policyType,+ label: t(LOGICAL_RETENTION_POLICY_TYPE_LABEL_KEYS[policyType]),+ }));++ const periodOptions = Object.values(Period).map((period) => ({+ value: period,+ label: t(PERIOD_LABEL_KEYS[period]),+ }));++ const encryptionOptions = Object.values(BackupEncryption).map((encryption) => ({+ value: encryption,+ label: t(BACKUP_ENCRYPTION_OPTION_LABEL_KEYS[encryption]),+ }));+const isAllFieldsFilled =!backupConfig.isBackupsEnabled ||(isRetentionValid &&@@ -261,7 +287,9 @@ export const EditLogicalBackupConfigComponent = ({<div>{database.id && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backups enabled</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.backupsEnabled')}+ </div><Switchchecked={backupConfig.isBackupsEnabled}onChange={(checked) => {@@ -275,7 +303,9 @@ export const EditLogicalBackupConfigComponent = ({{backupConfig.isBackupsEnabled && (<><div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backup interval</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.interval')}+ </div><Selectvalue={backupInterval?.type}onChange={(v) => {@@ -292,19 +322,15 @@ export const EditLogicalBackupConfigComponent = ({}}size="small"className="w-full max-w-[200px] grow"- options={[- { label: 'Hourly', value: IntervalType.HOURLY },- { label: 'Daily', value: IntervalType.DAILY },- { label: 'Weekly', value: IntervalType.WEEKLY },- { label: 'Monthly', value: IntervalType.MONTHLY },- { label: 'Cron', value: IntervalType.CRON },- ]}+ options={intervalTypeOptions}/></div>{backupInterval?.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backup weekday</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.weekday')}+ </div><Selectvalue={displayedWeekday}onChange={(localWeekday) => {@@ -321,7 +347,9 @@ export const EditLogicalBackupConfigComponent = ({{backupInterval?.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backup day of month</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.dayOfMonth')}+ </div><InputNumbermin={1}max={31}@@ -340,7 +368,9 @@ export const EditLogicalBackupConfigComponent = ({{backupInterval?.type === IntervalType.CRON && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Cron expression (UTC)</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.schedule.cronExpression')}+ </div><div className="flex items-center"><Inputvalue={backupInterval?.cronExpression || ''}@@ -354,13 +384,21 @@ export const EditLogicalBackupConfigComponent = ({title={<div><div className="font-bold">- Cron format: minute hour day month weekday (UTC)+ {t('backups.config.schedule.cronHelp.format')}+ </div>+ <div className="mt-1">{t('backups.config.schedule.cronHelp.examples')}</div>+ <div>+ {'•'} 0 2 * * * - {t('backups.config.schedule.cronHelp.dailyAt2am')}+ </div>+ <div>+ {'•'} 0 */6 * * * - {t('backups.config.schedule.cronHelp.every6Hours')}+ </div>+ <div>+ {'•'} 0 3 * * 1 - {t('backups.config.schedule.cronHelp.mondaysAt3am')}+ </div>+ <div>+ {'•'} 30 4 1,15 * * - {t('backups.config.schedule.cronHelp.twiceAMonth')}</div>- <div className="mt-1">Examples:</div>- <div>• 0 2 * * * - Daily at 2:00 AM UTC</div>- <div>• 0 */6 * * * - Every 6 hours</div>- <div>• 0 3 * * 1 - Every Monday at 3:00 AM UTC</div>- <div>• 30 4 1,15 * * - 1st and 15th at 4:30 AM UTC</div></div>}>@@ -377,18 +415,22 @@ export const EditLogicalBackupConfigComponent = ({const nextRun = interval.next().toDate();return (<div className="mb-1 flex w-full flex-col items-start text-xs text-gray-600 sm:flex-row sm:items-center dark:text-gray-400">- <div className="mb-1 min-w-[150px] sm:mb-0" />+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2" /><div className="text-gray-600 dark:text-gray-400">- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ {t('backups.config.schedule.nextRun', {+ time: dayjs(nextRun).local().format(dateTimeFormat.format),+ })}+ <br />({formatRelativeTime(nextRun)})</div></div>);} catch {return (<div className="mb-1 flex w-full flex-col items-start text-red-500 sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0" />- <div className="text-red-500">Invalid cron expression</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2" />+ <div className="text-red-500">+ {t('backups.config.schedule.invalidCron')}+ </div></div>);}@@ -399,7 +441,9 @@ export const EditLogicalBackupConfigComponent = ({{backupInterval?.type !== IntervalType.HOURLY &&backupInterval?.type !== IntervalType.CRON && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backup time of day</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.timeOfDay')}+ </div><TimePickervalue={localTime}format={timeFormat.format}@@ -407,15 +451,17 @@ export const EditLogicalBackupConfigComponent = ({allowClear={false}size="small"className="w-full max-w-[200px] grow"- onChange={(t) => {- if (!t) return;- const patch: Partial<Interval> = { timeOfDay: t.utc().format('HH:mm') };+ onChange={(pickedTime) => {+ if (!pickedTime) return;+ const patch: Partial<Interval> = {+ timeOfDay: pickedTime.utc().format('HH:mm'),+ };if (backupInterval?.type === IntervalType.WEEKLY && displayedWeekday) {- patch.weekday = getUtcWeekday(displayedWeekday, t);+ patch.weekday = getUtcWeekday(displayedWeekday, pickedTime);}if (backupInterval?.type === IntervalType.MONTHLY && displayedDayOfMonth) {- patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, t);+ patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, pickedTime);}saveInterval(patch);@@ -429,7 +475,7 @@ export const EditLogicalBackupConfigComponent = ({)}<div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Storage</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('backups.config.storage')}</div><div className="flex w-full items-center"><Selectkey={storageSelectKey}@@ -451,15 +497,15 @@ export const EditLogicalBackupConfigComponent = ({className="mr-2 max-w-[200px] grow"options={[...storages.map((s) => ({ label: s.name, value: s.id })),- { label: 'Create new storage', value: 'create-new-storage' },+ { label: t('backups.config.createNewStorage'), value: 'create-new-storage' },]}- placeholder="Select storage"+ placeholder={t('backups.config.selectStorage')}/>{backupConfig.storage?.type && (<imgsrc={getStorageLogoFromType(backupConfig.storage.type)}- alt="storageIcon"+ alt=""className="ml-1 h-4 w-4"/>)}@@ -467,30 +513,26 @@ export const EditLogicalBackupConfigComponent = ({</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Encryption</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('backups.config.encryption')}</div><div className="flex w-full items-center"><Selectvalue={backupConfig.encryption}onChange={(v) => updateBackupConfig({ encryption: v })}size="small"className="min-w-0 grow"- options={[- { label: 'None', value: BackupEncryption.NONE },- { label: 'Encrypt backup files', value: BackupEncryption.ENCRYPTED },- ]}+ options={encryptionOptions}/>- <Tooltip- className="cursor-pointer"- title="If backup is encrypted, backup files in your storage (S3, local, etc.) cannot be used directly. You can restore backups through Databasus or download them unencrypted via the 'Download' button."- >+ <Tooltip className="cursor-pointer" title={t('backups.logical.config.encryptionTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mt-1 mb-1 min-w-[150px] sm:mb-0">Retention policy</div>+ <div className="mt-1 mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.retentionPolicy')}+ </div><div className="flex min-w-0 grow flex-col gap-1"><Selectvalue={retentionPolicyType}@@ -523,24 +565,12 @@ export const EditLogicalBackupConfigComponent = ({onChange={(v) => updateBackupConfig({ retentionTimePeriod: v })}size="small"className="min-w-0 grow"- options={[- { label: '1 day', value: Period.DAY },- { label: '1 week', value: Period.WEEK },- { label: '1 month', value: Period.MONTH },- { label: '3 months', value: Period.THREE_MONTH },- { label: '6 months', value: Period.SIX_MONTH },- { label: '1 year', value: Period.YEAR },- { label: '2 years', value: Period.TWO_YEARS },- { label: '3 years', value: Period.THREE_YEARS },- { label: '4 years', value: Period.FOUR_YEARS },- { label: '5 years', value: Period.FIVE_YEARS },- { label: 'Forever', value: Period.FOREVER },- ]}+ options={periodOptions}/><TooltipclassName="cursor-pointer"- title="How long to keep the backups. Backups older than this period are automatically deleted."+ title={t('backups.logical.config.retention.timePeriodTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -550,7 +580,7 @@ export const EditLogicalBackupConfigComponent = ({{retentionPolicyType === LogicalRetentionPolicyType.Count && (<div className="flex items-center"><span className="mr-2 shrink-0 text-sm text-gray-600 dark:text-gray-400">- Most recent backups+ {t('backups.logical.config.retention.count')}</span><InputNumbermin={1}@@ -562,7 +592,7 @@ export const EditLogicalBackupConfigComponent = ({<TooltipclassName="cursor-pointer"- title="Keep only the specified number of most recent backups. Older backups beyond this count are automatically deleted."+ title={t('backups.logical.config.retention.countTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -576,14 +606,14 @@ export const EditLogicalBackupConfigComponent = ({className="cursor-pointer text-xs text-blue-600 hover:text-blue-800"onClick={() => setShowGfsHint(!isShowGfsHint)}>- {isShowGfsHint ? 'Hide' : 'What is GFS (Grandfather-Father-Son)?'}+ {isShowGfsHint+ ? t('backups.logical.config.retention.hideGfsHint')+ : t('backups.logical.config.retention.showGfsHint')}</span>{isShowGfsHint && (<div className="mt-1 max-w-[280px] text-xs text-gray-600 dark:text-gray-400">- GFS (Grandfather-Father-Son) rotation: keep the last N hourly, daily, weekly,- monthly and yearly backups. This allows keeping backups over long periods of- time within a reasonable storage space.+ {t('backups.logical.config.retention.gfsHint')}</div>)}</div>@@ -592,7 +622,7 @@ export const EditLogicalBackupConfigComponent = ({{isShowGfsHours && (<div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Hourly backups+ {t('backups.logical.config.retention.gfsFields.hourly')}</span><InputNumbermin={0}@@ -606,7 +636,7 @@ export const EditLogicalBackupConfigComponent = ({<div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Daily backups+ {t('backups.logical.config.retention.gfsFields.daily')}</span><InputNumbermin={0}@@ -619,7 +649,7 @@ export const EditLogicalBackupConfigComponent = ({<div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Weekly backups+ {t('backups.logical.config.retention.gfsFields.weekly')}</span><InputNumbermin={0}@@ -632,7 +662,7 @@ export const EditLogicalBackupConfigComponent = ({<div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Monthly backups+ {t('backups.logical.config.retention.gfsFields.monthly')}</span><InputNumbermin={0}@@ -644,7 +674,7 @@ export const EditLogicalBackupConfigComponent = ({</div><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Yearly backups+ {t('backups.logical.config.retention.gfsFields.yearly')}</span><InputNumbermin={0}@@ -663,7 +693,9 @@ export const EditLogicalBackupConfigComponent = ({{backupConfig.isBackupsEnabled && (<><div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mt-0 mb-1 min-w-[150px] sm:mt-1 sm:mb-0">Notifications</div>+ <div className="mt-0 mb-1 min-w-[150px] sm:mt-1 sm:mb-0 sm:pr-2">+ {t('backups.config.notifications')}+ </div><div className="flex flex-col space-y-2"><Checkboxchecked={backupConfig.sendNotificationsOn.includes(@@ -680,7 +712,11 @@ export const EditLogicalBackupConfigComponent = ({updateBackupConfig({ sendNotificationsOn: notifications });}}>- Backup success+ {t(+ LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ LogicalBackupNotificationType.BackupSuccess+ ],+ )}</Checkbox><Checkbox@@ -698,7 +734,11 @@ export const EditLogicalBackupConfigComponent = ({updateBackupConfig({ sendNotificationsOn: notifications });}}>- Backup failed+ {t(+ LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ LogicalBackupNotificationType.BackupFailed+ ],+ )}</Checkbox></div></div>@@ -710,7 +750,7 @@ export const EditLogicalBackupConfigComponent = ({className="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!isShowAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('backups.logical.config.advancedSettings')}</span>{isShowAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -723,7 +763,9 @@ export const EditLogicalBackupConfigComponent = ({{isShowAdvanced && backupConfig.isBackupsEnabled && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Retry backup if failed</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.retryIfFailed')}+ </div><div className="flex items-center"><Switchsize="small"@@ -733,7 +775,7 @@ export const EditLogicalBackupConfigComponent = ({<TooltipclassName="cursor-pointer"- title="Automatically retry failed backups. Backups can fail due to network failures, storage issues or temporary database unavailability."+ title={t('backups.logical.config.retryIfFailedTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -742,7 +784,9 @@ export const EditLogicalBackupConfigComponent = ({{backupConfig.isRetryIfFailed && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Max failed tries count</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.logical.config.maxFailedTries')}+ </div><div className="flex items-center"><InputNumbermin={1}@@ -755,7 +799,7 @@ export const EditLogicalBackupConfigComponent = ({<TooltipclassName="cursor-pointer"- title="Maximum number of retry attempts for failed backups. You will receive a notification when all tries have failed."+ title={t('backups.logical.config.maxFailedTriesTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -768,13 +812,13 @@ export const EditLogicalBackupConfigComponent = ({<div className="mt-5 flex">{isShowBackButton && (<Button className="mr-1" type="primary" ghost onClick={onBack}>- Back+ {t('common.actions.back')}</Button>)}{isShowCancelButton && (<Button danger ghost className="mr-1" onClick={onCancel}>- Cancel+ {t('common.actions.cancel')}</Button>)}@@ -785,13 +829,13 @@ export const EditLogicalBackupConfigComponent = ({loading={isSaving}disabled={!isUnsaved || !isAllFieldsFilled}>- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button></div>{isShowCreateStorage && (<Modal- title="Add storage"+ title={t('backups.config.addStorageTitle')}footer={<div />}open={isShowCreateStorage}onCancel={() => {@@ -801,7 +845,7 @@ export const EditLogicalBackupConfigComponent = ({maskClosable={false}><div className="my-3 max-w-[275px] text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, Google Drive, etc.)+ {t('backups.config.storageDescription')}</div><EditStorageComponent@@ -830,10 +874,10 @@ export const EditLogicalBackupConfigComponent = ({onDecline={() => {setIsShowWarn(false);}}- description="If you change the storage, all backups in this storage will be deleted."+ description={t('backups.config.storageChangeWarning')}actionButtonColor="red"- actionText="I understand"- cancelText="Cancel"+ actionText={t('backups.config.storageChangeAcknowledge')}+ cancelText={t('common.actions.cancel')}hideCancelButton/>)}diff --git a/frontend/src/features/backups/logical/ui/LogicalBackupsComponent.tsx b/frontend/src/features/backups/logical/ui/LogicalBackupsComponent.tsxindex 00ae7829..f18c1d51 100644--- a/frontend/src/features/backups/logical/ui/LogicalBackupsComponent.tsx+++ b/frontend/src/features/backups/logical/ui/LogicalBackupsComponent.tsx@@ -15,13 +15,17 @@ import {import { App, Button, Modal, Spin, Table, Tooltip } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';+import type { TFunction } from 'i18next';import { type JSX, useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {type BackupsFilters,+ LOGICAL_BACKUP_STATUS_LABEL_KEYS,type LogicalBackup,type LogicalBackupConfig,LogicalBackupStatus,+ RESTORE_VERIFICATION_STATUS_LABEL_KEYS,RestoreVerificationStatus,logicalBackupConfigApi,logicalBackupsApi,@@ -30,18 +34,30 @@ import { BackupEncryption } from '../../../../entity/backups/shared';import { type Database, DatabaseType } from '../../../../entity/databases';import { verificationRunsApi } from '../../../../entity/verification/runs';import { usePersistentState } from '../../../../shared/hooks';+import {+ type TranslationKey,+ getWebsitePageUrl,+ translateApiError,+ useLocale,+} from '../../../../shared/i18n';import { formatDuration } from '../../../../shared/lib';import { getUserTimeFormat } from '../../../../shared/time';import { ConfirmationComponent } from '../../../../shared/ui';import { RestoresComponent } from '../../../restores';-import {- RESTORE_VERIFICATION_STATUS_BADGE_STYLES,- RESTORE_VERIFICATION_STATUS_LABELS,-} from '../model/restoreVerificationStatus';+import { RESTORE_VERIFICATION_STATUS_BADGE_STYLES } from '../model/restoreVerificationStatus';import { LogicalBackupsFiltersPanelComponent } from './LogicalBackupsFiltersPanelComponent';const BACKUPS_PAGE_SIZE = 50;+// Physical databases have their own backups list; the generic text keeps the map exhaustive.+const DOWNLOAD_TOOLTIP_KEYS: Record<DatabaseType, TranslationKey> = {+ [DatabaseType.POSTGRES_LOGICAL]: 'backups.logical.list.actions.download.postgresql',+ [DatabaseType.POSTGRES_PHYSICAL]: 'backups.logical.list.actions.download.other',+ [DatabaseType.MYSQL]: 'backups.logical.list.actions.download.mysql',+ [DatabaseType.MARIADB]: 'backups.logical.list.actions.download.mariadb',+ [DatabaseType.MONGODB]: 'backups.logical.list.actions.download.mongodb',+};+interface Props {database: Database;isCanManageDBs: boolean;@@ -52,14 +68,15 @@ interface Props {const renderRestoreVerificationTag = (status: RestoreVerificationStatus | undefined,+ t: TFunction,): JSX.Element | null => {if (!status || status === RestoreVerificationStatus.NOT_VERIFIED) {return null;}const badgeStyle = RESTORE_VERIFICATION_STATUS_BADGE_STYLES[status];- const label = RESTORE_VERIFICATION_STATUS_LABELS[status];- if (!badgeStyle || !label) {+ const labelKey = RESTORE_VERIFICATION_STATUS_LABEL_KEYS[status];+ if (!badgeStyle || !labelKey) {return null;}@@ -68,7 +85,7 @@ const renderRestoreVerificationTag = (className={`ml-3 inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap ring-1 ring-inset ${badgeStyle.pillClasses}`}><span className={`h-1.5 w-1.5 rounded-full ${badgeStyle.dotClasses}`} />- {label}+ {t(labelKey)}</span>);};@@ -80,6 +97,8 @@ export const LogicalBackupsComponent = ({scrollContainerRef,onNavigateToVerifications,}: Props) => {+ const { t } = useTranslation();+ const { locale, formatNumber, formatRelativeTime } = useLocale();const { message, modal } = App.useApp();const [isBackupsLoading, setIsBackupsLoading] = useState(false);const [backups, setBackups] = useState<LogicalBackup[]>([]);@@ -109,13 +128,14 @@ export const LogicalBackupsComponent = ({const [verifyingBackupId, setVerifyingBackupId] = useState<string | undefined>();const [isFilterPanelVisible, setIsFilterPanelVisible] = useState(false);+ // eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst [filters, setFilters] = usePersistentState<BackupsFilters>('logicalBackupsFilters', {});const downloadBackup = async (backupId: string) => {try {await logicalBackupsApi.downloadBackup(backupId);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {setDownloadingBackupId(undefined);}@@ -141,7 +161,7 @@ export const LogicalBackupsComponent = ({setHasMore(response.backups.length < response.total);} catch (e) {if (lastRequestTimeRef.current === requestTime) {- alert((e as Error).message);+ alert(translateApiError(e, t));}} finally {isBackupsRequestInFlightRef.current = false;@@ -171,7 +191,7 @@ export const LogicalBackupsComponent = ({setHasMore(response.backups.length < response.total);} catch (e) {if (lastRequestTimeRef.current === requestTime) {- alert((e as Error).message);+ alert(translateApiError(e, t));}}@@ -188,7 +208,7 @@ export const LogicalBackupsComponent = ({setHasMore(true);await loadBackups(BACKUPS_PAGE_SIZE);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsMakeBackupRequestLoading(false);@@ -208,7 +228,7 @@ export const LogicalBackupsComponent = ({setHasMore(true);await loadBackups(BACKUPS_PAGE_SIZE);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setDeletingBackupId(undefined);@@ -222,7 +242,7 @@ export const LogicalBackupsComponent = ({await logicalBackupsApi.cancelBackup(backupId);await loadBackups();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setCancellingBackupId(undefined);@@ -233,10 +253,10 @@ export const LogicalBackupsComponent = ({try {await verificationRunsApi.enqueue(backupId);- message.success('Restore check queued');+ message.success(t('backups.logical.list.verifyRestore.queued'));onNavigateToVerifications?.();} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));} finally {setVerifyingBackupId(undefined);}@@ -244,25 +264,28 @@ export const LogicalBackupsComponent = ({const confirmVerifyRestore = (backupId: string) => {modal.confirm({- title: 'Verify restore?',+ title: t('backups.logical.list.verifyRestore.title'),icon: <InfoCircleOutlined className="!text-blue-600" />,content: (<span>- An agent will restore this backup to a temporary database and report row counts. This may- take a while depending on backup size.{' '}- <a- href="https://databasus.com/restore-verification"- target="_blank"- rel="noopener noreferrer"- >- How it works?- </a>+ <Trans+ i18nKey="backups.logical.list.verifyRestore.description"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('restoreVerification', locale)}+ target="_blank"+ rel="noopener noreferrer"+ />+ ),+ }}+ /></span>),- okText: 'Queue check',+ okText: t('backups.logical.list.verifyRestore.queue'),okType: 'primary',okButtonProps: { type: 'primary', danger: false },- cancelText: 'Cancel',+ cancelText: t('common.actions.cancel'),onOk: () => enqueueVerifyRestore(backupId),});};@@ -327,13 +350,13 @@ export const LogicalBackupsComponent = ({const renderBackupStatusLabel = (status: LogicalBackupStatus, record: LogicalBackup) => {if (status === LogicalBackupStatus.FAILED) {return (- <Tooltip title="Click to see error details">+ <Tooltip title={t('backups.list.clickToSeeErrorDetails')}><divclassName="flex cursor-pointer items-center text-red-600 underline"onClick={() => setShowingBackupError(record)}><ExclamationCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <div>Failed</div>+ <div>{t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status])}</div></div></Tooltip>);@@ -343,9 +366,9 @@ export const LogicalBackupsComponent = ({return (<div className="flex items-center text-green-600"><CheckCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <div>Successful</div>+ <div>{t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status])}</div>{record.encryption === BackupEncryption.ENCRYPTED && (- <Tooltip title="Encrypted">+ <Tooltip title={t('backups.logical.list.encrypted')}><LockOutlined className="ml-1" style={{ fontSize: 14 }} /></Tooltip>)}@@ -357,7 +380,7 @@ export const LogicalBackupsComponent = ({return (<div className="flex items-center text-gray-600"><DeleteOutlined className="mr-2" style={{ fontSize: 16 }} />- <div>Deleted</div>+ <div>{t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status])}</div></div>);}@@ -366,7 +389,7 @@ export const LogicalBackupsComponent = ({return (<div className="flex items-center font-bold text-blue-600"><SyncOutlined spin />- <span className="ml-2">In progress</span>+ <span className="ml-2">{t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status])}</span></div>);}@@ -375,7 +398,7 @@ export const LogicalBackupsComponent = ({return (<div className="flex items-center text-gray-600"><CloseCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <div>Canceled</div>+ <div>{t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status])}</div></div>);}@@ -384,7 +407,7 @@ export const LogicalBackupsComponent = ({};const renderStatus = (status: LogicalBackupStatus, record: LogicalBackup) => {- const verificationTag = renderRestoreVerificationTag(record.restoreVerificationStatus);+ const verificationTag = renderRestoreVerificationTag(record.restoreVerificationStatus, t);if (!verificationTag) {return renderBackupStatusLabel(status, record);}@@ -405,7 +428,7 @@ export const LogicalBackupsComponent = ({{cancellingBackupId === record.id ? (<SyncOutlined spin />) : (- <Tooltip title="Cancel backup">+ <Tooltip title={t('backups.list.actions.cancelBackup')}><CloseCircleOutlinedclassName="cursor-pointer"onClick={() => {@@ -426,7 +449,7 @@ export const LogicalBackupsComponent = ({) : (<>{isCanManageDBs && (- <Tooltip title="Delete backup">+ <Tooltip title={t('backups.list.actions.deleteBackup')}><DeleteOutlinedclassName="cursor-pointer"onClick={() => {@@ -443,7 +466,7 @@ export const LogicalBackupsComponent = ({(verifyingBackupId === record.id ? (<SyncOutlined spin style={{ color: '#155dfc' }} />) : (- <Tooltip title="Verify restore - queue an agent to restore this backup to a temporary database and report row counts">+ <Tooltip title={t('backups.logical.list.actions.verifyRestore')}><SafetyOutlinedclassName="cursor-pointer"onClick={() => {@@ -458,7 +481,7 @@ export const LogicalBackupsComponent = ({</Tooltip>))}- <Tooltip title="Restore from backup">+ <Tooltip title={t('backups.logical.list.actions.restore')}><CloudUploadOutlinedclassName="cursor-pointer"onClick={() => {@@ -470,19 +493,7 @@ export const LogicalBackupsComponent = ({/></Tooltip>- <Tooltip- title={- database.type === DatabaseType.POSTGRES_LOGICAL- ? 'Download backup file. It can be restored manually via pg_restore (from custom format)'- : database.type === DatabaseType.MYSQL- ? 'Download backup file. It can be restored manually via mysql client (from SQL dump)'- : database.type === DatabaseType.MARIADB- ? 'Download backup file. It can be restored manually via mariadb client (from SQL dump)'- : database.type === DatabaseType.MONGODB- ? 'Download backup file. It can be restored manually via mongorestore (from archive)'- : 'Download backup file'- }- >+ <Tooltip title={t(DOWNLOAD_TOOLTIP_KEYS[database.type])}>{downloadingBackupId === record.id ? (<SyncOutlined spin style={{ color: '#155dfc' }} />) : (@@ -510,21 +521,21 @@ export const LogicalBackupsComponent = ({const formatSize = (sizeMb: number) => {if (sizeMb >= 1024) {const sizeGb = sizeMb / 1024;- return `${Number(sizeGb.toFixed(2)).toLocaleString()} GB`;+ return `${formatNumber(Number(sizeGb.toFixed(2)))} GB`;}- return `${Number(sizeMb?.toFixed(2)).toLocaleString()} MB`;+ return `${formatNumber(Number(sizeMb?.toFixed(2)))} MB`;};const columns: ColumnsType<LogicalBackup> = [{- title: 'Created at',+ title: t('backups.list.columns.createdAt'),dataIndex: 'createdAt',key: 'createdAt',render: (createdAt: string) => (<div>{dayjs.utc(createdAt).local().format(getUserTimeFormat().format)} <br /><span className="text-gray-500 dark:text-gray-400">- ({dayjs.utc(createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(createdAt).local())})</span></div>),@@ -532,7 +543,7 @@ export const LogicalBackupsComponent = ({defaultSortOrder: 'descend',},{- title: 'Status',+ title: t('common.fields.status'),dataIndex: 'status',key: 'status',render: (status: LogicalBackupStatus, record: LogicalBackup) => renderStatus(status, record),@@ -540,11 +551,8 @@ export const LogicalBackupsComponent = ({{title: (<div className="flex items-center">- Size- <Tooltip- className="ml-1"- title="Top: the compressed backup file size we actually store in the storage (local, S3, Google Drive, etc.). Bottom (grayed): the original uncompressed database size at backup time. Backups are usually compressed ~5x."- >+ {t('backups.list.columns.size')}+ <Tooltip className="ml-1" title={t('backups.logical.list.sizeTooltip')}><InfoCircleOutlined /></Tooltip></div>@@ -557,21 +565,23 @@ export const LogicalBackupsComponent = ({<div>{formatSize(sizeMb)}</div>{record.backupRawDbSizeMb > 0 && (<div className="text-xs text-gray-500 dark:text-gray-500">- {formatSize(record.backupRawDbSizeMb)} (DB size)+ {t('backups.logical.list.databaseSize', {+ size: formatSize(record.backupRawDbSizeMb),+ })}</div>)}</div>),},{- title: 'Duration',+ title: t('backups.list.columns.duration'),dataIndex: 'backupDurationMs',key: 'backupDurationMs',width: 150,render: (durationMs: number) => formatDuration(durationMs),},{- title: 'Actions',+ title: t('backups.list.columns.actions'),dataIndex: '',key: '',render: (_, record: LogicalBackup) => renderActions(record),@@ -594,7 +604,7 @@ export const LogicalBackupsComponent = ({className={`w-full bg-white p-3 shadow md:p-5 dark:bg-gray-800 ${isDirectlyUnderTab ? 'rounded-tr-md rounded-br-md rounded-bl-md' : 'rounded-md'}`}><div className="flex items-center gap-2">- <h2 className="text-lg font-bold md:text-xl dark:text-white">Backups</h2>+ <h2 className="text-lg font-bold md:text-xl dark:text-white">{t('backups.list.title')}</h2><div className="relative">{isFilterPanelVisible ? (<FilterFilled@@ -620,9 +630,7 @@ export const LogicalBackupsComponent = ({)}{!isBackupConfigLoading && !backupConfig?.isBackupsEnabled && (- <div className="text-sm text-red-600">- Scheduled backups are disabled (you can enable it back in the backup configuration)- </div>+ <div className="text-sm text-red-600">{t('backups.list.scheduledBackupsDisabled')}</div>)}<div className="mt-5" />@@ -635,8 +643,8 @@ export const LogicalBackupsComponent = ({disabled={isMakeBackupRequestLoading}loading={isMakeBackupRequestLoading}>- <span className="md:hidden">Backup now</span>- <span className="hidden md:inline">Make backup right now</span>+ <span className="md:hidden">{t('backups.logical.list.backupNow')}</span>+ <span className="hidden md:inline">{t('backups.logical.list.makeBackupNow')}</span></Button></div>@@ -657,12 +665,14 @@ export const LogicalBackupsComponent = ({<div className="space-y-3"><div className="flex items-start justify-between"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Created at</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.createdAt')}+ </div><div className="text-sm font-medium">{dayjs.utc(backup.createdAt).local().format(getUserTimeFormat().format)}</div><div className="text-xs text-gray-500 dark:text-gray-400">- ({dayjs.utc(backup.createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(backup.createdAt).local())})</div></div><div>{renderStatus(backup.status, backup)}</div>@@ -670,16 +680,22 @@ export const LogicalBackupsComponent = ({<div className="grid grid-cols-2 gap-4"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Size</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.size')}+ </div><div className="text-sm font-medium">{formatSize(backup.backupSizeMb)}</div>{backup.backupRawDbSizeMb > 0 && (<div className="text-xs text-gray-500 dark:text-gray-500">- {formatSize(backup.backupRawDbSizeMb)} (DB size)+ {t('backups.logical.list.databaseSize', {+ size: formatSize(backup.backupRawDbSizeMb),+ })}</div>)}</div><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Duration</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.duration')}+ </div><div className="text-sm font-medium">{formatDuration(backup.backupDurationMs)}</div>@@ -702,11 +718,13 @@ export const LogicalBackupsComponent = ({)}{!hasMore && backups.length > 0 && (<div className="mt-3 text-center text-sm text-gray-500 dark:text-gray-400">- All backups loaded ({totalBackups} total)+ {t('backups.list.allLoaded', { count: totalBackups })}</div>)}{!isBackupsLoading && backups.length === 0 && (- <div className="py-8 text-center text-gray-500 dark:text-gray-400">No backups yet</div>+ <div className="py-8 text-center text-gray-500 dark:text-gray-400">+ {t('backups.list.empty')}+ </div>)}</div>@@ -728,7 +746,7 @@ export const LogicalBackupsComponent = ({)}{!hasMore && backups.length > 0 && (<div className="mt-2 text-center text-gray-500 dark:text-gray-400">- All backups loaded ({totalBackups} total)+ {t('backups.list.allLoaded', { count: totalBackups })}</div>)}</div>@@ -738,9 +756,9 @@ export const LogicalBackupsComponent = ({<ConfirmationComponentonConfirm={deleteBackup}onDecline={() => setDeleteConfimationId(undefined)}- description="Are you sure you want to delete this backup?"+ description={t('backups.logical.list.deleteConfirmation')}actionButtonColor="red"- actionText="Delete"+ actionText={t('common.actions.delete')}/>)}@@ -749,7 +767,7 @@ export const LogicalBackupsComponent = ({width={400}open={!!showingRestoresBackupId}onCancel={() => setShowingRestoresBackupId(undefined)}- title="Restore from backup"+ title={t('backups.list.restoreTitle')}footer={null}maskClosable={false}>@@ -762,7 +780,7 @@ export const LogicalBackupsComponent = ({{showingBackupError && (<Modal- title="Backup error details"+ title={t('backups.list.errorDetailsTitle')}open={!!showingBackupError}onCancel={() => setShowingBackupError(undefined)}maskClosable={false}diff --git a/frontend/src/features/backups/logical/ui/LogicalBackupsFiltersPanelComponent.tsx b/frontend/src/features/backups/logical/ui/LogicalBackupsFiltersPanelComponent.tsxindex 716ffff3..f109095d 100644--- a/frontend/src/features/backups/logical/ui/LogicalBackupsFiltersPanelComponent.tsx+++ b/frontend/src/features/backups/logical/ui/LogicalBackupsFiltersPanelComponent.tsx@@ -1,23 +1,29 @@import { DatePicker, Select } from 'antd';import type { Dayjs } from 'dayjs';import dayjs from 'dayjs';+import { useTranslation } from 'react-i18next';-import { LogicalBackupStatus } from '../../../../entity/backups/logical';-import type { BackupsFilters } from '../../../../entity/backups/logical';+import {+ type BackupsFilters,+ LOGICAL_BACKUP_STATUS_LABEL_KEYS,+ LogicalBackupStatus,+} from '../../../../entity/backups/logical';interface Props {filters: BackupsFilters;onFiltersChange: (filters: BackupsFilters) => void;}-const statusOptions = [- { label: 'In progress', value: LogicalBackupStatus.IN_PROGRESS },- { label: 'Successful', value: LogicalBackupStatus.COMPLETED },- { label: 'Failed', value: LogicalBackupStatus.FAILED },- { label: 'Canceled', value: LogicalBackupStatus.CANCELED },+const FILTERABLE_STATUSES = [+ LogicalBackupStatus.IN_PROGRESS,+ LogicalBackupStatus.COMPLETED,+ LogicalBackupStatus.FAILED,+ LogicalBackupStatus.CANCELED,];export const LogicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange }: Props) => {+ const { t } = useTranslation();+const handleStatusChange = (statuses: string[]) => {onFiltersChange({ ...filters, statuses: statuses.length > 0 ? statuses : undefined });};@@ -29,16 +35,23 @@ export const LogicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange }});};+ const statusOptions = FILTERABLE_STATUSES.map((status) => ({+ label: t(LOGICAL_BACKUP_STATUS_LABEL_KEYS[status]),+ value: status,+ }));+return (<div className="flex flex-col gap-3"><div className="flex items-center gap-2">- <span className="min-w-[90px] text-sm text-gray-500 dark:text-gray-400">Status</span>+ <span className="min-w-[90px] pr-2 text-sm text-gray-500 dark:text-gray-400">+ {t('common.fields.status')}+ </span><Selectmode="multiple"value={filters.statuses ?? []}onChange={handleStatusChange}options={statusOptions}- placeholder="All statuses"+ placeholder={t('backups.filters.allStatuses')}size="small"variant="filled"className="w-[200px] [&_.ant-select-selector]:!rounded-md"@@ -47,7 +60,9 @@ export const LogicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange }</div><div className="flex items-center gap-2">- <span className="min-w-[90px] text-sm text-gray-500 dark:text-gray-400">Before</span>+ <span className="min-w-[90px] pr-2 text-sm text-gray-500 dark:text-gray-400">+ {t('backups.filters.before')}+ </span><DatePickervalue={filters.beforeDate ? dayjs(filters.beforeDate) : null}onChange={handleBeforeDateChange}diff --git a/frontend/src/features/backups/logical/ui/ShowLogicalBackupConfigComponent.tsx b/frontend/src/features/backups/logical/ui/ShowLogicalBackupConfigComponent.tsxindex 5b5229db..7bb3e92e 100644--- a/frontend/src/features/backups/logical/ui/ShowLogicalBackupConfigComponent.tsx+++ b/frontend/src/features/backups/logical/ui/ShowLogicalBackupConfigComponent.tsx@@ -4,18 +4,24 @@ import { CronExpressionParser } from 'cron-parser';import dayjs from 'dayjs';import { useMemo } from 'react';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS,type LogicalBackupConfig,- LogicalBackupNotificationType,LogicalRetentionPolicyType,logicalBackupConfigApi,} from '../../../../entity/backups/logical';-import { BackupEncryption } from '../../../../entity/backups/shared';-import type { Database } from '../../../../entity/databases';-import { Period } from '../../../../entity/databases/model/Period';-import { IntervalType } from '../../../../entity/intervals';+import { BACKUP_ENCRYPTION_LABEL_KEYS } from '../../../../entity/backups/shared';+import { type Database, PERIOD_LABEL_KEYS } from '../../../../entity/databases';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ IntervalType,+ WEEKDAY_LABEL_KEYS,+ type Weekday,+} from '../../../../entity/intervals';import { getStorageLogoFromType } from '../../../../entity/storages/models/getStorageLogoFromType';+import { type LocalizedText, translateLocalizedText, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -27,58 +33,41 @@ interface Props {database: Database;}-const weekdayLabels = {- 1: 'Mon',- 2: 'Tue',- 3: 'Wed',- 4: 'Thu',- 5: 'Fri',- 6: 'Sat',- 7: 'Sun',-};--const intervalLabels = {- [IntervalType.HOURLY]: 'Hourly',- [IntervalType.DAILY]: 'Daily',- [IntervalType.WEEKLY]: 'Weekly',- [IntervalType.MONTHLY]: 'Monthly',- [IntervalType.CRON]: 'Cron',-};--const periodLabels = {- [Period.DAY]: '1 day',- [Period.WEEK]: '1 week',- [Period.MONTH]: '1 month',- [Period.THREE_MONTH]: '3 months',- [Period.SIX_MONTH]: '6 months',- [Period.YEAR]: '1 year',- [Period.TWO_YEARS]: '2 years',- [Period.THREE_YEARS]: '3 years',- [Period.FOUR_YEARS]: '4 years',- [Period.FIVE_YEARS]: '5 years',- [Period.FOREVER]: 'Forever',-};--const notificationLabels = {- [LogicalBackupNotificationType.BackupFailed]: 'Backup failed',- [LogicalBackupNotificationType.BackupSuccess]: 'Backup success',-};--const formatGfsRetention = (config: LogicalBackupConfig): string => {- const parts: string[] = [];-- if (config.retentionGfsHours > 0) parts.push(`${config.retentionGfsHours} hourly`);- if (config.retentionGfsDays > 0) parts.push(`${config.retentionGfsDays} daily`);- if (config.retentionGfsWeeks > 0) parts.push(`${config.retentionGfsWeeks} weekly`);- if (config.retentionGfsMonths > 0) parts.push(`${config.retentionGfsMonths} monthly`);- if (config.retentionGfsYears > 0) parts.push(`${config.retentionGfsYears} yearly`);-- return parts.length > 0 ? parts.join(', ') : 'Not configured';+const getGfsRetentionTexts = (config: LogicalBackupConfig): LocalizedText[] => {+ const texts: LocalizedText[] = [];++ if (config.retentionGfsHours > 0) {+ texts.push({ key: 'backups.config.gfs.hourly', params: { count: config.retentionGfsHours } });+ }+ if (config.retentionGfsDays > 0) {+ texts.push({ key: 'backups.config.gfs.daily', params: { count: config.retentionGfsDays } });+ }+ if (config.retentionGfsWeeks > 0) {+ texts.push({ key: 'backups.config.gfs.weekly', params: { count: config.retentionGfsWeeks } });+ }+ if (config.retentionGfsMonths > 0) {+ texts.push({ key: 'backups.config.gfs.monthly', params: { count: config.retentionGfsMonths } });+ }+ if (config.retentionGfsYears > 0) {+ texts.push({ key: 'backups.config.gfs.yearly', params: { count: config.retentionGfsYears } });+ }++ return texts;};export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();+ const listSeparator = t('common.listSeparator');const [backupConfig, setBackupConfig] = useState<LogicalBackupConfig>();+ const describeGfsRetention = (config: LogicalBackupConfig): string => {+ const texts = getGfsRetentionTexts(config);+ if (texts.length === 0) return t('backups.config.gfs.notConfigured');++ return texts.map((text) => translateLocalizedText(text, t)).join(listSeparator);+ };+const timeFormat = useMemo(() => {const is12Hour = getIs12Hour();return {@@ -127,33 +116,33 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backups enabled</div>+ <div className="min-w-[150px] pr-2">{t('backups.config.backupsEnabled')}</div><div className={backupConfig.isBackupsEnabled ? '' : 'font-bold text-red-600'}>- {backupConfig.isBackupsEnabled ? 'Yes' : 'No'}+ {backupConfig.isBackupsEnabled ? t('common.answers.yes') : t('common.answers.no')}</div></div>{backupConfig.isBackupsEnabled ? (<><div className="mt-4 mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backup interval</div>- <div>{backupInterval?.type ? intervalLabels[backupInterval.type] : ''}</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.interval')}</div>+ <div>+ {backupInterval?.type ? t(INTERVAL_TYPE_LABEL_KEYS[backupInterval.type]) : ''}+ </div></div>{backupInterval?.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backup weekday</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.weekday')}</div><div>- {displayedWeekday- ? weekdayLabels[displayedWeekday as keyof typeof weekdayLabels]- : ''}+ {displayedWeekday ? t(WEEKDAY_LABEL_KEYS[displayedWeekday as Weekday]) : ''}</div></div>)}{backupInterval?.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backup day of month</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.dayOfMonth')}</div><div>{displayedDayOfMonth || ''}</div></div>)}@@ -161,7 +150,9 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {{backupInterval?.type === IntervalType.CRON && (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Cron expression (UTC)</div>+ <div className="min-w-[150px] pr-2">+ {t('backups.config.schedule.cronExpression')}+ </div><code className="rounded bg-gray-100 px-2 py-0.5 text-sm dark:bg-gray-700">{backupInterval?.cronExpression || ''}</code>@@ -175,10 +166,12 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {const nextRun = interval.next().toDate();return (<div className="mb-1 flex w-full items-center text-xs text-gray-600 dark:text-gray-400">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div>- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ {t('backups.config.schedule.nextRun', {+ time: dayjs(nextRun).local().format(dateTimeFormat.format),+ })}+ <br />({formatRelativeTime(nextRun)})</div></div>);@@ -192,40 +185,48 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {{backupInterval?.type !== IntervalType.HOURLY &&backupInterval?.type !== IntervalType.CRON && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backup time of day</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.timeOfDay')}</div><div>{formattedTime}</div></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Retry if failed</div>- <div>{backupConfig.isRetryIfFailed ? 'Yes' : 'No'}</div>+ <div className="min-w-[150px] pr-2">+ {t('backups.logical.config.retryIfFailedShort')}+ </div>+ <div>+ {backupConfig.isRetryIfFailed ? t('common.answers.yes') : t('common.answers.no')}+ </div></div>{backupConfig.isRetryIfFailed && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Max failed tries count</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.maxFailedTries')}</div><div>{backupConfig.maxFailedTriesCount}</div></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Retention policy</div>+ <div className="min-w-[150px] pr-2">{t('backups.logical.config.retentionPolicy')}</div><div className="flex items-center gap-1">{retentionPolicyType === LogicalRetentionPolicyType.TimePeriod && (<span>{backupConfig.retentionTimePeriod- ? periodLabels[backupConfig.retentionTimePeriod]+ ? t(PERIOD_LABEL_KEYS[backupConfig.retentionTimePeriod]): ''}</span>)}{retentionPolicyType === LogicalRetentionPolicyType.Count && (- <span>Keep last {backupConfig.retentionCount} backups</span>+ <span>+ {t('backups.logical.config.retention.countValue', {+ count: backupConfig.retentionCount,+ })}+ </span>)}{retentionPolicyType === LogicalRetentionPolicyType.GFS && (<span className="flex items-center gap-1">- {formatGfsRetention(backupConfig)}- <Tooltip title="Grandfather-Father-Son rotation: keep the last N hourly, daily, weekly, monthly and yearly backups.">+ {describeGfsRetention(backupConfig)}+ <Tooltip title={t('backups.logical.config.retention.gfsTooltip')}><InfoCircleOutlined style={{ color: 'gray' }} /></Tooltip></span>@@ -234,13 +235,13 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Storage</div>+ <div className="min-w-[150px] pr-2">{t('backups.config.storage')}</div><div className="flex items-center"><div>{backupConfig.storage?.name || ''}</div>{backupConfig.storage?.type && (<imgsrc={getStorageLogoFromType(backupConfig.storage.type)}- alt="storageIcon"+ alt=""className="ml-1 h-4 w-4"/>)}@@ -248,25 +249,25 @@ export const ShowLogicalBackupConfigComponent = ({ database }: Props) => {</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Encryption</div>- <div>{backupConfig.encryption === BackupEncryption.ENCRYPTED ? 'Enabled' : 'None'}</div>+ <div className="min-w-[150px] pr-2">{t('backups.config.encryption')}</div>+ <div>{t(BACKUP_ENCRYPTION_LABEL_KEYS[backupConfig.encryption])}</div><TooltipclassName="cursor-pointer"- title="If backup is encrypted, backup files in your storage (S3, local, etc.) cannot be used directly. You can restore backups through Databasus or download them unencrypted via the 'Download' button."+ title={t('backups.logical.config.encryptionTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Notifications</div>+ <div className="min-w-[150px] pr-2">{t('backups.config.notifications')}</div><div>{backupConfig.sendNotificationsOn.length > 0? backupConfig.sendNotificationsOn- .map((type) => notificationLabels[type])- .join(', ')- : 'None'}+ .map((type) => t(LOGICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[type]))+ .join(listSeparator)+ : t('backups.config.noNotifications')}</div></div></>diff --git a/frontend/src/features/backups/physical/lib/restoreCommands.test.ts b/frontend/src/features/backups/physical/lib/restoreCommands.test.tsindex 63d45a46..e77b9bbf 100644--- a/frontend/src/features/backups/physical/lib/restoreCommands.test.ts+++ b/frontend/src/features/backups/physical/lib/restoreCommands.test.ts@@ -101,7 +101,10 @@ describe('buildDockerScriptCommand', () => {});describe('buildManualSteps', () => {- const configCheckTitle = "Check the cluster's configuration files";+ const reconstructTitleKey = 'backups.physical.restore.manualSteps.reconstruct';+ const configCheckTitleKey = 'backups.physical.restore.manualSteps.checkConfig';+ const wireUpRecoveryTitleKey = 'backups.physical.restore.manualSteps.wireUpRecovery';+ const recoveryParametersTitleKey = 'backups.physical.restore.manualSteps.recoveryParameters';const base = {bundleUrl,outputDir: './databasus-restore',@@ -113,25 +116,23 @@ describe('buildManualSteps', () => {it('decompresses each backup blob before pg_combinebackup and skips recovery when there is no WAL', () => {const steps = buildManualSteps({ ...base, environment: 'host', hasWal: false });- const titles = steps.map((step) => step.title);- const combine = steps.find((step) => step.title === 'Reconstruct the data directory');+ const titleKeys = steps.map((step) => step.titleKey);+ const combine = steps.find((step) => step.titleKey === reconstructTitleKey);expect(combine?.code).toContain('base.tar');expect(combine?.code).toContain('pg_combinebackup bundle/recon/full');expect(combine!.code.indexOf('base.tar')).toBeLessThan(combine!.code.indexOf('pg_combinebackup'),);- expect(titles).not.toContain('Decompress WAL and wire up recovery');- expect(titles).not.toContain('If recovery stops on parameter settings');+ expect(titleKeys).not.toContain(wireUpRecoveryTitleKey);+ expect(titleKeys).not.toContain(recoveryParametersTitleKey);});it('adds a recovery-parameter note pointing at pg_controldata when there is WAL', () => {const host = buildManualSteps({ ...base, environment: 'host', hasWal: true });const docker = buildManualSteps({ ...base, environment: 'docker', hasWal: true });- const hostNote = host.find((step) => step.title === 'If recovery stops on parameter settings');- const dockerNote = docker.find(- (step) => step.title === 'If recovery stops on parameter settings',- );+ const hostNote = host.find((step) => step.titleKey === recoveryParametersTitleKey);+ const dockerNote = docker.find((step) => step.titleKey === recoveryParametersTitleKey);expect(hostNote?.code).toContain('pg_controldata "./databasus-restore/18/docker"');expect(hostNote?.code).toContain('max_connections');@@ -143,8 +144,8 @@ describe('buildManualSteps', () => {it('builds the cluster at the version-specific path', () => {const pg18 = buildManualSteps({ ...base, pgVersion: '18', environment: 'host', hasWal: false });const pg17 = buildManualSteps({ ...base, pgVersion: '17', environment: 'host', hasWal: false });- const combine18 = pg18.find((step) => step.title === 'Reconstruct the data directory');- const combine17 = pg17.find((step) => step.title === 'Reconstruct the data directory');+ const combine18 = pg18.find((step) => step.titleKey === reconstructTitleKey);+ const combine17 = pg17.find((step) => step.titleKey === reconstructTitleKey);expect(combine18?.code).toContain('-o "./databasus-restore/18/docker"');expect(combine17?.code).toContain('-o "./databasus-restore/data"');@@ -152,7 +153,7 @@ describe('buildManualSteps', () => {it('includes the WAL recovery step with a PGDATA-relative restore_command when there is WAL', () => {const steps = buildManualSteps({ ...base, environment: 'host', hasWal: true });- const recovery = steps.find((step) => step.title === 'Decompress WAL and wire up recovery');+ const recovery = steps.find((step) => step.titleKey === wireUpRecoveryTitleKey);expect(recovery).toBeDefined();expect(recovery?.code).toContain('./databasus-restore/18/docker/recovery.signal');@@ -168,17 +169,13 @@ describe('buildManualSteps', () => {hasWal: true,targetTime: '2026-06-12 14:30:00+00:00',});- const recovery = withTarget.find(- (step) => step.title === 'Decompress WAL and wire up recovery',- );+ const recovery = withTarget.find((step) => step.titleKey === wireUpRecoveryTitleKey);expect(recovery?.code).toContain("recovery_target_time = '2026-06-12 14:30:00+00:00'");expect(recovery?.code).toContain("recovery_target_action = 'promote'");const withoutTarget = buildManualSteps({ ...base, environment: 'host', hasWal: true });- const latestRecovery = withoutTarget.find(- (step) => step.title === 'Decompress WAL and wire up recovery',- );+ const latestRecovery = withoutTarget.find((step) => step.titleKey === wireUpRecoveryTitleKey);expect(latestRecovery?.code).not.toContain('recovery_target_time');});@@ -186,8 +183,8 @@ describe('buildManualSteps', () => {it('reports missing configuration files rather than writing them, for both environments', () => {const hostSteps = buildManualSteps({ ...base, environment: 'host', hasWal: false });const dockerSteps = buildManualSteps({ ...base, environment: 'docker', hasWal: false });- const hostCheckStep = hostSteps.find((step) => step.title === configCheckTitle);- const dockerCheckStep = dockerSteps.find((step) => step.title === configCheckTitle);+ const hostCheckStep = hostSteps.find((step) => step.titleKey === configCheckTitleKey);+ const dockerCheckStep = dockerSteps.find((step) => step.titleKey === configCheckTitleKey);for (const checkStep of [hostCheckStep, dockerCheckStep]) {expect(checkStep?.code).toContain('echo "MISSING: $f"');@@ -211,8 +208,8 @@ describe('buildManualSteps', () => {environment: 'host',hasWal: false,});- const pg17CheckStep = pg17Steps.find((step) => step.title === configCheckTitle);- const pg18CheckStep = pg18Steps.find((step) => step.title === configCheckTitle);+ const pg17CheckStep = pg17Steps.find((step) => step.titleKey === configCheckTitleKey);+ const pg18CheckStep = pg18Steps.find((step) => step.titleKey === configCheckTitleKey);expect(pg17CheckStep?.code).toContain('"./databasus-restore/data/$f"');expect(pg17CheckStep?.code).toContain('/etc/postgresql/17/main');@@ -221,21 +218,21 @@ describe('buildManualSteps', () => {});it('checks the configuration after reconstruction and before recovery is wired up', () => {- const titles = buildManualSteps({ ...base, environment: 'host', hasWal: true }).map(- (step) => step.title,+ const titleKeys = buildManualSteps({ ...base, environment: 'host', hasWal: true }).map(+ (step) => step.titleKey,);- expect(titles.indexOf(configCheckTitle)).toBeGreaterThan(- titles.indexOf('Reconstruct the data directory'),+ expect(titleKeys.indexOf(configCheckTitleKey)).toBeGreaterThan(+ titleKeys.indexOf(reconstructTitleKey),);- expect(titles.indexOf(configCheckTitle)).toBeLessThan(- titles.indexOf('Decompress WAL and wire up recovery'),+ expect(titleKeys.indexOf(configCheckTitleKey)).toBeLessThan(+ titleKeys.indexOf(wireUpRecoveryTitleKey),);});it('decompresses on the host then runs pg_combinebackup through docker in the docker environment', () => {const steps = buildManualSteps({ ...base, environment: 'docker', hasWal: false });- const combine = steps.find((step) => step.title === 'Reconstruct the data directory');+ const combine = steps.find((step) => step.titleKey === reconstructTitleKey);expect(combine?.code).toContain('docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" -w /work postgres:18',diff --git a/frontend/src/features/backups/physical/lib/restoreCommands.ts b/frontend/src/features/backups/physical/lib/restoreCommands.tsindex 94693775..2300fce2 100644--- a/frontend/src/features/backups/physical/lib/restoreCommands.ts+++ b/frontend/src/features/backups/physical/lib/restoreCommands.ts@@ -1,3 +1,6 @@+/* eslint-disable i18next/no-literal-string -- shell commands and paths, shown verbatim in every language */+import type { TranslationKey } from '../../../../shared/i18n';+// Builds the shell commands the restore dialog shows. Pure string assembly - no// network or React - so the wiring (which flag appears when, host vs Docker) is// unit-tested in isolation. The served recovery_script.sh accepts optional@@ -29,6 +32,29 @@ export const clusterDataDir = (outputDir: string, pgVersion: string): string =>// than a fact about the user's source.export const debianConfigDir = (pgVersion: string): string => `/etc/postgresql/${pgVersion}/main`;+export const defaultPgBinDir = (pgVersion: string): string =>+ `/usr/lib/postgresql/${pgVersion}/bin`;++export const defaultDockerImage = (pgVersion: string): string => `postgres:${pgVersion}`;++export const buildChownCommand = (dataDir: string): string =>+ `chown -R postgres:postgres ${dataDir}`;++export const buildPgCtlStartCommand = (dataDir: string): string => `pg_ctl -D ${dataDir} start`;++interface DockerRunCommandParams {+ hostDir: string;+ containerDir: string;+ pgVersion: string;+}++export const buildDockerRunCommand = ({+ hostDir,+ containerDir,+ pgVersion,+}: DockerRunCommandParams): string =>+ `docker run -e POSTGRES_PASSWORD=... -v "$PWD/${hostDir}:${containerDir}" ${defaultDockerImage(pgVersion)}`;+export interface ScriptCommandParams {scriptUrl: string;bundleUrl: string;@@ -63,7 +89,7 @@ export interface ManualStepsParams {}export interface RestoreStep {- title: string;+ titleKey: TranslationKey;code: string;}@@ -200,23 +226,23 @@ export const buildManualSteps = ({const steps: RestoreStep[] = [{- title: 'Download the bundle',+ titleKey: 'backups.physical.restore.manualSteps.download',code: `curl -fsSL "${bundleUrl}" -o restore.tar`,},{- title: 'Extract it',+ titleKey: 'backups.physical.restore.manualSteps.extract',code: `mkdir -p bundle\ntar -xf restore.tar -C bundle`,},{- title: 'Verify the transfer',+ titleKey: 'backups.physical.restore.manualSteps.verify',code: `(cd bundle && sha256sum -c MANIFEST.sha256)`,},{- title: 'Reconstruct the data directory',+ titleKey: 'backups.physical.restore.manualSteps.reconstruct',code: combine,},{- title: "Check the cluster's configuration files",+ titleKey: 'backups.physical.restore.manualSteps.checkConfig',code: checkClusterConfigBlock({ dataDir, pgVersion }),},];@@ -227,7 +253,7 @@ export const buildManualSteps = ({: '';steps.push({- title: 'Decompress WAL and wire up recovery',+ titleKey: 'backups.physical.restore.manualSteps.wireUpRecovery',// WAL is inflated inside PGDATA and restore_command is relative to it, so replay works// whether the cluster starts on the host or in a container (the WAL travels with PGDATA).code: [@@ -247,7 +273,7 @@ export const buildManualSteps = ({});steps.push({- title: 'If recovery stops on parameter settings',+ titleKey: 'backups.physical.restore.manualSteps.recoveryParameters',// Archive recovery aborts when these are below the source's values - the served script sets// them from the control file automatically, but a hand-run restore must do it too.code: [diff --git a/frontend/src/features/backups/physical/model/physicalBackupStatus.ts b/frontend/src/features/backups/physical/model/physicalBackupStatus.tsindex 5731b15c..16174eae 100644--- a/frontend/src/features/backups/physical/model/physicalBackupStatus.ts+++ b/frontend/src/features/backups/physical/model/physicalBackupStatus.ts@@ -1,3 +1,4 @@+/* eslint-disable i18next/no-literal-string -- Tailwind class names */import { PhysicalBackupStatus } from '../../../../entity/backups/physical';interface PhysicalBackupStatusBadgeStyle {@@ -35,11 +36,3 @@ export const PHYSICAL_BACKUP_STATUS_BADGE_STYLES: Record<dotClasses: 'bg-gray-500 dark:bg-gray-400',},};--export const PHYSICAL_BACKUP_STATUS_LABELS: Record<PhysicalBackupStatus, string> = {- [PhysicalBackupStatus.COMPLETED]: 'Successful',- [PhysicalBackupStatus.IN_PROGRESS]: 'In progress',- [PhysicalBackupStatus.ERROR]: 'Error',- [PhysicalBackupStatus.CHAIN_BROKEN]: 'Chain broken',- [PhysicalBackupStatus.CANCELED]: 'Canceled',-};diff --git a/frontend/src/features/backups/physical/ui/EditPhysicalBackupConfigComponent.tsx b/frontend/src/features/backups/physical/ui/EditPhysicalBackupConfigComponent.tsxindex 715245fe..1a385b71 100644--- a/frontend/src/features/backups/physical/ui/EditPhysicalBackupConfigComponent.tsx+++ b/frontend/src/features/backups/physical/ui/EditPhysicalBackupConfigComponent.tsx@@ -1,19 +1,26 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Button, Checkbox, InputNumber, Modal, Select, Spin, Switch, Tooltip } from 'antd';import { type JSX, useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {type FullBackupsRetention,+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS,+ PHYSICAL_FULL_BACKUPS_POLICY_LABEL_KEYS,type PhysicalBackupConfig,PhysicalBackupNotificationType,PhysicalFullBackupsPolicy,PhysicalRetention,physicalBackupConfigApi,} from '../../../../entity/backups/physical';-import { BackupEncryption } from '../../../../entity/backups/shared';+import {+ BACKUP_ENCRYPTION_OPTION_LABEL_KEYS,+ BackupEncryption,+} from '../../../../entity/backups/shared';import { type Database, PhysicalDatabaseBackupType } from '../../../../entity/databases';import { type Interval, IntervalType } from '../../../../entity/intervals';import { type Storage, getStorageLogoFromType, storageApi } from '../../../../entity/storages';+import { translateApiError } from '../../../../shared/i18n';import { ConfirmationComponent } from '../../../../shared/ui';import { EditStorageComponent } from '../../../storages/ui/edit/EditStorageComponent';import { PhysicalIntervalEditor } from './PhysicalIntervalEditor';@@ -100,6 +107,7 @@ export const EditPhysicalBackupConfigComponent = ({isSaveToApi,onSaved,}: Props): JSX.Element => {+ const { t } = useTranslation();const [backupConfig, setBackupConfig] = useState<PhysicalBackupConfig>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);@@ -168,7 +176,7 @@ export const EditPhysicalBackupConfigComponent = ({await physicalBackupConfigApi.savePhysicalBackupConfig(configToSave);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);}@@ -181,7 +189,7 @@ export const EditPhysicalBackupConfigComponent = ({const loadedStorages = await storageApi.getStorages(database.workspaceId);setStorages(loadedStorages);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}};@@ -230,7 +238,7 @@ export const EditPhysicalBackupConfigComponent = ({await loadStorages();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {setIsLoading(false);}@@ -267,6 +275,16 @@ export const EditPhysicalBackupConfigComponent = ({const isFullRetentionValid =!isShowFullBackupsEditor || isFullBackupsRetentionValid(fullBackupsRetention);+ const encryptionOptions = Object.values(BackupEncryption).map((encryption) => ({+ value: encryption,+ label: t(BACKUP_ENCRYPTION_OPTION_LABEL_KEYS[encryption]),+ }));++ const fullBackupsPolicyOptions = Object.values(PhysicalFullBackupsPolicy).map((policy) => ({+ value: policy,+ label: t(PHYSICAL_FULL_BACKUPS_POLICY_LABEL_KEYS[policy]),+ }));+const isAllFieldsFilled =!backupConfig.isBackupsEnabled ||(Boolean(backupConfig.storage?.id) &&@@ -280,7 +298,9 @@ export const EditPhysicalBackupConfigComponent = ({<div>{database.id && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Backups enabled</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.backupsEnabled')}+ </div><Switchchecked={backupConfig.isBackupsEnabled}onChange={(checked) => updateBackupConfig({ isBackupsEnabled: checked })}@@ -292,7 +312,7 @@ export const EditPhysicalBackupConfigComponent = ({{backupConfig.isBackupsEnabled && (<><PhysicalIntervalEditor- label="Full backup cadence"+ label={t('backups.physical.config.fullBackupCadence')}interval={backupConfig.fullBackupInterval}onChange={updateFullInterval}/>@@ -300,14 +320,14 @@ export const EditPhysicalBackupConfigComponent = ({{isIncrementalAllowed && (<><PhysicalIntervalEditor- label="Incremental backup cadence"+ label={t('backups.physical.config.incrementalBackupCadence')}interval={backupConfig.incrementalBackupInterval}onChange={updateIncrementalInterval}/><div className="mt-1 mb-3 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[320px] text-xs text-gray-500 dark:text-gray-400">- Incremental backups must run more frequently than full backups.+ {t('backups.physical.config.incrementalMoreFrequent')}</div></div></>@@ -318,7 +338,7 @@ export const EditPhysicalBackupConfigComponent = ({)}<div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Storage</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('backups.config.storage')}</div><div className="flex w-full items-center"><Selectkey={storageSelectKey}@@ -340,15 +360,15 @@ export const EditPhysicalBackupConfigComponent = ({className="mr-2 max-w-[200px] grow"options={[...storages.map((s) => ({ label: s.name, value: s.id })),- { label: 'Create new storage', value: 'create-new-storage' },+ { label: t('backups.config.createNewStorage'), value: 'create-new-storage' },]}- placeholder="Select storage"+ placeholder={t('backups.config.selectStorage')}/>{backupConfig.storage?.type && (<imgsrc={getStorageLogoFromType(backupConfig.storage.type)}- alt="storageIcon"+ alt=""className="ml-1 h-4 w-4"/>)}@@ -356,22 +376,19 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Encryption</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('backups.config.encryption')}</div><div className="flex w-full items-center"><Selectvalue={backupConfig.encryption}onChange={(v) => updateBackupConfig({ encryption: v })}size="small"className="min-w-0 grow"- options={[- { label: 'None', value: BackupEncryption.NONE },- { label: 'Encrypt backup files', value: BackupEncryption.ENCRYPTED },- ]}+ options={encryptionOptions}/><TooltipclassName="cursor-pointer"- title="If backups are encrypted, the files in your storage cannot be used directly. You can restore them through Databasus or download them unencrypted."+ title={t('backups.physical.config.encryptionTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -379,11 +396,13 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mt-1 mb-1 min-w-[150px] sm:mb-0">Retention</div>+ <div className="mt-1 mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.physical.config.retention')}+ </div><div className="flex min-w-0 grow flex-col gap-2">{backupType === PhysicalDatabaseBackupType.FULL ? (<div className="max-w-[320px] text-xs text-gray-500 dark:text-gray-400">- This database keeps full backups only, so retention applies to full backups.+ {t('backups.physical.config.fullBackupsOnlyRetention')}</div>) : (<div className="flex w-full items-center">@@ -394,9 +413,12 @@ export const EditPhysicalBackupConfigComponent = ({className="min-w-0 grow"popupMatchSelectWidth={false}options={[- { label: 'Keep last N chains', value: PhysicalRetention.CHAINS },{- label: 'Keep last N chains and full backups',+ label: t('backups.physical.config.retentionOptions.chains'),+ value: PhysicalRetention.CHAINS,+ },+ {+ label: t('backups.physical.config.retentionOptions.chainsAndFullBackups'),value: PhysicalRetention.CHAINS_AND_FULL_BACKUPS,},]}@@ -406,22 +428,15 @@ export const EditPhysicalBackupConfigComponent = ({className="cursor-pointer"title={<div>- <div>- A chain is one full backup plus the incrementals (and streamed WAL) that- depend on it. Restoring needs the full backup and every incremental in its- chain.- </div>- <div className="mt-2 font-bold">Keep last N chains</div>- <div>- Keeps only the last N chains. When a chain rolls off, its full backup and all- its incrementals are deleted - you can restore only within the kept chains.+ <div>{t('backups.physical.config.retentionHelp.chain')}</div>+ <div className="mt-2 font-bold">+ {t('backups.physical.config.retentionOptions.chains')}</div>- <div className="mt-2 font-bold">Keep last N chains and full backups</div>- <div>- Keeps the last N chains for recent point-in-time recovery, and additionally- retains older standalone full backups by the policy below (GFS or last N) for- long-term restore points after their incrementals are gone.+ <div>{t('backups.physical.config.retentionHelp.chains')}</div>+ <div className="mt-2 font-bold">+ {t('backups.physical.config.retentionOptions.chainsAndFullBackups')}</div>+ <div>{t('backups.physical.config.retentionHelp.chainsAndFullBackups')}</div></div>}>@@ -433,10 +448,10 @@ export const EditPhysicalBackupConfigComponent = ({{isShowChainsCount && (<div className="flex items-center gap-2"><div className="flex w-[110px] items-center text-sm text-gray-600 dark:text-gray-400">- <span>Chains</span>+ <span>{t('backups.physical.config.chainsCount')}</span><TooltipclassName="cursor-pointer"- title="Number of most recent backup chains to keep. A chain is a full backup plus its incrementals."+ title={t('backups.physical.config.chainsCountTooltip')}><InfoCircleOutlined className="ml-1" style={{ color: 'gray' }} /></Tooltip>@@ -455,7 +470,7 @@ export const EditPhysicalBackupConfigComponent = ({<div className="mt-1 flex flex-col gap-2"><div className="flex w-full max-w-[200px] items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Full backups+ {t('backups.physical.config.fullBackups')}</span><Selectvalue={fullBackupsRetention.policy}@@ -463,23 +478,14 @@ export const EditPhysicalBackupConfigComponent = ({size="small"className="mr-5 max-w-[80px] min-w-0 grow"popupMatchSelectWidth={false}- options={[- {- label: 'Count',- value: PhysicalFullBackupsPolicy.LAST_N,- },- {- label: 'GFS',- value: PhysicalFullBackupsPolicy.GFS,- },- ]}+ options={fullBackupsPolicyOptions}/></div>{fullBackupsRetention.policy === PhysicalFullBackupsPolicy.LAST_N && (<div className="flex items-center gap-2"><span className="max-w-[110px] shrink-0 text-sm leading-4 text-gray-600 dark:text-gray-400">- Most recent full backups+ {t('backups.physical.config.fullBackupsCount')}</span><InputNumbermin={1}@@ -495,7 +501,7 @@ export const EditPhysicalBackupConfigComponent = ({<div className="flex max-w-[200px] flex-col gap-1"><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Hourly+ {t('backups.physical.config.gfsFields.hourly')}</span><InputNumbermin={0}@@ -507,7 +513,7 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Daily+ {t('backups.physical.config.gfsFields.daily')}</span><InputNumbermin={0}@@ -519,7 +525,7 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Weekly+ {t('backups.physical.config.gfsFields.weekly')}</span><InputNumbermin={0}@@ -531,7 +537,7 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Monthly+ {t('backups.physical.config.gfsFields.monthly')}</span><InputNumbermin={0}@@ -543,7 +549,7 @@ export const EditPhysicalBackupConfigComponent = ({</div><div className="flex items-center gap-2"><span className="w-[110px] text-sm text-gray-600 dark:text-gray-400">- Yearly+ {t('backups.physical.config.gfsFields.yearly')}</span><InputNumbermin={0}@@ -562,7 +568,9 @@ export const EditPhysicalBackupConfigComponent = ({{backupConfig.isBackupsEnabled && (<div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mt-0 mb-1 min-w-[150px] sm:mt-1 sm:mb-0">Notifications</div>+ <div className="mt-0 mb-1 min-w-[150px] sm:mt-1 sm:mb-0 sm:pr-2">+ {t('backups.config.notifications')}+ </div><div className="flex flex-col space-y-2"><Checkboxchecked={backupConfig.sendNotificationsOn.includes(@@ -572,7 +580,11 @@ export const EditPhysicalBackupConfigComponent = ({toggleNotification(PhysicalBackupNotificationType.BACKUP_SUCCESS, e.target.checked)}>- Backup success+ {t(+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ PhysicalBackupNotificationType.BACKUP_SUCCESS+ ],+ )}</Checkbox><Checkbox@@ -583,7 +595,11 @@ export const EditPhysicalBackupConfigComponent = ({toggleNotification(PhysicalBackupNotificationType.BACKUP_FAILED, e.target.checked)}>- Backup failed+ {t(+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ PhysicalBackupNotificationType.BACKUP_FAILED+ ],+ )}</Checkbox>{isIncrementalAllowed && (@@ -595,7 +611,11 @@ export const EditPhysicalBackupConfigComponent = ({toggleNotification(PhysicalBackupNotificationType.CHAIN_BROKEN, e.target.checked)}>- Chain broken+ {t(+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ PhysicalBackupNotificationType.CHAIN_BROKEN+ ],+ )}</Checkbox>)}@@ -608,7 +628,11 @@ export const EditPhysicalBackupConfigComponent = ({toggleNotification(PhysicalBackupNotificationType.WAL_GAP, e.target.checked)}>- WAL gap+ {t(+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[+ PhysicalBackupNotificationType.WAL_GAP+ ],+ )}</Checkbox>)}</div>@@ -618,13 +642,13 @@ export const EditPhysicalBackupConfigComponent = ({<div className="mt-5 flex">{isShowBackButton && (<Button className="mr-1" type="primary" ghost onClick={onBack}>- Back+ {t('common.actions.back')}</Button>)}{isShowCancelButton && (<Button danger ghost className="mr-1" onClick={onCancel}>- Cancel+ {t('common.actions.cancel')}</Button>)}@@ -635,13 +659,13 @@ export const EditPhysicalBackupConfigComponent = ({loading={isSaving}disabled={!isAllFieldsFilled || (isSaveToApi && !isUnsaved)}>- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button></div>{isShowCreateStorage && (<Modal- title="Add storage"+ title={t('backups.config.addStorageTitle')}footer={<div />}open={isShowCreateStorage}onCancel={() => {@@ -651,7 +675,7 @@ export const EditPhysicalBackupConfigComponent = ({maskClosable={false}><div className="my-3 max-w-[275px] text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, Google Drive, etc.)+ {t('backups.config.storageDescription')}</div><EditStorageComponent@@ -676,10 +700,10 @@ export const EditPhysicalBackupConfigComponent = ({<ConfirmationComponentonConfirm={() => setIsShowWarn(false)}onDecline={() => setIsShowWarn(false)}- description="If you change the storage, all backups in this storage will be deleted."+ description={t('backups.config.storageChangeWarning')}actionButtonColor="red"- actionText="I understand"- cancelText="Cancel"+ actionText={t('backups.config.storageChangeAcknowledge')}+ cancelText={t('common.actions.cancel')}hideCancelButton/>)}diff --git a/frontend/src/features/backups/physical/ui/PhysicalBackupsComponent.tsx b/frontend/src/features/backups/physical/ui/PhysicalBackupsComponent.tsxindex 45e55a6e..a4033fb1 100644--- a/frontend/src/features/backups/physical/ui/PhysicalBackupsComponent.tsx+++ b/frontend/src/features/backups/physical/ui/PhysicalBackupsComponent.tsx@@ -10,9 +10,13 @@ import {import { App, Button, Dropdown, type MenuProps, Modal, Spin, Table, Tooltip } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';+import type { TFunction } from 'i18next';import { type JSX, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ PHYSICAL_BACKUP_STATUS_LABEL_KEYS,+ PHYSICAL_BACKUP_TYPE_LABEL_KEYS,type PhysicalBackupConfig,type PhysicalBackupListItem,PhysicalBackupStatus,@@ -24,13 +28,11 @@ import {} from '../../../../entity/backups/physical';import { type Database, PhysicalDatabaseBackupType } from '../../../../entity/databases';import { usePersistentState } from '../../../../shared/hooks';+import { type LocaleContextValue, translateApiError, useLocale } from '../../../../shared/i18n';import { formatDuration } from '../../../../shared/lib';import { getUserTimeFormat } from '../../../../shared/time';import { ConfirmationComponent } from '../../../../shared/ui';-import {- PHYSICAL_BACKUP_STATUS_BADGE_STYLES,- PHYSICAL_BACKUP_STATUS_LABELS,-} from '../model/physicalBackupStatus';+import { PHYSICAL_BACKUP_STATUS_BADGE_STYLES } from '../model/physicalBackupStatus';import { PhysicalBackupsFiltersPanelComponent } from './PhysicalBackupsFiltersPanelComponent';import { PhysicalRestoreComponent } from './PhysicalRestoreComponent';@@ -43,21 +45,22 @@ interface Props {scrollContainerRef?: React.RefObject<HTMLDivElement | null>;}-const formatSize = (sizeMb: number): string => {+const formatSize = (sizeMb: number, formatNumber: LocaleContextValue['formatNumber']): string => {if (sizeMb >= 1024) {const sizeGb = sizeMb / 1024;- return `${Number(sizeGb.toFixed(2)).toLocaleString()} GB`;+ return `${formatNumber(Number(sizeGb.toFixed(2)))} GB`;}- return `${Number((sizeMb ?? 0).toFixed(2)).toLocaleString()} MB`;+ return `${formatNumber(Number((sizeMb ?? 0).toFixed(2)))} MB`;};const renderStatusBadge = (backup: PhysicalBackupListItem,onShowError: (backup: PhysicalBackupListItem) => void,+ t: TFunction,): JSX.Element => {const badgeStyle = PHYSICAL_BACKUP_STATUS_BADGE_STYLES[backup.status];- const label = PHYSICAL_BACKUP_STATUS_LABELS[backup.status];+ const label = t(PHYSICAL_BACKUP_STATUS_LABEL_KEYS[backup.status]);const badge = (<span@@ -77,7 +80,7 @@ const renderStatusBadge = (}return (- <Tooltip title="Click to see error details">+ <Tooltip title={t('backups.list.clickToSeeErrorDetails')}><span className="cursor-pointer" onClick={() => onShowError(backup)}>{badge}</span>@@ -85,11 +88,13 @@ const renderStatusBadge = ();};-const renderTypeBadge = (type: PhysicalBackupType): JSX.Element => {+const renderTypeBadge = (type: PhysicalBackupType, t: TFunction): JSX.Element => {+ const label = t(PHYSICAL_BACKUP_TYPE_LABEL_KEYS[type]);+if (type === PhysicalBackupType.FULL) {return (<span className="inline-flex items-center rounded bg-indigo-500/15 px-2 py-0.5 text-xs font-semibold text-indigo-700 ring-1 ring-indigo-500/40 ring-inset dark:text-indigo-300">- Full+ {label}</span>);}@@ -97,14 +102,14 @@ const renderTypeBadge = (type: PhysicalBackupType): JSX.Element => {if (type === PhysicalBackupType.WAL) {return (<span className="inline-flex items-center rounded bg-slate-400/10 px-2 py-0.5 text-xs font-medium text-slate-600 ring-1 ring-slate-400/30 ring-inset dark:text-slate-300">- WAL+ {label}</span>);}return (<span className="inline-flex items-center rounded bg-indigo-400/10 px-2 py-0.5 text-xs font-medium text-indigo-600 ring-1 ring-indigo-400/30 ring-inset dark:text-indigo-300">- Incremental+ {label}</span>);};@@ -115,6 +120,8 @@ export const PhysicalBackupsComponent = ({isDirectlyUnderTab,scrollContainerRef,}: Props): JSX.Element => {+ const { t } = useTranslation();+ const { formatNumber, formatRelativeTime } = useLocale();const { message } = App.useApp();const [isBackupsLoading, setIsBackupsLoading] = useState(false);@@ -145,6 +152,7 @@ export const PhysicalBackupsComponent = ({const [isFilterPanelVisible, setIsFilterPanelVisible] = useState(false);const [filters, setFilters] = usePersistentState<PhysicalBackupsFilters>(+ // eslint-disable-next-line i18next/no-literal-string -- localStorage key'physicalBackupsFilters',{},);@@ -181,7 +189,7 @@ export const PhysicalBackupsComponent = ({setHasMore(response.backups.length < response.total);} catch (e) {if (lastRequestTimeRef.current === requestTime) {- alert((e as Error).message);+ alert(translateApiError(e, t));}} finally {isBackupsRequestInFlightRef.current = false;@@ -215,7 +223,7 @@ export const PhysicalBackupsComponent = ({setHasMore(response.backups.length < response.total);} catch (e) {if (lastRequestTimeRef.current === requestTime) {- alert((e as Error).message);+ alert(translateApiError(e, t));}}@@ -232,7 +240,7 @@ export const PhysicalBackupsComponent = ({setHasMore(true);await loadBackups(BACKUPS_PAGE_SIZE);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}setIsTriggeringBackup(false);@@ -245,7 +253,7 @@ export const PhysicalBackupsComponent = ({await physicalBackupsApi.cancelPhysicalBackup(backupId);await loadBackups();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setCancellingBackupId(undefined);@@ -264,7 +272,7 @@ export const PhysicalBackupsComponent = ({setHasMore(true);await loadBackups(BACKUPS_PAGE_SIZE);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setDeletingBackupId(undefined);@@ -327,7 +335,7 @@ export const PhysicalBackupsComponent = ({{cancellingBackupId === record.id ? (<SyncOutlined spin />) : (- <Tooltip title="Cancel backup">+ <Tooltip title={t('backups.list.actions.cancelBackup')}><CloseCircleOutlinedclassName="cursor-pointer"onClick={() => {@@ -343,7 +351,7 @@ export const PhysicalBackupsComponent = ({{record.status === PhysicalBackupStatus.COMPLETED && (<>- <Tooltip title="Restore from this backup">+ <Tooltip title={t('backups.physical.list.restoreFromThisBackup')}><CloudUploadOutlinedclassName="cursor-pointer"onClick={() => setRestoringBackup(record)}@@ -355,7 +363,7 @@ export const PhysicalBackupsComponent = ({(deletingBackupId === record.id ? (<SyncOutlined spin />) : (- <Tooltip title="Delete backup">+ <Tooltip title={t('backups.list.actions.deleteBackup')}><DeleteOutlinedclassName="cursor-pointer"onClick={() => {@@ -388,33 +396,33 @@ export const PhysicalBackupsComponent = ({const columns: ColumnsType<PhysicalBackupListItem> = [{- title: 'Type',+ title: t('common.fields.type'),dataIndex: 'type',key: 'type',- render: (type: PhysicalBackupType) => renderTypeBadge(type),+ render: (type: PhysicalBackupType) => renderTypeBadge(type, t),},{- title: 'Status',+ title: t('common.fields.status'),dataIndex: 'status',key: 'status',render: (_status: PhysicalBackupStatus, record: PhysicalBackupListItem) =>- renderStatusBadge(record, setShowingBackupError),+ renderStatusBadge(record, setShowingBackupError, t),},{- title: 'Size',+ title: t('backups.list.columns.size'),dataIndex: 'sizeMb',key: 'sizeMb',width: 110,- render: (sizeMb: number) => formatSize(sizeMb),+ render: (sizeMb: number) => formatSize(sizeMb, formatNumber),},{- title: 'Duration',+ title: t('backups.list.columns.duration'),key: 'duration',width: 150,render: (_, record: PhysicalBackupListItem) => renderDuration(record),},{- title: 'Created',+ title: t('backups.list.columns.created'),dataIndex: 'createdAt',key: 'createdAt',render: (createdAt: Date) => (@@ -422,7 +430,7 @@ export const PhysicalBackupsComponent = ({{dayjs.utc(createdAt).local().format(getUserTimeFormat().format)}<br /><span className="text-gray-500 dark:text-gray-400">- ({dayjs.utc(createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(createdAt).local())})</span></div>),@@ -430,7 +438,7 @@ export const PhysicalBackupsComponent = ({defaultSortOrder: 'descend',},{- title: 'Actions',+ title: t('backups.list.columns.actions'),key: 'actions',render: (_, record: PhysicalBackupListItem) => renderActions(record),},@@ -438,10 +446,10 @@ export const PhysicalBackupsComponent = ({const backupNowMenu: MenuProps = {items: [- { key: 'full', label: 'Full backup' },+ { key: 'full', label: t('backups.physical.list.fullBackup') },{key: 'incremental',- label: 'Incremental backup',+ label: t('backups.physical.list.incrementalBackup'),disabled: !isIncrementalAllowed,},],@@ -466,7 +474,7 @@ export const PhysicalBackupsComponent = ({className={`w-full bg-white p-3 shadow md:p-5 dark:bg-gray-800 ${isDirectlyUnderTab ? 'rounded-tr-md rounded-br-md rounded-bl-md' : 'rounded-md'}`}><div className="flex items-center gap-2">- <h2 className="text-lg font-bold md:text-xl dark:text-white">Backups</h2>+ <h2 className="text-lg font-bold md:text-xl dark:text-white">{t('backups.list.title')}</h2><div className="relative">{isFilterPanelVisible ? (<FilterFilled@@ -492,13 +500,11 @@ export const PhysicalBackupsComponent = ({)}{!isBackupConfigLoading && !backupConfig?.isBackupsEnabled && (- <div className="text-sm text-red-600">- Scheduled backups are disabled (you can enable it back in the backup configuration)- </div>+ <div className="text-sm text-red-600">{t('backups.list.scheduledBackupsDisabled')}</div>)}<div className="mt-3 text-sm text-gray-600 dark:text-gray-400">- Total usage: {formatSize(totalUsageMb)}+ {t('backups.physical.list.totalUsage', { size: formatSize(totalUsageMb, formatNumber) })}</div><div className="mt-4 flex items-center">@@ -511,11 +517,11 @@ export const PhysicalBackupsComponent = ({menu={backupNowMenu}onClick={() => triggerBackup('auto')}>- Back up now+ {t('backups.physical.list.backUpNow')}</Dropdown.Button><Button className="ml-2" onClick={() => setIsPitrModalOpen(true)}>- Restore+ {t('backups.physical.list.restore')}</Button></div>@@ -536,28 +542,38 @@ export const PhysicalBackupsComponent = ({<div className="space-y-3"><div className="flex items-start justify-between"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Created</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.created')}+ </div><div className="text-sm font-medium">{dayjs.utc(backup.createdAt).local().format(getUserTimeFormat().format)}</div><div className="text-xs text-gray-500 dark:text-gray-400">- ({dayjs.utc(backup.createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(backup.createdAt).local())})</div></div>- <div>{renderStatusBadge(backup, setShowingBackupError)}</div>+ <div>{renderStatusBadge(backup, setShowingBackupError, t)}</div></div><div className="grid grid-cols-2 gap-4"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Type</div>- <div className="text-sm font-medium">{renderTypeBadge(backup.type)}</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('common.fields.type')}+ </div>+ <div className="text-sm font-medium">{renderTypeBadge(backup.type, t)}</div></div><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Size</div>- <div className="text-sm font-medium">{formatSize(backup.sizeMb)}</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.size')}+ </div>+ <div className="text-sm font-medium">+ {formatSize(backup.sizeMb, formatNumber)}+ </div></div><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Duration</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('backups.list.columns.duration')}+ </div><div className="text-sm font-medium">{renderDuration(backup)}</div></div></div>@@ -578,11 +594,13 @@ export const PhysicalBackupsComponent = ({)}{!hasMore && backups.length > 0 && (<div className="mt-3 text-center text-sm text-gray-500 dark:text-gray-400">- All backups loaded ({totalBackups} total)+ {t('backups.list.allLoaded', { count: totalBackups })}</div>)}{!isBackupsLoading && backups.length === 0 && (- <div className="py-8 text-center text-gray-500 dark:text-gray-400">No backups yet</div>+ <div className="py-8 text-center text-gray-500 dark:text-gray-400">+ {t('backups.list.empty')}+ </div>)}</div>@@ -604,7 +622,7 @@ export const PhysicalBackupsComponent = ({)}{!hasMore && backups.length > 0 && (<div className="mt-2 text-center text-gray-500 dark:text-gray-400">- All backups loaded ({totalBackups} total)+ {t('backups.list.allLoaded', { count: totalBackups })}</div>)}</div>@@ -616,11 +634,11 @@ export const PhysicalBackupsComponent = ({onDecline={() => setDeleteConfirmationBackup(undefined)}description={deleteConfirmationBackup.type === PhysicalBackupType.FULL- ? 'Deleting this full backup removes its entire chain (all incrementals that depend on it). This cannot be undone. Continue?'- : 'Deleting this incremental backup removes all later incrementals that depend on it. This cannot be undone. Continue?'+ ? t('backups.physical.list.deleteFullConfirmation')+ : t('backups.physical.list.deleteIncrementalConfirmation')}actionButtonColor="red"- actionText="Delete"+ actionText={t('common.actions.delete')}/>)}@@ -629,7 +647,7 @@ export const PhysicalBackupsComponent = ({width={640}open={!!restoringBackup}onCancel={() => setRestoringBackup(undefined)}- title="Restore from backup"+ title={t('backups.list.restoreTitle')}footer={null}maskClosable={false}>@@ -646,7 +664,7 @@ export const PhysicalBackupsComponent = ({width={640}open={isPitrModalOpen}onCancel={() => setIsPitrModalOpen(false)}- title="Point-in-time restore"+ title={t('backups.physical.list.pointInTimeRestoreTitle')}footer={null}maskClosable={false}>@@ -656,7 +674,7 @@ export const PhysicalBackupsComponent = ({{showingBackupError && (<Modal- title="Backup error details"+ title={t('backups.list.errorDetailsTitle')}open={!!showingBackupError}onCancel={() => setShowingBackupError(undefined)}maskClosable={false}diff --git a/frontend/src/features/backups/physical/ui/PhysicalBackupsFiltersPanelComponent.tsx b/frontend/src/features/backups/physical/ui/PhysicalBackupsFiltersPanelComponent.tsxindex 879c4845..dc14fea2 100644--- a/frontend/src/features/backups/physical/ui/PhysicalBackupsFiltersPanelComponent.tsx+++ b/frontend/src/features/backups/physical/ui/PhysicalBackupsFiltersPanelComponent.tsx@@ -1,31 +1,24 @@import { DatePicker, Select } from 'antd';import type { Dayjs } from 'dayjs';import dayjs from 'dayjs';+import { useTranslation } from 'react-i18next';import {+ PHYSICAL_BACKUP_STATUS_LABEL_KEYS,+ PHYSICAL_BACKUP_TYPE_LABEL_KEYS,PhysicalBackupStatus,PhysicalBackupType,type PhysicalBackupsFilters,} from '../../../../entity/backups/physical';-import { PHYSICAL_BACKUP_STATUS_LABELS } from '../model/physicalBackupStatus';interface Props {filters: PhysicalBackupsFilters;onFiltersChange: (filters: PhysicalBackupsFilters) => void;}-const typeOptions = [- { label: 'Full', value: PhysicalBackupType.FULL },- { label: 'Incremental', value: PhysicalBackupType.INCREMENTAL },- { label: 'WAL', value: PhysicalBackupType.WAL },-];--const statusOptions = Object.values(PhysicalBackupStatus).map((status) => ({- label: PHYSICAL_BACKUP_STATUS_LABELS[status],- value: status,-}));-export const PhysicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange }: Props) => {+ const { t } = useTranslation();+const handleTypeChange = (types: PhysicalBackupType[]) => {onFiltersChange({ ...filters, types: types.length > 0 ? types : undefined });};@@ -41,16 +34,28 @@ export const PhysicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange});};+ const typeOptions = Object.values(PhysicalBackupType).map((type) => ({+ label: t(PHYSICAL_BACKUP_TYPE_LABEL_KEYS[type]),+ value: type,+ }));++ const statusOptions = Object.values(PhysicalBackupStatus).map((status) => ({+ label: t(PHYSICAL_BACKUP_STATUS_LABEL_KEYS[status]),+ value: status,+ }));+return (<div className="flex flex-col gap-3"><div className="flex items-center gap-2">- <span className="min-w-[90px] text-sm text-gray-500 dark:text-gray-400">Type</span>+ <span className="min-w-[90px] pr-2 text-sm text-gray-500 dark:text-gray-400">+ {t('common.fields.type')}+ </span><Selectmode="multiple"value={filters.types ?? []}onChange={handleTypeChange}options={typeOptions}- placeholder="All types"+ placeholder={t('backups.filters.allTypes')}size="small"variant="filled"className="w-[200px] [&_.ant-select-selector]:!rounded-md"@@ -59,13 +64,15 @@ export const PhysicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange</div><div className="flex items-center gap-2">- <span className="min-w-[90px] text-sm text-gray-500 dark:text-gray-400">Status</span>+ <span className="min-w-[90px] pr-2 text-sm text-gray-500 dark:text-gray-400">+ {t('common.fields.status')}+ </span><Selectmode="multiple"value={filters.statuses ?? []}onChange={handleStatusChange}options={statusOptions}- placeholder="All statuses"+ placeholder={t('backups.filters.allStatuses')}size="small"variant="filled"className="w-[200px] [&_.ant-select-selector]:!rounded-md"@@ -74,7 +81,9 @@ export const PhysicalBackupsFiltersPanelComponent = ({ filters, onFiltersChange</div><div className="flex items-center gap-2">- <span className="min-w-[90px] text-sm text-gray-500 dark:text-gray-400">Before</span>+ <span className="min-w-[90px] pr-2 text-sm text-gray-500 dark:text-gray-400">+ {t('backups.filters.before')}+ </span><DatePickervalue={filters.beforeDate ? dayjs(filters.beforeDate) : null}onChange={handleBeforeDateChange}diff --git a/frontend/src/features/backups/physical/ui/PhysicalIntervalEditor.tsx b/frontend/src/features/backups/physical/ui/PhysicalIntervalEditor.tsxindex 5abb67aa..9aff3a2f 100644--- a/frontend/src/features/backups/physical/ui/PhysicalIntervalEditor.tsx+++ b/frontend/src/features/backups/physical/ui/PhysicalIntervalEditor.tsx@@ -3,8 +3,16 @@ import { Input, InputNumber, Select, TimePicker, Tooltip } from 'antd';import { CronExpressionParser } from 'cron-parser';import dayjs, { Dayjs } from 'dayjs';import { type JSX, useMemo } from 'react';+import { useTranslation } from 'react-i18next';-import { type Interval, IntervalType } from '../../../../entity/intervals';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ type Interval,+ IntervalType,+ WEEKDAYS,+ WEEKDAY_LABEL_KEYS,+} from '../../../../entity/intervals';+import { useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -20,21 +28,14 @@ interface Props {onChange: (patch: Partial<Interval>) => void;}-const weekdayOptions = [- { value: 1, label: 'Mon' },- { value: 2, label: 'Tue' },- { value: 3, label: 'Wed' },- { value: 4, label: 'Thu' },- { value: 5, label: 'Fri' },- { value: 6, label: 'Sat' },- { value: 7, label: 'Sun' },-];-// Reusable interval sub-form for a single backup cadence. All times are stored in// UTC (timeOfDay 'HH:mm', weekday/dayOfMonth as UTC values) and displayed in the// user's local timezone - the getUtc*/getLocal* helpers translate across the date// boundary so e.g. "Sunday 23:00 local" can map to "Monday 04:00 UTC".export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JSX.Element => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();+const timeFormat = useMemo(() => {const is12 = getIs12Hour();return { use12Hours: is12, format: is12 ? 'h:mm A' : 'HH:mm' };@@ -57,28 +58,34 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JS? getLocalDayOfMonth(interval.dayOfMonth, interval.timeOfDay): interval?.dayOfMonth;+ const intervalTypeOptions = Object.values(IntervalType).map((intervalType) => ({+ value: intervalType,+ label: t(INTERVAL_TYPE_LABEL_KEYS[intervalType]),+ }));++ const weekdayOptions = WEEKDAYS.map((weekday) => ({+ value: weekday,+ label: t(WEEKDAY_LABEL_KEYS[weekday]),+ }));+return (<><div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 max-w-[150px] min-w-[150px] leading-4 sm:mb-0">{label}</div>+ <div className="mb-1 max-w-[150px] min-w-[150px] leading-4 sm:mb-0 sm:pr-2">{label}</div><Selectvalue={interval?.type}onChange={(v) => onChange({ type: v })}size="small"className="w-full max-w-[200px] grow"- options={[- { label: 'Hourly', value: IntervalType.HOURLY },- { label: 'Daily', value: IntervalType.DAILY },- { label: 'Weekly', value: IntervalType.WEEKLY },- { label: 'Monthly', value: IntervalType.MONTHLY },- { label: 'Cron', value: IntervalType.CRON },- ]}+ options={intervalTypeOptions}/></div>{interval?.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Weekday</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.schedule.weekday')}+ </div><Selectvalue={displayedWeekday}onChange={(localWeekday) => {@@ -95,7 +102,9 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JS{interval?.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Day of month</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.schedule.dayOfMonth')}+ </div><InputNumbermin={1}max={31}@@ -114,7 +123,9 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JS{interval?.type === IntervalType.CRON && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Cron expression (UTC)</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.schedule.cronExpression')}+ </div><div className="flex items-center"><Inputvalue={interval?.cronExpression || ''}@@ -127,14 +138,12 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JSclassName="cursor-pointer"title={<div>- <div className="font-bold">- Cron format: minute hour day month weekday (UTC)- </div>- <div className="mt-1">Examples:</div>- <div>0 2 * * * - Daily at 2:00 AM UTC</div>- <div>0 */6 * * * - Every 6 hours</div>- <div>0 3 * * 1 - Every Monday at 3:00 AM UTC</div>- <div>30 4 1,15 * * - 1st and 15th at 4:30 AM UTC</div>+ <div className="font-bold">{t('backups.config.schedule.cronHelp.format')}</div>+ <div className="mt-1">{t('backups.config.schedule.cronHelp.examples')}</div>+ <div>0 2 * * * - {t('backups.config.schedule.cronHelp.dailyAt2am')}</div>+ <div>0 */6 * * * - {t('backups.config.schedule.cronHelp.every6Hours')}</div>+ <div>0 3 * * 1 - {t('backups.config.schedule.cronHelp.mondaysAt3am')}</div>+ <div>30 4 1,15 * * - {t('backups.config.schedule.cronHelp.twiceAMonth')}</div></div>}>@@ -151,18 +160,20 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JSconst nextRun = parsed.next().toDate();return (<div className="mb-1 flex w-full flex-col items-start text-xs text-gray-600 sm:flex-row sm:items-center dark:text-gray-400">- <div className="mb-1 min-w-[150px] sm:mb-0" />+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2" /><div className="text-gray-600 dark:text-gray-400">- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ {t('backups.config.schedule.nextRun', {+ time: dayjs(nextRun).local().format(dateTimeFormat.format),+ })}+ <br />({formatRelativeTime(nextRun)})</div></div>);} catch {return (<div className="mb-1 flex w-full flex-col items-start text-red-500 sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0" />- <div className="text-red-500">Invalid cron expression</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2" />+ <div className="text-red-500">{t('backups.config.schedule.invalidCron')}</div></div>);}@@ -172,7 +183,9 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JS{interval?.type !== IntervalType.HOURLY && interval?.type !== IntervalType.CRON && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Time of day</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('backups.config.schedule.timeOfDay')}+ </div><TimePickervalue={localTime}format={timeFormat.format}@@ -180,15 +193,15 @@ export const PhysicalIntervalEditor = ({ label, interval, onChange }: Props): JSallowClear={false}size="small"className="w-full max-w-[200px] grow"- onChange={(t) => {- if (!t) return;- const patch: Partial<Interval> = { timeOfDay: t.utc().format('HH:mm') };+ onChange={(pickedTime) => {+ if (!pickedTime) return;+ const patch: Partial<Interval> = { timeOfDay: pickedTime.utc().format('HH:mm') };if (interval?.type === IntervalType.WEEKLY && displayedWeekday) {- patch.weekday = getUtcWeekday(displayedWeekday, t);+ patch.weekday = getUtcWeekday(displayedWeekday, pickedTime);}if (interval?.type === IntervalType.MONTHLY && displayedDayOfMonth) {- patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, t);+ patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, pickedTime);}onChange(patch);diff --git a/frontend/src/features/backups/physical/ui/PhysicalRestoreComponent.tsx b/frontend/src/features/backups/physical/ui/PhysicalRestoreComponent.tsxindex 60485a72..0d9a5fe0 100644--- a/frontend/src/features/backups/physical/ui/PhysicalRestoreComponent.tsx+++ b/frontend/src/features/backups/physical/ui/PhysicalRestoreComponent.tsx@@ -2,6 +2,7 @@ import { CheckOutlined, CopyOutlined } from '@ant-design/icons';import { Alert, Button, DatePicker, Input, Segmented, Spin, Tabs } from 'antd';import type { Dayjs } from 'dayjs';import { type JSX, useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { getApplicationServer } from '../../../../constants';import {@@ -9,16 +10,24 @@ import {physicalBackupsApi,} from '../../../../entity/backups/physical';import type { Database } from '../../../../entity/databases';+import { ApiError } from '../../../../shared/api';+import { type TranslationKey, translateApiError } from '../../../../shared/i18n';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';+import { InlineCodeComponent } from '../../../../shared/ui';import {type RestoreEnvironment,+ buildChownCommand,+ buildDockerRunCommand,buildDockerScriptCommand,buildManualSteps,+ buildPgCtlStartCommand,buildScriptCommand,clusterDataDir,containerDataDir,containerVolumeDir,debianConfigDir,+ defaultDockerImage,+ defaultPgBinDir,} from '../lib/restoreCommands';interface Props {@@ -29,35 +38,28 @@ interface Props {type RestoreMethod = 'script' | 'manual';-// Surfaces a friendlier hint for the two known API failures: a concurrent download-// (409) and an unreachable target time / WAL gap (422).-const describeRestoreError = (message: string): string => {- if (message.includes('409') || message.toLowerCase().includes('in progress')) {- return `${message}\n\nA restore download is already in progress for this database. Wait for it to finish, then try again.`;- }-- if (message.includes('422') || message.toLowerCase().includes('gap')) {- return `${message}\n\nThe requested target time cannot be reached - there is a WAL gap or the time is out of the available range. Pick a different time or restore the latest available point.`;- }-- return message;+// The two restore failures with a known cause get a hint after the message: a concurrent download+// (409) and an unreachable target time or WAL gap (422). Decided by status, never by the text.+const RESTORE_ERROR_HINT_KEYS: Partial<Record<number, TranslationKey>> = {+ 409: 'backups.physical.restore.errorHints.downloadInProgress',+ 422: 'backups.physical.restore.errorHints.targetTimeUnreachable',};+const getRestoreErrorHintKey = (error: unknown): TranslationKey | undefined =>+ error instanceof ApiError && error.status ? RESTORE_ERROR_HINT_KEYS[error.status] : undefined;+// Rendered for host and Docker alike: whether the source keeps its configuration outside the data// directory cannot be known from here, and the resulting startup failure looks identical to a// wrong-directory mount, so the difference has to be spelled out.const missingConfigFilesNote = (pgVersion: string): JSX.Element => (<li>- A base backup copies only the data directory. If your source PostgreSQL keeps its configuration- outside it - the Debian/Ubuntu layout, <code>{debianConfigDir(pgVersion)}</code> - then{' '}- <code>postgresql.conf</code>, <code>pg_hba.conf</code> and <code>pg_ident.conf</code> are not in- the backup and the server will not start. Ask the source for their real paths with{' '}- <code>psql -Atc "SHOW config_file"</code>, copy all three in, then comment out{' '}- <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>,{' '}- <code>external_pid_file</code> and the <code>ssl</code> / <code>ssl_*</code> lines, create{' '}- <code>conf.d</code>, and set <code>listen_addresses = '*'</code> for a container. If- those files are present and you still get the same error, it is the mounted directory that is- wrong, not the configuration.+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.missingConfigFiles"+ components={{+ code: <InlineCodeComponent />,+ configDir: <InlineCodeComponent>{debianConfigDir(pgVersion)}</InlineCodeComponent>,+ }}+ /></li>);@@ -76,6 +78,7 @@ const CopyableCommand = ({copiedKey,onCopy,}: CopyableCommandProps): JSX.Element => {+ const { t } = useTranslation();const isCopied = copiedKey === id;return (@@ -88,7 +91,7 @@ const CopyableCommand = ({icon={isCopied ? <CheckOutlined /> : <CopyOutlined />}onClick={() => onCopy(id, code)}>- {isCopied ? 'Copied' : 'Copy'}+ {isCopied ? t('backups.physical.restore.copied') : t('common.actions.copy')}</Button></div><pre className="overflow-x-auto rounded bg-gray-100 p-3 text-xs whitespace-pre-wrap text-gray-700 dark:bg-gray-700 dark:text-gray-200">@@ -99,6 +102,8 @@ const CopyableCommand = ({};export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props): JSX.Element => {+ const { t } = useTranslation();+// The source cluster's major version, detected on connect. Physical databases are// always PostgreSQL 17 or 18; the fallback is only a defensive guard. Every shown// image tag, bin path and container PGDATA derives from this single value.@@ -106,18 +111,18 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):const [targetTime, setTargetTime] = useState<Dayjs | undefined>();const [isGenerating, setIsGenerating] = useState(true);- const [errorMessage, setErrorMessage] = useState<string>();+ const [restoreError, setRestoreError] = useState<unknown>();const [bundleUrl, setBundleUrl] = useState<string>();const [restoreMethod, setRestoreMethod] = useState<RestoreMethod>('script');const [environment, setEnvironment] = useState<RestoreEnvironment>('host');const [outputDir, setOutputDir] = useState('./databasus-restore');const [pgBin, setPgBin] = useState('');- const [dockerImage, setDockerImage] = useState(`postgres:${pgVersion}`);+ const [dockerImage, setDockerImage] = useState(defaultDockerImage(pgVersion));const [copiedKey, setCopiedKey] = useState<string | null>(null);const generateRestore = async () => {setIsGenerating(true);- setErrorMessage(undefined);+ setRestoreError(undefined);setBundleUrl(undefined);setCopiedKey(null);@@ -131,7 +136,7 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):setBundleUrl(`${getApplicationServer()}${response.url}`);} catch (e) {- setErrorMessage(describeRestoreError((e as Error).message));+ setRestoreError(e);}setIsGenerating(false);@@ -155,11 +160,14 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):const dataDir = clusterDataDir(outputDir, pgVersion);const scriptUrl = `${getApplicationServer()}/api/v1/backups/physical/recovery-script`;const recoveryTargetTime = targetTime ? targetTime.utc().format('YYYY-MM-DD HH:mm:ssZ') : '';+ const restoreErrorHintKey = getRestoreErrorHintKey(restoreError);const renderConfig = (env: RestoreEnvironment): JSX.Element => (<div className="mb-3"><div className="mb-2 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Restore directory</div>+ <div className="mb-1 shrink-0 sm:mb-0 sm:w-[190px] sm:pr-2">+ {t('backups.physical.restore.fields.restoreDirectory')}+ </div><Inputvalue={outputDir}onChange={(e) => setOutputDir(e.target.value)}@@ -168,17 +176,23 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):</div>{env === 'host' ? (<div className="flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">PostgreSQL bin path</div>+ <div className="mb-1 shrink-0 sm:mb-0 sm:w-[190px] sm:pr-2">+ {t('backups.physical.restore.fields.pgBinPath')}+ </div><Inputvalue={pgBin}onChange={(e) => setPgBin(e.target.value)}- placeholder={`/usr/lib/postgresql/${pgVersion}/bin (optional)`}+ placeholder={t('backups.physical.restore.fields.pgBinPathPlaceholder', {+ path: defaultPgBinDir(pgVersion),+ })}className="w-full max-w-[320px]"/></div>) : (<div className="flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">PostgreSQL image</div>+ <div className="mb-1 shrink-0 sm:mb-0 sm:w-[190px] sm:pr-2">+ {t('backups.physical.restore.fields.pgImage')}+ </div><Inputvalue={dockerImage}onChange={(e) => setDockerImage(e.target.value)}@@ -211,7 +225,11 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):return (<CopyableCommandid={`script-${env}`}- title={env === 'host' ? 'Run on your restore host' : 'Run where Docker is available'}+ title={+ env === 'host'+ ? t('backups.physical.restore.scriptTitles.host')+ : t('backups.physical.restore.scriptTitles.docker')+ }code={code}copiedKey={copiedKey}onCopy={copyText}@@ -234,9 +252,9 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):<>{steps.map((step, index) => (<CopyableCommand- key={step.title}+ key={step.titleKey}id={`manual-${env}-${index}`}- title={`${index + 1}. ${step.title}`}+ title={`${index + 1}. ${t(step.titleKey)}`}code={step.code}copiedKey={copiedKey}onCopy={copyText}@@ -252,24 +270,31 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):<Alerttype="info"showIcon- message="Before you run"+ message={t('backups.physical.restore.beforeYouRun.title')}description={env === 'host' ? (<ul className="ml-4 list-disc"><li>- Install the PostgreSQL {pgVersion} client tools - set the bin path above if they are- not on PATH.+ {t('backups.physical.restore.beforeYouRun.host.clientTools', {+ version: pgVersion,+ })}+ </li>+ <li>+ {hasWal+ ? t('backups.physical.restore.beforeYouRun.host.zstdWithWal')+ : t('backups.physical.restore.beforeYouRun.host.zstd')}</li>- <li>zstd is required to decompress the backup{hasWal ? ' and its WAL' : ''}.</li>- <li>The restore directory must be empty and not an in-use cluster.</li>+ <li>{t('backups.physical.restore.beforeYouRun.host.emptyDirectory')}</li></ul>) : (<ul className="ml-4 list-disc">- <li>Use a postgres:{pgVersion} image - the major version must match the source.</li><li>- The host needs zstd, tar and curl: the download and all decompression - the base- backup{hasWal ? ' and the WAL' : ''} - run on the host, and only pg_combinebackup- runs in the container, so the postgres image needs no extra tools.+ {t('backups.physical.restore.beforeYouRun.docker.image', { version: pgVersion })}+ </li>+ <li>+ {hasWal+ ? t('backups.physical.restore.beforeYouRun.docker.hostToolsWithWal')+ : t('backups.physical.restore.beforeYouRun.docker.hostTools')}</li></ul>)@@ -280,57 +305,92 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):<Alerttype="info"showIcon- message="After it finishes"+ message={t('backups.physical.restore.afterItFinishes.title')}description={env === 'host' ? (<ul className="ml-4 list-disc"><li>- The cluster is at <code>{dataDir}</code>.+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.host.clusterLocation"+ components={{ dataDir: <InlineCodeComponent>{dataDir}</InlineCodeComponent> }}+ /></li><li>- Own it as root: <code>chown -R postgres:postgres {dataDir}</code>.+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.host.changeOwner"+ components={{+ command: (+ <InlineCodeComponent>{buildChownCommand(dataDir)}</InlineCodeComponent>+ ),+ }}+ /></li><li>- Start it as postgres: <code>pg_ctl -D {dataDir} start</code>, or point- data_directory at it.+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.host.start"+ components={{+ command: (+ <InlineCodeComponent>{buildPgCtlStartCommand(dataDir)}</InlineCodeComponent>+ ),+ }}+ /></li>- {hasWal && (- <li>- PostgreSQL replays WAL and promotes - watch the log for recovery completion.- </li>- )}+ {hasWal && <li>{t('backups.physical.restore.afterItFinishes.host.walReplay')}</li>}{missingConfigFilesNote(pgVersion)}</ul>) : (<ul className="ml-4 list-disc"><li>- <code>{dataDir}</code> on the host is the restored cluster.+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.docker.clusterLocation"+ components={{ dataDir: <InlineCodeComponent>{dataDir}</InlineCodeComponent> }}+ /></li>{Number(pgVersion) >= 18 ? (<li>- PostgreSQL {pgVersion} keeps its data directory at{' '}- <code>{containerDataDir(pgVersion)}</code>, under the volume{' '}- <code>{containerVolumeDir(pgVersion)}</code>. Mount the output dir as that volume- root - this is what a docker-compose <code>./pgdata:/var/lib/postgresql</code>{' '}- expects:+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.docker.volumeMount"+ values={{ version: pgVersion }}+ components={{+ code: <InlineCodeComponent />,+ dataDir: (+ <InlineCodeComponent>{containerDataDir(pgVersion)}</InlineCodeComponent>+ ),+ volumeDir: (+ <InlineCodeComponent>{containerVolumeDir(pgVersion)}</InlineCodeComponent>+ ),+ }}+ /><br />- <code>- {`docker run -e POSTGRES_PASSWORD=... -v "$PWD/${outputDir}:${containerVolumeDir(pgVersion)}" postgres:${pgVersion}`}- </code>+ <InlineCodeComponent>+ {buildDockerRunCommand({+ hostDir: outputDir,+ containerDir: containerVolumeDir(pgVersion),+ pgVersion,+ })}+ </InlineCodeComponent></li>) : (<li>- Bind-mount the cluster at the image's data directory{' '}- <code>{containerDataDir(pgVersion)}</code>:+ <Trans+ i18nKey="backups.physical.restore.afterItFinishes.docker.dataDirectoryMount"+ components={{+ dataDir: (+ <InlineCodeComponent>{containerDataDir(pgVersion)}</InlineCodeComponent>+ ),+ }}+ /><br />- <code>- {`docker run -e POSTGRES_PASSWORD=... -v "$PWD/${dataDir}:${containerDataDir(pgVersion)}" postgres:${pgVersion}`}- </code>+ <InlineCodeComponent>+ {buildDockerRunCommand({+ hostDir: dataDir,+ containerDir: containerDataDir(pgVersion),+ pgVersion,+ })}+ </InlineCodeComponent></li>)}- <li>- Ownership must match the postgres uid inside the image (999 in the official one).- </li>+ <li>{t('backups.physical.restore.afterItFinishes.docker.ownership')}</li>{missingConfigFilesNote(pgVersion)}</ul>)@@ -343,38 +403,39 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):<div>{backup ? (<div className="mb-3 text-sm text-gray-600 dark:text-gray-400">- Restore command for this backup. A full backup restores itself; an incremental restores- its full backup and all incremental ancestors.+ {t('backups.physical.restore.backupIntro')}</div>) : (<><div className="mb-3 text-sm text-gray-600 dark:text-gray-400">- Point-in-time restore. Pick a target time, or leave it empty to restore the latest- available point.+ {t('backups.physical.restore.pointInTimeIntro')}</div><div className="mb-3 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[120px] sm:mb-0">Target time</div>+ <div className="mb-1 min-w-[120px] sm:mb-0 sm:pr-2">+ {t('backups.physical.restore.targetTime')}+ </div><DatePickershowTimevalue={targetTime}onChange={(value) => setTargetTime(value ?? undefined)}className="w-full max-w-[260px] grow"- placeholder="Latest available"+ placeholder={t('backups.physical.restore.latestAvailable')}/></div></>)}- {errorMessage && (+ {restoreError !== undefined && (<div className="mt-3 rounded border border-red-300/50 bg-red-50 px-3 py-2 text-sm whitespace-pre-line text-red-700 dark:border-red-600/30 dark:bg-red-900/20 dark:text-red-400">- {errorMessage}+ <div>{translateApiError(restoreError, t)}</div>+ {restoreErrorHintKey && <div className="mt-5">{t(restoreErrorHintKey)}</div>}</div>)}{isGenerating && (<div className="mt-5 flex items-center gap-2 border-t border-gray-200 pt-4 text-sm text-gray-500 dark:border-gray-700 dark:text-gray-400"><Spin size="small" />- Preparing restore command...+ {t('backups.physical.restore.preparing')}</div>)}@@ -384,8 +445,8 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):value={restoreMethod}onChange={setRestoreMethod}options={[- { label: 'Via script', value: 'script' },- { label: 'Manual', value: 'manual' },+ { label: t('backups.physical.restore.methods.script'), value: 'script' },+ { label: t('backups.physical.restore.methods.manual'), value: 'manual' },]}/><Tabs@@ -395,26 +456,26 @@ export const PhysicalRestoreComponent = ({ database, backup, onClose }: Props):items={[{key: 'host',- label: 'Host PostgreSQL',+ label: t('backups.physical.restore.environments.host'),children: renderEnvironmentPanel('host', bundleUrl),},{key: 'docker',+ // eslint-disable-next-line i18next/no-literal-string -- product namelabel: 'Docker',children: renderEnvironmentPanel('docker', bundleUrl),},]}/><p className="mt-1 text-xs text-gray-500 dark:text-gray-400">- The download link is single-use and expires in 15 minutes. If a command fails with a- 401, reopen this dialog to mint a fresh one.+ {t('backups.physical.restore.linkExpiry')}</p></div>)}<div className="mt-4 flex"><Button className="ml-auto" onClick={onClose}>- Close+ {t('common.actions.close')}</Button></div></div>diff --git a/frontend/src/features/backups/physical/ui/ShowPhysicalBackupConfigComponent.tsx b/frontend/src/features/backups/physical/ui/ShowPhysicalBackupConfigComponent.tsxindex 637688a7..2b1c8d01 100644--- a/frontend/src/features/backups/physical/ui/ShowPhysicalBackupConfigComponent.tsx+++ b/frontend/src/features/backups/physical/ui/ShowPhysicalBackupConfigComponent.tsx@@ -3,19 +3,28 @@ import { Tooltip } from 'antd';import { CronExpressionParser } from 'cron-parser';import dayjs from 'dayjs';import { type JSX, useEffect, useMemo, useState } from 'react';+import { useTranslation } from 'react-i18next';import {type FullBackupsRetention,+ PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS,+ PHYSICAL_RETENTION_LABEL_KEYS,type PhysicalBackupConfig,- PhysicalBackupNotificationType,PhysicalFullBackupsPolicy,PhysicalRetention,physicalBackupConfigApi,} from '../../../../entity/backups/physical';-import { BackupEncryption } from '../../../../entity/backups/shared';+import { BACKUP_ENCRYPTION_LABEL_KEYS } from '../../../../entity/backups/shared';import type { Database } from '../../../../entity/databases';-import { type Interval, IntervalType } from '../../../../entity/intervals';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ type Interval,+ IntervalType,+ WEEKDAY_LABEL_KEYS,+ type Weekday,+} from '../../../../entity/intervals';import { getStorageLogoFromType } from '../../../../entity/storages';+import { type LocalizedText, translateLocalizedText, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -27,52 +36,41 @@ interface Props {database: Database;}-const weekdayLabels: Record<number, string> = {- 1: 'Mon',- 2: 'Tue',- 3: 'Wed',- 4: 'Thu',- 5: 'Fri',- 6: 'Sat',- 7: 'Sun',-};--const intervalLabels: Record<IntervalType, string> = {- [IntervalType.HOURLY]: 'Hourly',- [IntervalType.DAILY]: 'Daily',- [IntervalType.WEEKLY]: 'Weekly',- [IntervalType.MONTHLY]: 'Monthly',- [IntervalType.CRON]: 'Cron',-};--const notificationLabels: Record<PhysicalBackupNotificationType, string> = {- [PhysicalBackupNotificationType.BACKUP_SUCCESS]: 'Backup success',- [PhysicalBackupNotificationType.BACKUP_FAILED]: 'Backup failed',- [PhysicalBackupNotificationType.CHAIN_BROKEN]: 'Chain broken',- [PhysicalBackupNotificationType.WAL_GAP]: 'WAL gap',-};--const retentionLabels: Record<PhysicalRetention, string> = {- [PhysicalRetention.CHAINS]: 'Chains',- [PhysicalRetention.FULL_BACKUPS]: 'Full backups',- [PhysicalRetention.CHAINS_AND_FULL_BACKUPS]: 'Chains and full backups',-};--const formatGfsRetention = (retention: FullBackupsRetention): string => {- const parts: string[] = [];-- if (retention.gfsHours > 0) parts.push(`${retention.gfsHours} hourly`);- if (retention.gfsDays > 0) parts.push(`${retention.gfsDays} daily`);- if (retention.gfsWeeks > 0) parts.push(`${retention.gfsWeeks} weekly`);- if (retention.gfsMonths > 0) parts.push(`${retention.gfsMonths} monthly`);- if (retention.gfsYears > 0) parts.push(`${retention.gfsYears} yearly`);-- return parts.length > 0 ? parts.join(', ') : 'Not configured';+const getGfsRetentionTexts = (retention: FullBackupsRetention): LocalizedText[] => {+ const texts: LocalizedText[] = [];++ if (retention.gfsHours > 0) {+ texts.push({ key: 'backups.config.gfs.hourly', params: { count: retention.gfsHours } });+ }+ if (retention.gfsDays > 0) {+ texts.push({ key: 'backups.config.gfs.daily', params: { count: retention.gfsDays } });+ }+ if (retention.gfsWeeks > 0) {+ texts.push({ key: 'backups.config.gfs.weekly', params: { count: retention.gfsWeeks } });+ }+ if (retention.gfsMonths > 0) {+ texts.push({ key: 'backups.config.gfs.monthly', params: { count: retention.gfsMonths } });+ }+ if (retention.gfsYears > 0) {+ texts.push({ key: 'backups.config.gfs.yearly', params: { count: retention.gfsYears } });+ }++ return texts;};export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Element => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();+ const listSeparator = t('common.listSeparator');const [backupConfig, setBackupConfig] = useState<PhysicalBackupConfig>();+ const describeGfsRetention = (retention: FullBackupsRetention): string => {+ const texts = getGfsRetentionTexts(retention);+ if (texts.length === 0) return t('backups.config.gfs.notConfigured');++ return texts.map((text) => translateLocalizedText(text, t)).join(listSeparator);+ };+const timeFormat = useMemo(() => {const is12Hour = getIs12Hour();return { use12Hours: is12Hour, format: is12Hour ? 'h:mm A' : 'HH:mm' };@@ -107,10 +105,12 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elemconst nextRun = parsed.next().toDate();return (<div className="mb-1 flex w-full items-center text-xs text-gray-600 dark:text-gray-400">- <div className="min-w-[180px]" />+ <div className="min-w-[180px] pr-2" /><div>- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ {t('backups.config.schedule.nextRun', {+ time: dayjs(nextRun).local().format(dateTimeFormat.format),+ })}+ <br />({formatRelativeTime(nextRun)})</div></div>);@@ -122,20 +122,20 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elemreturn (<><div className="mt-4 mb-1 flex w-full items-center">- <div className="max-w-[150px] min-w-[150px]">{label}</div>- <div>{intervalLabels[interval.type]}</div>+ <div className="max-w-[150px] min-w-[150px] pr-2">{label}</div>+ <div>{t(INTERVAL_TYPE_LABEL_KEYS[interval.type])}</div></div>{interval.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Weekday</div>- <div>{displayedWeekday ? weekdayLabels[displayedWeekday] : ''}</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.schedule.weekday')}</div>+ <div>{displayedWeekday ? t(WEEKDAY_LABEL_KEYS[displayedWeekday as Weekday]) : ''}</div></div>)}{interval.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Day of month</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.schedule.dayOfMonth')}</div><div>{displayedDayOfMonth || ''}</div></div>)}@@ -143,7 +143,9 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elem{interval.type === IntervalType.CRON && (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Cron expression (UTC)</div>+ <div className="min-w-[180px] pr-2">+ {t('backups.config.schedule.cronExpression')}+ </div><code className="rounded bg-gray-100 px-2 py-0.5 text-sm dark:bg-gray-700">{interval.cronExpression || ''}</code>@@ -154,7 +156,7 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elem{interval.type !== IntervalType.HOURLY && interval.type !== IntervalType.CRON && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Time of day</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.schedule.timeOfDay')}</div><div>{formattedTime}</div></div>)}@@ -182,42 +184,56 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.ElembackupConfig.retention === PhysicalRetention.FULL_BACKUPS ||backupConfig.retention === PhysicalRetention.CHAINS_AND_FULL_BACKUPS;+ const retentionLabelKey = PHYSICAL_RETENTION_LABEL_KEYS[backupConfig.retention];+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Backups enabled</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.backupsEnabled')}</div><div className={backupConfig.isBackupsEnabled ? '' : 'font-bold text-red-600'}>- {backupConfig.isBackupsEnabled ? 'Yes' : 'No'}+ {backupConfig.isBackupsEnabled ? t('common.answers.yes') : t('common.answers.no')}</div></div>{backupConfig.isBackupsEnabled && (<>- {renderInterval('Full backup cadence', backupConfig.fullBackupInterval)}- {renderInterval('Incremental backup cadence', backupConfig.incrementalBackupInterval)}+ {renderInterval(+ t('backups.physical.config.fullBackupCadence'),+ backupConfig.fullBackupInterval,+ )}+ {renderInterval(+ t('backups.physical.config.incrementalBackupCadence'),+ backupConfig.incrementalBackupInterval,+ )}<div className="mt-4 mb-1 flex w-full items-center">- <div className="min-w-[180px]">Retention</div>- <div>{retentionLabels[backupConfig.retention] ?? '-'}</div>+ <div className="min-w-[180px] pr-2">{t('backups.physical.config.retention')}</div>+ <div>{retentionLabelKey ? t(retentionLabelKey) : '-'}</div></div>{isShowChainsCount && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Chains kept</div>+ <div className="min-w-[180px] pr-2">{t('backups.physical.config.chainsKept')}</div><div>{backupConfig.chainsRetention?.count ?? '-'}</div></div>)}{isShowFullBackups && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Full backups kept</div>+ <div className="min-w-[180px] pr-2">+ {t('backups.physical.config.fullBackupsKept')}+ </div><div className="flex items-center gap-1">{fullBackupsRetention.policy === PhysicalFullBackupsPolicy.LAST_N ? (- <span>Last {fullBackupsRetention.count} full backups</span>+ <span>+ {t('backups.physical.config.fullBackupsCountValue', {+ count: fullBackupsRetention.count,+ })}+ </span>) : (<span className="flex items-center gap-1">- {formatGfsRetention(fullBackupsRetention)}- <Tooltip title="Grandfather-Father-Son rotation: keep the last N hourly, daily, weekly, monthly and yearly full backups.">+ {describeGfsRetention(fullBackupsRetention)}+ <Tooltip title={t('backups.physical.config.gfsTooltip')}><InfoCircleOutlined style={{ color: 'gray' }} /></Tooltip></span>@@ -227,13 +243,13 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elem)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Storage</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.storage')}</div><div className="flex items-center"><div>{backupConfig.storage?.name || '-'}</div>{backupConfig.storage?.type && (<imgsrc={getStorageLogoFromType(backupConfig.storage.type)}- alt="storageIcon"+ alt=""className="ml-1 h-4 w-4"/>)}@@ -241,18 +257,18 @@ export const ShowPhysicalBackupConfigComponent = ({ database }: Props): JSX.Elem</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Encryption</div>- <div>{backupConfig.encryption === BackupEncryption.ENCRYPTED ? 'Enabled' : 'None'}</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.encryption')}</div>+ <div>{t(BACKUP_ENCRYPTION_LABEL_KEYS[backupConfig.encryption])}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Notifications</div>+ <div className="min-w-[180px] pr-2">{t('backups.config.notifications')}</div><div>{backupConfig.sendNotificationsOn.length > 0? backupConfig.sendNotificationsOn- .map((type) => notificationLabels[type])- .join(', ')- : 'None'}+ .map((type) => t(PHYSICAL_BACKUP_NOTIFICATION_TYPE_LABEL_KEYS[type]))+ .join(listSeparator)+ : t('backups.config.noNotifications')}</div></div></>diff --git a/frontend/src/features/databases/ui/CreateDatabaseComponent.tsx b/frontend/src/features/databases/ui/CreateDatabaseComponent.tsxindex 8c651d32..83f8b3e0 100644--- a/frontend/src/features/databases/ui/CreateDatabaseComponent.tsx+++ b/frontend/src/features/databases/ui/CreateDatabaseComponent.tsx@@ -1,4 +1,5 @@-import { useState } from 'react';+import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {type LogicalBackupConfig,@@ -18,6 +19,7 @@ import {initializeDatabaseTypeData,isPostgresType,} from '../../../entity/databases';+import { translateApiError } from '../../../shared/i18n';import { EditLogicalBackupConfigComponent } from '../../backups/logical';import { EditPhysicalBackupConfigComponent } from '../../backups/physical';import { ChoosePostgresBackupTypeComponent } from './edit/ChoosePostgresBackupTypeComponent';@@ -31,6 +33,7 @@ interface Props {onCreated: (databaseId: string) => void;onClose: () => void;onConnectionErrorChange?: (hasConnectionError: boolean) => void;+ onWideStepChange?: (isWideStep: boolean) => void;}const createInitialDatabase = (workspaceId: string): Database =>@@ -53,7 +56,9 @@ export const CreateDatabaseComponent = ({onCreated,onClose,onConnectionErrorChange,+ onWideStepChange,}: Props) => {+ const { t } = useTranslation();const [isCreating, setIsCreating] = useState(false);const [backupConfig, setBackupConfig] = useState<LogicalBackupConfig | undefined>();const [physicalBackupConfig, setPhysicalBackupConfig] = useState<@@ -73,6 +78,12 @@ export const CreateDatabaseComponent = ({const isPhysical = database.type === DatabaseType.POSTGRES_PHYSICAL;const isPostgres = isPostgresType(database.type);+ // The read-only user step explains its choice in long sentences and puts three buttons in one+ // row, which the narrow wizard width cannot hold.+ useEffect(() => {+ onWideStepChange?.(step === 'create-readonly-user');+ }, [step]);+const createDatabase = async (database: Database) => {if (isPhysical ? !physicalBackupConfig : !backupConfig) return;@@ -101,7 +112,7 @@ export const CreateDatabaseComponent = ({onCreated(createdDatabase.id);onClose();} catch (error) {- alert(error);+ alert(translateApiError(error, t));}setIsCreating(false);@@ -115,7 +126,7 @@ export const CreateDatabaseComponent = ({isShowNameisShowEngineisSaveToApi={false}- saveButtonText="Continue"+ saveButtonText={t('common.actions.continue')}onCancel={() => onClose()}onSaved={(db) => {const initializedDb = initializeDatabaseTypeData(db);@@ -131,7 +142,7 @@ export const CreateDatabaseComponent = ({return (<ChoosePostgresBackupTypeComponentdatabase={database}- saveButtonText="Continue"+ saveButtonText={t('common.actions.continue')}onBack={() => setStep('base-info')}onSelected={(type) => {const initializedDb = initializeDatabaseTypeData({ ...database, type });@@ -150,7 +161,7 @@ export const CreateDatabaseComponent = ({onCancel={() => onClose()}isShowBackButtononBack={() => setStep(isPostgres ? 'postgres-backup-type' : 'base-info')}- saveButtonText="Continue"+ saveButtonText={t('common.actions.continue')}isSaveToApi={false}onConnectionErrorChange={onConnectionErrorChange}onSaved={(database) => {@@ -186,7 +197,7 @@ export const CreateDatabaseComponent = ({onCancel={() => onClose()}isShowBackButtononBack={() => setStep('db-settings')}- saveButtonText="Continue"+ saveButtonText={t('common.actions.continue')}isSaveToApi={false}onSaved={(physicalBackupConfig) => {setPhysicalBackupConfig(physicalBackupConfig);@@ -203,7 +214,7 @@ export const CreateDatabaseComponent = ({onCancel={() => onClose()}isShowBackButtononBack={() => setStep('db-settings')}- saveButtonText="Continue"+ saveButtonText={t('common.actions.continue')}isSaveToApi={false}onSaved={(backupConfig) => {setBackupConfig(backupConfig);@@ -215,7 +226,7 @@ export const CreateDatabaseComponent = ({if (step === 'notifiers') {if (isCreating) {- return <div>Creating database...</div>;+ return <div>{t('databases.create.creating')}</div>;}return (@@ -227,7 +238,7 @@ export const CreateDatabaseComponent = ({isShowBackButtononBack={() => setStep('backup-config')}isShowSaveOnlyForUnsaved={false}- saveButtonText="Complete"+ saveButtonText={t('databases.create.complete')}isSaveToApi={false}onSaved={(database) => {if (isCreating) return;diff --git a/frontend/src/features/databases/ui/DatabaseCardComponent.tsx b/frontend/src/features/databases/ui/DatabaseCardComponent.tsxindex 2a0aca28..daf379a2 100644--- a/frontend/src/features/databases/ui/DatabaseCardComponent.tsx+++ b/frontend/src/features/databases/ui/DatabaseCardComponent.tsx@@ -1,13 +1,14 @@import { InfoCircleOutlined } from '@ant-design/icons';-import dayjs from 'dayjs';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { logicalBackupConfigApi } from '../../../entity/backups/logical';import { physicalBackupConfigApi } from '../../../entity/backups/physical';-import { type Database, DatabaseType } from '../../../entity/databases';+import { type Database, DatabaseType, HEALTH_STATUS_LABEL_KEYS } from '../../../entity/databases';import { HealthStatus } from '../../../entity/databases/model/HealthStatus';import type { Storage } from '../../../entity/storages';import { getStorageLogoFromType } from '../../../entity/storages/models/getStorageLogoFromType';+import { useLocale } from '../../../shared/i18n';interface Props {database: Database;@@ -20,6 +21,8 @@ export const DatabaseCardComponent = ({selectedDatabaseId,setSelectedDatabaseId,}: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const [storage, setStorage] = useState<Storage | undefined>();useEffect(() => {@@ -48,7 +51,7 @@ export const DatabaseCardComponent = ({database.healthStatus === HealthStatus.AVAILABLE ? 'bg-green-500' : 'bg-red-500'}`}>- {database.healthStatus === HealthStatus.AVAILABLE ? 'Available' : 'Unavailable'}+ {t(HEALTH_STATUS_LABEL_KEYS[database.healthStatus])}</div></div>)}@@ -56,30 +59,38 @@ export const DatabaseCardComponent = ({{storage && (<div className="text-sm text-gray-500 dark:text-gray-400">- <span>Storage: </span>- <span className="inline-flex items-center">- {storage.name}{' '}- {storage.type && (- <img- src={getStorageLogoFromType(storage.type)}- alt="storageIcon"- className="ml-1 h-4 w-4"- />- )}- </span>+ <Trans+ i18nKey="databases.card.storage"+ components={{+ storageName: (+ <span className="inline-flex items-center">+ {storage.name}{' '}+ {storage.type && (+ <img+ src={getStorageLogoFromType(storage.type)}+ alt=""+ className="ml-1 h-4 w-4"+ />+ )}+ </span>+ ),+ }}+ /></div>)}{database.lastBackupTime && (<div className="text-gray-500 dark:text-gray-400">- Last backup {dayjs(database.lastBackupTime).fromNow()}+ {t('databases.card.lastBackup', {+ relativeTime: formatRelativeTime(database.lastBackupTime),+ })}</div>)}{database.lastBackupErrorMessage && (<div className="mt-1 flex items-center text-sm text-red-600 underline dark:text-red-400"><InfoCircleOutlined className="mr-1" style={{ color: 'red' }} />- Has backup error+ {t('databases.card.hasBackupError')}</div>)}</div>diff --git a/frontend/src/features/databases/ui/DatabaseComponent.tsx b/frontend/src/features/databases/ui/DatabaseComponent.tsxindex d49141dd..0d85b6ca 100644--- a/frontend/src/features/databases/ui/DatabaseComponent.tsx+++ b/frontend/src/features/databases/ui/DatabaseComponent.tsx@@ -1,5 +1,6 @@import { Spin } from 'antd';import { useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import { type Database, DatabaseType, databaseApi } from '../../../entity/databases';import { LogicalBackupsComponent } from '../../backups/logical';@@ -23,6 +24,7 @@ export const DatabaseComponent = ({onDatabaseDeleted,isCanManageDBs,}: Props) => {+ const { t } = useTranslation();const [currentTab, setCurrentTab] = useState<'config' | 'backups' | 'verifications'>('backups');const [database, setDatabase] = useState<Database | undefined>();@@ -64,14 +66,14 @@ export const DatabaseComponent = ({className={`mr-2 cursor-pointer rounded-tl-md rounded-tr-md px-6 py-2 ${currentTab === 'config' ? 'bg-white dark:bg-gray-800' : 'bg-gray-200 dark:bg-gray-700'}`}onClick={() => setCurrentTab('config')}>- Config+ {t('databases.tabs.config')}</div><divclassName={`mr-2 cursor-pointer rounded-tl-md rounded-tr-md px-6 py-2 ${currentTab === 'backups' ? 'bg-white dark:bg-gray-800' : 'bg-gray-200 dark:bg-gray-700'}`}onClick={() => setCurrentTab('backups')}>- Backups+ {t('databases.tabs.backups')}</div>{isLogicalDatabase && (@@ -79,7 +81,7 @@ export const DatabaseComponent = ({className={`mr-2 cursor-pointer rounded-tl-md rounded-tr-md px-6 py-2 ${currentTab === 'verifications' ? 'bg-white dark:bg-gray-800' : 'bg-gray-200 dark:bg-gray-700'}`}onClick={() => setCurrentTab('verifications')}>- Verifications+ {t('databases.tabs.verifications')}</div>)}</div>diff --git a/frontend/src/features/databases/ui/DatabaseConfigComponent.tsx b/frontend/src/features/databases/ui/DatabaseConfigComponent.tsxindex 3ff21d87..59da0f32 100644--- a/frontend/src/features/databases/ui/DatabaseConfigComponent.tsx+++ b/frontend/src/features/databases/ui/DatabaseConfigComponent.tsx@@ -7,10 +7,12 @@ import {} from '@ant-design/icons';import { Button, Input } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { logicalBackupConfigApi } from '../../../entity/backups/logical';import { physicalBackupConfigApi } from '../../../entity/backups/physical';import { type Database, DatabaseType, databaseApi } from '../../../entity/databases';+import { translateApiError } from '../../../shared/i18n';import { ToastHelper } from '../../../shared/toast';import { ConfirmationComponent } from '../../../shared/ui';import {@@ -52,6 +54,7 @@ export const DatabaseConfigComponent = ({setEditDatabase,isCanManageDBs,}: Props) => {+ const { t } = useTranslation();const [isEditName, setIsEditName] = useState(false);const [isEditDatabaseSpecificDataSettings, setIsEditDatabaseSpecificDataSettings] =useState(false);@@ -99,13 +102,13 @@ export const DatabaseConfigComponent = ({.copyDatabase(database.id).then((copiedDatabase) => {ToastHelper.showToast({- title: 'Database copied successfully!',- description: `"${copiedDatabase.name}" has been created successfully`,+ title: t('databases.config.copied.title'),+ description: t('databases.config.copied.description', { name: copiedDatabase.name }),});window.location.reload();})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));}).finally(() => {setIsCopying(false);@@ -120,8 +123,8 @@ export const DatabaseConfigComponent = ({.testDatabaseConnection(database.id).then(() => {ToastHelper.showToast({- title: 'Connection test successful!',- description: 'Database connection tested successfully',+ title: t('databases.config.connectionTestSucceeded.title'),+ description: t('databases.config.connectionTestSucceeded.description'),});if (database.lastBackupErrorMessage) {@@ -129,8 +132,8 @@ export const DatabaseConfigComponent = ({onDatabaseChanged(database);}})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));}).finally(() => {setIsTestingConnection(false);@@ -147,8 +150,8 @@ export const DatabaseConfigComponent = ({.then(() => {onDatabaseDeleted();})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));}).finally(() => {setIsRemoving(false);@@ -187,8 +190,8 @@ export const DatabaseConfigComponent = ({setIsEditName(false);onDatabaseChanged(editDatabase);})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));setIsSaving(false);});};@@ -202,7 +205,7 @@ export const DatabaseConfigComponent = ({<div className="flex flex-col items-center gap-3"><div className="h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-blue-500" /><span className="text-sm font-medium text-gray-600 dark:text-gray-300">- Removing database...+ {t('databases.config.removing')}</span></div></div>@@ -230,7 +233,7 @@ export const DatabaseConfigComponent = ({setEditDatabase({ ...editDatabase, name: e.target.value });setIsNameUnsaved(true);}}- placeholder="Enter name..."+ placeholder={t('databases.config.namePlaceholder')}size="large"/>@@ -257,7 +260,7 @@ export const DatabaseConfigComponent = ({loading={isSaving}disabled={!editDatabase?.name}>- Save+ {t('common.actions.save')}</Button>)}</div>@@ -267,20 +270,20 @@ export const DatabaseConfigComponent = ({<div className="mb-4 max-w-full rounded border border-red-600 px-3 py-3 sm:max-w-[400px]"><div className="mt-1 flex items-center text-sm font-bold text-red-600"><InfoCircleOutlined className="mr-2" style={{ color: 'red' }} />- Last backup error+ {t('databases.config.lastBackupError.title')}</div><div className="mt-3 text-sm break-words whitespace-pre-wrap">- The error:+ {t('databases.config.lastBackupError.errorLabel')}<br />{database.lastBackupErrorMessage}</div><div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- To clean this error (choose any):+ {t('databases.config.lastBackupError.clearHint')}<ul>- <li>- test connection via button below (even if you updated settings);</li>- <li>- wait until the next backup is done without errors;</li>+ <li>{t('databases.config.lastBackupError.clearByTestingConnection')}</li>+ <li>{t('databases.config.lastBackupError.clearByNextBackup')}</li></ul></div></div>@@ -289,7 +292,7 @@ export const DatabaseConfigComponent = ({<div className="flex flex-col gap-6 lg:flex-row lg:flex-wrap lg:gap-10"><div className="w-full lg:w-[400px]"><div className="mt-5 flex items-center font-bold">- <div>Database settings</div>+ <div>{t('databases.config.sections.database')}</div>{!isEditDatabaseSpecificDataSettings && isCanManageDBs ? (<div className="ml-2 h-4 w-4 cursor-pointer" onClick={() => startEdit('database')}>@@ -322,7 +325,7 @@ export const DatabaseConfigComponent = ({<div className="w-full lg:w-[400px]"><div className="mt-5 flex items-center font-bold">- <div>Backup config</div>+ <div>{t('databases.config.sections.backupConfig')}</div>{!isEditBackupConfig && isCanManageDBs ? (<div@@ -379,7 +382,7 @@ export const DatabaseConfigComponent = ({<div className="flex flex-col gap-6 lg:flex-row lg:flex-wrap lg:gap-10"><div className="w-full lg:w-[400px]"><div className="mt-5 flex items-center font-bold">- <div>Healthcheck settings</div>+ <div>{t('databases.config.sections.healthcheck')}</div>{!isEditHealthcheckSettings && isCanManageDBs ? (<div className="ml-2 h-4 w-4 cursor-pointer" onClick={() => startEdit('healthcheck')}>@@ -408,7 +411,7 @@ export const DatabaseConfigComponent = ({{isLogicalDatabase && (<div className="w-full lg:w-[400px]"><div className="mt-5 flex items-center font-bold">- <div>Restore verification</div>+ <div>{t('databases.config.sections.restoreVerification')}</div>{!isEditVerificationConfig && isCanManageDBs ? (<div@@ -440,7 +443,7 @@ export const DatabaseConfigComponent = ({<div className="w-full lg:w-[400px]"><div className="mt-5 flex items-center font-bold">- <div>Notifiers settings</div>+ <div>{t('databases.config.sections.notifiers')}</div>{!isEditNotifiersSettings && isCanManageDBs ? (<div className="ml-2 h-4 w-4 cursor-pointer" onClick={() => startEdit('notifiers')}>@@ -465,7 +468,7 @@ export const DatabaseConfigComponent = ({loadSettings();}}isSaveToApi={true}- saveButtonText="Save"+ saveButtonText={t('common.actions.save')}onSaved={onDatabaseChanged}/>) : (@@ -484,7 +487,7 @@ export const DatabaseConfigComponent = ({loading={isTestingConnection}disabled={isTestingConnection}>- Test connection+ {t('databases.actions.testConnection')}</Button>{isCanManageDBs && (@@ -525,8 +528,8 @@ export const DatabaseConfigComponent = ({<ConfirmationComponentonConfirm={copyDatabase}onDecline={() => setIsShowCopyConfirm(false)}- description="Are you sure you want to copy this database? A new database with the same settings will be created."- actionText="Copy"+ description={t('databases.config.copyConfirmation')}+ actionText={t('common.actions.copy')}actionButtonColor="blue"/>)}@@ -535,8 +538,8 @@ export const DatabaseConfigComponent = ({<ConfirmationComponentonConfirm={remove}onDecline={() => setIsShowRemoveConfirm(false)}- description="Are you sure you want to remove this database? This action cannot be undone."- actionText="Remove"+ description={t('databases.config.removeConfirmation')}+ actionText={t('common.actions.remove')}actionButtonColor="red"/>)}diff --git a/frontend/src/features/databases/ui/DatabaseTransferDialogComponent.tsx b/frontend/src/features/databases/ui/DatabaseTransferDialogComponent.tsxindex 36d92e58..65217ab9 100644--- a/frontend/src/features/databases/ui/DatabaseTransferDialogComponent.tsx+++ b/frontend/src/features/databases/ui/DatabaseTransferDialogComponent.tsx@@ -1,6 +1,7 @@import { CheckCircleOutlined, ExclamationCircleOutlined, SwapOutlined } from '@ant-design/icons';import { Button, Modal, Radio, Select, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { logicalBackupConfigApi } from '../../../entity/backups/logical';import { physicalBackupConfigApi } from '../../../entity/backups/physical';@@ -10,6 +11,7 @@ import type { Notifier } from '../../../entity/notifiers';import { notifierApi } from '../../../entity/notifiers';import { type Storage, getStorageLogoFromType, storageApi } from '../../../entity/storages';import { type WorkspaceResponse, workspaceApi } from '../../../entity/workspaces';+import { translateApiError } from '../../../shared/i18n';import { ToastHelper } from '../../../shared/toast';import { EditNotifierComponent } from '../../notifiers/ui/edit/EditNotifierComponent';import { EditStorageComponent } from '../../storages/ui/edit/EditStorageComponent';@@ -33,6 +35,7 @@ export const DatabaseTransferDialogComponent = ({onClose,onTransferred,}: Props) => {+ const { t } = useTranslation();const [isLoading, setIsLoading] = useState(true);const [workspaces, setWorkspaces] = useState<WorkspaceResponse[]>([]);const [selectedWorkspaceId, setSelectedWorkspaceId] = useState<string | undefined>();@@ -68,7 +71,7 @@ export const DatabaseTransferDialogComponent = ({const filteredWorkspaces = response.workspaces.filter((w) => w.id !== database.workspaceId);setWorkspaces(filteredWorkspaces);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsLoading(false);@@ -85,7 +88,7 @@ export const DatabaseTransferDialogComponent = ({const count = await logicalBackupConfigApi.getDatabasesCountForStorage(currentStorageId);setStorageUsageCount(count);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsLoadingStorageCount(false);@@ -110,7 +113,7 @@ export const DatabaseTransferDialogComponent = ({setNotifierUsageInfo(usageInfo);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsLoadingNotifierCounts(false);@@ -125,7 +128,7 @@ export const DatabaseTransferDialogComponent = ({setTargetStorages(storages);setTargetNotifiers(notifiers);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}};@@ -149,12 +152,12 @@ export const DatabaseTransferDialogComponent = ({await logicalBackupConfigApi.transferDatabase(database.id, request);}ToastHelper.showToast({- title: 'Database transferred successfully!',- description: `"${database.name}" has been transferred to the new workspace`,+ title: t('databases.transfer.transferred.title'),+ description: t('databases.transfer.transferred.description', { name: database.name }),});onTransferred();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTransferring(false);@@ -190,7 +193,7 @@ export const DatabaseTransferDialogComponent = ({title={<div className="flex items-center gap-2"><SwapOutlined />- Transfer database to another workspace+ {t('databases.transfer.title')}</div>}footer={null}@@ -207,12 +210,12 @@ export const DatabaseTransferDialogComponent = ({<div className="py-3">{/* Workspace Selection */}<div className="mb-5">- <div className="mb-2 font-medium">Target workspace</div>+ <div className="mb-2 font-medium">{t('databases.transfer.targetWorkspace')}</div><Selectvalue={selectedWorkspaceId}onChange={setSelectedWorkspaceId}className="w-full"- placeholder="Select workspace"+ placeholder={t('databases.transfer.selectWorkspace')}options={workspaces.map((w) => ({ label: w.name, value: w.id }))}/></div>@@ -221,7 +224,7 @@ export const DatabaseTransferDialogComponent = ({<>{/* Storage Transfer Options */}<div className="mb-5">- <div className="mb-2 font-medium">Storage</div>+ <div className="mb-2 font-medium">{t('databases.transfer.storage.title')}</div><Radio.Groupvalue={storageOption}onChange={(e) => setStorageOption(e.target.value)}@@ -231,14 +234,14 @@ export const DatabaseTransferDialogComponent = ({<div><Radio value="transfer"><span className="flex items-center gap-2">- Transfer with existing storage+ {t('databases.transfer.storage.transferExisting')}{isLoadingStorageCount && <Spin size="small" />}</span></Radio></div>)}<div>- <Radio value="select">Select storage from target workspace</Radio>+ <Radio value="select">{t('databases.transfer.storage.selectFromTarget')}</Radio></div></Radio.Group>@@ -250,14 +253,13 @@ export const DatabaseTransferDialogComponent = ({<div className="flex items-center gap-2 rounded border border-red-300 bg-red-50 p-2 text-sm text-red-600 dark:border-red-600 dark:bg-red-900/20"><ExclamationCircleOutlined /><span>- This storage is used by {storageUsageCount} databases. Transfer is blocked- because other databases depend on it.+ {t('databases.transfer.storage.blocked', { count: storageUsageCount })}</span></div>) : (<div className="flex items-center gap-2 text-sm text-green-600 dark:text-green-400"><CheckCircleOutlined />- Storage can be transferred+ {t('databases.transfer.storage.canTransfer')}</div>)}</div>@@ -277,10 +279,13 @@ export const DatabaseTransferDialogComponent = ({setSelectedStorageId(storageId);}}className="w-full max-w-[300px]"- placeholder="Select storage"+ placeholder={t('databases.transfer.storage.selectPlaceholder')}options={[...targetStorages.map((s) => ({ label: s.name, value: s.id })),- { label: 'Create new storage', value: 'create-new-storage' },+ {+ label: t('databases.transfer.storage.createNew'),+ value: 'create-new-storage',+ },]}/>@@ -290,7 +295,7 @@ export const DatabaseTransferDialogComponent = ({src={getStorageLogoFromType(targetStorages.find((s) => s.id === selectedStorageId)!.type,)}- alt="storageIcon"+ alt=""className="h-4 w-4"/>)}@@ -302,7 +307,7 @@ export const DatabaseTransferDialogComponent = ({{/* Notifier transfer options */}{hasCurrentNotifiers && (<div className="mb-5">- <div className="mb-2 font-medium">Notifiers (optional)</div>+ <div className="mb-2 font-medium">{t('databases.transfer.notifiers.title')}</div><Radio.Groupvalue={notifierOption}@@ -310,10 +315,14 @@ export const DatabaseTransferDialogComponent = ({className="flex flex-col gap-3"><div>- <Radio value="transfer">Transfer notifiers with database</Radio>+ <Radio value="transfer">+ {t('databases.transfer.notifiers.transferWithDatabase')}+ </Radio></div><div>- <Radio value="select">Select notifiers from target workspace</Radio>+ <Radio value="select">+ {t('databases.transfer.notifiers.selectFromTarget')}+ </Radio></div></Radio.Group>@@ -327,7 +336,7 @@ export const DatabaseTransferDialogComponent = ({<div className="text-sm text-green-600 dark:text-green-400"><div className="mb-1 flex items-center gap-1"><CheckCircleOutlined />- <span>Will be transferred:</span>+ <span>{t('databases.transfer.notifiers.willTransfer')}</span></div><ul className="ml-5 list-disc">{notifiersCanTransfer.map((info) => (@@ -341,12 +350,15 @@ export const DatabaseTransferDialogComponent = ({<div className="mt-2 rounded border border-red-300 bg-red-50 p-2 text-sm text-red-600 dark:border-red-600 dark:bg-red-900/20 dark:text-red-600"><div className="mb-1 flex items-center gap-1"><ExclamationCircleOutlined />- <span>Will NOT be transferred (used by other databases):</span>+ <span>{t('databases.transfer.notifiers.willNotTransfer')}</span></div><ul className="ml-5 list-disc">{notifiersBlockingTransfer.map((info) => (<li key={info.notifier.id}>- {info.notifier.name} (used by {info.databaseCount} databases)+ {t('databases.transfer.notifiers.usedByDatabases', {+ name: info.notifier.name,+ count: info.databaseCount,+ })}</li>))}</ul>@@ -356,8 +368,7 @@ export const DatabaseTransferDialogComponent = ({{notifiersCanTransfer.length === 0 &¬ifiersBlockingTransfer.length > 0 && (<div className="mt-1 text-sm text-gray-500 dark:text-gray-400">- No notifiers will be transferred. You can select notifiers from the- target workspace after transfer.+ {t('databases.transfer.notifiers.noneTransferred')}</div>)}</div>@@ -379,10 +390,13 @@ export const DatabaseTransferDialogComponent = ({setSelectedNotifierIds(notifierIds);}}className="w-full max-w-[300px]"- placeholder="Select notifiers (optional)"+ placeholder={t('databases.transfer.notifiers.selectPlaceholder')}options={[...targetNotifiers.map((n) => ({ label: n.name, value: n.id })),- { label: 'Create new notifier', value: 'create-new-notifier' },+ {+ label: t('databases.notifiers.createNew'),+ value: 'create-new-notifier',+ },]}/></div>@@ -395,7 +409,7 @@ export const DatabaseTransferDialogComponent = ({{/* Action Buttons */}<div className="mt-5 flex gap-2"><Button type="default" onClick={onClose}>- Cancel+ {t('common.actions.cancel')}</Button><Button@@ -404,7 +418,7 @@ export const DatabaseTransferDialogComponent = ({loading={isTransferring}disabled={!isFormValid || isTransferring}>- Transfer+ {t('databases.transfer.submit')}</Button></div></div>@@ -413,7 +427,7 @@ export const DatabaseTransferDialogComponent = ({{/* Create Storage Modal */}{isShowCreateStorage && selectedWorkspaceId && (<Modal- title="Add storage"+ title={t('databases.transfer.storage.addTitle')}footer={null}open={isShowCreateStorage}onCancel={() => {@@ -423,7 +437,7 @@ export const DatabaseTransferDialogComponent = ({maskClosable={false}><div className="my-3 max-w-[275px] text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, Google Drive, etc.)+ {t('databases.transfer.storage.description')}</div><EditStorageComponent@@ -443,7 +457,7 @@ export const DatabaseTransferDialogComponent = ({{/* Create Notifier Modal */}{isShowCreateNotifier && selectedWorkspaceId && (<Modal- title="Add notifier"+ title={t('databases.notifiers.addTitle')}footer={null}open={isShowCreateNotifier}onCancel={() => {@@ -453,7 +467,7 @@ export const DatabaseTransferDialogComponent = ({maskClosable={false}><div className="my-3 max-w-[275px] text-gray-500 dark:text-gray-400">- Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)+ {t('databases.notifiers.description')}</div><EditNotifierComponentdiff --git a/frontend/src/features/databases/ui/DatabasesComponent.tsx b/frontend/src/features/databases/ui/DatabasesComponent.tsxindex 20e87c36..7e597bf1 100644--- a/frontend/src/features/databases/ui/DatabasesComponent.tsx+++ b/frontend/src/features/databases/ui/DatabasesComponent.tsx@@ -1,10 +1,12 @@import { Button, Modal, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { databaseApi } from '../../../entity/databases';import type { Database } from '../../../entity/databases';import type { WorkspaceResponse } from '../../../entity/workspaces';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError } from '../../../shared/i18n';import { CreateDatabaseComponent } from './CreateDatabaseComponent';import { DatabaseCardComponent } from './DatabaseCardComponent';import { DatabaseComponent } from './DatabaseComponent';@@ -15,9 +17,11 @@ interface Props {isCanManageDBs: boolean;}+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst SELECTED_DATABASE_STORAGE_KEY = 'selectedDatabaseId';export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }: Props) => {+ const { t } = useTranslation();const isMobile = useIsMobile();const [isLoading, setIsLoading] = useState(true);const [databases, setDatabases] = useState<Database[]>([]);@@ -25,6 +29,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:const [isShowAddDatabase, setIsShowAddDatabase] = useState(false);const [hasConnectionError, setHasConnectionError] = useState(false);+ const [isWideStep, setIsWideStep] = useState(false);const [selectedDatabaseId, setSelectedDatabaseId] = useState<string | undefined>(undefined);const updateSelectedDatabaseId = (databaseId: string | undefined) => {@@ -59,7 +64,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:updateSelectedDatabaseId(databaseToSelect);}})- .catch((e) => alert(e.message))+ .catch((e) => alert(translateApiError(e, t))).finally(() => setIsLoading(false));};@@ -90,7 +95,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:setIsShowAddDatabase(true);}}>- Add database+ {t('databases.list.addDatabase')}</Button>);@@ -116,7 +121,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:<div className="mb-2"><input- placeholder="Search database"+ placeholder={t('databases.list.searchPlaceholder')}value={searchQuery}onChange={(e) => setSearchQuery(e.target.value)}className="w-full border-b border-gray-300 p-1 text-gray-500 outline-none dark:text-gray-400"@@ -136,14 +141,14 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:)): searchQuery && (<div className="mb-4 text-center text-sm text-gray-500 dark:text-gray-400">- No databases found matching "{searchQuery}"+ {t('databases.list.noSearchResults', { query: searchQuery })}</div>)}{databases.length < 5 && isCanManageDBs && addDatabaseButton}<div className="mx-3 text-center text-xs text-gray-500 dark:text-gray-400">- Database - is a thing we are backing up+ {t('databases.list.description')}</div></div>)}@@ -157,7 +162,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:onClick={() => updateSelectedDatabaseId(undefined)}className="w-full">- ← Back to databases+ {t('databases.list.backToList')}</Button></div>)}@@ -183,13 +188,13 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:{isShowAddDatabase && (<Modal- title="Add database for backup"+ title={t('databases.create.title')}footer={<div />}open={isShowAddDatabase}onCancel={() => setIsShowAddDatabase(false)}maskClosable={false}closable={!hasConnectionError}- width={hasConnectionError ? 640 : 420}+ width={hasConnectionError || isWideStep ? 640 : 420}><div className="mt-5" />@@ -201,6 +206,7 @@ export const DatabasesComponent = ({ contentHeight, workspace, isCanManageDBs }:}}onClose={() => setIsShowAddDatabase(false)}onConnectionErrorChange={setHasConnectionError}+ onWideStepChange={setIsWideStep}/></Modal>)}diff --git a/frontend/src/features/databases/ui/edit/AdvancedSettingsToggleComponent.tsx b/frontend/src/features/databases/ui/edit/AdvancedSettingsToggleComponent.tsxindex d203b5e7..f482f2c6 100644--- a/frontend/src/features/databases/ui/edit/AdvancedSettingsToggleComponent.tsx+++ b/frontend/src/features/databases/ui/edit/AdvancedSettingsToggleComponent.tsx@@ -1,23 +1,28 @@import { DownOutlined, UpOutlined } from '@ant-design/icons';+import { useTranslation } from 'react-i18next';interface Props {isShowAdvanced: boolean;onToggle: () => void;}-export const AdvancedSettingsToggleComponent = ({ isShowAdvanced, onToggle }: Props) => (- <div className="mt-4 mb-1 flex items-center">- <div- className="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"- onClick={onToggle}- >- <span className="mr-2">Advanced settings</span>+export const AdvancedSettingsToggleComponent = ({ isShowAdvanced, onToggle }: Props) => {+ const { t } = useTranslation();- {isShowAdvanced ? (- <UpOutlined style={{ fontSize: '12px' }} />- ) : (- <DownOutlined style={{ fontSize: '12px' }} />- )}+ return (+ <div className="mt-4 mb-1 flex items-center">+ <div+ className="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"+ onClick={onToggle}+ >+ <span className="mr-2">{t('databases.edit.advancedSettings')}</span>++ {isShowAdvanced ? (+ <UpOutlined style={{ fontSize: '12px' }} />+ ) : (+ <DownOutlined style={{ fontSize: '12px' }} />+ )}+ </div></div>- </div>-);+ );+};diff --git a/frontend/src/features/databases/ui/edit/ChoosePostgresBackupTypeComponent.tsx b/frontend/src/features/databases/ui/edit/ChoosePostgresBackupTypeComponent.tsxindex e0469996..bd33fddc 100644--- a/frontend/src/features/databases/ui/edit/ChoosePostgresBackupTypeComponent.tsx+++ b/frontend/src/features/databases/ui/edit/ChoosePostgresBackupTypeComponent.tsx@@ -1,7 +1,9 @@import { Button } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import { type Database, DatabaseType } from '../../../../entity/databases';+import type { TranslationKey } from '../../../../shared/i18n';interface Props {database: Database;@@ -10,17 +12,20 @@ interface Props {onSelected: (type: DatabaseType) => void;}-const backupTypeOptions = [+const backupTypeOptions: {+ type: DatabaseType;+ titleKey: TranslationKey;+ descriptionKey: TranslationKey;+}[] = [{type: DatabaseType.POSTGRES_LOGICAL,- title: 'Logical',- description: 'Recommended for databases under 50 GB. Simpler to set up.',+ titleKey: 'databases.create.backupType.logical.title',+ descriptionKey: 'databases.create.backupType.logical.description',},{type: DatabaseType.POSTGRES_PHYSICAL,- title: 'Physical',- description:- 'For databases over 50 GB. Enables point-in-time recovery and better RPO/RTO, but needs extra setup.',+ titleKey: 'databases.create.backupType.physical.title',+ descriptionKey: 'databases.create.backupType.physical.description',},];@@ -30,6 +35,7 @@ export const ChoosePostgresBackupTypeComponent = ({onBack,onSelected,}: Props) => {+ const { t } = useTranslation();const [selectedType, setSelectedType] = useState<DatabaseType>(database.type === DatabaseType.POSTGRES_PHYSICAL? DatabaseType.POSTGRES_PHYSICAL@@ -38,7 +44,7 @@ export const ChoosePostgresBackupTypeComponent = ({return (<div>- <div className="my-3 text-center text-lg">Choose backup type</div>+ <div className="my-3 text-center text-lg">{t('databases.create.backupType.title')}</div><div className="grid grid-cols-2 gap-3">{backupTypeOptions.map((option) => {@@ -55,11 +61,11 @@ export const ChoosePostgresBackupTypeComponent = ({}`}><div className="flex items-center gap-2">- <span className="font-semibold">{option.title}</span>+ <span className="font-semibold">{t(option.titleKey)}</span></div><span className="text-sm leading-snug text-gray-500 dark:text-gray-400">- {option.description}+ {t(option.descriptionKey)}</span></div>);@@ -68,11 +74,11 @@ export const ChoosePostgresBackupTypeComponent = ({<div className="mt-5 flex"><Button className="mr-auto" type="primary" ghost onClick={onBack}>- Back+ {t('common.actions.back')}</Button><Button type="primary" onClick={() => onSelected(selectedType)}>- {saveButtonText || 'Continue'}+ {saveButtonText || t('common.actions.continue')}</Button></div></div>diff --git a/frontend/src/features/databases/ui/edit/CreateReadOnlyComponent.tsx b/frontend/src/features/databases/ui/edit/CreateReadOnlyComponent.tsxindex 802447fa..7f972fdf 100644--- a/frontend/src/features/databases/ui/edit/CreateReadOnlyComponent.tsx+++ b/frontend/src/features/databases/ui/edit/CreateReadOnlyComponent.tsx@@ -1,13 +1,21 @@import { App, Button, Modal, Spin } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {+ DATABASE_TYPE_LABEL_KEYS,type Database,DatabaseType,type ShouldSuggestReadOnlyUserResponse,databaseApi,- getDatabaseTypeLabel,} from '../../../../entity/databases';+import {+ TransByKey,+ type TranslationKey,+ getWebsitePageUrl,+ translateApiError,+ useLocale,+} from '../../../../shared/i18n';interface Props {database: Database;@@ -22,6 +30,38 @@ const PRIVILEGES_TRUNCATE_LENGTH = 50;const FORCED_WAL_ROTATION_WARNING_SECONDS = 15;+// Physical PostgreSQL gets a replication-only user and every other engine a read-only one. The two+// nouns inflect differently in other languages, so each kind has its own sentences.+interface RestrictedUserCopyKeys {+ checking: TranslationKey;+ title: TranslationKey;+ description: TranslationKey;+ noWriteCredentials: TranslationKey;+ create: TranslationKey;+ skipTitle: TranslationKey;+ skipQuestion: TranslationKey;+}++const READ_ONLY_USER_COPY_KEYS: RestrictedUserCopyKeys = {+ checking: 'databases.readOnlyUser.readOnly.checking',+ title: 'databases.readOnlyUser.readOnly.title',+ description: 'databases.readOnlyUser.readOnly.description',+ noWriteCredentials: 'databases.readOnlyUser.readOnly.noWriteCredentials',+ create: 'databases.readOnlyUser.readOnly.create',+ skipTitle: 'databases.readOnlyUser.readOnly.skipTitle',+ skipQuestion: 'databases.readOnlyUser.readOnly.skipQuestion',+};++const REPLICATION_ONLY_USER_COPY_KEYS: RestrictedUserCopyKeys = {+ checking: 'databases.readOnlyUser.replicationOnly.checking',+ title: 'databases.readOnlyUser.replicationOnly.title',+ description: 'databases.readOnlyUser.replicationOnly.description',+ noWriteCredentials: 'databases.readOnlyUser.replicationOnly.noWriteCredentials',+ create: 'databases.readOnlyUser.replicationOnly.create',+ skipTitle: 'databases.readOnlyUser.replicationOnly.skipTitle',+ skipQuestion: 'databases.readOnlyUser.replicationOnly.skipQuestion',+};+export const CreateReadOnlyComponent = ({database,onReadOnlyUserUpdated,@@ -29,6 +69,8 @@ export const CreateReadOnlyComponent = ({onSkipped,onReadOnlyUserNotSuggested,}: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [isCheckingReadOnlyUserSuggestion, setIsCheckingReadOnlyUserSuggestion] = useState(false);@@ -42,17 +84,17 @@ export const CreateReadOnlyComponent = ({const isMysql = database.type === DatabaseType.MYSQL;const isMariadb = database.type === DatabaseType.MARIADB;const isMongodb = database.type === DatabaseType.MONGODB;- const databaseTypeName = getDatabaseTypeLabel(database.type);-- const privilegesLabel = isMongodb ? 'roles' : 'privileges';- const userKindNoun = isPhysicalPostgres ? 'replication-only user' : 'read-only user';+ const databaseTypeName = t(DATABASE_TYPE_LABEL_KEYS[database.type]);+ const userKindKeys = isPhysicalPostgres+ ? REPLICATION_ONLY_USER_COPY_KEYS+ : READ_ONLY_USER_COPY_KEYS;const fetchReadOnlyUserSuggestion =async (): Promise<ShouldSuggestReadOnlyUserResponse | null> => {try {return await databaseApi.shouldSuggestReadOnlyUser(database);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));return null;}};@@ -81,9 +123,7 @@ export const CreateReadOnlyComponent = ({if (!response.isForcedWalRotationAvailable) {message.warning(- 'This source would not grant EXECUTE on pg_switch_wal() to the new user, which ' +- 'continuous WAL streaming needs to keep the recovery point close to the present. ' +- 'Full and incremental backups work normally with these credentials.',+ t('databases.readOnlyUser.forcedWalRotationUnavailable'),FORCED_WAL_ROTATION_WARNING_SECONDS,);}@@ -119,7 +159,7 @@ export const CreateReadOnlyComponent = ({onReadOnlyUserUpdated(database);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}setIsCreatingReadOnlyUser(false);@@ -156,7 +196,7 @@ export const CreateReadOnlyComponent = ({return (<div className="flex items-center"><Spin />- <span className="ml-3">Checking {userKindNoun}...</span>+ <span className="ml-3">{t(userKindKeys.checking)}</span></div>);}@@ -164,45 +204,51 @@ export const CreateReadOnlyComponent = ({return (<div><div className="mb-5">- <p className="mb-3 text-lg font-bold">Create a {userKindNoun} for Databasus?</p>+ <p className="mb-3 text-lg font-bold">{t(userKindKeys.title)}</p>- <p className="mb-2">- A {userKindNoun} is a {databaseTypeName} user with limited permissions that can only read- data from your database, not modify it. This is recommended for backup operations because:- </p>+ <p className="mb-2">{t(userKindKeys.description, { databaseType: databaseTypeName })}</p><ul className="mb-2 ml-5 list-disc">- <li>it prevents accidental data modifications during backup</li>- <li>it follows the principle of least privilege</li>- <li>it's a security best practice</li>+ <li>{t('databases.readOnlyUser.reasons.preventsModifications')}</li>+ <li>{t('databases.readOnlyUser.reasons.leastPrivilege')}</li>+ <li>{t('databases.readOnlyUser.reasons.bestPractice')}</li></ul><p className="mb-2">- Databasus enforce enterprise-grade security (- <a- href="https://databasus.com/security"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read in details here- </a>- ). However, it is not possible to be covered from all possible risks.+ <Trans+ i18nKey="databases.readOnlyUser.securityNote"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('security', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></p><p className="mt-3">- <b>A {userKindNoun} allows to avoid storing credentials with write access at all</b>. Even- in the worst case of hacking, nobody will be able to corrupt your data.+ <TransByKey i18nKey={userKindKeys.noWriteCredentials} components={{ bold: <b /> }} /></p><p className="mt-3">{privileges.length === 0 ? (- <>- Current user has <b>no write {privilegesLabel}</b>.- </>+ <Trans+ i18nKey={+ isMongodb+ ? 'databases.readOnlyUser.noWriteRoles'+ : 'databases.readOnlyUser.noWritePrivileges'+ }+ components={{ bold: <b /> }}+ />) : (<>- Current user has the following write {privilegesLabel}:{' '}+ {isMongodb+ ? t('databases.readOnlyUser.writeRoles')+ : t('databases.readOnlyUser.writePrivileges')}{' '}<spanclassName={shouldShowExpandToggle() ? 'cursor-pointer hover:opacity-80' : ''}onClick={() =>@@ -212,7 +258,9 @@ export const CreateReadOnlyComponent = ({{getPrivilegesDisplay()}{shouldShowExpandToggle() && (<span className="ml-1 text-xs text-blue-600 hover:opacity-80">- ({isPrivilegesExpanded ? 'collapse' : 'expand'})+ {isPrivilegesExpanded+ ? t('databases.readOnlyUser.collapse')+ : t('databases.readOnlyUser.expand')}</span>)}</span>@@ -223,11 +271,11 @@ export const CreateReadOnlyComponent = ({<div className="mt-5 flex"><Button className="mr-auto" type="primary" ghost onClick={() => onGoBack()}>- Back+ {t('common.actions.back')}</Button><Button className="mr-2 ml-auto" danger ghost onClick={handleSkip}>- Skip+ {t('databases.readOnlyUser.skip')}</Button><Button@@ -236,38 +284,32 @@ export const CreateReadOnlyComponent = ({loading={isCreatingReadOnlyUser}disabled={isCreatingReadOnlyUser}>- Yes, create {userKindNoun}+ {t(userKindKeys.create)}</Button></div><Modal- title={`Skip ${userKindNoun} creation?`}+ title={t(userKindKeys.skipTitle)}open={isShowSkipConfirmation}onCancel={() => setShowSkipConfirmation(false)}footer={null}width={450}><div className="mb-5">- <p className="mb-2">Are you sure you want to skip creating a {userKindNoun}?</p>+ <p className="mb-2">{t(userKindKeys.skipQuestion)}</p>- <p className="mb-2">- Using a user with full permissions for backups is not recommended and may pose security- risks. Databasus is highly recommending you to not skip this step.- </p>+ <p className="mb-2">{t('databases.readOnlyUser.skipRisk')}</p>- <p>- 100% protection is never possible. It's better to be safe in case of 0.01% risk of- full hacking. So it is better to follow the secure way with read-only user.- </p>+ <p>{t('databases.readOnlyUser.skipAdvice')}</p></div><div className="flex justify-end"><Button className="mr-2" danger ghost onClick={handleSkipConfirmed}>- Yes, I accept risks+ {t('databases.readOnlyUser.acceptRisks')}</Button><Button type="primary" onClick={() => setShowSkipConfirmation(false)}>- Let's continue with the secure way+ {t('databases.readOnlyUser.continueSecurely')}</Button></div></Modal>diff --git a/frontend/src/features/databases/ui/edit/EditDatabaseBaseInfoComponent.tsx b/frontend/src/features/databases/ui/edit/EditDatabaseBaseInfoComponent.tsxindex 3821f2b8..21990617 100644--- a/frontend/src/features/databases/ui/edit/EditDatabaseBaseInfoComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditDatabaseBaseInfoComponent.tsx@@ -1,7 +1,9 @@import { Button, Input } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ DATABASE_TYPE_LABEL_KEYS,type Database,DatabaseType,databaseApi,@@ -9,6 +11,7 @@ import {initializeDatabaseTypeData,isPostgresType,} from '../../../../entity/databases';+import { translateApiError } from '../../../../shared/i18n';interface Props {database: Database;@@ -25,11 +28,11 @@ interface Props {// PostgreSQL maps to the logical type as a tentative default; the backup-type// (logical vs physical) is chosen on the next step.-const databaseEngineOptions = [- { type: DatabaseType.POSTGRES_LOGICAL, label: 'PostgreSQL' },- { type: DatabaseType.MYSQL, label: 'MySQL' },- { type: DatabaseType.MARIADB, label: 'MariaDB' },- { type: DatabaseType.MONGODB, label: 'MongoDB' },+const databaseEngineTypes = [+ DatabaseType.POSTGRES_LOGICAL,+ DatabaseType.MYSQL,+ DatabaseType.MARIADB,+ DatabaseType.MONGODB,];export const EditDatabaseBaseInfoComponent = ({@@ -42,6 +45,7 @@ export const EditDatabaseBaseInfoComponent = ({isSaveToApi,onSaved,}: Props) => {+ const { t } = useTranslation();const [editingDatabase, setEditingDatabase] = useState<Database>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);@@ -68,7 +72,7 @@ export const EditDatabaseBaseInfoComponent = ({await databaseApi.updateDatabase(editingDatabase);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -90,12 +94,12 @@ export const EditDatabaseBaseInfoComponent = ({<div>{isShowName && (<div className="mb-3 flex items-center">- <div className="mr-3">Name</div>+ <div className="mr-3">{t('common.fields.name')}</div><Inputvalue={editingDatabase.name || ''}onChange={(e) => updateDatabase({ name: e.target.value })}size="small"- placeholder="My favourite DB"+ placeholder={t('databases.create.namePlaceholder')}className="grow"/></div>@@ -103,15 +107,16 @@ export const EditDatabaseBaseInfoComponent = ({{isShowEngine && (<div className="grid grid-cols-2 gap-3">- {databaseEngineOptions.map((option) => {- const isSelected = isPostgresType(option.type)+ {databaseEngineTypes.map((engineType) => {+ const isSelected = isPostgresType(engineType)? isPostgresType(editingDatabase.type)- : editingDatabase.type === option.type;+ : editingDatabase.type === engineType;+ const engineLabel = t(DATABASE_TYPE_LABEL_KEYS[engineType]);return (<div- key={option.type}- onClick={() => handleTypeChange(option.type)}+ key={engineType}+ onClick={() => handleTypeChange(engineType)}className={`flex h-24 cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border text-center text-xs transition hover:border-blue-400 ${isSelected? 'border-blue-500 bg-blue-50 dark:bg-blue-900/40'@@ -119,12 +124,12 @@ export const EditDatabaseBaseInfoComponent = ({}`}><img- src={getDatabaseLogoFromType(option.type)}- alt={option.label}+ src={getDatabaseLogoFromType(engineType)}+ alt={engineLabel}className="h-7 w-7"/>- <span className="px-1 leading-tight">{option.label}</span>+ <span className="px-1 leading-tight">{engineLabel}</span></div>);})}@@ -134,7 +139,7 @@ export const EditDatabaseBaseInfoComponent = ({<div className="mt-5 flex">{isShowCancelButton && (<Button danger ghost className="mr-1" onClick={onCancel}>- Cancel+ {t('common.actions.cancel')}</Button>)}@@ -145,7 +150,7 @@ export const EditDatabaseBaseInfoComponent = ({loading={isSaving}disabled={(isSaveToApi && !isUnsaved) || !isAllFieldsFilled}>- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button></div></div>diff --git a/frontend/src/features/databases/ui/edit/EditDatabaseNotifiersComponent.tsx b/frontend/src/features/databases/ui/edit/EditDatabaseNotifiersComponent.tsxindex d8103b02..bcb76ea4 100644--- a/frontend/src/features/databases/ui/edit/EditDatabaseNotifiersComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditDatabaseNotifiersComponent.tsx@@ -1,8 +1,10 @@import { Button, Modal, Select, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { type Database, databaseApi } from '../../../../entity/databases';import { type Notifier, notifierApi } from '../../../../entity/notifiers';+import { translateApiError } from '../../../../shared/i18n';import { EditNotifierComponent } from '../../../notifiers/ui/edit/EditNotifierComponent';interface Props {@@ -36,6 +38,7 @@ export const EditDatabaseNotifiersComponent = ({isSaveToApi,onSaved,}: Props) => {+ const { t } = useTranslation();const [editingDatabase, setEditingDatabase] = useState<Database>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);@@ -55,7 +58,7 @@ export const EditDatabaseNotifiersComponent = ({await databaseApi.updateDatabase(editingDatabase);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -71,7 +74,7 @@ export const EditDatabaseNotifiersComponent = ({const notifiers = await notifierApi.getNotifiers(workspaceId);setNotifiers(notifiers);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsNotifiersLoading(false);@@ -95,14 +98,14 @@ export const EditDatabaseNotifiersComponent = ({return (<div><div className="mb-5 max-w-[275px] text-gray-500 dark:text-gray-400">- Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)+ {t('databases.notifiers.description')}<br /><br />- You can select several notifiers, notifications will be sent to all of them.+ {t('databases.notifiers.multipleHint')}</div><div className="mb-5 flex w-full items-center">- <div className="min-w-[150px]">Notifiers</div>+ <div className="min-w-[150px] pr-2">{t('databases.notifiers.title')}</div><Selectkey={notifierSelectKey}@@ -125,22 +128,22 @@ export const EditDatabaseNotifiersComponent = ({className="max-w-[200px] grow"options={[...notifiers.map((n) => ({ label: n.name, value: n.id })),- { label: 'Create new notifier', value: 'create-new-notifier' },+ { label: t('databases.notifiers.createNew'), value: 'create-new-notifier' },]}- placeholder="Select notifiers"+ placeholder={t('databases.notifiers.selectPlaceholder')}/></div><div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -152,14 +155,14 @@ export const EditDatabaseNotifiersComponent = ({disabled={isSaving}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</div>{isShowCreateNotifier && (<Modal- title="Add notifier"+ title={t('databases.notifiers.addTitle')}footer={<div />}open={isShowCreateNotifier}onCancel={() => {@@ -169,7 +172,7 @@ export const EditDatabaseNotifiersComponent = ({maskClosable={false}><div className="my-3 max-w-[275px] text-gray-500 dark:text-gray-400">- Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)+ {t('databases.notifiers.description')}</div><EditNotifierComponentdiff --git a/frontend/src/features/databases/ui/edit/EditDatabaseSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditDatabaseSpecificDataComponent.tsxindex 3d4964f1..44bae343 100644--- a/frontend/src/features/databases/ui/edit/EditDatabaseSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditDatabaseSpecificDataComponent.tsx@@ -1,7 +1,9 @@import { App, Modal } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import { type Database, DatabaseType, databaseApi } from '../../../../entity/databases';+import { translateApiError } from '../../../../shared/i18n';import { CreateReadOnlyComponent } from './CreateReadOnlyComponent';import { EditMariaDbSpecificDataComponent } from './EditMariaDbSpecificDataComponent';import { EditMongoDbSpecificDataComponent } from './EditMongoDbSpecificDataComponent';@@ -44,6 +46,7 @@ export const EditDatabaseSpecificDataComponent = ({isRestoreMode = false,onConnectionErrorChange,}: Props) => {+ const { t } = useTranslation();const { message } = App.useApp();const [isShowReadOnlyDialog, setIsShowReadOnlyDialog] = useState(false);@@ -66,7 +69,7 @@ export const EditDatabaseSpecificDataComponent = ({onSaved(databaseToSave);}} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}};@@ -83,12 +86,12 @@ export const EditDatabaseSpecificDataComponent = ({if (isShowReadOnlyDialog) {return (<Modal- title="Create read-only user"+ title={t('databases.readOnlyUser.dialogTitle')}footer={<div />}open={isShowReadOnlyDialog}onCancel={() => setIsShowReadOnlyDialog(false)}maskClosable={false}- width={450}+ width={640}><CreateReadOnlyComponentdatabase={editingDatabase}diff --git a/frontend/src/features/databases/ui/edit/EditMariaDbSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditMariaDbSpecificDataComponent.tsxindex 1964e1bb..a87f6d6e 100644--- a/frontend/src/features/databases/ui/edit/EditMariaDbSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditMariaDbSpecificDataComponent.tsx@@ -1,14 +1,23 @@import { CopyOutlined, InfoCircleOutlined } from '@ant-design/icons';import { App, Button, Checkbox, Input, InputNumber, Select, Switch, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {+ DATABASE_TYPE_LABEL_KEYS,type Database,+ DatabaseType,databaseApi,hasStoredSshTunnelSecretsForAuthType,isSshTunnelReadyToTest,} from '../../../../entity/databases';import { MariadbConnectionStringParser } from '../../../../entity/databases/model/mariadb/MariadbConnectionStringParser';+import {+ getWebsitePageUrl,+ translateApiError,+ translateLocalizedText,+ useLocale,+} from '../../../../shared/i18n';import { NAME_LIST_TOKEN_SEPARATORS, normalizeNameList } from '../../../../shared/lib';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';import { ToastHelper } from '../../../../shared/toast';@@ -46,6 +55,8 @@ export const EditMariaDbSpecificDataComponent = ({onSaved,isShowDbName = true,}: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>();@@ -68,14 +79,14 @@ export const EditMariaDbSpecificDataComponent = ({const trimmedText = text.trim();if (!trimmedText) {- message.error('Clipboard is empty');+ message.error(t('databases.edit.clipboardEmpty'));return;}const result = MariadbConnectionStringParser.parse(trimmedText);if ('error' in result) {- message.error(result.error);+ message.error(translateLocalizedText(result.error, t));return;}@@ -96,7 +107,7 @@ export const EditMariaDbSpecificDataComponent = ({setEditingDatabase(updatedDatabase);setIsConnectionTested(false);- message.success('Connection string parsed successfully');+ message.success(t('databases.edit.connectionStringParsed'));};const parseFromClipboard = async () => {@@ -109,7 +120,7 @@ export const EditMariaDbSpecificDataComponent = ({const text = await ClipboardHelper.readFromClipboard();applyConnectionString(text);} catch {- message.error('Failed to read clipboard. Please check browser permissions.');+ message.error(t('databases.edit.clipboardReadFailed'));}};@@ -130,12 +141,12 @@ export const EditMariaDbSpecificDataComponent = ({await databaseApi.testDatabaseConnectionDirect(trimmedDatabase);setIsConnectionTested(true);ToastHelper.showToast({- title: 'Connection test passed',- description: 'You can continue with the next step',+ title: t('databases.edit.connectionTestPassed.title'),+ description: t('databases.edit.connectionTestPassed.description'),});} catch (e) {setIsConnectionFailed(true);- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTestingConnection(false);@@ -158,7 +169,7 @@ export const EditMariaDbSpecificDataComponent = ({try {await databaseApi.updateDatabase(trimmedDatabase);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -178,6 +189,8 @@ export const EditMariaDbSpecificDataComponent = ({if (!editingDatabase) return null;+ const engineName = t(DATABASE_TYPE_LABEL_KEYS[DatabaseType.MARIADB]);+const hasStoredSshSecrets = hasStoredSshTunnelSecretsForAuthType(database.mariadb?.sshTunnel,editingDatabase.mariadb?.sshTunnel?.authType,@@ -205,18 +218,18 @@ export const EditMariaDbSpecificDataComponent = ({return (<div><div className="mb-3 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><divclassName="cursor-pointer text-sm text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-200"onClick={parseFromClipboard}><CopyOutlined className="mr-1" />- Parse from clipboard+ {t('databases.edit.parseFromClipboard')}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Host</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.host')}</div><Inputvalue={editingDatabase.mariadb?.host}onChange={(e) => {@@ -233,30 +246,33 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MariaDB host"+ placeholder={t('databases.edit.placeholders.host', { engine: engineName })}/></div>{isLocalhostDb && (<div className="mb-1 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[200px] text-xs text-gray-500 dark:text-gray-400">- Please{' '}- <a- href="https://databasus.com/faq/localhost"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read this document- </a>{' '}- to study how to backup local database+ <Trans+ i18nKey="databases.edit.localhostHint"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('faqLocalhost', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></div></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><InputNumbertype="number"value={editingDatabase.mariadb?.port}@@ -271,12 +287,12 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MariaDB port"+ placeholder={t('databases.edit.placeholders.port', { engine: engineName })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><Inputvalue={editingDatabase.mariadb?.username}onChange={(e) => {@@ -290,12 +306,12 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MariaDB username"+ placeholder={t('databases.edit.placeholders.username', { engine: engineName })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={editingDatabase.mariadb?.password}onChange={(e) => {@@ -309,7 +325,7 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MariaDB password"+ placeholder={t('databases.edit.placeholders.password', { engine: engineName })}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -319,7 +335,7 @@ export const EditMariaDbSpecificDataComponent = ({{isShowDbName && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><Inputvalue={editingDatabase.mariadb?.database}onChange={(e) => {@@ -333,13 +349,13 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MariaDB database name"+ placeholder={t('databases.edit.placeholders.databaseName', { engine: engineName })}/></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div><Switchchecked={editingDatabase.mariadb?.isHttps}onChange={(checked) => {@@ -377,7 +393,7 @@ export const EditMariaDbSpecificDataComponent = ({/><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude events</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeEvents')}</div><div className="flex items-center"><Checkboxchecked={editingDatabase.mariadb?.isExcludeEvents || false}@@ -393,12 +409,12 @@ export const EditMariaDbSpecificDataComponent = ({});}}>- Skip events+ {t('databases.edit.mariadb.skipEvents')}</Checkbox><TooltipclassName="cursor-pointer"- title="Skip backing up database events. Enable this if the event scheduler is disabled on your MariaDB server."+ title={t('databases.edit.mariadb.skipEventsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -406,7 +422,7 @@ export const EditMariaDbSpecificDataComponent = ({</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Galera replication</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.galeraReplication')}</div><div className="flex items-center"><Checkboxchecked={editingDatabase.mariadb?.isSkipGaleraDisable || false}@@ -422,12 +438,12 @@ export const EditMariaDbSpecificDataComponent = ({});}}>- Skip disabling on restore+ {t('databases.edit.mariadb.skipGaleraDisable')}</Checkbox><TooltipclassName="cursor-pointer"- title="By default Databasus runs SET SESSION wsrep_on=OFF during restore to avoid Galera writeset-size errors. That requires the SUPER privilege. Enable this to skip it if your managed provider denies SUPER - large restores may then hit Galera writeset limits."+ title={t('databases.edit.mariadb.skipGaleraDisableTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -435,7 +451,7 @@ export const EditMariaDbSpecificDataComponent = ({</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><Selectmode="tags"value={editingDatabase.mariadb?.excludeTables || []}@@ -449,14 +465,11 @@ export const EditMariaDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="No tables excluded"+ placeholder={t('databases.edit.excludeTablesPlaceholder')}tokenSeparators={NAME_LIST_TOKEN_SEPARATORS}/>- <Tooltip- className="cursor-pointer"- title="Table names to exclude from the backup. You can paste a list separated by commas or new lines."- >+ <Tooltip className="cursor-pointer" title={t('databases.edit.excludeTablesTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -466,13 +479,13 @@ export const EditMariaDbSpecificDataComponent = ({<div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -484,7 +497,7 @@ export const EditMariaDbSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- Test connection+ {t('databases.actions.testConnection')}</Button>)}@@ -496,15 +509,14 @@ export const EditMariaDbSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</div>{isConnectionFailed && (<div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- If your database uses IP whitelist, make sure Databasus server IP is added to the allowed- list.+ {t('databases.edit.ipWhitelistHint')}</div>)}diff --git a/frontend/src/features/databases/ui/edit/EditMongoDbSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditMongoDbSpecificDataComponent.tsxindex f91c4258..149a9fa5 100644--- a/frontend/src/features/databases/ui/edit/EditMongoDbSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditMongoDbSpecificDataComponent.tsx@@ -1,15 +1,24 @@import { CopyOutlined, InfoCircleOutlined } from '@ant-design/icons';import { App, Button, Input, InputNumber, Select, Switch, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {+ DATABASE_TYPE_LABEL_KEYS,type Database,+ DatabaseType,databaseApi,disableSrvWhenTunneled,hasStoredSshTunnelSecretsForAuthType,isSshTunnelReadyToTest,} from '../../../../entity/databases';import { MongodbConnectionStringParser } from '../../../../entity/databases/model/mongodb/MongodbConnectionStringParser';+import {+ getWebsitePageUrl,+ translateApiError,+ translateLocalizedText,+ useLocale,+} from '../../../../shared/i18n';import { NAME_LIST_TOKEN_SEPARATORS, normalizeNameList } from '../../../../shared/lib';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';import { ToastHelper } from '../../../../shared/toast';@@ -47,6 +56,8 @@ export const EditMongoDbSpecificDataComponent = ({onSaved,isShowDbName = true,}: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>();@@ -70,14 +81,14 @@ export const EditMongoDbSpecificDataComponent = ({const trimmedText = text.trim();if (!trimmedText) {- message.error('Clipboard is empty');+ message.error(t('databases.edit.clipboardEmpty'));return;}const result = MongodbConnectionStringParser.parse(trimmedText);if ('error' in result) {- message.error(result.error);+ message.error(translateLocalizedText(result.error, t));return;}@@ -108,9 +119,9 @@ export const EditMongoDbSpecificDataComponent = ({setIsConnectionTested(false);if (!result.password) {- message.warning('Connection string parsed successfully. Please enter the password manually.');+ message.warning(t('databases.edit.connectionStringParsedWithoutPassword'));} else {- message.success('Connection string parsed successfully');+ message.success(t('databases.edit.connectionStringParsed'));}};@@ -124,7 +135,7 @@ export const EditMongoDbSpecificDataComponent = ({const text = await ClipboardHelper.readFromClipboard();applyConnectionString(text);} catch {- message.error('Failed to read clipboard. Please check browser permissions.');+ message.error(t('databases.edit.clipboardReadFailed'));}};@@ -145,12 +156,12 @@ export const EditMongoDbSpecificDataComponent = ({await databaseApi.testDatabaseConnectionDirect(trimmedDatabase);setIsConnectionTested(true);ToastHelper.showToast({- title: 'Connection test passed',- description: 'You can continue with the next step',+ title: t('databases.edit.connectionTestPassed.title'),+ description: t('databases.edit.connectionTestPassed.description'),});} catch (e) {setIsConnectionFailed(true);- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTestingConnection(false);@@ -173,7 +184,7 @@ export const EditMongoDbSpecificDataComponent = ({try {await databaseApi.updateDatabase(trimmedDatabase);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -193,6 +204,8 @@ export const EditMongoDbSpecificDataComponent = ({if (!editingDatabase) return null;+ const engineName = t(DATABASE_TYPE_LABEL_KEYS[DatabaseType.MONGODB]);+const isSrvConnection = editingDatabase.mongodb?.isSrv || false;const hasStoredSshSecrets = hasStoredSshTunnelSecretsForAuthType(@@ -222,18 +235,18 @@ export const EditMongoDbSpecificDataComponent = ({return (<div><div className="mb-3 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><divclassName="cursor-pointer text-sm text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-200"onClick={parseFromClipboard}><CopyOutlined className="mr-1" />- Parse from clipboard+ {t('databases.edit.parseFromClipboard')}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Host</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.host')}</div><Inputvalue={editingDatabase.mongodb?.host}onChange={(e) => {@@ -250,31 +263,34 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MongoDB host"+ placeholder={t('databases.edit.placeholders.host', { engine: engineName })}/></div>{isLocalhostDb && (<div className="mb-1 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[200px] text-xs text-gray-500 dark:text-gray-400">- Please{' '}- <a- href="https://databasus.com/faq/localhost"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read this document- </a>{' '}- to study how to backup local database+ <Trans+ i18nKey="databases.edit.localhostHint"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('faqLocalhost', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></div></div>)}{!isSrvConnection && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><InputNumbertype="number"value={editingDatabase.mongodb?.port}@@ -295,7 +311,7 @@ export const EditMongoDbSpecificDataComponent = ({)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><Inputvalue={editingDatabase.mongodb?.username}onChange={(e) => {@@ -309,12 +325,12 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MongoDB username"+ placeholder={t('databases.edit.placeholders.username', { engine: engineName })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={editingDatabase.mongodb?.password}onChange={(e) => {@@ -328,7 +344,7 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MongoDB password"+ placeholder={t('databases.edit.placeholders.password', { engine: engineName })}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -338,7 +354,7 @@ export const EditMongoDbSpecificDataComponent = ({{isShowDbName && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><Inputvalue={editingDatabase.mongodb?.database}onChange={(e) => {@@ -352,13 +368,13 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MongoDB database name"+ placeholder={t('databases.edit.placeholders.databaseName', { engine: engineName })}/></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div><Switchchecked={editingDatabase.mongodb?.isHttps}onChange={(checked) => {@@ -375,7 +391,7 @@ export const EditMongoDbSpecificDataComponent = ({</div><div className="mb-5 flex w-full items-center">- <div className="min-w-[150px]">CPU count</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.cpuCount')}</div><div className="flex items-center"><InputNumbermin={1}@@ -394,10 +410,7 @@ export const EditMongoDbSpecificDataComponent = ({className="max-w-[200px] grow"/>- <Tooltip- className="cursor-pointer"- title="Number of CPU cores to use for backup and restore operations. Higher values may speed up operations but use more resources."- >+ <Tooltip className="cursor-pointer" title={t('databases.edit.cpuCountTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -425,7 +438,7 @@ export const EditMongoDbSpecificDataComponent = ({/><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use SRV connection</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useSrvConnection')}</div><div className="flex items-center"><Switchchecked={editingDatabase.mongodb?.isSrv || false}@@ -445,8 +458,8 @@ export const EditMongoDbSpecificDataComponent = ({className="cursor-pointer"title={isTunnelEnabled- ? 'Not available over an SSH tunnel - SRV resolves its own host list and bypasses the forwarded port.'- : 'Enable for MongoDB Atlas SRV connections (mongodb+srv://). Port is not required for SRV connections.'+ ? t('databases.edit.mongodb.srvOverTunnelTooltip')+ : t('databases.edit.mongodb.srvTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} />@@ -455,7 +468,7 @@ export const EditMongoDbSpecificDataComponent = ({</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Direct connection</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.directConnection')}</div><div className="flex items-center">{/* Shown as on but never written: the backend forces it per connection, so thestored value still applies once the tunnel is switched off. */}@@ -477,8 +490,8 @@ export const EditMongoDbSpecificDataComponent = ({className="cursor-pointer"title={isTunnelEnabled- ? 'Forced on while the SSH tunnel is enabled - a tunnel exposes a single address, so replica set discovery cannot be used.'- : 'Connect directly to a single server, skipping replica set discovery. Useful when the server is behind a load balancer, proxy or tunnel.'+ ? t('databases.edit.mongodb.directConnectionOverTunnelTooltip')+ : t('databases.edit.mongodb.directConnectionTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} />@@ -487,7 +500,7 @@ export const EditMongoDbSpecificDataComponent = ({</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Auth database</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.authDatabase')}</div><Inputvalue={editingDatabase.mongodb?.authDatabase}onChange={(e) => {@@ -501,12 +514,13 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- MongoDB's default authentication databaseplaceholder="admin"/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude collections</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeCollections')}</div><Selectmode="tags"value={editingDatabase.mongodb?.excludeCollections || []}@@ -523,13 +537,13 @@ export const EditMongoDbSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="No collections excluded"+ placeholder={t('databases.edit.mongodb.excludeCollectionsPlaceholder')}tokenSeparators={NAME_LIST_TOKEN_SEPARATORS}/><TooltipclassName="cursor-pointer"- title="Collection names to exclude from the backup. You can paste a list separated by commas or new lines."+ title={t('databases.edit.mongodb.excludeCollectionsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -540,13 +554,13 @@ export const EditMongoDbSpecificDataComponent = ({<div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -558,7 +572,7 @@ export const EditMongoDbSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- Test connection+ {t('databases.actions.testConnection')}</Button>)}@@ -570,15 +584,14 @@ export const EditMongoDbSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</div>{isConnectionFailed && (<div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- If your database uses IP whitelist, make sure Databasus server IP is added to the allowed- list.+ {t('databases.edit.ipWhitelistHint')}</div>)}diff --git a/frontend/src/features/databases/ui/edit/EditMySqlSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditMySqlSpecificDataComponent.tsxindex 5fa81286..2cbe0374 100644--- a/frontend/src/features/databases/ui/edit/EditMySqlSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditMySqlSpecificDataComponent.tsx@@ -1,14 +1,23 @@import { CopyOutlined, InfoCircleOutlined } from '@ant-design/icons';import { App, Button, Input, InputNumber, Select, Switch, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {+ DATABASE_TYPE_LABEL_KEYS,type Database,+ DatabaseType,databaseApi,hasStoredSshTunnelSecretsForAuthType,isSshTunnelReadyToTest,} from '../../../../entity/databases';import { MySqlConnectionStringParser } from '../../../../entity/databases/model/mysql/MySqlConnectionStringParser';+import {+ getWebsitePageUrl,+ translateApiError,+ translateLocalizedText,+ useLocale,+} from '../../../../shared/i18n';import { NAME_LIST_TOKEN_SEPARATORS, normalizeNameList } from '../../../../shared/lib';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';import { ToastHelper } from '../../../../shared/toast';@@ -46,6 +55,8 @@ export const EditMySqlSpecificDataComponent = ({onSaved,isShowDbName = true,}: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>();@@ -65,14 +76,14 @@ export const EditMySqlSpecificDataComponent = ({const trimmedText = text.trim();if (!trimmedText) {- message.error('Clipboard is empty');+ message.error(t('databases.edit.clipboardEmpty'));return;}const result = MySqlConnectionStringParser.parse(trimmedText);if ('error' in result) {- message.error(result.error);+ message.error(translateLocalizedText(result.error, t));return;}@@ -93,7 +104,7 @@ export const EditMySqlSpecificDataComponent = ({setEditingDatabase(updatedDatabase);setIsConnectionTested(false);- message.success('Connection string parsed successfully');+ message.success(t('databases.edit.connectionStringParsed'));};const parseFromClipboard = async () => {@@ -106,7 +117,7 @@ export const EditMySqlSpecificDataComponent = ({const text = await ClipboardHelper.readFromClipboard();applyConnectionString(text);} catch {- message.error('Failed to read clipboard. Please check browser permissions.');+ message.error(t('databases.edit.clipboardReadFailed'));}};@@ -127,12 +138,12 @@ export const EditMySqlSpecificDataComponent = ({await databaseApi.testDatabaseConnectionDirect(trimmedDatabase);setIsConnectionTested(true);ToastHelper.showToast({- title: 'Connection test passed',- description: 'You can continue with the next step',+ title: t('databases.edit.connectionTestPassed.title'),+ description: t('databases.edit.connectionTestPassed.description'),});} catch (e) {setIsConnectionFailed(true);- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTestingConnection(false);@@ -155,7 +166,7 @@ export const EditMySqlSpecificDataComponent = ({try {await databaseApi.updateDatabase(trimmedDatabase);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -175,6 +186,8 @@ export const EditMySqlSpecificDataComponent = ({if (!editingDatabase) return null;+ const engineName = t(DATABASE_TYPE_LABEL_KEYS[DatabaseType.MYSQL]);+const hasStoredSshSecrets = hasStoredSshTunnelSecretsForAuthType(database.mysql?.sshTunnel,editingDatabase.mysql?.sshTunnel?.authType,@@ -201,18 +214,18 @@ export const EditMySqlSpecificDataComponent = ({return (<div><div className="mb-3 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><divclassName="cursor-pointer text-sm text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-200"onClick={parseFromClipboard}><CopyOutlined className="mr-1" />- Parse from clipboard+ {t('databases.edit.parseFromClipboard')}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Host</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.host')}</div><Inputvalue={editingDatabase.mysql?.host}onChange={(e) => {@@ -229,30 +242,33 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MySQL host"+ placeholder={t('databases.edit.placeholders.host', { engine: engineName })}/></div>{isLocalhostDb && (<div className="mb-1 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[200px] text-xs text-gray-500 dark:text-gray-400">- Please{' '}- <a- href="https://databasus.com/faq/localhost"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read this document- </a>{' '}- to study how to backup local database+ <Trans+ i18nKey="databases.edit.localhostHint"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('faqLocalhost', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></div></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><InputNumbertype="number"value={editingDatabase.mysql?.port}@@ -267,12 +283,12 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MySQL port"+ placeholder={t('databases.edit.placeholders.port', { engine: engineName })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><Inputvalue={editingDatabase.mysql?.username}onChange={(e) => {@@ -286,12 +302,12 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MySQL username"+ placeholder={t('databases.edit.placeholders.username', { engine: engineName })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={editingDatabase.mysql?.password}onChange={(e) => {@@ -305,7 +321,7 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MySQL password"+ placeholder={t('databases.edit.placeholders.password', { engine: engineName })}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -315,7 +331,7 @@ export const EditMySqlSpecificDataComponent = ({{isShowDbName && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><Inputvalue={editingDatabase.mysql?.database}onChange={(e) => {@@ -329,13 +345,13 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter MySQL database name"+ placeholder={t('databases.edit.placeholders.databaseName', { engine: engineName })}/></div>)}<div className="mb-3 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div><Switchchecked={editingDatabase.mysql?.isHttps}onChange={(checked) => {@@ -373,7 +389,7 @@ export const EditMySqlSpecificDataComponent = ({/><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><Selectmode="tags"value={editingDatabase.mysql?.excludeTables || []}@@ -387,14 +403,11 @@ export const EditMySqlSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="No tables excluded"+ placeholder={t('databases.edit.excludeTablesPlaceholder')}tokenSeparators={NAME_LIST_TOKEN_SEPARATORS}/>- <Tooltip- className="cursor-pointer"- title="Table names to exclude from the backup. You can paste a list separated by commas or new lines."- >+ <Tooltip className="cursor-pointer" title={t('databases.edit.excludeTablesTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -404,13 +417,13 @@ export const EditMySqlSpecificDataComponent = ({<div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -422,7 +435,7 @@ export const EditMySqlSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- Test connection+ {t('databases.actions.testConnection')}</Button>)}@@ -434,15 +447,14 @@ export const EditMySqlSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</div>{isConnectionFailed && (<div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- If your database uses IP whitelist, make sure Databasus server IP is added to the allowed- list.+ {t('databases.edit.ipWhitelistHint')}</div>)}diff --git a/frontend/src/features/databases/ui/edit/EditPostgreSqlLogicalSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditPostgreSqlLogicalSpecificDataComponent.tsxindex 62cebb1b..ed3ab0bf 100644--- a/frontend/src/features/databases/ui/edit/EditPostgreSqlLogicalSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditPostgreSqlLogicalSpecificDataComponent.tsx@@ -1,9 +1,12 @@import { CopyOutlined, InfoCircleOutlined } from '@ant-design/icons';import { App, Button, Checkbox, Input, InputNumber, Select, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {type Database,+ POSTGRESQL_SHORT_NAME,+ POSTGRES_SSL_MODE_LABEL_KEYS,PostgresSslMode,type PostgresqlLogicalDatabase,databaseApi,@@ -11,6 +14,12 @@ import {isSshTunnelReadyToTest,} from '../../../../entity/databases';import { ConnectionStringParser } from '../../../../entity/databases/model/postgresql/ConnectionStringParser';+import {+ getWebsitePageUrl,+ translateApiError,+ translateLocalizedText,+ useLocale,+} from '../../../../shared/i18n';import { NAME_LIST_TOKEN_SEPARATORS, normalizeNameList } from '../../../../shared/lib';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';import { ToastHelper } from '../../../../shared/toast';@@ -77,6 +86,8 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({isShowDbName = true,isRestoreMode = false,}: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>();@@ -109,14 +120,14 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({const trimmedText = text.trim();if (!trimmedText) {- message.error('Clipboard is empty');+ message.error(t('databases.edit.clipboardEmpty'));return;}const result = ConnectionStringParser.parse(trimmedText);if ('error' in result) {- message.error(result.error);+ message.error(translateLocalizedText(result.error, t));return;}@@ -139,7 +150,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({setHasUserChosenSslMode(true);setEditingDatabase(autoAddPublicSchemaForSupabase(updatedDatabase));setIsConnectionTested(false);- message.success('Connection string parsed successfully');+ message.success(t('databases.edit.connectionStringParsed'));};const parseFromClipboard = async () => {@@ -152,7 +163,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({const text = await ClipboardHelper.readFromClipboard();applyConnectionString(text);} catch {- message.error('Failed to read clipboard. Please check browser permissions.');+ message.error(t('databases.edit.clipboardReadFailed'));}};@@ -172,6 +183,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({...updatedDatabase,postgresqlLogical: {...updatedDatabase.postgresqlLogical,+ // eslint-disable-next-line i18next/no-literal-string -- PostgreSQL schema nameincludeSchemas: ['public', ...currentSchemas],},};@@ -198,12 +210,12 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({await databaseApi.testDatabaseConnectionDirect(trimmedDatabase);setIsConnectionTested(true);ToastHelper.showToast({- title: 'Connection test passed',- description: 'You can continue with the next step',+ title: t('databases.edit.connectionTestPassed.title'),+ description: t('databases.edit.connectionTestPassed.description'),});} catch (e) {setIsConnectionFailed(true);- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTestingConnection(false);@@ -226,7 +238,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({try {await databaseApi.updateDatabase(trimmedDatabase);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -281,13 +293,13 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({<div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -303,11 +315,11 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({if (hadSslCert && !isReplacingCerts) {return (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><div className="flex items-center"><span className="mr-3">*************</span><Button size="small" onClick={startReplacingCerts}>- Replace+ {t('databases.actions.replace')}</Button></div></div>@@ -317,35 +329,37 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({return (<><div className="mb-1 flex w-full items-start">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><Input.TextAreavalue={editingDatabase.postgresqlLogical?.sslClientCert || ''}onChange={(e) => updatePostgresqlCert('sslClientCert', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN CERTIFICATE-----"autoSize={{ minRows: 2, maxRows: 5 }}/></div><div className="mb-1 flex w-full items-start">- <div className="min-w-[150px]">Client key</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientKey')}</div><Input.TextAreavalue={editingDatabase.postgresqlLogical?.sslClientKey || ''}onChange={(e) => updatePostgresqlCert('sslClientKey', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN PRIVATE KEY-----"autoSize={{ minRows: 2, maxRows: 5 }}/></div><div className="mb-1 flex w-full items-start">- <div className="flex min-w-[150px] items-center">- <span>Server CA certificate</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.serverCaCertificate')}</span><TooltipclassName="cursor-pointer"- title="Optional. When provided, the server certificate is verified against this CA (verify-ca / verify-full)."+ title={t('databases.edit.serverCaCertificateTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -355,6 +369,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({onChange={(e) => updatePostgresqlCert('sslRootCert', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN CERTIFICATE-----"autoSize={{ minRows: 2, maxRows: 5 }}/>@@ -390,18 +405,18 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({return (<><div className="mb-3 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><divclassName="cursor-pointer text-sm text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-200"onClick={parseFromClipboard}><CopyOutlined className="mr-1" />- Parse from clipboard+ {t('databases.edit.parseFromClipboard')}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Host</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.host')}</div><Inputvalue={editingDatabase.postgresqlLogical?.host}onChange={(e) => {@@ -436,48 +451,54 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG host"+ placeholder={t('databases.edit.placeholders.host', { engine: POSTGRESQL_SHORT_NAME })}/></div>{isLocalhostDb && (<div className="mb-1 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[200px] text-xs text-gray-500 dark:text-gray-400">- Please{' '}- <a- href="https://databasus.com/faq/localhost"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read this document- </a>{' '}- to study how to backup local database+ <Trans+ i18nKey="databases.edit.localhostHint"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('faqLocalhost', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></div></div>)}{isSupabaseDb && (<div className="mb-1 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><div className="max-w-[200px] text-xs text-gray-500 dark:text-gray-400">- Please{' '}- <a- href="https://databasus.com/faq/supabase"- target="_blank"- rel="noreferrer"- className="!text-blue-600 dark:!text-blue-400"- >- read this document- </a>{' '}- to study how to backup Supabase database+ <Trans+ i18nKey="databases.edit.postgresql.supabaseHint"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('faqSupabase', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600 dark:!text-blue-400"+ />+ ),+ }}+ /></div></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><InputNumbertype="number"value={editingDatabase.postgresqlLogical?.port}@@ -492,12 +513,12 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG port"+ placeholder={t('databases.edit.placeholders.port', { engine: POSTGRESQL_SHORT_NAME })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><Inputvalue={editingDatabase.postgresqlLogical?.username}onChange={(e) => {@@ -515,12 +536,14 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG username"+ placeholder={t('databases.edit.placeholders.username', {+ engine: POSTGRESQL_SHORT_NAME,+ })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={editingDatabase.postgresqlLogical?.password}onChange={(e) => {@@ -537,7 +560,9 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG password"+ placeholder={t('databases.edit.placeholders.password', {+ engine: POSTGRESQL_SHORT_NAME,+ })}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -547,7 +572,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isShowDbName && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><Inputvalue={editingDatabase.postgresqlLogical?.database}onChange={(e) => {@@ -564,13 +589,15 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG database name"+ placeholder={t('databases.edit.placeholders.databaseName', {+ engine: POSTGRESQL_SHORT_NAME,+ })}/></div>)}<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSL mode</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.sslMode')}</div><Selectvalue={editingDatabase.postgresqlLogical?.sslMode ?? PostgresSslMode.Disable}onChange={(value: PostgresSslMode) => {@@ -583,12 +610,10 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({});setIsConnectionTested(false);}}- options={[- { label: 'Disable', value: PostgresSslMode.Disable },- { label: 'Require', value: PostgresSslMode.Require },- { label: 'Verify CA', value: PostgresSslMode.VerifyCa },- { label: 'Verify full', value: PostgresSslMode.VerifyFull },- ]}+ options={Object.values(PostgresSslMode).map((sslMode) => ({+ label: t(POSTGRES_SSL_MODE_LABEL_KEYS[sslMode]),+ value: sslMode,+ }))}size="small"className="max-w-[200px] grow"/>@@ -596,7 +621,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isRestoreMode && (<div className="mb-5 flex w-full items-center">- <div className="min-w-[150px]">CPU count</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.cpuCount')}</div><div className="flex items-center"><InputNumbermin={1}@@ -618,10 +643,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({className="max-w-[75px] grow"/>- <Tooltip- className="cursor-pointer"- title="Number of CPU cores to use for backup and restore operations. Higher values may speed up operations but use more resources."- >+ <Tooltip className="cursor-pointer" title={t('databases.edit.cpuCountTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -651,7 +673,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{!isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Include schemas</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.includeSchemas')}</div><Selectmode="tags"value={editingDatabase.postgresqlLogical?.includeSchemas || []}@@ -668,7 +690,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="All schemas (default)"+ placeholder={t('databases.edit.postgresql.includeSchemasPlaceholder')}tokenSeparators={NAME_LIST_TOKEN_SEPARATORS}/></div>@@ -676,7 +698,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{!isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><Selectmode="tags"value={editingDatabase.postgresqlLogical?.excludeTables || []}@@ -693,13 +715,13 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="No tables excluded"+ placeholder={t('databases.edit.excludeTablesPlaceholder')}tokenSeparators={NAME_LIST_TOKEN_SEPARATORS}/><TooltipclassName="cursor-pointer"- title="Tables to exclude from the backup. Use 'tablename' or 'schema.tablename'. Glob patterns are supported (e.g. 'logs_*'). You can paste a list separated by commas or new lines."+ title={t('databases.edit.postgresql.excludeTablesTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -708,11 +730,11 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{!isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="flex min-w-[150px] items-center">- <span>Skip user mappings</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.skipUserMappings')}</span><TooltipclassName="cursor-pointer"- title="Skip restoring user mappings (CREATE USER MAPPING statements). Enable this when the backup role cannot read the mapping credentials - otherwise they are dumped without options and break restore for FDWs like oracle_fdw."+ title={t('databases.edit.postgresql.skipUserMappingsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -736,11 +758,11 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="flex min-w-[150px] items-center">- <span>Exclude extensions</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.excludeExtensions')}</span><TooltipclassName="cursor-pointer"- title="Skip restoring extension definitions (CREATE EXTENSION statements). Enable this if you're restoring to a managed PostgreSQL service where extensions are managed by the provider."+ title={t('databases.edit.postgresql.excludeExtensionsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -764,11 +786,11 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="flex min-w-[150px] items-center">- <span>Restore ownership</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.restoreOwnership')}</span><TooltipclassName="cursor-pointer"- title="Apply ALTER OWNER statements from the dump so restored objects keep their original owner. The connection user must be able to assign these roles - typically a superuser."+ title={t('databases.edit.postgresql.restoreOwnershipTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -792,11 +814,11 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isRestoreMode && (<div className="mb-1 flex w-full items-center">- <div className="flex min-w-[150px] items-center">- <span>Restore privileges</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.restorePrivileges')}</span><TooltipclassName="cursor-pointer"- title="Apply GRANT and REVOKE statements from the dump so restored objects keep their original ACLs. The connection user must be able to grant to the referenced roles - typically a superuser."+ title={t('databases.edit.postgresql.restorePrivilegesTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -832,7 +854,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- Test connection+ {t('databases.actions.testConnection')}</Button>)}@@ -844,7 +866,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</>,@@ -852,8 +874,7 @@ export const EditPostgreSqlLogicalSpecificDataComponent = ({{isConnectionFailed && (<div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- If your database uses IP whitelist, make sure Databasus server IP is added to the- allowed list.+ {t('databases.edit.ipWhitelistHint')}</div>)}</>diff --git a/frontend/src/features/databases/ui/edit/EditPostgreSqlPhysicalSpecificDataComponent.tsx b/frontend/src/features/databases/ui/edit/EditPostgreSqlPhysicalSpecificDataComponent.tsxindex ba48e087..b2f47e0c 100644--- a/frontend/src/features/databases/ui/edit/EditPostgreSqlPhysicalSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditPostgreSqlPhysicalSpecificDataComponent.tsx@@ -1,11 +1,14 @@import { CopyOutlined, InfoCircleOutlined } from '@ant-design/icons';import { Alert, App, Button, Input, InputNumber, Radio, Select, Space, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {ConnectionErrorCode,type Database,- type PhysicalConnectionErrorTextRun,+ PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS,+ POSTGRESQL_SHORT_NAME,+ POSTGRES_SSL_MODE_LABEL_KEYS,PhysicalDatabaseBackupType,PostgresSslMode,type PostgresqlPhysicalDatabase,@@ -16,6 +19,12 @@ import {} from '../../../../entity/databases';import { ConnectionStringParser } from '../../../../entity/databases/model/postgresql/ConnectionStringParser';import { ApiError } from '../../../../shared/api';+import {+ TransByKey,+ type TranslationKey,+ translateApiError,+ translateLocalizedText,+} from '../../../../shared/i18n';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';import { ToastHelper } from '../../../../shared/toast';import { ClipboardPasteModalComponent } from '../../../../shared/ui';@@ -43,6 +52,14 @@ interface Props {const IPV4_PATTERN = /^\d{1,3}(\.\d{1,3}){3}$/;+const BACKUP_TYPE_TOOLTIP_KEYS: Record<PhysicalDatabaseBackupType, TranslationKey> = {+ [PhysicalDatabaseBackupType.FULL]: 'databases.edit.postgresql.backupTypeTooltips.full',+ [PhysicalDatabaseBackupType.FULL_INCREMENTAL]:+ 'databases.edit.postgresql.backupTypeTooltips.fullIncremental',+ [PhysicalDatabaseBackupType.FULL_INCREMENTAL_WAL_STREAM]:+ 'databases.edit.postgresql.backupTypeTooltips.fullIncrementalWalStream',+};+const deriveSslModeFromHost = (rawHost: string): PostgresSslMode | null => {const trimmed = rawHost.trim().toLowerCase();@@ -88,6 +105,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({onSaved,onConnectionErrorChange,}: Props) => {+ const { t } = useTranslation();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>();@@ -115,9 +133,9 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({const copyCommand = async (command: string) => {try {await ClipboardHelper.copyToClipboard(command);- message.success('Copied to clipboard');+ message.success(t('common.messages.copiedToClipboard'));} catch {- message.error('Failed to copy');+ message.error(t('databases.edit.copyFailed'));}};@@ -125,14 +143,14 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({const trimmedText = text.trim();if (!trimmedText) {- message.error('Clipboard is empty');+ message.error(t('databases.edit.clipboardEmpty'));return;}const result = ConnectionStringParser.parse(trimmedText);if ('error' in result) {- message.error(result.error);+ message.error(translateLocalizedText(result.error, t));return;}@@ -153,7 +171,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({setHasUserChosenSslMode(true);setEditingDatabase(updatedDatabase);invalidateConnectionTest();- message.success('Connection string parsed successfully');+ message.success(t('databases.edit.connectionStringParsed'));};const parseFromClipboard = async () => {@@ -166,7 +184,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({const text = await ClipboardHelper.readFromClipboard();applyConnectionString(text);} catch {- message.error('Failed to read clipboard. Please check browser permissions.');+ message.error(t('databases.edit.clipboardReadFailed'));}};@@ -197,14 +215,14 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({await databaseApi.testDatabaseConnectionDirect(trimmedDatabase);setIsConnectionTested(true);ToastHelper.showToast({- title: 'Connection test passed',- description: 'You can continue with the next step',+ title: t('databases.edit.connectionTestPassed.title'),+ description: t('databases.edit.connectionTestPassed.description'),});} catch (e) {if (e instanceof ApiError && e.code && e.code in physicalConnectionErrorContent) {setConnectionErrorCode(e.code as ConnectionErrorCode);} else {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}}@@ -228,7 +246,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({try {await databaseApi.updateDatabase(trimmedDatabase);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -282,37 +300,17 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({if (!editingDatabase) return null;- const backupTypeOptions = [- {- label: 'Full backups only',- value: PhysicalDatabaseBackupType.FULL,- tooltip: 'Periodic standalone full backups. Each backup is self-contained.',- },- {- label: 'Full + incremental',- value: PhysicalDatabaseBackupType.FULL_INCREMENTAL,- tooltip:- 'Full backups plus incremental ones that store only the changes since the previous backup. Smaller and faster.',- },- {- label: 'Full + incremental + WAL',- value: PhysicalDatabaseBackupType.FULL_INCREMENTAL_WAL_STREAM,- tooltip:- 'Adds continuous WAL streaming on top of full and incremental backups. Only this option enables point-in-time recovery (PITR), but it requires more space and slower in restore.',- },- ];-const renderFooter = (footerContent?: React.ReactNode) => (<div className="mt-5 flex">{isShowCancelButton && (<Button className="mr-1" danger ghost onClick={() => onCancel()}>- Cancel+ {t('common.actions.cancel')}</Button>)}{isShowBackButton && (<Button className="mr-auto" type="primary" ghost onClick={() => onBack()}>- Back+ {t('common.actions.back')}</Button>)}@@ -328,11 +326,11 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({if (hadSslCert && !isReplacingCerts) {return (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><div className="flex items-center"><span className="mr-3">*************</span><Button size="small" onClick={startReplacingCerts}>- Replace+ {t('databases.actions.replace')}</Button></div></div>@@ -342,35 +340,37 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({return (<><div className="mb-1 flex w-full items-start">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><Input.TextAreavalue={editingDatabase.postgresqlPhysical?.sslClientCert || ''}onChange={(e) => updatePostgresqlCert('sslClientCert', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN CERTIFICATE-----"autoSize={{ minRows: 2, maxRows: 5 }}/></div><div className="mb-1 flex w-full items-start">- <div className="min-w-[150px]">Client key</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientKey')}</div><Input.TextAreavalue={editingDatabase.postgresqlPhysical?.sslClientKey || ''}onChange={(e) => updatePostgresqlCert('sslClientKey', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN PRIVATE KEY-----"autoSize={{ minRows: 2, maxRows: 5 }}/></div><div className="mb-1 flex w-full items-start">- <div className="flex min-w-[150px] items-center">- <span>Server CA certificate</span>+ <div className="flex min-w-[150px] items-center pr-2">+ <span>{t('databases.fields.serverCaCertificate')}</span><TooltipclassName="cursor-pointer"- title="Optional. When provided, the server certificate is verified against this CA (verify-ca / verify-full)."+ title={t('databases.edit.serverCaCertificateTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -380,6 +380,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({onChange={(e) => updatePostgresqlCert('sslRootCert', e.target.value)}size="small"className="max-w-[300px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- PEM format example, not copyplaceholder="-----BEGIN CERTIFICATE-----"autoSize={{ minRows: 2, maxRows: 5 }}/>@@ -393,7 +394,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({<pre className="rounded-md bg-gray-900 p-3 pr-10 font-mono text-xs break-all whitespace-pre-wrap text-gray-100">{command}</pre>- <Tooltip title="Copy">+ <Tooltip title={t('common.actions.copy')}><buttontype="button"className="absolute top-2 right-2 cursor-pointer rounded p-1 text-gray-400 hover:text-white"@@ -405,44 +406,34 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({</div>);- const renderNoteRuns = (runs: PhysicalConnectionErrorTextRun[]) =>- runs.map((run, runIndex) =>- run.isBold ? (- <strong key={runIndex}>{run.text}</strong>- ) : (- <span key={runIndex}>{run.text}</span>- ),- );-const renderConnectionError = () => {if (!connectionErrorCode) return null;const content = physicalConnectionErrorContent[connectionErrorCode];const commandContext = { username: editingDatabase.postgresqlPhysical?.username ?? '' };const steps = content.buildSteps?.(commandContext) ?? [];- const managedNote =- typeof content.managedNote === 'function'- ? content.managedNote(commandContext)- : content.managedNote;+ const managedNote = content.buildManagedNote?.(commandContext);return (<Alerttype="error"className="mt-3"- message={<span className="text-sm font-bold">{content.title}</span>}+ message={<span className="text-sm font-bold">{t(content.titleKey)}</span>}description={<div>- <div>{content.summary}</div>+ <div>{t(content.summaryKey)}</div>{steps.map((step, index) =>step.type === 'command' ? (<div key={index}>{renderCopyableCommand(step.command)}</div>) : (<p key={index} className="mt-2 text-sm">- {renderNoteRuns(step.runs)}+ <TransByKey i18nKey={step.key} components={{ bold: <strong /> }} /></p>),)}- {managedNote && <div className="mt-2 text-sm">{managedNote}</div>}+ {managedNote && (+ <div className="mt-2 text-sm">{translateLocalizedText(managedNote, t)}</div>+ )}</div>}/>@@ -462,7 +453,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({return (<><div className="mb-3 flex w-full items-start">- <div className="min-w-[150px]">Backup type</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.backupType')}</div><Radio.Groupvalue={editingDatabase.postgresqlPhysical?.backupType ?? PhysicalDatabaseBackupType.FULL@@ -470,10 +461,13 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({onChange={(e) => updateBackupType(e.target.value)}><Space direction="vertical" size={0}>- {backupTypeOptions.map((option) => (- <Radio key={option.value} value={option.value} className="my-1! leading-[17px]!">- {option.label}- <Tooltip className="cursor-pointer" title={option.tooltip}>+ {Object.values(PhysicalDatabaseBackupType).map((backupType) => (+ <Radio key={backupType} value={backupType} className="my-1! leading-[17px]!">+ {t(PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS[backupType])}+ <Tooltip+ className="cursor-pointer"+ title={t(BACKUP_TYPE_TOOLTIP_KEYS[backupType])}+ ><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></Radio>@@ -483,18 +477,18 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({</div><div className="mb-3 flex">- <div className="min-w-[150px]" />+ <div className="min-w-[150px] pr-2" /><divclassName="cursor-pointer text-sm text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-200"onClick={parseFromClipboard}><CopyOutlined className="mr-1" />- Parse from clipboard+ {t('databases.edit.parseFromClipboard')}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Host</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.host')}</div><Inputvalue={editingDatabase.postgresqlPhysical?.host}onChange={(e) => {@@ -528,12 +522,12 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG host"+ placeholder={t('databases.edit.placeholders.host', { engine: POSTGRESQL_SHORT_NAME })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><InputNumbertype="number"value={editingDatabase.postgresqlPhysical?.port}@@ -548,12 +542,12 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG port"+ placeholder={t('databases.edit.placeholders.port', { engine: POSTGRESQL_SHORT_NAME })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><Inputvalue={editingDatabase.postgresqlPhysical?.username}onChange={(e) => {@@ -570,12 +564,14 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG username"+ placeholder={t('databases.edit.placeholders.username', {+ engine: POSTGRESQL_SHORT_NAME,+ })}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={editingDatabase.postgresqlPhysical?.password}onChange={(e) => {@@ -592,7 +588,9 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({}}size="small"className="max-w-[200px] grow"- placeholder="Enter PG password"+ placeholder={t('databases.edit.placeholders.password', {+ engine: POSTGRESQL_SHORT_NAME,+ })}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -601,7 +599,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSL mode</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.sslMode')}</div><Selectvalue={editingDatabase.postgresqlPhysical?.sslMode ?? PostgresSslMode.Disable}onChange={(value: PostgresSslMode) => {@@ -614,12 +612,10 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({});invalidateConnectionTest();}}- options={[- { label: 'Disable', value: PostgresSslMode.Disable },- { label: 'Require', value: PostgresSslMode.Require },- { label: 'Verify CA', value: PostgresSslMode.VerifyCa },- { label: 'Verify full', value: PostgresSslMode.VerifyFull },- ]}+ options={Object.values(PostgresSslMode).map((sslMode) => ({+ label: t(POSTGRES_SSL_MODE_LABEL_KEYS[sslMode]),+ value: sslMode,+ }))}size="small"className="max-w-[200px] grow"/>@@ -660,7 +656,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- Test connection+ {t('databases.actions.testConnection')}</Button>)}@@ -672,7 +668,7 @@ export const EditPostgreSqlPhysicalSpecificDataComponent = ({disabled={!isAllFieldsFilled}className="mr-5">- {saveButtonText || 'Save'}+ {saveButtonText || t('common.actions.save')}</Button>)}</>,diff --git a/frontend/src/features/databases/ui/edit/EditSshTunnelComponent.tsx b/frontend/src/features/databases/ui/edit/EditSshTunnelComponent.tsxindex a1ba4e81..df6ab30e 100644--- a/frontend/src/features/databases/ui/edit/EditSshTunnelComponent.tsx+++ b/frontend/src/features/databases/ui/edit/EditSshTunnelComponent.tsx@@ -1,10 +1,11 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Button, Checkbox, Input, InputNumber, Select, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import {DEFAULT_SSH_PORT,- SSH_TUNNEL_AUTH_TYPE_LABELS,+ SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS,SshTunnelAuthType,type SshTunnelConfig,createEmptySshTunnelConfig,@@ -18,6 +19,7 @@ interface Props {}export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }: Props) => {+ const { t } = useTranslation();const [isReplacingSecrets, setIsReplacingSecrets] = useState(false);const updateField = <Field extends keyof SshTunnelConfig>(@@ -38,11 +40,11 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }const renderStoredSecrets = () => (<div className="mb-3 flex w-full items-center">- <div className="min-w-[150px]">SSH credentials</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.credentials')}</div><div className="flex items-center"><span className="mr-3">*************</span><Button size="small" onClick={startReplacingSecrets}>- Replace+ {t('databases.actions.replace')}</Button></div></div>@@ -50,13 +52,13 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }const renderPassword = () => (<div className="mb-3 flex w-full items-center">- <div className="min-w-[150px]">SSH password</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.password')}</div><Input.Passwordvalue={currentTunnel.password}onChange={(e) => updateField('password', e.target.value)}size="small"className="max-w-[200px] grow"- placeholder="Enter SSH password"+ placeholder={t('databases.sshTunnel.passwordPlaceholder')}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -68,25 +70,26 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }const renderPrivateKey = () => (<><div className="mb-1 flex w-full items-start">- <div className="min-w-[150px] leading-6">SSH private key</div>+ <div className="min-w-[150px] pr-2 leading-6">{t('databases.sshTunnel.privateKey')}</div><Input.TextAreavalue={currentTunnel.privateKey}onChange={(e) => updateField('privateKey', e.target.value)}size="small"className="max-w-[200px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- key format example, not copyplaceholder="-----BEGIN OPENSSH PRIVATE KEY-----"autoSize={{ minRows: 2, maxRows: 5 }}/></div><div className="mb-3 flex w-full items-center">- <div className="min-w-[150px]">Key passphrase</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.keyPassphrase')}</div><Input.Passwordvalue={currentTunnel.privateKeyPassphrase}onChange={(e) => updateField('privateKeyPassphrase', e.target.value)}size="small"className="max-w-[200px] grow"- placeholder="Only for an encrypted key"+ placeholder={t('databases.sshTunnel.keyPassphrasePlaceholder')}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -109,15 +112,12 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }return (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH tunnel</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.title')}</div><Checkboxchecked={currentTunnel.isEnabled}onChange={(e) => updateField('isEnabled', e.target.checked)}>- <Tooltip- className="cursor-pointer"- title="For a database inside a closed network. Databasus connects to the SSH host below, and that host reaches the database using the host and port above."- >+ <Tooltip className="cursor-pointer" title={t('databases.sshTunnel.tooltip')}><InfoCircleOutlined style={{ color: 'gray' }} /></Tooltip></Checkbox>@@ -126,25 +126,23 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }{currentTunnel.isEnabled && (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH host</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.host')}</div><Inputvalue={currentTunnel.host}onChange={(e) => updateField('host', e.target.value)}size="small"className="max-w-[200px] grow"+ // eslint-disable-next-line i18next/no-literal-string -- example hostnameplaceholder="bastion.example.com"/>- <Tooltip- className="cursor-pointer"- title="The database host above is resolved by the SSH host, not by Databasus. Use 127.0.0.1 when the database runs on the SSH host itself."- >+ <Tooltip className="cursor-pointer" title={t('databases.sshTunnel.hostTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH port</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.port')}</div><InputNumbervalue={currentTunnel.port}onChange={(value) => updateField('port', value ?? DEFAULT_SSH_PORT)}@@ -156,24 +154,24 @@ export const EditSshTunnelComponent = ({ sshTunnel, hasStoredSecrets, onChange }</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH username</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.username')}</div><Inputvalue={currentTunnel.username}onChange={(e) => updateField('username', e.target.value)}size="small"className="max-w-[200px] grow"- placeholder="Enter SSH username"+ placeholder={t('databases.sshTunnel.usernamePlaceholder')}/></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH auth</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.authType')}</div><Selectvalue={currentTunnel.authType}onChange={changeAuthType}- options={Object.entries(SSH_TUNNEL_AUTH_TYPE_LABELS).map(([authType, label]) => ({- label,- value: authType as SshTunnelAuthType,+ options={Object.values(SshTunnelAuthType).map((authType) => ({+ label: t(SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS[authType]),+ value: authType,}))}size="small"className="max-w-[200px] grow"diff --git a/frontend/src/features/databases/ui/show/ShowDatabaseBaseInfoComponent.tsx b/frontend/src/features/databases/ui/show/ShowDatabaseBaseInfoComponent.tsxindex 76165d8b..288b7e26 100644--- a/frontend/src/features/databases/ui/show/ShowDatabaseBaseInfoComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowDatabaseBaseInfoComponent.tsx@@ -1,7 +1,9 @@+import { useTranslation } from 'react-i18next';+import {+ DATABASE_TYPE_LABEL_KEYS,type Database,getDatabaseLogoFromType,- getDatabaseTypeLabel,} from '../../../../entity/databases';interface Props {@@ -11,25 +13,23 @@ interface Props {}export const ShowDatabaseBaseInfoComponent = ({ database, isShowName, isShowType }: Props) => {+ const { t } = useTranslation();+return (<div>{isShowName && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Name</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.name')}</div><div>{database.name || ''}</div></div>)}{isShowType && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Database type</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseType')}</div><div className="flex items-center">- <span>{getDatabaseTypeLabel(database.type)}</span>- <img- src={getDatabaseLogoFromType(database.type)}- alt="databaseIcon"- className="ml-2 h-4 w-4"- />+ <span>{t(DATABASE_TYPE_LABEL_KEYS[database.type])}</span>+ <img src={getDatabaseLogoFromType(database.type)} alt="" className="ml-2 h-4 w-4" /></div></div>)}diff --git a/frontend/src/features/databases/ui/show/ShowDatabaseNotifiersComponent.tsx b/frontend/src/features/databases/ui/show/ShowDatabaseNotifiersComponent.tsxindex e682b9ac..93d968ff 100644--- a/frontend/src/features/databases/ui/show/ShowDatabaseNotifiersComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowDatabaseNotifiersComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import { type Database } from '../../../../entity/databases';import { getNotifierLogoFromType } from '../../../../entity/notifiers/models/getNotifierLogoFromType';@@ -6,10 +8,12 @@ interface Props {}export const ShowDatabaseNotifiersComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="flex w-full">- <div className="min-w-[150px]">Notify to</div>+ <div className="min-w-[150px] pr-2">{t('databases.notifiers.notifyTo')}</div><div>{database.notifiers && database.notifiers.length > 0 ? (@@ -23,7 +27,7 @@ export const ShowDatabaseNotifiersComponent = ({ database }: Props) => {</div>))) : (- <div className="text-gray-500 dark:text-gray-400">No notifiers configured</div>+ <div className="text-gray-500 dark:text-gray-400">{t('databases.notifiers.empty')}</div>)}</div></div>diff --git a/frontend/src/features/databases/ui/show/ShowMariaDbSpecificDataComponent.tsx b/frontend/src/features/databases/ui/show/ShowMariaDbSpecificDataComponent.tsxindex df9018a4..62001960 100644--- a/frontend/src/features/databases/ui/show/ShowMariaDbSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowMariaDbSpecificDataComponent.tsx@@ -1,4 +1,11 @@-import { type Database, MariadbVersion } from '../../../../entity/databases';+import { useTranslation } from 'react-i18next';++import {+ DATABASE_TYPE_LABEL_KEYS,+ type Database,+ DatabaseType,+ MariadbVersion,+} from '../../../../entity/databases';import { ShowSshTunnelComponent } from './ShowSshTunnelComponent';interface Props {@@ -20,61 +27,67 @@ const mariadbVersionLabels: Record<MariadbVersion, string> = {};export const ShowMariaDbSpecificDataComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">MariaDB version</div>+ <div className="min-w-[150px] pr-2">+ {t('databases.fields.version', {+ engine: t(DATABASE_TYPE_LABEL_KEYS[DatabaseType.MARIADB]),+ })}+ </div><div>{database.mariadb?.version ? mariadbVersionLabels[database.mariadb.version] : ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px] break-all">Host</div>+ <div className="min-w-[150px] pr-2 break-all">{t('common.fields.host')}</div><div>{database.mariadb?.host || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><div>{database.mariadb?.port || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><div>{database.mariadb?.username || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><div>{'*************'}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><div>{database.mariadb?.database || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>- <div>{database.mariadb?.isHttps ? 'Yes' : 'No'}</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div>+ <div>{database.mariadb?.isHttps ? t('common.answers.yes') : t('common.answers.no')}</div></div><ShowSshTunnelComponent sshTunnel={database.mariadb?.sshTunnel} />{database.mariadb?.isExcludeEvents && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude events</div>- <div>Yes</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeEvents')}</div>+ <div>{t('common.answers.yes')}</div></div>)}{database.mariadb?.isSkipGaleraDisable && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Galera replication</div>- <div>Skip disabling on restore</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.galeraReplication')}</div>+ <div>{t('databases.show.galeraDisableSkipped')}</div></div>)}{!!database.mariadb?.excludeTables?.length && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><div>{database.mariadb.excludeTables.join(', ')}</div></div>)}diff --git a/frontend/src/features/databases/ui/show/ShowMongoDbSpecificDataComponent.tsx b/frontend/src/features/databases/ui/show/ShowMongoDbSpecificDataComponent.tsxindex d31f1e14..5c4e5ae4 100644--- a/frontend/src/features/databases/ui/show/ShowMongoDbSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowMongoDbSpecificDataComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import { type Database } from '../../../../entity/databases';import { ShowSshTunnelComponent } from './ShowSshTunnelComponent';@@ -6,61 +8,63 @@ interface Props {}export const ShowMongoDbSpecificDataComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px] break-all">Host</div>+ <div className="min-w-[150px] pr-2 break-all">{t('common.fields.host')}</div><div>{database.mongodb?.host || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><div>{database.mongodb?.port || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><div>{database.mongodb?.username || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><div>{'*************'}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><div>{database.mongodb?.database || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>- <div>{database.mongodb?.isHttps ? 'Yes' : 'No'}</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div>+ <div>{database.mongodb?.isHttps ? t('common.answers.yes') : t('common.answers.no')}</div></div><ShowSshTunnelComponent sshTunnel={database.mongodb?.sshTunnel} /><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">CPU count</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.cpuCount')}</div><div>{database.mongodb?.cpuCount}</div></div>{database.mongodb?.isDirectConnection && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Direct connection</div>- <div>Yes</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.directConnection')}</div>+ <div>{t('common.answers.yes')}</div></div>)}{database.mongodb?.authDatabase && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Auth database</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.authDatabase')}</div><div>{database.mongodb.authDatabase}</div></div>)}{!!database.mongodb?.excludeCollections?.length && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude collections</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeCollections')}</div><div>{database.mongodb.excludeCollections.join(', ')}</div></div>)}diff --git a/frontend/src/features/databases/ui/show/ShowMySqlSpecificDataComponent.tsx b/frontend/src/features/databases/ui/show/ShowMySqlSpecificDataComponent.tsxindex 00627369..71b51c43 100644--- a/frontend/src/features/databases/ui/show/ShowMySqlSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowMySqlSpecificDataComponent.tsx@@ -1,4 +1,11 @@-import { type Database, MysqlVersion } from '../../../../entity/databases';+import { useTranslation } from 'react-i18next';++import {+ DATABASE_TYPE_LABEL_KEYS,+ type Database,+ DatabaseType,+ MysqlVersion,+} from '../../../../entity/databases';import { ShowSshTunnelComponent } from './ShowSshTunnelComponent';interface Props {@@ -13,47 +20,53 @@ const mysqlVersionLabels = {};export const ShowMySqlSpecificDataComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">MySQL version</div>+ <div className="min-w-[150px] pr-2">+ {t('databases.fields.version', {+ engine: t(DATABASE_TYPE_LABEL_KEYS[DatabaseType.MYSQL]),+ })}+ </div><div>{database.mysql?.version ? mysqlVersionLabels[database.mysql.version] : ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px] break-all">Host</div>+ <div className="min-w-[150px] pr-2 break-all">{t('common.fields.host')}</div><div>{database.mysql?.host || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><div>{database.mysql?.port || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><div>{database.mysql?.username || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><div>{'*************'}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><div>{database.mysql?.database || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Use HTTPS</div>- <div>{database.mysql?.isHttps ? 'Yes' : 'No'}</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.useHttps')}</div>+ <div>{database.mysql?.isHttps ? t('common.answers.yes') : t('common.answers.no')}</div></div><ShowSshTunnelComponent sshTunnel={database.mysql?.sshTunnel} />{!!database.mysql?.excludeTables?.length && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><div>{database.mysql.excludeTables.join(', ')}</div></div>)}diff --git a/frontend/src/features/databases/ui/show/ShowPostgreSqlLogicalSpecificDataComponent.tsx b/frontend/src/features/databases/ui/show/ShowPostgreSqlLogicalSpecificDataComponent.tsxindex 9a616ed3..22578e54 100644--- a/frontend/src/features/databases/ui/show/ShowPostgreSqlLogicalSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowPostgreSqlLogicalSpecificDataComponent.tsx@@ -1,4 +1,12 @@-import { type Database, PostgresSslMode, PostgresqlVersion } from '../../../../entity/databases';+import { useTranslation } from 'react-i18next';++import {+ type Database,+ POSTGRESQL_SHORT_NAME,+ POSTGRES_SSL_MODE_LABEL_KEYS,+ PostgresSslMode,+ PostgresqlVersion,+} from '../../../../entity/databases';import { ShowSshTunnelComponent } from './ShowSshTunnelComponent';interface Props {@@ -15,18 +23,15 @@ const postgresqlVersionLabels = {[PostgresqlVersion.PostgresqlVersion18]: '18',};-const sslModeLabels: Record<string, string> = {- [PostgresSslMode.Disable]: 'Disable',- [PostgresSslMode.Require]: 'Require',- [PostgresSslMode.VerifyCa]: 'Verify CA',- [PostgresSslMode.VerifyFull]: 'Verify full',-};-export const ShowPostgreSqlLogicalSpecificDataComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">PG version</div>+ <div className="min-w-[150px] pr-2">+ {t('databases.fields.version', { engine: POSTGRESQL_SHORT_NAME })}+ </div><div>{database.postgresqlLogical?.version? postgresqlVersionLabels[database.postgresqlLogical.version]@@ -35,39 +40,45 @@ export const ShowPostgreSqlLogicalSpecificDataComponent = ({ database }: Props)</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px] break-all">Host</div>+ <div className="min-w-[150px] pr-2 break-all">{t('common.fields.host')}</div><div>{database.postgresqlLogical?.host || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><div>{database.postgresqlLogical?.port || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><div>{database.postgresqlLogical?.username || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><div>{'*************'}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">DB name</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.databaseName')}</div><div>{database.postgresqlLogical?.database || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSL mode</div>- <div>{sslModeLabels[database.postgresqlLogical?.sslMode ?? PostgresSslMode.Disable]}</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.sslMode')}</div>+ <div>+ {t(+ POSTGRES_SSL_MODE_LABEL_KEYS[+ database.postgresqlLogical?.sslMode ?? PostgresSslMode.Disable+ ],+ )}+ </div></div>{!!database.postgresqlLogical?.sslClientCert &&database.postgresqlLogical?.sslMode !== PostgresSslMode.Disable && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><div>*************</div></div>)}@@ -75,22 +86,22 @@ export const ShowPostgreSqlLogicalSpecificDataComponent = ({ database }: Props){!!database.postgresqlLogical?.includeSchemas?.length && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Include schemas</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.includeSchemas')}</div><div>{database.postgresqlLogical.includeSchemas.join(', ')}</div></div>)}{!!database.postgresqlLogical?.excludeTables?.length && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Exclude tables</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.excludeTables')}</div><div>{database.postgresqlLogical.excludeTables.join(', ')}</div></div>)}{!!database.postgresqlLogical?.isSkipUserMappings && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Skip user mappings</div>- <div>Yes</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.skipUserMappings')}</div>+ <div>{t('common.answers.yes')}</div></div>)}</div>diff --git a/frontend/src/features/databases/ui/show/ShowPostgreSqlPhysicalSpecificDataComponent.tsx b/frontend/src/features/databases/ui/show/ShowPostgreSqlPhysicalSpecificDataComponent.tsxindex 6a134b91..ac2886e6 100644--- a/frontend/src/features/databases/ui/show/ShowPostgreSqlPhysicalSpecificDataComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowPostgreSqlPhysicalSpecificDataComponent.tsx@@ -1,6 +1,10 @@+import { useTranslation } from 'react-i18next';+import {type Database,- PhysicalDatabaseBackupType,+ PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS,+ POSTGRESQL_SHORT_NAME,+ POSTGRES_SSL_MODE_LABEL_KEYS,PostgresSslMode,PostgresqlVersion,} from '../../../../entity/databases';@@ -20,24 +24,15 @@ const postgresqlVersionLabels: Record<string, string> = {[PostgresqlVersion.PostgresqlVersion18]: '18',};-const backupTypeLabels: Record<string, string> = {- [PhysicalDatabaseBackupType.FULL]: 'Full backups only',- [PhysicalDatabaseBackupType.FULL_INCREMENTAL]: 'Full + incremental',- [PhysicalDatabaseBackupType.FULL_INCREMENTAL_WAL_STREAM]: 'Full + incremental + WAL streaming',-};--const sslModeLabels: Record<string, string> = {- [PostgresSslMode.Disable]: 'Disable',- [PostgresSslMode.Require]: 'Require',- [PostgresSslMode.VerifyCa]: 'Verify CA',- [PostgresSslMode.VerifyFull]: 'Verify full',-};-export const ShowPostgreSqlPhysicalSpecificDataComponent = ({ database }: Props) => {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">PG version</div>+ <div className="min-w-[150px] pr-2">+ {t('databases.fields.version', { engine: POSTGRESQL_SHORT_NAME })}+ </div><div>{database.postgresqlPhysical?.version? postgresqlVersionLabels[database.postgresqlPhysical.version]@@ -46,43 +41,49 @@ export const ShowPostgreSqlPhysicalSpecificDataComponent = ({ database }: Props)</div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Backup type</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.backupType')}</div><div>{database.postgresqlPhysical?.backupType- ? backupTypeLabels[database.postgresqlPhysical.backupType]+ ? t(PHYSICAL_DATABASE_BACKUP_TYPE_LABEL_KEYS[database.postgresqlPhysical.backupType]): ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px] break-all">Host</div>+ <div className="min-w-[150px] pr-2 break-all">{t('common.fields.host')}</div><div>{database.postgresqlPhysical?.host || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Port</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.port')}</div><div>{database.postgresqlPhysical?.port || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Username</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.username')}</div><div>{database.postgresqlPhysical?.username || ''}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Password</div>+ <div className="min-w-[150px] pr-2">{t('common.fields.password')}</div><div>{'*************'}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSL mode</div>- <div>{sslModeLabels[database.postgresqlPhysical?.sslMode ?? PostgresSslMode.Disable]}</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.sslMode')}</div>+ <div>+ {t(+ POSTGRES_SSL_MODE_LABEL_KEYS[+ database.postgresqlPhysical?.sslMode ?? PostgresSslMode.Disable+ ],+ )}+ </div></div>{!!database.postgresqlPhysical?.sslClientCert &&database.postgresqlPhysical?.sslMode !== PostgresSslMode.Disable && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">Client certificate</div>+ <div className="min-w-[150px] pr-2">{t('databases.fields.clientCertificate')}</div><div>*************</div></div>)}diff --git a/frontend/src/features/databases/ui/show/ShowSshTunnelComponent.tsx b/frontend/src/features/databases/ui/show/ShowSshTunnelComponent.tsxindex 62ef6431..6f798485 100644--- a/frontend/src/features/databases/ui/show/ShowSshTunnelComponent.tsx+++ b/frontend/src/features/databases/ui/show/ShowSshTunnelComponent.tsx@@ -1,36 +1,43 @@-import { SSH_TUNNEL_AUTH_TYPE_LABELS, type SshTunnelConfig } from '../../../../entity/databases';+import { useTranslation } from 'react-i18next';++import {+ SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS,+ type SshTunnelConfig,+} from '../../../../entity/databases';interface Props {sshTunnel: SshTunnelConfig | undefined;}export const ShowSshTunnelComponent = ({ sshTunnel }: Props) => {+ const { t } = useTranslation();+if (!sshTunnel?.isEnabled) return null;return (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH host</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.host')}</div><div>{sshTunnel.host}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH port</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.port')}</div><div>{sshTunnel.port}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH username</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.username')}</div><div>{sshTunnel.username}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH auth</div>- <div>{SSH_TUNNEL_AUTH_TYPE_LABELS[sshTunnel.authType]}</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.authType')}</div>+ <div>{t(SSH_TUNNEL_AUTH_TYPE_LABEL_KEYS[sshTunnel.authType])}</div></div><div className="mb-1 flex w-full items-center">- <div className="min-w-[150px]">SSH credentials</div>+ <div className="min-w-[150px] pr-2">{t('databases.sshTunnel.credentials')}</div><div>*************</div></div></>diff --git a/frontend/src/features/healthcheck/ui/EditHealthcheckConfigComponent.tsx b/frontend/src/features/healthcheck/ui/EditHealthcheckConfigComponent.tsxindex 2282ae45..be44b410 100644--- a/frontend/src/features/healthcheck/ui/EditHealthcheckConfigComponent.tsx+++ b/frontend/src/features/healthcheck/ui/EditHealthcheckConfigComponent.tsx@@ -1,9 +1,11 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Button, Input, Spin, Switch, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { healthcheckConfigApi } from '../../../entity/healthcheck';import type { HealthcheckConfig } from '../../../entity/healthcheck';+import { translateApiError } from '../../../shared/i18n';interface Props {databaseId: string;@@ -11,6 +13,7 @@ interface Props {}export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) => {+ const { t } = useTranslation();const [isLoading, setIsLoading] = useState(false);const [isSaving, setIsSaving] = useState(false);const [isUnsaved, setIsUnsaved] = useState(false);@@ -28,7 +31,7 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =setIsUnsaved(false);onClose();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -42,7 +45,7 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =setHealthcheckConfig(config);}).catch((error) => {- alert(error.message);+ alert(translateApiError(error, t));}).finally(() => {setIsLoading(false);@@ -60,7 +63,7 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =return (<div className="space-y-4"><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Enable healthcheck</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.enable')}</div><Switchchecked={healthcheckConfig.isHealthcheckEnabled}onChange={(checked) => {@@ -73,10 +76,7 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =size="small"/>- <Tooltip- className="cursor-pointer"- title="Enable or disable healthcheck monitoring for this database"- >+ <Tooltip className="cursor-pointer" title={t('healthcheck.config.tooltips.enable')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -84,7 +84,9 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) ={healthcheckConfig.isHealthcheckEnabled && (<><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Notify when unavailable</div>+ <div className="min-w-[180px] pr-2">+ {t('healthcheck.config.notifyWhenUnavailable')}+ </div><Switchchecked={healthcheckConfig.isSentNotificationWhenUnavailable}@@ -100,14 +102,14 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =<TooltipclassName="cursor-pointer"- title="Send notifications when database becomes unavailable"+ title={t('healthcheck.config.tooltips.notifyWhenUnavailable')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Check interval (minutes)</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.checkIntervalMinutes')}</div><Inputtype="number"@@ -130,14 +132,14 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =<TooltipclassName="cursor-pointer"- title="How often to check database health (in minutes)"+ title={t('healthcheck.config.tooltips.checkIntervalMinutes')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Attempts before down</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.attemptsBeforeDown')}</div><Inputtype="number"@@ -160,14 +162,14 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =<TooltipclassName="cursor-pointer"- title="Number of failed attempts before marking database as down"+ title={t('healthcheck.config.tooltips.attemptsBeforeDown')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Store attempts (days)</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.storeAttemptsDays')}</div><Inputtype="number"@@ -190,7 +192,7 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =<TooltipclassName="cursor-pointer"- title="How many days to store health check attempt history"+ title={t('healthcheck.config.tooltips.storeAttemptsDays')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -200,11 +202,11 @@ export const EditHealthcheckConfigComponent = ({ databaseId, onClose }: Props) =<div className="mt-6 flex justify-end space-x-2"><Button onClick={onClose} disabled={isSaving}>- Cancel+ {t('common.actions.cancel')}</Button><Button type="primary" onClick={handleSave} loading={isSaving} disabled={!isUnsaved}>- Save+ {t('common.actions.save')}</Button></div></div>diff --git a/frontend/src/features/healthcheck/ui/HealthckeckAttemptsComponent.tsx b/frontend/src/features/healthcheck/ui/HealthckeckAttemptsComponent.tsxindex 0857ebf3..9ad548a4 100644--- a/frontend/src/features/healthcheck/ui/HealthckeckAttemptsComponent.tsx+++ b/frontend/src/features/healthcheck/ui/HealthckeckAttemptsComponent.tsx@@ -1,6 +1,7 @@import { Select, Spin, Tooltip } from 'antd';import dayjs from 'dayjs';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import type { Database } from '../../../entity/databases';import { HealthStatus } from '../../../entity/databases/model/HealthStatus';@@ -9,6 +10,7 @@ import {healthcheckAttemptApi,healthcheckConfigApi,} from '../../../entity/healthcheck';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserShortTimeFormat } from '../../../shared/time/getUserTimeFormat';interface Props {@@ -41,6 +43,9 @@ const getAfterDateByPeriod = (period: 'today' | '7d' | '30d' | 'all'): Date => {};export const HealthckeckAttemptsComponent = ({ database, onVisibilityChange }: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();+const [isHealthcheckConfigLoading, setIsHealthcheckConfigLoading] = useState(false);const [isShowHealthcheckConfig, setIsShowHealthcheckConfig] = useState(false);@@ -70,7 +75,7 @@ export const HealthckeckAttemptsComponent = ({ database, onVisibilityChange }: PsetHealthcheckAttempts(healthcheckAttempts);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}if (isShowLoading) {@@ -129,20 +134,20 @@ export const HealthckeckAttemptsComponent = ({ database, onVisibilityChange }: Preturn (<div className="mb-5 w-full rounded-tr-md rounded-br-md rounded-bl-md bg-white p-3 shadow sm:p-5 dark:bg-gray-800">- <h2 className="text-lg font-bold sm:text-xl">Healthcheck attempts</h2>+ <h2 className="text-lg font-bold sm:text-xl">{t('healthcheck.attempts.title')}</h2><div className="mt-3 flex flex-col gap-2 sm:mt-4 sm:flex-row sm:items-center">- <span className="text-sm font-medium sm:mr-2">Period</span>+ <span className="text-sm font-medium sm:mr-2">{t('healthcheck.attempts.period')}</span><Selectsize="small"value={period}onChange={(value) => setPeriod(value)}className="w-full sm:w-[120px]"options={[- { value: 'today', label: 'Today' },- { value: '7d', label: '7 days' },- { value: '30d', label: '30 days' },- { value: 'all', label: 'All time' },+ { value: 'today', label: t('healthcheck.attempts.periods.today') },+ { value: '7d', label: t('healthcheck.attempts.periods.sevenDays') },+ { value: '30d', label: t('healthcheck.attempts.periods.thirtyDays') },+ { value: 'all', label: t('healthcheck.attempts.periods.allTime') },]}/></div>@@ -159,7 +164,7 @@ export const HealthckeckAttemptsComponent = ({ database, onVisibilityChange }: PhealthcheckAttempts.map((healthcheckAttempt) => (<Tooltipkey={healthcheckAttempt.createdAt.toString()}- title={`${dayjs(healthcheckAttempt.createdAt).format(getUserShortTimeFormat().format)} (${dayjs(healthcheckAttempt.createdAt).fromNow()})`}+ title={`${dayjs(healthcheckAttempt.createdAt).format(getUserShortTimeFormat().format)} (${formatRelativeTime(healthcheckAttempt.createdAt)})`}><divclassName={`h-[8px] w-[8px] cursor-pointer rounded-[2px] ${@@ -171,7 +176,7 @@ export const HealthckeckAttemptsComponent = ({ database, onVisibilityChange }: P</Tooltip>))) : (- <div className="text-xs text-gray-400">No data yet</div>+ <div className="text-xs text-gray-400">{t('healthcheck.attempts.empty')}</div>)}</div>)}diff --git a/frontend/src/features/healthcheck/ui/ShowHealthcheckConfigComponent.tsx b/frontend/src/features/healthcheck/ui/ShowHealthcheckConfigComponent.tsxindex 723a9bd0..0b24fa3e 100644--- a/frontend/src/features/healthcheck/ui/ShowHealthcheckConfigComponent.tsx+++ b/frontend/src/features/healthcheck/ui/ShowHealthcheckConfigComponent.tsx@@ -1,14 +1,17 @@import { Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { healthcheckConfigApi } from '../../../entity/healthcheck';import type { HealthcheckConfig } from '../../../entity/healthcheck';+import { translateApiError } from '../../../shared/i18n';interface Props {databaseId: string;}export const ShowHealthcheckConfigComponent = ({ databaseId }: Props) => {+ const { t } = useTranslation();const [isLoading, setIsLoading] = useState(false);const [healthcheckConfig, setHealthcheckConfig] = useState<HealthcheckConfig | undefined>(undefined,@@ -22,7 +25,7 @@ export const ShowHealthcheckConfigComponent = ({ databaseId }: Props) => {setHealthcheckConfig(config);}).catch((error) => {- alert(error.message);+ alert(translateApiError(error, t));}).finally(() => {setIsLoading(false);@@ -40,31 +43,39 @@ export const ShowHealthcheckConfigComponent = ({ databaseId }: Props) => {return (<div className="space-y-4"><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Is health check enabled</div>- <div>{healthcheckConfig.isHealthcheckEnabled ? 'Yes' : 'No'}</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.isEnabled')}</div>+ <div>+ {healthcheckConfig.isHealthcheckEnabled+ ? t('common.answers.yes')+ : t('common.answers.no')}+ </div></div>{healthcheckConfig.isHealthcheckEnabled && (<><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Notify when unavailable</div>+ <div className="min-w-[180px] pr-2">+ {t('healthcheck.config.notifyWhenUnavailable')}+ </div><div className="lg:w-[200px]">- {healthcheckConfig.isSentNotificationWhenUnavailable ? 'Yes' : 'No'}+ {healthcheckConfig.isSentNotificationWhenUnavailable+ ? t('common.answers.yes')+ : t('common.answers.no')}</div></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Check interval (minutes)</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.checkIntervalMinutes')}</div><div className="lg:w-[200px]">{healthcheckConfig.intervalMinutes}</div></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Attempts before down</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.attemptsBeforeDown')}</div><div className="lg:w-[200px]">{healthcheckConfig.attemptsBeforeConcideredAsDown}</div></div><div className="mb-1 flex items-center">- <div className="min-w-[180px]">Store attempts (days)</div>+ <div className="min-w-[180px] pr-2">{t('healthcheck.config.storeAttemptsDays')}</div><div className="lg:w-[200px]">{healthcheckConfig.storeAttemptsDays}</div></div></>diff --git a/frontend/src/features/notifiers/lib/defaultAcceptNotificationTypes.ts b/frontend/src/features/notifiers/lib/defaultAcceptNotificationTypes.tsnew file mode 100644index 00000000..815fb31c--- /dev/null+++ b/frontend/src/features/notifiers/lib/defaultAcceptNotificationTypes.ts@@ -0,0 +1,3 @@+import { NotificationType } from '../../../entity/notifiers';++export const DEFAULT_ACCEPT_NOTIFICATION_TYPES = [NotificationType.ALL];diff --git a/frontend/src/features/notifiers/lib/notificationTypeLabels.ts b/frontend/src/features/notifiers/lib/notificationTypeLabels.tsdeleted file mode 100644index 5cab4169..00000000--- a/frontend/src/features/notifiers/lib/notificationTypeLabels.ts+++ /dev/null@@ -1,18 +0,0 @@-import { NotificationType } from '../../../entity/notifiers';--export const NOTIFICATION_TYPE_LABELS: Record<NotificationType, string> = {- [NotificationType.ALL]: 'All',- [NotificationType.BACKUP_SUCCESS]: 'Backup success',- [NotificationType.BACKUP_FAILED]: 'Backup failed',- [NotificationType.HEALTHCHECK_SUCCESS]: 'Healthcheck success',- [NotificationType.HEALTHCHECK_FAILED]: 'Healthcheck failed',- [NotificationType.VERIFICATION_SUCCESS]: 'Verification success',- [NotificationType.VERIFICATION_FAILED]: 'Verification failed',-};--export const NOTIFICATION_TYPE_OPTIONS = Object.values(NotificationType).map((value) => ({- label: NOTIFICATION_TYPE_LABELS[value],- value,-}));--export const DEFAULT_ACCEPT_NOTIFICATION_TYPES = [NotificationType.ALL];diff --git a/frontend/src/features/notifiers/lib/webhookExampleRequest.ts b/frontend/src/features/notifiers/lib/webhookExampleRequest.tsnew file mode 100644index 00000000..5d4f3bd6--- /dev/null+++ b/frontend/src/features/notifiers/lib/webhookExampleRequest.ts@@ -0,0 +1,35 @@+/* eslint-disable i18next/no-literal-string -- a sample HTTP request carrying the English text the backend sends */+import type { WebhookHeader } from '../../../entity/notifiers';++const EXAMPLE_HEADING = '✅ Backup completed for database "my-database" (workspace "Production")';++const EXAMPLE_JSON_ESCAPED_MESSAGE =+ 'Backup completed successfully in 1m 23s.\\nCompressed backup size: 256.00 MB';++const EXAMPLE_DEFAULT_BODY = `{+ "heading": "✅ Backup completed for database "my-database" (workspace "My workspace")",+ "message": "Backup completed successfully in 1m 23s. Compressed backup size: 256.00 MB"+}`;++export const EXAMPLE_GET_QUERY =+ '?heading=✅ Backup completed for database "my-database" (workspace "Production")&message=Backup completed successfully in 1m 23s.%0ACompressed backup size: 256.00 MB';++export const getExamplePostHeaderLines = (headers: WebhookHeader[]): string => {+ const contentTypeLine = headers.some((header) => header.key.toLowerCase() === 'content-type')+ ? ''+ : 'Content-Type: application/json';++ const customHeaderLines = headers+ .filter((header) => header.key)+ .map((header) => `\n${header.key}: ${header.value}`)+ .join('');++ return `${contentTypeLine}${customHeaderLines}`;+};++export const getExamplePostBody = (bodyTemplate: string | undefined): string =>+ bodyTemplate+ ? bodyTemplate+ .replace('{{heading}}', EXAMPLE_HEADING)+ .replace('{{message}}', EXAMPLE_JSON_ESCAPED_MESSAGE)+ : EXAMPLE_DEFAULT_BODY;diff --git a/frontend/src/features/notifiers/ui/NotifierCardComponent.tsx b/frontend/src/features/notifiers/ui/NotifierCardComponent.tsxindex 6b407ef5..1dba58b7 100644--- a/frontend/src/features/notifiers/ui/NotifierCardComponent.tsx+++ b/frontend/src/features/notifiers/ui/NotifierCardComponent.tsx@@ -1,8 +1,9 @@import { InfoCircleOutlined } from '@ant-design/icons';+import { useTranslation } from 'react-i18next';-import { type Notifier } from '../../../entity/notifiers';+import { type Notifier, NotifierType } from '../../../entity/notifiers';import { getNotifierLogoFromType } from '../../../entity/notifiers/models/getNotifierLogoFromType';-import { getNotifierNameFromType } from '../../../entity/notifiers/models/getNotifierNameFromType';+import type { TranslationKey } from '../../../shared/i18n';interface Props {notifier: Notifier;@@ -10,11 +11,25 @@ interface Props {setSelectedNotifierId: (notifierId: string) => void;}+// One sentence per type rather than one with the type interpolated: some languages put a different+// preposition before a messenger than before email or a webhook.+const NOTIFY_TO_KEYS: Record<NotifierType, TranslationKey> = {+ [NotifierType.EMAIL]: 'notifiers.card.notifyTo.email',+ [NotifierType.TELEGRAM]: 'notifiers.card.notifyTo.telegram',+ [NotifierType.WEBHOOK]: 'notifiers.card.notifyTo.webhook',+ [NotifierType.SLACK]: 'notifiers.card.notifyTo.slack',+ [NotifierType.DISCORD]: 'notifiers.card.notifyTo.discord',+ [NotifierType.TEAMS]: 'notifiers.card.notifyTo.teams',+ [NotifierType.MATTERMOST]: 'notifiers.card.notifyTo.mattermost',+};+export const NotifierCardComponent = ({notifier,selectedNotifierId,setSelectedNotifierId,}: Props) => {+ const { t } = useTranslation();+return (<divclassName={`mb-3 cursor-pointer rounded p-3 shadow ${selectedNotifierId === notifier.id ? 'bg-blue-100 dark:bg-blue-800' : 'bg-white dark:bg-gray-800'}`}@@ -24,20 +39,16 @@ export const NotifierCardComponent = ({<div className="flex items-center"><div className="text-sm text-gray-500 dark:text-gray-400">- Notify to {getNotifierNameFromType(notifier.notifierType)}+ {t(NOTIFY_TO_KEYS[notifier.notifierType])}</div>- <img- src={getNotifierLogoFromType(notifier.notifierType)}- alt="notifyIcon"- className="ml-1 h-4 w-4"- />+ <img src={getNotifierLogoFromType(notifier.notifierType)} alt="" className="ml-1 h-4 w-4" /></div>{notifier.lastSendError && (<div className="mt-1 flex items-center text-sm text-red-600 underline dark:text-red-400"><InfoCircleOutlined className="mr-1" style={{ color: 'red' }} />- Has send error+ {t('notifiers.card.hasSendError')}</div>)}</div>diff --git a/frontend/src/features/notifiers/ui/NotifierComponent.tsx b/frontend/src/features/notifiers/ui/NotifierComponent.tsxindex 1298b663..09237f2d 100644--- a/frontend/src/features/notifiers/ui/NotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/NotifierComponent.tsx@@ -7,10 +7,12 @@ import {import { Button, Input, Spin } from 'antd';import { useState } from 'react';import { useEffect } from 'react';+import { useTranslation } from 'react-i18next';import { databaseApi } from '../../../entity/databases';import { notifierApi } from '../../../entity/notifiers';import type { Notifier } from '../../../entity/notifiers';+import { translateApiError } from '../../../shared/i18n';import { ToastHelper } from '../../../shared/toast';import { ConfirmationComponent } from '../../../shared/ui';import { NotifierTransferDialogComponent } from './NotifierTransferDialogComponent';@@ -32,6 +34,7 @@ export const NotifierComponent = ({onNotifierTransferred,isCanManageNotifiers,}: Props) => {+ const { t } = useTranslation();const [notifier, setNotifier] = useState<Notifier | undefined>();const [isEditName, setIsEditName] = useState(false);@@ -56,8 +59,8 @@ export const NotifierComponent = ({.sendTestNotification(notifier.id).then(() => {ToastHelper.showToast({- title: 'Test notification sent!',- description: 'Test notification sent successfully',+ title: t('notifiers.testNotification.sent.title'),+ description: t('notifiers.testNotification.sent.description'),});if (notifier.lastSendError) {@@ -65,8 +68,8 @@ export const NotifierComponent = ({onNotifierChanged(notifier);}})- .catch((e) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));}).finally(() => {setIsSendingTestNotification(false);@@ -81,16 +84,14 @@ export const NotifierComponent = ({try {const isNotifierUsing = await databaseApi.isNotifierUsing(notifier.id);if (isNotifierUsing) {- alert(- 'Notifier is used by some databases. Please remove the notifier from databases first.',- );+ alert(t('notifiers.config.removeBlockedByDatabases'));setIsShowRemoveConfirm(false);} else {await notifierApi.deleteNotifier(notifier.id);onNotifierDeleted();}} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsRemoving(false);@@ -116,8 +117,8 @@ export const NotifierComponent = ({setIsEditName(false);onNotifierChanged(editNotifier);})- .catch((e) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));setIsSaving(false);});};@@ -162,7 +163,7 @@ export const NotifierComponent = ({setEditNotifier({ ...editNotifier, name: e.target.value });setIsNameUnsaved(true);}}- placeholder="Enter name..."+ placeholder={t('notifiers.config.namePlaceholder')}size="large"/>@@ -189,7 +190,7 @@ export const NotifierComponent = ({loading={isSaving}disabled={!editNotifier?.name}>- Save+ {t('common.actions.save')}</Button>)}</div>@@ -199,29 +200,27 @@ export const NotifierComponent = ({<div className="max-w-[400px] rounded border border-red-600 px-3 py-3"><div className="mt-1 flex items-center text-sm font-bold text-red-600"><InfoCircleOutlined className="mr-2" style={{ color: 'red' }} />- Send error+ {t('notifiers.config.sendError.title')}</div><div className="mt-3 text-sm">- The error:+ {t('notifiers.config.sendError.errorLabel')}<br />{notifier.lastSendError}</div><div className="mt-3 text-sm break-words whitespace-pre-wrap text-gray-500 dark:text-gray-400">- To clean this error (choose any):+ {t('notifiers.config.sendError.clearHint')}<ul>- <li>- - send test notification via button below (even if you updated settings);- </li>- <li>- wait until the next notification is sent without errors;</li>+ <li>{t('notifiers.config.sendError.clearBySendingTest')}</li>+ <li>{t('notifiers.config.sendError.clearByNextNotification')}</li></ul></div></div>)}<div className="mt-5 flex items-center font-bold">- <div>Notifier settings</div>+ <div>{t('notifiers.config.settingsTitle')}</div>{!isEditSettings && isCanManageNotifiers ? (<div className="ml-2 h-4 w-4 cursor-pointer" onClick={() => startEdit('settings')}>@@ -260,7 +259,7 @@ export const NotifierComponent = ({loading={isSendingTestNotification}disabled={isSendingTestNotification}>- Send test notification+ {t('notifiers.testNotification.send')}</Button>{isCanManageNotifiers && (@@ -293,8 +292,8 @@ export const NotifierComponent = ({<ConfirmationComponentonConfirm={remove}onDecline={() => setIsShowRemoveConfirm(false)}- description="Are you sure you want to remove this notifier? This action cannot be undone."- actionText="Remove"+ description={t('notifiers.config.removeConfirmation')}+ actionText={t('common.actions.remove')}actionButtonColor="red"/>)}diff --git a/frontend/src/features/notifiers/ui/NotifierTransferDialogComponent.tsx b/frontend/src/features/notifiers/ui/NotifierTransferDialogComponent.tsxindex 03035d5f..2424eef9 100644--- a/frontend/src/features/notifiers/ui/NotifierTransferDialogComponent.tsx+++ b/frontend/src/features/notifiers/ui/NotifierTransferDialogComponent.tsx@@ -1,9 +1,11 @@import { Button, Modal, Select, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { databaseApi } from '../../../entity/databases';import { type Notifier, notifierApi } from '../../../entity/notifiers';import { type WorkspaceResponse, workspaceApi } from '../../../entity/workspaces';+import { translateApiError } from '../../../shared/i18n';interface Props {notifier: Notifier;@@ -12,6 +14,7 @@ interface Props {}export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferred }: Props) => {+ const { t } = useTranslation();const [isLoading, setIsLoading] = useState(true);const [isNotifierInUse, setIsNotifierInUse] = useState(false);const [workspaces, setWorkspaces] = useState<WorkspaceResponse[]>([]);@@ -31,7 +34,7 @@ export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferrsetWorkspaces(filteredWorkspaces);}} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsLoading(false);@@ -46,7 +49,7 @@ export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferrawait notifierApi.transferNotifier(notifier.id, selectedWorkspaceId);onTransferred();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTransferring(false);@@ -58,7 +61,7 @@ export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferrreturn (<Modal- title="Transfer notifier to another workspace"+ title={t('notifiers.transfer.title')}footer={null}open={true}onCancel={onClose}@@ -71,37 +74,36 @@ export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferr) : isNotifierInUse ? (<div className="py-3"><div className="text-gray-700 dark:text-gray-300">- This notifier is used by some databases. Please transfer or remove related databases- first.+ {t('notifiers.transfer.blockedByDatabases')}</div><div className="mt-5"><Button type="primary" onClick={onClose}>- OK+ {t('common.actions.ok')}</Button></div></div>) : (<div className="py-3"><div className="mb-3 text-gray-500 dark:text-gray-400">- Select a workspace to transfer this notifier to.+ {t('notifiers.transfer.description')}</div><div className="mb-5 flex items-center">- <div className="min-w-[120px]">Target workspace</div>+ <div className="min-w-[120px] pr-2">{t('notifiers.transfer.targetWorkspace')}</div><Selectvalue={selectedWorkspaceId}onChange={setSelectedWorkspaceId}className="min-w-[200px] grow"- placeholder="Select workspace"+ placeholder={t('notifiers.transfer.selectWorkspace')}options={workspaces.map((w) => ({ label: w.name, value: w.id }))}/></div><div className="flex gap-2"><Button type="default" onClick={onClose}>- Cancel+ {t('common.actions.cancel')}</Button><Button@@ -110,7 +112,7 @@ export const NotifierTransferDialogComponent = ({ notifier, onClose, onTransferrloading={isTransferring}disabled={!selectedWorkspaceId || isTransferring}>- Transfer+ {t('notifiers.transfer.submit')}</Button></div></div>diff --git a/frontend/src/features/notifiers/ui/NotifiersComponent.tsx b/frontend/src/features/notifiers/ui/NotifiersComponent.tsxindex 7f38cce9..96056385 100644--- a/frontend/src/features/notifiers/ui/NotifiersComponent.tsx+++ b/frontend/src/features/notifiers/ui/NotifiersComponent.tsx@@ -1,10 +1,12 @@import { Button, Modal, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { notifierApi } from '../../../entity/notifiers';import type { Notifier } from '../../../entity/notifiers';import type { WorkspaceResponse } from '../../../entity/workspaces';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError } from '../../../shared/i18n';import { NotifierCardComponent } from './NotifierCardComponent';import { NotifierComponent } from './NotifierComponent';import { EditNotifierComponent } from './edit/EditNotifierComponent';@@ -15,9 +17,11 @@ interface Props {isCanManageNotifiers: boolean;}+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst SELECTED_NOTIFIER_STORAGE_KEY = 'selectedNotifierId';export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifiers }: Props) => {+ const { t } = useTranslation();const isMobile = useIsMobile();const [isLoading, setIsLoading] = useState(true);const [notifiers, setNotifiers] = useState<Notifier[]>([]);@@ -58,7 +62,7 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifiupdateSelectedNotifierId(notifierToSelect);}})- .catch((e) => alert(e.message))+ .catch((e: unknown) => alert(translateApiError(e, t))).finally(() => setIsLoading(false));};@@ -82,7 +86,7 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotificonst addNotifierButton = (<Button type="primary" className="mb-2 w-full" onClick={() => setIsShowAddNotifier(true)}>- Add notifier+ {t('notifiers.list.addNotifier')}</Button>);@@ -108,7 +112,7 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifi<div className="mb-2"><input- placeholder="Search notifier"+ placeholder={t('notifiers.list.searchPlaceholder')}value={searchQuery}onChange={(e) => setSearchQuery(e.target.value)}className="w-full border-b border-gray-300 p-1 text-gray-500 outline-none dark:text-gray-400"@@ -128,14 +132,14 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifi)): searchQuery && (<div className="mb-4 text-center text-sm text-gray-500 dark:text-gray-400">- No notifiers found matching "{searchQuery}"+ {t('notifiers.list.noSearchResults', { query: searchQuery })}</div>)}{notifiers.length < 5 && isCanManageNotifiers && addNotifierButton}<div className="mx-3 text-center text-xs text-gray-500 dark:text-gray-400">- Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)+ {t('notifiers.list.description')}</div></div>)}@@ -149,7 +153,7 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifionClick={() => updateSelectedNotifierId(undefined)}className="w-full">- ← Back to notifiers+ {t('notifiers.list.backToList')}</Button></div>)}@@ -181,14 +185,14 @@ export const NotifiersComponent = ({ contentHeight, workspace, isCanManageNotifi{isShowAddNotifier && (<Modal- title="Add notifier"+ title={t('notifiers.create.title')}footer={<div />}open={isShowAddNotifier}onCancel={() => setIsShowAddNotifier(false)}maskClosable={false}><div className="my-3 max-w-[250px] text-gray-500 dark:text-gray-400">- Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)+ {t('notifiers.list.description')}</div><EditNotifierComponentdiff --git a/frontend/src/features/notifiers/ui/edit/EditNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/EditNotifierComponent.tsxindex a1ed8d05..fa47c967 100644--- a/frontend/src/features/notifiers/ui/edit/EditNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/EditNotifierComponent.tsx@@ -1,8 +1,10 @@import { Button, Input, Select } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {MattermostDeliveryMode,+ NOTIFIER_TYPE_LABEL_KEYS,type Notifier,NotifierType,WebhookMethod,@@ -16,6 +18,7 @@ import {validateWebhookNotifier,} from '../../../../entity/notifiers';import { getNotifierLogoFromType } from '../../../../entity/notifiers/models/getNotifierLogoFromType';+import { translateApiError } from '../../../../shared/i18n';import { ToastHelper } from '../../../../shared/toast';import { EditDiscordNotifierComponent } from './notifiers/EditDiscordNotifierComponent';import { EditEmailNotifierComponent } from './notifiers/EditEmailNotifierComponent';@@ -37,6 +40,16 @@ interface Props {onChanged: (notifier: Notifier) => void;}+const SELECTABLE_NOTIFIER_TYPES = [+ NotifierType.TELEGRAM,+ NotifierType.EMAIL,+ NotifierType.WEBHOOK,+ NotifierType.SLACK,+ NotifierType.DISCORD,+ NotifierType.TEAMS,+ NotifierType.MATTERMOST,+];+export function EditNotifierComponent({workspaceId,isShowClose,@@ -45,6 +58,7 @@ export function EditNotifierComponent({editingNotifier,onChanged,}: Props) {+ const { t } = useTranslation();const [notifier, setNotifier] = useState<Notifier | undefined>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);@@ -62,7 +76,7 @@ export function EditNotifierComponent({onChanged(notifier);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -77,16 +91,14 @@ export function EditNotifierComponent({await notifierApi.sendTestNotificationDirect(notifier);setIsTestNotificationSuccess(true);ToastHelper.showToast({- title: 'Test notification sent!',- description: 'Test notification sent successfully',+ title: t('notifiers.testNotification.sent.title'),+ description: t('notifiers.testNotification.sent.description'),});} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));if (notifier.notifierType === NotifierType.SLACK) {- alert(- 'Make sure channel is public or bot is added to the private channel (via @invite) or group. For direct messages use User ID from Slack profile.',- );+ alert(t('notifiers.slack.testFailedHint'));}}@@ -236,7 +248,7 @@ export function EditNotifierComponent({<div>{isShowName && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Name</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('common.fields.name')}</div><Inputvalue={notifier?.name || ''}@@ -246,26 +258,21 @@ export function EditNotifierComponent({}}size="small"className="w-full max-w-[250px]"- placeholder="Chat with me"+ placeholder={t('notifiers.create.namePlaceholder')}/></div>)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Type</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('common.fields.type')}</div><div className="flex items-center"><Selectvalue={notifier?.notifierType}- options={[- { label: 'Telegram', value: NotifierType.TELEGRAM },- { label: 'Email', value: NotifierType.EMAIL },- { label: 'Webhook', value: NotifierType.WEBHOOK },- { label: 'Slack', value: NotifierType.SLACK },- { label: 'Discord', value: NotifierType.DISCORD },- { label: 'Teams', value: NotifierType.TEAMS },- { label: 'Mattermost', value: NotifierType.MATTERMOST },- ]}+ options={SELECTABLE_NOTIFIER_TYPES.map((type) => ({+ label: t(NOTIFIER_TYPE_LABEL_KEYS[type]),+ value: type,+ }))}onChange={(value) => {setNotifierType(value);setIsUnsaved(true);@@ -367,7 +374,7 @@ export function EditNotifierComponent({type="primary"onClick={sendTestNotification}>- Send test notification+ {t('notifiers.testNotification.send')}</Button>) : (<div />@@ -381,7 +388,7 @@ export function EditNotifierComponent({type="primary"onClick={save}>- Save+ {t('common.actions.save')}</Button>) : (<div />@@ -396,7 +403,7 @@ export function EditNotifierComponent({ghostonClick={onClose}>- Cancel+ {t('common.actions.cancel')}</Button>) : (<div />diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditDiscordNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditDiscordNotifierComponent.tsxindex a65cd753..8bb07fee 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditDiscordNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditDiscordNotifierComponent.tsx@@ -1,4 +1,5 @@import { Input } from 'antd';+import { useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';@@ -9,10 +10,14 @@ interface Props {}export function EditDiscordNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Channel webhook URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.discord.channelWebhookUrl')}+ </div><Inputvalue={notifier?.discordNotifier?.channelWebhookUrl || ''}onChange={(e) => {@@ -28,27 +33,28 @@ export function EditDiscordNotifierComponent({ notifier, setNotifier, setUnsaved}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example token, not copyplaceholder="1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"/></div><div className="max-w-[250px] sm:ml-[150px]"><div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- <strong>How to get Discord webhook URL:</strong>+ <strong>{t('notifiers.discord.howTo.title')}</strong><br /><br />- 1. Create or select a Discord channel+ {t('notifiers.discord.howTo.createChannel')}<br />- 2. Go to channel settings (gear icon)+ {t('notifiers.discord.howTo.openChannelSettings')}<br />- 3. Navigate to Integrations+ {t('notifiers.discord.howTo.openIntegrations')}<br />- 4. Create a new webhook+ {t('notifiers.discord.howTo.createWebhook')}<br />- 5. Copy the webhook URL+ {t('notifiers.discord.howTo.copyWebhookUrl')}<br /><br />- <em>Note: make sure make channel private if needed</em>+ <em>{t('notifiers.discord.howTo.privacyNote')}</em></div></div></>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditEmailNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditEmailNotifierComponent.tsxindex e0d7c0ab..c2b4b083 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditEmailNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditEmailNotifierComponent.tsx@@ -1,6 +1,7 @@import { DownOutlined, InfoCircleOutlined, UpOutlined } from '@ant-design/icons';import { Checkbox, Input, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';@@ -11,13 +12,14 @@ interface Props {}export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();const hasAdvancedValues = !!notifier?.emailNotifier?.isInsecureSkipVerify;const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Target email</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.email.targetEmail')}</div><div className="flex items-center"><Inputvalue={notifier?.emailNotifier?.targetEmail || ''}@@ -38,17 +40,14 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }placeholder="[email protected]"/>- <Tooltip- className="cursor-pointer"- title="The email where you want to receive the message"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.email.targetEmailTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">SMTP host</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.email.smtpHost')}</div><Inputvalue={notifier?.emailNotifier?.smtpHost || ''}onChange={(e) => {@@ -65,12 +64,13 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example hostnameplaceholder="smtp.gmail.com"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">SMTP port</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.email.smtpPort')}</div><Inputtype="number"value={notifier?.emailNotifier?.smtpPort || ''}@@ -93,7 +93,7 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">SMTP user</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.email.smtpUser')}</div><Inputvalue={notifier?.emailNotifier?.smtpUser || ''}onChange={(e) => {@@ -115,7 +115,9 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">SMTP password</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.email.smtpPassword')}+ </div><Inputtype="password"value={notifier?.emailNotifier?.smtpPassword || ''}@@ -133,12 +135,12 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }}}size="small"className="w-full max-w-[250px]"- placeholder="password"+ placeholder={t('notifiers.email.smtpPasswordPlaceholder')}/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">From</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.email.from')}</div><div className="flex items-center"><Inputvalue={notifier?.emailNotifier?.from || ''}@@ -159,10 +161,7 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }placeholder="[email protected]"/>- <Tooltip- className="cursor-pointer"- title="Optional. Email address to use as sender. If empty, will use SMTP user or auto-generate from host"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.email.fromTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -173,7 +172,7 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }className="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!showAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('notifiers.email.advancedSettings')}</span>{showAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -185,7 +184,9 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }{showAdvanced && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Skip TLS verify</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.skipTlsVerify')}+ </div><div className="flex items-center"><Checkboxchecked={notifier?.emailNotifier?.isInsecureSkipVerify || false}@@ -202,13 +203,10 @@ export function EditEmailNotifierComponent({ notifier, setNotifier, setUnsaved }setUnsaved();}}>- Skip TLS+ {t('notifiers.fields.skipTls')}</Checkbox>- <Tooltip- className="cursor-pointer"- title="Skip TLS certificate verification. Enable this if your SMTP server uses a self-signed certificate. Warning: this reduces security."- >+ <Tooltip className="cursor-pointer" title={t('notifiers.email.skipTlsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditMattermostNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditMattermostNotifierComponent.tsxindex c14f4c00..5fd34f74 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditMattermostNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditMattermostNotifierComponent.tsx@@ -1,12 +1,15 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Checkbox, Input, Select, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ MATTERMOST_DELIVERY_MODE_LABEL_KEYS,MattermostDeliveryMode,type MattermostNotifier,type Notifier,} from '../../../../../entity/notifiers';+import { getWebsitePageUrl, useLocale } from '../../../../../shared/i18n';interface Props {notifier: Notifier;@@ -15,6 +18,8 @@ interface Props {}export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();const mattermostNotifier = notifier.mattermostNotifier;const [isShowOptional, setIsShowOptional] = useState(@@ -44,22 +49,24 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa<div className="mb-1 max-w-[250px] sm:ml-[150px]" style={{ lineHeight: 1 }}><aclassName="text-xs !text-blue-600"- href="https://databasus.com/notifiers/mattermost"+ href={getWebsitePageUrl('notifiersMattermost', locale)}target="_blank"rel="noreferrer">- How to connect Mattermost?+ {t('notifiers.mattermost.howToConnect')}</a></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Connect via</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.connectVia')}+ </div><Selectvalue={mattermostNotifier.deliveryMode}- options={[- { label: 'Incoming webhook', value: MattermostDeliveryMode.WEBHOOK },- { label: 'Bot account', value: MattermostDeliveryMode.BOT },- ]}+ options={Object.values(MattermostDeliveryMode).map((deliveryMode) => ({+ label: t(MATTERMOST_DELIVERY_MODE_LABEL_KEYS[deliveryMode]),+ value: deliveryMode,+ }))}onChange={(deliveryMode) => updateMattermostNotifier({ deliveryMode })}size="small"className="w-full max-w-[250px]"@@ -68,7 +75,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa{isWebhookMode ? (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Incoming webhook URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.incomingWebhookUrl')}+ </div><Inputvalue={mattermostNotifier.webhookUrl}onChange={(e) => updateMattermostNotifier({ webhookUrl: e.target.value.trim() })}@@ -80,7 +89,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa) : (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Server URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.serverUrl')}+ </div><Inputvalue={mattermostNotifier.serverUrl}onChange={(e) => updateMattermostNotifier({ serverUrl: e.target.value.trim() })}@@ -91,18 +102,23 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Bot token</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.botToken')}+ </div><Inputvalue={mattermostNotifier.botToken}onChange={(e) => updateMattermostNotifier({ botToken: e.target.value.trim() })}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example token, not copyplaceholder="xxxxxxxxxxxxxxxxxxxxxxxxxx"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Channel ID</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.channelId')}+ </div><div className="flex items-center"><Inputvalue={mattermostNotifier.targetChannelId}@@ -111,12 +127,13 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example channel IDplaceholder="8f4ycxjmztbwmcy1o3xasjrxha"/><TooltipclassName="cursor-pointer"- title="26-character channel ID, not the channel name. Open the channel, click its name and choose View Info."+ title={t('notifiers.mattermost.channelIdTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -131,7 +148,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsaonClick={() => setIsShowOptional(!isShowOptional)}className="text-xs text-blue-600 hover:underline">- {isShowOptional ? 'Hide optional settings' : 'Show optional settings'}+ {isShowOptional+ ? t('notifiers.mattermost.hideOptionalSettings')+ : t('notifiers.mattermost.showOptionalSettings')}</button></div>@@ -139,7 +158,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa<>{isWebhookMode && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Channel override</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.channelOverride')}+ </div><div className="flex items-center"><Inputvalue={mattermostNotifier.targetChannelName}@@ -148,12 +169,13 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example channel nameplaceholder="town-square"/><TooltipclassName="cursor-pointer"- title="Post to this channel instead of the one the webhook was created for. Mattermost ignores it when the webhook is locked to a channel."+ title={t('notifiers.mattermost.channelOverrideTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -162,7 +184,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Post as username</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.postAsUsername')}+ </div><div className="flex items-center"><Inputvalue={mattermostNotifier.overrideUsername}@@ -171,12 +195,13 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- product name as an example usernameplaceholder="Databasus"/><TooltipclassName="cursor-pointer"- title="Requires Enable integrations to override usernames in the Mattermost system console, otherwise it is ignored."+ title={t('notifiers.mattermost.postAsUsernameTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -184,7 +209,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Post as icon URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.mattermost.postAsIconUrl')}+ </div><div className="flex items-center"><Inputvalue={mattermostNotifier.overrideIconUrl}@@ -198,7 +225,7 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa<TooltipclassName="cursor-pointer"- title="Requires Enable integrations to override profile picture icons in the Mattermost system console, otherwise it is ignored."+ title={t('notifiers.mattermost.postAsIconUrlTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -206,7 +233,9 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Skip TLS verify</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.skipTlsVerify')}+ </div><div className="flex items-center"><Checkboxchecked={mattermostNotifier.isInsecureSkipVerify}@@ -214,13 +243,10 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsaupdateMattermostNotifier({ isInsecureSkipVerify: e.target.checked })}>- Skip TLS+ {t('notifiers.fields.skipTls')}</Checkbox>- <Tooltip- className="cursor-pointer"- title="Skip TLS certificate verification. Enable this if your Mattermost server uses a self-signed certificate. Warning: this reduces security."- >+ <Tooltip className="cursor-pointer" title={t('notifiers.mattermost.skipTlsTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -231,25 +257,25 @@ export function EditMattermostNotifierComponent({ notifier, setNotifier, setUnsa<div className="mt-1 max-w-[250px] text-xs text-gray-500 sm:ml-[150px] dark:text-gray-400">{isWebhookMode ? (<>- <strong>How to get an incoming webhook URL:</strong>+ <strong>{t('notifiers.mattermost.webhookHowTo.title')}</strong><br /><br />- 1. Main menu - Integrations - Incoming Webhooks+ {t('notifiers.mattermost.webhookHowTo.openIncomingWebhooks')}<br />- 2. Add Incoming Webhook, pick the channel+ {t('notifiers.mattermost.webhookHowTo.addWebhook')}<br />- 3. Copy the generated URL+ {t('notifiers.mattermost.webhookHowTo.copyUrl')}</>) : (<>- <strong>How to get a bot token:</strong>+ <strong>{t('notifiers.mattermost.botHowTo.title')}</strong><br /><br />- 1. Integrations - Bot Accounts - Add Bot Account+ {t('notifiers.mattermost.botHowTo.addBotAccount')}<br />- 2. Copy the token shown once after creation+ {t('notifiers.mattermost.botHowTo.copyToken')}<br />- 3. Add the bot to the team and to the channel+ {t('notifiers.mattermost.botHowTo.addBotToChannel')}</>)}</div>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsxindex 5add0c67..55524af0 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditSlackNotifierComponent.tsx@@ -1,6 +1,8 @@import { Input } from 'antd';+import { useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';+import { getWebsitePageUrl, useLocale } from '../../../../../shared/i18n';interface Props {notifier: Notifier;@@ -9,21 +11,24 @@ interface Props {}export function EditSlackNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();+return (<><div className="mb-1 max-w-[250px] sm:ml-[150px]" style={{ lineHeight: 1 }}><aclassName="text-xs !text-blue-600"- href="https://databasus.com/notifiers/slack"+ href={getWebsitePageUrl('notifiersSlack', locale)}target="_blank"rel="noreferrer">- How to connect Slack (how to get bot token and chat ID)?+ {t('notifiers.slack.howToConnect')}</a></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Bot token</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.fields.botToken')}</div><Inputvalue={notifier?.slackNotifier?.botToken || ''}onChange={(e) => {@@ -40,12 +45,15 @@ export function EditSlackNotifierComponent({ notifier, setNotifier, setUnsaved }}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example token prefix, not copyplaceholder="xoxb-..."/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Target chat ID</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.targetChatId')}+ </div><Inputvalue={notifier?.slackNotifier?.targetChatId || ''}onChange={(e) => {@@ -62,6 +70,7 @@ export function EditSlackNotifierComponent({ notifier, setNotifier, setUnsaved }}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example channel IDplaceholder="C1234567890"/></div>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsxindex 0559c16e..a086a724 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditTeamsNotifierComponent.tsx@@ -1,8 +1,10 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Input, Tooltip } from 'antd';import React from 'react';+import { useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';+import { getWebsitePageUrl, useLocale } from '../../../../../shared/i18n';interface Props {notifier: Notifier;@@ -11,6 +13,8 @@ interface Props {}export function EditTeamsNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();const value = notifier?.teamsNotifier?.powerAutomateUrl || '';const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {@@ -30,16 +34,18 @@ export function EditTeamsNotifierComponent({ notifier, setNotifier, setUnsaved }<div className="mb-1 max-w-[250px] sm:ml-[150px]" style={{ lineHeight: 1 }}><aclassName="text-xs !text-blue-600"- href="https://databasus.com/notifiers/teams"+ href={getWebsitePageUrl('notifiersTeams', locale)}target="_blank"rel="noreferrer">- How to connect Microsoft Teams?+ {t('notifiers.teams.howToConnect')}</a></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Power Automate URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.teams.powerAutomateUrl')}+ </div><div className="flex items-center"><Inputvalue={value}@@ -49,10 +55,7 @@ export function EditTeamsNotifierComponent({ notifier, setNotifier, setUnsaved }placeholder="https://prod-00.westeurope.logic.azure.com:443/workflows/....."/>- <Tooltip- className="cursor-pointer"- title="HTTP endpoint from your Power Automate flow (When an HTTP request is received)"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.teams.powerAutomateUrlTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditTelegramNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditTelegramNotifierComponent.tsxindex ad07a6ad..2a30ef42 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditTelegramNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditTelegramNotifierComponent.tsx@@ -1,6 +1,7 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Input, Switch, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';@@ -10,7 +11,10 @@ interface Props {setUnsaved: () => void;}+const chatIdBotLink = <a href="https://t.me/getmyid_bot" target="_blank" rel="noreferrer" />;+export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();const [isShowHowToGetChatId, setIsShowHowToGetChatId] = useState(false);useEffect(() => {@@ -28,7 +32,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsavereturn (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Bot token</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.fields.botToken')}</div><Inputvalue={notifier?.telegramNotifier?.botToken || ''}onChange={(e) => {@@ -44,6 +48,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example token, not copyplaceholder="1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"/></div>@@ -55,12 +60,14 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsavetarget="_blank"rel="noreferrer">- How to get Telegram bot API token?+ {t('notifiers.telegram.botTokenHelpLink')}</a></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Target chat ID</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.fields.targetChatId')}+ </div><div className="flex items-center"><Inputvalue={notifier?.telegramNotifier?.targetChatId || ''}@@ -81,10 +88,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsaveplaceholder="-1001234567890"/>- <Tooltip- className="cursor-pointer"- title="The chat where you want to receive the message (it can be your private chat or a group)"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.telegram.targetChatIdTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -96,28 +100,26 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsaveclassName="mt-1 cursor-pointer text-xs text-blue-600"onClick={() => setIsShowHowToGetChatId(true)}>- How to get Telegram chat ID?+ {t('notifiers.telegram.chatIdHelp.toggle')}</div>) : (<div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- To get your chat ID, message{' '}- <a href="https://t.me/getmyid_bot" target="_blank" rel="noreferrer">- @getmyid_bot- </a>{' '}- in Telegram. <u>Make sure you started chat with the bot</u>+ <Trans+ i18nKey="notifiers.telegram.chatIdHelp.privateChat"+ components={{ botLink: chatIdBotLink, underline: <u /> }}+ /><br /><br />- If you want to get chat ID of a group, add your bot with{' '}- <a href="https://t.me/getmyid_bot" target="_blank" rel="noreferrer">- @getmyid_bot- </a>{' '}- to the group and write /start (you will see chat ID)+ <Trans+ i18nKey="notifiers.telegram.chatIdHelp.group"+ components={{ botLink: chatIdBotLink }}+ /></div>)}</div><div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Use proxy</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.telegram.useProxy')}</div><div className="flex items-center"><Switchchecked={notifier?.telegramNotifier?.isProxyEnabled || false}@@ -137,7 +139,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsavesize="small"/>- <Tooltip className="cursor-pointer" title="Use a proxy for Telegram API requests">+ <Tooltip className="cursor-pointer" title={t('notifiers.telegram.useProxyTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -145,7 +147,9 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave{notifier?.telegramNotifier?.isProxyEnabled && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Proxy URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.telegram.proxyUrl')}+ </div><div className="flex items-center"><Inputvalue={notifier?.telegramNotifier?.proxyUrl || ''}@@ -163,13 +167,11 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example proxy URLplaceholder="socks5://user:pass@host:1080"/>- <Tooltip- className="cursor-pointer"- title="Supports http, https, socks5, socks5h. May include username and password"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.telegram.proxyUrlTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -177,7 +179,9 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave)}<div className="mt-4 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Send to group topic</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.telegram.sendToGroupTopic')}+ </div><div className="flex items-center"><Switchchecked={notifier?.telegramNotifier?.isSendToThreadEnabled || false}@@ -200,7 +204,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave<TooltipclassName="cursor-pointer"- title="Enable this to send messages to a specific thread in a group chat"+ title={t('notifiers.telegram.sendToGroupTopicTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -210,7 +214,9 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave{notifier?.telegramNotifier?.isSendToThreadEnabled && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Thread ID</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">+ {t('notifiers.telegram.threadId')}+ </div><div className="flex items-center"><Inputvalue={notifier?.telegramNotifier?.threadId?.toString() || ''}@@ -236,10 +242,7 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsavemin="1"/>- <Tooltip- className="cursor-pointer"- title="The ID of the thread where messages should be sent"- >+ <Tooltip className="cursor-pointer" title={t('notifiers.telegram.threadIdTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -247,18 +250,22 @@ export function EditTelegramNotifierComponent({ notifier, setNotifier, setUnsave<div className="max-w-[250px] sm:ml-[150px]"><div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- To get the thread ID, go to the thread in your Telegram group, tap on the thread name- at the top, then tap “Thread Info”. Copy the thread link and take the last- number from the URL.+ {t('notifiers.telegram.threadIdHelp.steps')}<br /><br />- <strong>Example:</strong> If the thread link is{' '}- <code className="rounded bg-gray-100 px-1">https://t.me/c/2831948048/3</code>, the- thread ID is <code className="rounded bg-gray-100 px-1">3</code>+ <Trans+ i18nKey="notifiers.telegram.threadIdHelp.example"+ components={{+ bold: <strong />,+ code: <code className="rounded bg-gray-100 px-1" />,+ }}+ /><br /><br />- <strong>Note:</strong> Thread functionality only works in group chats, not in private- chats.+ <Trans+ i18nKey="notifiers.telegram.threadIdHelp.note"+ components={{ bold: <strong /> }}+ /></div></div></>diff --git a/frontend/src/features/notifiers/ui/edit/notifiers/EditWebhookNotifierComponent.tsx b/frontend/src/features/notifiers/ui/edit/notifiers/EditWebhookNotifierComponent.tsxindex 24064808..65a49405 100644--- a/frontend/src/features/notifiers/ui/edit/notifiers/EditWebhookNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/edit/notifiers/EditWebhookNotifierComponent.tsx@@ -1,14 +1,21 @@import { DeleteOutlined, InfoCircleOutlined, PlusOutlined } from '@ant-design/icons';import { Button, Input, Select, Tooltip } from 'antd';import { useMemo } from 'react';+import { Trans, useTranslation } from 'react-i18next';import type { Notifier, WebhookHeader } from '../../../../../entity/notifiers';-import { NotificationType } from '../../../../../entity/notifiers';-import { WebhookMethod } from '../../../../../entity/notifiers/models/webhook/WebhookMethod';import {- DEFAULT_ACCEPT_NOTIFICATION_TYPES,- NOTIFICATION_TYPE_OPTIONS,-} from '../../../lib/notificationTypeLabels';+ NOTIFICATION_TYPE_LABEL_KEYS,+ NotificationType,+ WebhookMethod,+} from '../../../../../entity/notifiers';+import type { TranslationKey } from '../../../../../shared/i18n';+import { DEFAULT_ACCEPT_NOTIFICATION_TYPES } from '../../../lib/defaultAcceptNotificationTypes';+import {+ EXAMPLE_GET_QUERY,+ getExamplePostBody,+ getExamplePostHeaderLines,+} from '../../../lib/webhookExampleRequest';interface Props {notifier: Notifier;@@ -16,12 +23,13 @@ interface Props {setUnsaved: () => void;}+// eslint-disable-next-line i18next/no-literal-string -- JSON template with the backend's variablesconst DEFAULT_BODY_TEMPLATE = `{"heading": "{{heading}}","message": "{{message}}"}`;-function validateJsonTemplate(template: string): string | null {+function validateJsonTemplate(template: string): TranslationKey | null {if (!template.trim()) {return null; // Empty is valid (will use default)}@@ -34,17 +42,18 @@ function validateJsonTemplate(template: string): string | null {return null;} catch (e) {if (e instanceof SyntaxError) {- return 'Invalid JSON format';+ return 'notifiers.webhook.bodyTemplate.invalidJsonFormat';}- return 'Invalid JSON';+ return 'notifiers.webhook.bodyTemplate.invalidJson';}}export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsaved }: Props) {+ const { t } = useTranslation();const headers = notifier?.webhookNotifier?.headers || [];const bodyTemplate = notifier?.webhookNotifier?.bodyTemplate || '';- const jsonError = useMemo(() => validateJsonTemplate(bodyTemplate), [bodyTemplate]);+ const jsonErrorKey = useMemo(() => validateJsonTemplate(bodyTemplate), [bodyTemplate]);const acceptNotificationTypes =notifier?.webhookNotifier?.acceptNotificationTypes || DEFAULT_ACCEPT_NOTIFICATION_TYPES;@@ -94,7 +103,7 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedreturn (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Webhook URL</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.fields.webhookUrl')}</div><Inputvalue={notifier?.webhookNotifier?.webhookUrl || ''}onChange={(e) => {@@ -107,7 +116,7 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsaved</div><div className="mt-1 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Method</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.webhook.method')}</div><div className="flex items-center"><Selectvalue={notifier?.webhookNotifier?.webhookMethod || WebhookMethod.POST}@@ -117,31 +126,34 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedsize="small"className="w-[100px] max-w-[250px]"options={[- { value: WebhookMethod.POST, label: 'POST' },- { value: WebhookMethod.GET, label: 'GET' },+ { value: WebhookMethod.POST, label: WebhookMethod.POST },+ { value: WebhookMethod.GET, label: WebhookMethod.GET },]}/></div></div><div className="mt-1 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[150px] sm:mb-0">Send on</div>+ <div className="mb-1 min-w-[150px] sm:mb-0 sm:pr-2">{t('notifiers.webhook.sendOn')}</div><Selectmode="multiple"value={acceptNotificationTypes}onChange={(value) => changeAcceptNotificationTypes(value as NotificationType[])}size="small"className="w-full max-w-[250px]"- options={NOTIFICATION_TYPE_OPTIONS}- placeholder="Select notification types"+ options={Object.values(NotificationType).map((type) => ({+ label: t(NOTIFICATION_TYPE_LABEL_KEYS[type]),+ value: type,+ }))}+ placeholder={t('notifiers.webhook.sendOnPlaceholder')}/></div><div className="mt-3 mb-1 flex w-full flex-col items-start"><div className="mb-1 flex items-center">- <span className="min-w-[150px]">- Custom headers{' '}- <Tooltip title="Add custom HTTP headers to the webhook request (e.g., Authorization, X-API-Key)">+ <span className="min-w-[150px] pr-2">+ {t('notifiers.webhook.customHeaders')}{' '}+ <Tooltip title={t('notifiers.webhook.customHeadersTooltip')}><InfoCircleOutlined className="ml-1" style={{ color: 'gray' }} /></Tooltip></span>@@ -149,7 +161,7 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsaved{notifier.id && (<div className="mb-1 text-xs text-orange-700">- *Saved headers hidden for security reasons+ {t('notifiers.webhook.savedHeadersHidden')}</div>)}@@ -161,14 +173,14 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedonChange={(e) => updateHeader(index, 'key', e.target.value)}size="small"style={{ width: 150, flexShrink: 0 }}- placeholder="Header name"+ placeholder={t('notifiers.webhook.headerNamePlaceholder')}/><Inputvalue={header.value}onChange={(e) => updateHeader(index, 'value', e.target.value)}size="small"style={{ flex: 1, minWidth: 0 }}- placeholder="Header value"+ placeholder={t('notifiers.webhook.headerValuePlaceholder')}/><Buttontype="text"@@ -187,7 +199,7 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedonClick={addHeader}className="mt-1">- Add header+ {t('notifiers.webhook.addHeader')}</Button></div></div>@@ -195,21 +207,33 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsaved{notifier?.webhookNotifier?.webhookMethod === WebhookMethod.POST && (<div className="mt-3 mb-1 flex w-full flex-col items-start"><div className="mb-1 flex items-center">- <span className="min-w-[150px]">Body template </span>+ <span className="min-w-[150px] pr-2">{t('notifiers.webhook.bodyTemplate.title')}</span></div><div className="mb-2 text-xs text-gray-500 dark:text-gray-400"><span className="mr-4">- <code className="rounded bg-gray-100 px-1.5 py-0.5 dark:bg-gray-700">- {'{{heading}}'}- </code>{' '}- — notification title+ <Trans+ i18nKey="notifiers.webhook.bodyTemplate.headingVariable"+ components={{+ variable: (+ <code className="rounded bg-gray-100 px-1.5 py-0.5 dark:bg-gray-700">+ {'{{heading}}'}+ </code>+ ),+ }}+ /></span><span>- <code className="rounded bg-gray-100 px-1.5 py-0.5 dark:bg-gray-700">- {'{{message}}'}- </code>{' '}- — notification message+ <Trans+ i18nKey="notifiers.webhook.bodyTemplate.messageVariable"+ components={{+ variable: (+ <code className="rounded bg-gray-100 px-1.5 py-0.5 dark:bg-gray-700">+ {'{{message}}'}+ </code>+ ),+ }}+ /></span></div>@@ -221,36 +245,34 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedclassName="w-full max-w-[500px] font-mono text-xs"rows={6}placeholder={DEFAULT_BODY_TEMPLATE}- status={jsonError ? 'error' : undefined}+ status={jsonErrorKey ? 'error' : undefined}/>- {jsonError && <div className="mt-1 text-xs text-red-500">{jsonError}</div>}+ {jsonErrorKey && <div className="mt-1 text-xs text-red-500">{t(jsonErrorKey)}</div>}</div>)}{notifier?.webhookNotifier?.webhookUrl && (<div className="mt-4">- <div className="mb-1 font-medium">Example request</div>+ <div className="mb-1 font-medium">{t('notifiers.webhook.exampleRequest.title')}</div>{notifier?.webhookNotifier?.webhookMethod === WebhookMethod.GET && (<div className="rounded bg-gray-100 p-2 px-3 text-sm break-all dark:bg-gray-800"><div className="font-semibold text-blue-600 dark:text-blue-400">GET</div><div className="mt-1">{notifier?.webhookNotifier?.webhookUrl}- {- '?heading=✅ Backup completed for database "my-database" (workspace "Production")&message=Backup completed successfully in 1m 23s.%0ACompressed backup size: 256.00 MB'- }+ {EXAMPLE_GET_QUERY}</div>{headers.length > 0 && (<div className="mt-2 border-t border-gray-200 pt-2 dark:border-gray-600"><div className="text-xs font-semibold text-gray-500 dark:text-gray-400">- Headers:+ {t('notifiers.webhook.exampleRequest.headers')}</div>{headers.filter((h) => h.key).map((h, i) => (<div key={i} className="text-xs">- {h.key}: {h.value || '(hidden)'}+ {h.key}: {h.value || t('notifiers.webhook.hiddenHeaderValue')}</div>))}</div>@@ -264,29 +286,10 @@ export function EditWebhookNotifierComponent({ notifier, setNotifier, setUnsavedPOST {notifier?.webhookNotifier?.webhookUrl}</div><div className="mt-1 text-gray-600 dark:text-gray-400">- {headers.find((h) => h.key.toLowerCase() === 'content-type')- ? ''- : 'Content-Type: application/json'}- {headers- .filter((h) => h.key)- .map((h) => `\n${h.key}: ${h.value}`)- .join('')}+ {getExamplePostHeaderLines(headers)}</div><div className="mt-2 break-words whitespace-pre-wrap">- {notifier?.webhookNotifier?.bodyTemplate- ? notifier.webhookNotifier.bodyTemplate- .replace(- '{{heading}}',- '✅ Backup completed for database "my-database" (workspace "Production")',- )- .replace(- '{{message}}',- 'Backup completed successfully in 1m 23s.\\nCompressed backup size: 256.00 MB',- )- : `{- "heading": "✅ Backup completed for database "my-database" (workspace "My workspace")",- "message": "Backup completed successfully in 1m 23s. Compressed backup size: 256.00 MB"-}`}+ {getExamplePostBody(notifier?.webhookNotifier?.bodyTemplate)}</div></div>)}diff --git a/frontend/src/features/notifiers/ui/show/ShowNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/ShowNotifierComponent.tsxindex 9d0334f3..6adf7ea7 100644--- a/frontend/src/features/notifiers/ui/show/ShowNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/ShowNotifierComponent.tsx@@ -1,6 +1,11 @@-import { type Notifier, NotifierType } from '../../../../entity/notifiers';+import { useTranslation } from 'react-i18next';++import {+ NOTIFIER_TYPE_LABEL_KEYS,+ type Notifier,+ NotifierType,+} from '../../../../entity/notifiers';import { getNotifierLogoFromType } from '../../../../entity/notifiers/models/getNotifierLogoFromType';-import { getNotifierNameFromType } from '../../../../entity/notifiers/models/getNotifierNameFromType';import { ShowDiscordNotifierComponent } from './notifier/ShowDiscordNotifierComponent';import { ShowEmailNotifierComponent } from './notifier/ShowEmailNotifierComponent';import { ShowMattermostNotifierComponent } from './notifier/ShowMattermostNotifierComponent';@@ -14,12 +19,14 @@ interface Props {}export function ShowNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();+return (<div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Type</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.type')}</div>- {getNotifierNameFromType(notifier?.notifierType)}+ {t(NOTIFIER_TYPE_LABEL_KEYS[notifier.notifierType])}<img src={getNotifierLogoFromType(notifier?.notifierType)} className="ml-1 h-4 w-4" /></div>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowDiscordNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowDiscordNotifierComponent.tsxindex 0b393b33..c89ad992 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowDiscordNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowDiscordNotifierComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Notifier } from '../../../../../entity/notifiers';interface Props {@@ -5,10 +7,14 @@ interface Props {}export function ShowDiscordNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();+return (<><div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Channel webhook URL</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.discord.channelWebhookUrl')}+ </div><div>{notifier.discordNotifier?.channelWebhookUrl?.slice(0, 10)}*******</div></div>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowEmailNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowEmailNotifierComponent.tsxindex 4739d11b..fb5240b6 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowEmailNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowEmailNotifierComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Notifier } from '../../../../../entity/notifiers';interface Props {@@ -5,42 +7,44 @@ interface Props {}export function ShowEmailNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Target email</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.email.targetEmail')}</div>{notifier?.emailNotifier?.targetEmail}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">SMTP host</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.email.smtpHost')}</div>{notifier?.emailNotifier?.smtpHost}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">SMTP port</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.email.smtpPort')}</div>{notifier?.emailNotifier?.smtpPort}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">SMTP user</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.email.smtpUser')}</div>{notifier?.emailNotifier?.smtpUser}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">SMTP password</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.email.smtpPassword')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">From</div>- {notifier?.emailNotifier?.from || '(auto)'}+ <div className="min-w-[110px] pr-2">{t('notifiers.email.from')}</div>+ {notifier?.emailNotifier?.from || t('notifiers.email.fromAuto')}</div>{notifier?.emailNotifier?.isInsecureSkipVerify && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Skip TLS</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.skipTls')}</div>+ {t('common.states.enabled')}</div>)}</>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowMattermostNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowMattermostNotifierComponent.tsxindex 8a553bbe..cc21fd55 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowMattermostNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowMattermostNotifierComponent.tsx@@ -1,10 +1,17 @@-import { MattermostDeliveryMode, type Notifier } from '../../../../../entity/notifiers';+import { useTranslation } from 'react-i18next';++import {+ MATTERMOST_DELIVERY_MODE_LABEL_KEYS,+ MattermostDeliveryMode,+ type Notifier,+} from '../../../../../entity/notifiers';interface Props {notifier: Notifier;}export function ShowMattermostNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();const mattermostNotifier = notifier.mattermostNotifier;if (!mattermostNotifier) return <div />;@@ -14,14 +21,18 @@ export function ShowMattermostNotifierComponent({ notifier }: Props) {return (<><div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Connect via</div>- <div>{isWebhookMode ? 'Incoming webhook' : 'Bot account'}</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.mattermost.connectVia')}+ </div>+ <div>{t(MATTERMOST_DELIVERY_MODE_LABEL_KEYS[mattermostNotifier.deliveryMode])}</div></div>{isWebhookMode ? (<><div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Webhook URL</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.fields.webhookUrl')}+ </div><div className="break-all">{mattermostNotifier.webhookUrl? `${mattermostNotifier.webhookUrl}*******`@@ -31,7 +42,9 @@ export function ShowMattermostNotifierComponent({ notifier }: Props) {{mattermostNotifier.targetChannelName && (<div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Channel</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.mattermost.channel')}+ </div><div className="break-all">{mattermostNotifier.targetChannelName}</div></div>)}@@ -39,12 +52,16 @@ export function ShowMattermostNotifierComponent({ notifier }: Props) {) : (<><div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Server URL</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.mattermost.serverUrl')}+ </div><div className="break-all">{mattermostNotifier.serverUrl}</div></div><div className="flex">- <div className="max-w-[110px] min-w-[110px] pr-3">Channel ID</div>+ <div className="max-w-[110px] min-w-[110px] pr-3">+ {t('notifiers.fields.channelId')}+ </div><div className="break-all">{mattermostNotifier.targetChannelId}</div></div></>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowSlackNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowSlackNotifierComponent.tsxindex 564b37c2..e1e96668 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowSlackNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowSlackNotifierComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Notifier } from '../../../../../entity/notifiers';interface Props {@@ -5,16 +7,18 @@ interface Props {}export function ShowSlackNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();+return (<><div className="flex items-center">- <div className="min-w-[110px]">Bot token</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.botToken')}</div><div>*********</div></div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Target chat ID</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.targetChatId')}</div>{notifier?.slackNotifier?.targetChatId}</div></>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowTeamsNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowTeamsNotifierComponent.tsxindex dd7e9fe6..f3b90a3d 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowTeamsNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowTeamsNotifierComponent.tsx@@ -1,4 +1,5 @@import { useState } from 'react';+import { useTranslation } from 'react-i18next';import type { Notifier } from '../../../../../entity/notifiers';@@ -7,6 +8,7 @@ interface Props {}export function ShowTeamsNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();const url = notifier?.teamsNotifier?.powerAutomateUrl || '';const [expanded, setExpanded] = useState(false);@@ -17,7 +19,7 @@ export function ShowTeamsNotifierComponent({ notifier }: Props) {return (<><div className="flex items-center">- <div className="min-w-[110px]">Power Automate URL: </div>+ <div className="min-w-[110px] pr-2">{t('notifiers.teams.powerAutomateUrlLabel')}</div><div className="w-[50px] break-all md:w-[250px]">{url ? (<>@@ -28,7 +30,7 @@ export function ShowTeamsNotifierComponent({ notifier }: Props) {onClick={() => setExpanded((v) => !v)}className="ml-2 text-xs text-blue-600 hover:underline">- {expanded ? 'Hide' : 'Show'}+ {expanded ? t('notifiers.teams.hideFullUrl') : t('notifiers.teams.showFullUrl')}</button>)}</>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowTelegramNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowTelegramNotifierComponent.tsxindex c4b0dba3..2a70e0a5 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowTelegramNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowTelegramNotifierComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Notifier } from '../../../../../entity/notifiers';interface Props {@@ -5,30 +7,32 @@ interface Props {}export function ShowTelegramNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();+return (<><div className="flex items-center">- <div className="min-w-[110px]">Bot token</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.botToken')}</div><div>*********</div></div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Target chat ID</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.targetChatId')}</div>{notifier?.telegramNotifier?.targetChatId}</div>{notifier?.telegramNotifier?.threadId && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Topic ID</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.telegram.topicId')}</div>{notifier.telegramNotifier.threadId}</div>)}{notifier?.telegramNotifier?.isProxyEnabled && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Proxy</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('notifiers.telegram.proxy')}</div>+ {t('common.states.enabled')}</div>)}</>diff --git a/frontend/src/features/notifiers/ui/show/notifier/ShowWebhookNotifierComponent.tsx b/frontend/src/features/notifiers/ui/show/notifier/ShowWebhookNotifierComponent.tsxindex 5b5ab8d7..6640fbc0 100644--- a/frontend/src/features/notifiers/ui/show/notifier/ShowWebhookNotifierComponent.tsx+++ b/frontend/src/features/notifiers/ui/show/notifier/ShowWebhookNotifierComponent.tsx@@ -1,15 +1,15 @@+import { useTranslation } from 'react-i18next';+import type { Notifier, WebhookHeader } from '../../../../../entity/notifiers';-import { WebhookMethod } from '../../../../../entity/notifiers';-import {- DEFAULT_ACCEPT_NOTIFICATION_TYPES,- NOTIFICATION_TYPE_LABELS,-} from '../../../lib/notificationTypeLabels';+import { NOTIFICATION_TYPE_LABEL_KEYS, WebhookMethod } from '../../../../../entity/notifiers';+import { DEFAULT_ACCEPT_NOTIFICATION_TYPES } from '../../../lib/defaultAcceptNotificationTypes';interface Props {notifier: Notifier;}export function ShowWebhookNotifierComponent({ notifier }: Props) {+ const { t } = useTranslation();const headers = notifier?.webhookNotifier?.headers || [];const hasHeaders = headers.filter((h: WebhookHeader) => h.key).length > 0;@@ -19,31 +19,34 @@ export function ShowWebhookNotifierComponent({ notifier }: Props) {return (<><div className="flex items-center">- <div className="min-w-[110px]">Webhook URL</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.fields.webhookUrl')}</div><div className="max-w-[350px] truncate">{notifier?.webhookNotifier?.webhookUrl || '-'}</div></div><div className="mt-1 mb-1 flex items-center">- <div className="min-w-[110px]">Method</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.webhook.method')}</div><div>{notifier?.webhookNotifier?.webhookMethod || '-'}</div></div><div className="mt-1 mb-1 flex items-center">- <div className="min-w-[110px]">Send on</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.webhook.sendOn')}</div><div>- {acceptNotificationTypes.map((type) => NOTIFICATION_TYPE_LABELS[type]).join(', ') || '-'}+ {acceptNotificationTypes+ .map((type) => t(NOTIFICATION_TYPE_LABEL_KEYS[type]))+ .join(t('common.listSeparator')) || '-'}</div></div>{hasHeaders && (<div className="mt-1 mb-1 flex items-start">- <div className="min-w-[110px]">Headers</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.webhook.headers')}</div><div className="flex flex-col text-sm">{headers.filter((h: WebhookHeader) => h.key).map((h: WebhookHeader, i: number) => (<div key={i} className="text-gray-600">- <span className="font-medium">{h.key}:</span> {h.value || '(hidden)'}+ <span className="font-medium">{h.key}:</span>{' '}+ {h.value || t('notifiers.webhook.hiddenHeaderValue')}</div>))}</div>@@ -53,7 +56,7 @@ export function ShowWebhookNotifierComponent({ notifier }: Props) {{notifier?.webhookNotifier?.webhookMethod === WebhookMethod.POST &¬ifier?.webhookNotifier?.bodyTemplate && (<div className="mt-1 mb-1 flex items-start">- <div className="min-w-[110px]">Body template</div>+ <div className="min-w-[110px] pr-2">{t('notifiers.webhook.bodyTemplate.title')}</div><div className="max-w-[350px] rounded bg-gray-50 p-2 font-mono text-xs whitespace-pre-wrap dark:bg-gray-700">{notifier.webhookNotifier.bodyTemplate}</div>diff --git a/frontend/src/features/restores/ui/RestoresComponent.tsx b/frontend/src/features/restores/ui/RestoresComponent.tsxindex 6b4e701c..5e17d579 100644--- a/frontend/src/features/restores/ui/RestoresComponent.tsx+++ b/frontend/src/features/restores/ui/RestoresComponent.tsx@@ -8,10 +8,17 @@ import {import { App, Button, Modal, Spin, Tooltip } from 'antd';import dayjs from 'dayjs';import { useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import type { LogicalBackup } from '../../../entity/backups/logical';import { type Database, DatabaseType } from '../../../entity/databases';-import { type Restore, RestoreStatus, restoreApi } from '../../../entity/restores';+import {+ RESTORE_STATUS_LABEL_KEYS,+ type Restore,+ RestoreStatus,+ restoreApi,+} from '../../../entity/restores';+import { translateApiError, useLocale } from '../../../shared/i18n';import { ClipboardHelper } from '../../../shared/lib/ClipboardHelper';import { getUserTimeFormat } from '../../../shared/time';import { ConfirmationComponent } from '../../../shared/ui';@@ -64,6 +71,8 @@ const getRestorePayload = (database: Database, editingDatabase: Database) => {};export const RestoresComponent = ({ database, backup }: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const [editingDatabase, setEditingDatabase] = useState<Database>(@@ -94,7 +103,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {const restores = await restoreApi.getRestores(backup.id);setRestores(restores);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}isReloadInProgress.current = false;@@ -110,7 +119,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {setIsShowRestore(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}};@@ -120,7 +129,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {await restoreApi.cancelRestore(restoreId);await loadRestores();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {setCancellingRestoreId(undefined);}@@ -145,13 +154,10 @@ export const RestoresComponent = ({ database, backup }: Props) => {return (<><div className="my-5 text-sm">- Enter info of the database we will restore backup to.{' '}- <u>The empty database for restore should be created before the restore</u>. During the- restore, all the current data will be cleared+ <Trans i18nKey="restores.targetDatabase.description" components={{ underline: <u /> }} /><br /><br />- Make sure the database is not used right now (most likely you do not want to restore the- data to the same DB where the backup was made)+ {t('restores.targetDatabase.notInUseHint')}</div><EditDatabaseSpecificDataComponent@@ -159,7 +165,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {onCancel={() => setIsShowRestore(false)}isShowBackButton={false}onBack={() => setIsShowRestore(false)}- saveButtonText="Restore to this DB"+ saveButtonText={t('restores.targetDatabase.submit')}isSaveToApi={false}onSaved={(database) => {setEditingDatabase({ ...database });@@ -186,11 +192,11 @@ export const RestoresComponent = ({ database, backup }: Props) => {loading={isRestoreInProgress}onClick={() => setIsShowRestore(true)}>- Select database to restore to+ {t('restores.targetDatabase.select')}</Button>{restores.length === 0 && (- <div className="my-5 text-center text-gray-400">No restores yet</div>+ <div className="my-5 text-center text-gray-400">{t('restores.list.empty')}</div>)}<div className="mt-5">@@ -205,20 +211,22 @@ export const RestoresComponent = ({ database, backup }: Props) => {const minutes = Math.floor(restoreDurationMs / 60000);const seconds = Math.floor((restoreDurationMs % 60000) / 1000);const milliseconds = restoreDurationMs % 1000;+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languageconst duration = `${minutes}m ${seconds}s ${milliseconds}ms`;const backupDurationMs = backup.backupDurationMs;const expectedRestoreDurationMs = backupDurationMs * 5;+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languageconst expectedRestoreDuration = `${Math.floor(expectedRestoreDurationMs / 60000)}m ${Math.floor((expectedRestoreDurationMs % 60000) / 1000)}s`;return (<div key={restore.id} className="mb-1 rounded border border-gray-200 p-3 text-sm"><div className="mb-1 flex items-center justify-between"><div className="flex flex-1">- <div className="w-[75px] min-w-[75px]">Status</div>+ <div className="w-[75px] min-w-[75px] pr-2">{t('common.fields.status')}</div>{restore.status === RestoreStatus.FAILED && (- <Tooltip title="Click to see error details">+ <Tooltip title={t('restores.card.errorDetailsTooltip')}><divclassName="flex cursor-pointer items-center text-red-600 underline"onClick={() => setShowingRestoreError(restore)}@@ -228,7 +236,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {style={{ fontSize: 16, color: '#ff0000' }}/>- <div>Failed</div>+ <div>{t(RESTORE_STATUS_LABEL_KEYS[restore.status])}</div></div></Tooltip>)}@@ -240,7 +248,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {style={{ fontSize: 16, color: '#008000' }}/>- <div>Successful</div>+ <div>{t(RESTORE_STATUS_LABEL_KEYS[restore.status])}</div></div>)}@@ -251,14 +259,16 @@ export const RestoresComponent = ({ database, backup }: Props) => {style={{ fontSize: 16, color: '#808080' }}/>- <div>Canceled</div>+ <div>{t(RESTORE_STATUS_LABEL_KEYS[restore.status])}</div></div>)}{restore.status === RestoreStatus.IN_PROGRESS && (<div className="flex items-center font-bold text-blue-600"><SyncOutlined spin />- <span className="ml-2">In progress</span>+ <span className="ml-2">+ {t(RESTORE_STATUS_LABEL_KEYS[restore.status])}+ </span></div>)}</div>@@ -268,7 +278,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {{cancellingRestoreId === restore.id ? (<SyncOutlined spin style={{ fontSize: 16 }} />) : (- <Tooltip title="Cancel restore">+ <Tooltip title={t('restores.card.cancelTooltip')}><CloseCircleOutlinedclassName="cursor-pointer"onClick={() => {@@ -289,25 +299,27 @@ export const RestoresComponent = ({ database, backup }: Props) => {</div><div className="mb-1 flex">- <div className="w-[75px] min-w-[75px]">Started at</div>+ <div className="w-[75px] min-w-[75px] pr-2">{t('restores.card.startedAt')}</div><div>{dayjs.utc(restore.createdAt).local().format(getUserTimeFormat().format)} (- {dayjs.utc(restore.createdAt).local().fromNow()})+ {formatRelativeTime(dayjs.utc(restore.createdAt).local())})</div></div>{restore.status === RestoreStatus.IN_PROGRESS && (<div className="flex">- <div className="w-[75px] min-w-[75px]">Duration</div>+ <div className="w-[75px] min-w-[75px] pr-2">+ {t('restores.card.duration')}+ </div><div><div>{duration}</div><div className="mt-2 text-xs text-gray-500 dark:text-gray-400">- Expected restoration time usually 3x-5x longer than the backup duration- (sometimes less, sometimes more depending on data type)+ {t('restores.card.expectedDurationHint')}<br /><br />- So it is expected to take up to {expectedRestoreDuration} (usually- significantly faster)+ {t('restores.card.expectedDurationLimit', {+ duration: expectedRestoreDuration,+ })}</div></div></div>@@ -321,7 +333,7 @@ export const RestoresComponent = ({ database, backup }: Props) => {{showingRestoreError && (<Modal- title="Restore error details"+ title={t('restores.errorDetails.title')}open={!!showingRestoreError}onCancel={() => setShowingRestoreError(undefined)}maskClosable={false}@@ -330,18 +342,19 @@ export const RestoresComponent = ({ database, backup }: Props) => {icon={<CopyOutlined />}onClick={() => {ClipboardHelper.copyToClipboard(showingRestoreError.failMessage || '');- message.success('Error message copied to clipboard');+ message.success(t('restores.errorDetails.copied'));}}>- Copy+ {t('common.actions.copy')}</Button>}>{showingRestoreError.failMessage?.includes('must be owner of extension') && (<div className="mb-4 rounded border border-yellow-300 bg-yellow-50 p-3 text-sm dark:border-yellow-600 dark:bg-yellow-900/30">- <strong>💡 Tip:</strong> This error typically occurs when restoring to managed- PostgreSQL services (like Yandex Cloud, AWS RDS or similar). Try enabling{' '}- <strong>"Exclude extensions"</strong> in Advanced settings before restoring.+ <Trans+ i18nKey="restores.errorDetails.excludeExtensionsTip"+ components={{ bold: <strong /> }}+ /></div>)}<div className="overflow-y-auto text-sm whitespace-pre-wrap" style={{ height: '400px' }}>@@ -363,8 +376,18 @@ export const RestoresComponent = ({ database, backup }: Props) => {setShowCancelConfirmation(false);setRestoreToCancelId(undefined);}}- description="<strong>⚠️ Warning:</strong> Cancelling this restore will likely leave your database in a corrupted or incomplete state. You will need to recreate the database before attempting another restore.<br/><br/>Are you sure you want to cancel?"- actionText="Yes, cancel restore"+ description={+ <>+ <div>+ <Trans+ i18nKey="restores.cancelConfirmation.warning"+ components={{ bold: <strong /> }}+ />+ </div>+ <div className="mt-5">{t('restores.cancelConfirmation.question')}</div>+ </>+ }+ actionText={t('restores.cancelConfirmation.confirm')}actionButtonColor="red"/>)}diff --git a/frontend/src/features/settings/ui/AuditLogsComponent.tsx b/frontend/src/features/settings/ui/AuditLogsComponent.tsxindex 8871a667..f029806e 100644--- a/frontend/src/features/settings/ui/AuditLogsComponent.tsx+++ b/frontend/src/features/settings/ui/AuditLogsComponent.tsx@@ -3,11 +3,13 @@ import { App, Spin, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';import { useCallback, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import { auditLogApi } from '../../../entity/audit-logs/api/auditLogApi';import type { AuditLog } from '../../../entity/audit-logs/model/AuditLog';import type { GetAuditLogsRequest } from '../../../entity/audit-logs/model/GetAuditLogsRequest';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserTimeFormat } from '../../../shared/time';interface Props {@@ -15,6 +17,8 @@ interface Props {}export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Props) {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const isMobile = useIsMobile();const [auditLogs, setAuditLogs] = useState<AuditLog[]>([]);@@ -88,8 +92,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: PrsetTotal(response.total);setHasMore(response.auditLogs.length === pageSize);} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to load audit logs';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {loadingRef.current = false;setIsLoading(false);@@ -99,14 +102,14 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Prconst columns: ColumnsType<AuditLog> = [{- title: 'User',+ title: t('auditLogs.columns.user'),key: 'user',width: 300,render: (_, record: AuditLog) => {if (!record.userEmail && !record.userName) {return (<span className="inline-block rounded-full bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300">- System+ {t('auditLogs.systemUser')}</span>);}@@ -123,7 +126,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr},},{- title: 'Message',+ title: t('auditLogs.columns.message'),dataIndex: 'message',key: 'message',render: (message: string) => (@@ -131,7 +134,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr),},{- title: 'Workspace',+ title: t('auditLogs.columns.workspace'),dataIndex: 'workspaceName',key: 'workspaceName',width: 200,@@ -148,7 +151,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr),},{- title: 'Created',+ title: t('auditLogs.columns.created'),dataIndex: 'createdAt',key: 'createdAt',width: 250,@@ -157,7 +160,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Prconst timeFormat = getUserTimeFormat();return (<span className="text-xs text-gray-700 dark:text-gray-300">- {`${date.format(timeFormat.format)} (${date.fromNow()})`}+ {`${date.format(timeFormat.format)} (${formatRelativeTime(date)})`}</span>);},@@ -172,7 +175,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Prif (!log.userEmail && !log.userName) {return (<span className="inline-block rounded-full bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300">- System+ {t('auditLogs.systemUser')}</span>);}@@ -195,7 +198,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr<div className="flex-1">{getUserDisplay()}</div><div className="text-right text-xs text-gray-500 dark:text-gray-400"><div>{date.format(timeFormat.format)}</div>- <div className="text-gray-400 dark:text-gray-500">{date.fromNow()}</div>+ <div className="text-gray-400 dark:text-gray-500">{formatRelativeTime(date)}</div></div></div><div className="mt-2 text-sm text-gray-900 dark:text-gray-100">{log.message}</div>@@ -213,12 +216,12 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Prreturn (<div className="max-w-[1200px]"><div className="mb-4 flex items-center justify-between">- <h2 className="text-xl font-bold dark:text-white">Audit Logs</h2>+ <h2 className="text-xl font-bold dark:text-white">{t('auditLogs.title')}</h2><div className="text-sm text-gray-500 dark:text-gray-400">{isLoading ? (<Spin indicator={<LoadingOutlined spin />} />) : (- `${auditLogs.length} of ${total} logs`+ t('auditLogs.loadedOfTotal', { loaded: auditLogs.length, total }))}</div></div>@@ -229,7 +232,7 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr</div>) : auditLogs.length === 0 ? (<div className="flex h-32 items-center justify-center text-gray-500 dark:text-gray-400">- No audit logs found.+ {t('auditLogs.empty')}</div>) : (<>@@ -250,14 +253,14 @@ export function AuditLogsComponent({ scrollContainerRef: externalScrollRef }: Pr<div className="flex justify-center py-4"><Spin indicator={<LoadingOutlined spin />} /><span className="ml-2 text-sm text-gray-500 dark:text-gray-400">- Loading more logs...+ {t('auditLogs.loadingMore')}</span></div>)}{!hasMore && auditLogs.length > 0 && (<div className="py-4 text-center text-sm text-gray-500 dark:text-gray-400">- All logs loaded ({auditLogs.length} total)+ {t('auditLogs.allLoaded', { count: auditLogs.length })}</div>)}</>diff --git a/frontend/src/features/settings/ui/SettingsComponent.tsx b/frontend/src/features/settings/ui/SettingsComponent.tsxindex 4e1aa04f..45a8ea00 100644--- a/frontend/src/features/settings/ui/SettingsComponent.tsx+++ b/frontend/src/features/settings/ui/SettingsComponent.tsx@@ -1,10 +1,12 @@import { LoadingOutlined } from '@ant-design/icons';import { App, Button, Spin, Switch } from 'antd';import { useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { getApplicationServer } from '../../../constants';import { settingsApi } from '../../../entity/users/api/settingsApi';import type { UsersSettings } from '../../../entity/users/model/UsersSettings';+import { getWebsitePageUrl, translateApiError, useLocale } from '../../../shared/i18n';import { ClipboardHelper } from '../../../shared/lib/ClipboardHelper';import { VerificationAgentsComponent } from '../../verification/agents';import { AuditLogsComponent } from './AuditLogsComponent';@@ -14,6 +16,8 @@ interface Props {}export function SettingsComponent({ contentHeight }: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();const { message } = App.useApp();const [settings, setSettings] = useState<UsersSettings | undefined>(undefined);const [isLoading, setIsLoading] = useState(true);@@ -43,8 +47,7 @@ export function SettingsComponent({ contentHeight }: Props) {setFormSettings(currentSettings);setHasChanges(false);} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to load settings';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsLoading(false);}@@ -74,10 +77,9 @@ export function SettingsComponent({ contentHeight }: Props) {setSettings(updatedSettings);setFormSettings(updatedSettings);setHasChanges(false);- message.success('Settings updated successfully');+ message.success(t('settings.updated'));} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to update settings';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsSaving(false);}@@ -98,7 +100,7 @@ export function SettingsComponent({ contentHeight }: Props) {className="grow overflow-y-auto rounded bg-white p-5 shadow dark:bg-gray-800"style={{ height: contentHeight }}>- <h1 className="text-2xl font-bold dark:text-white">Databasus settings</h1>+ <h1 className="text-2xl font-bold dark:text-white">{t('settings.title')}</h1><div className="mt-6">{isLoading ? (@@ -112,11 +114,10 @@ export function SettingsComponent({ contentHeight }: Props) {<div className="flex items-start justify-between border-b border-gray-200 pb-4 dark:border-gray-700"><div className="flex-1 pr-20"><div className="font-medium text-gray-900 dark:text-white">- Allow external registrations+ {t('settings.externalRegistrations.title')}</div><div className="mt-1 text-gray-500 dark:text-gray-400">- When enabled, new users can register accounts in Databasus. If disabled, new- users can only register via invitation+ {t('settings.externalRegistrations.description')}</div></div>@@ -140,12 +141,11 @@ export function SettingsComponent({ contentHeight }: Props) {<div className="flex items-start justify-between border-b border-gray-200 pb-4 dark:border-gray-700"><div className="flex-1 pr-20"><div className="font-medium text-gray-900 dark:text-white">- Allow member invitations+ {t('settings.memberInvitations.title')}</div><div className="mt-1 text-gray-500 dark:text-gray-400">- When enabled, existing members can invite new users to join Databasus. If- not - only admins can invite users.+ {t('settings.memberInvitations.description')}</div></div>@@ -169,12 +169,11 @@ export function SettingsComponent({ contentHeight }: Props) {<div className="flex items-start justify-between border-b border-gray-200 pb-4 dark:border-gray-700"><div className="flex-1 pr-20"><div className="font-medium text-gray-900 dark:text-white">- Members can create workspaces+ {t('settings.memberWorkspaceCreation.title')}</div><div className="mt-1 text-gray-500 dark:text-gray-400">- When enabled, members (non-admin users) can create new workspaces. If not -- only admins can create workspaces.+ {t('settings.memberWorkspaceCreation.description')}</div></div><div className="ml-4">@@ -203,11 +202,11 @@ export function SettingsComponent({ contentHeight }: Props) {disabled={isSaving}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- {isSaving ? 'Saving...' : 'Save Changes'}+ {isSaving ? t('settings.saving') : t('settings.saveChanges')}</Button><Button type="default" onClick={handleReset} disabled={isSaving}>- Reset+ {t('settings.reset')}</Button></div>)}@@ -216,20 +215,26 @@ export function SettingsComponent({ contentHeight }: Props) {</div><div className="mt-3 text-sm text-gray-500 dark:text-gray-400">- Read more about settings you can{' '}- <a- href="https://databasus.com/access-management#global-settings"- target="_blank"- rel="noreferrer"- className="!text-blue-600"- >- here- </a>+ <Trans+ i18nKey="settings.readMore"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('accessManagementGlobalSettings', locale)}+ target="_blank"+ rel="noreferrer"+ className="!text-blue-600"+ />+ ),+ }}+ /></div>{/* Health-check Information */}<div className="my-8 max-w-2xl">- <h2 className="mb-3 text-xl font-bold dark:text-white">Health-check</h2>+ <h2 className="mb-3 text-xl font-bold dark:text-white">+ {t('settings.healthcheck.title')}+ </h2><div className="group relative"><div className="flex items-center rounded-md border border-gray-300 bg-gray-50 px-3 py-2 !font-mono text-sm text-gray-700 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200">@@ -238,7 +243,7 @@ export function SettingsComponent({ contentHeight }: Props) {onClick={() => {window.open(`${getApplicationServer()}/api/v1/system/health`, '_blank');}}- title="Click to open in new tab"+ title={t('settings.healthcheck.openInNewTab')}>{getApplicationServer()}/api/v1/system/health</code>@@ -250,14 +255,14 @@ export function SettingsComponent({ contentHeight }: Props) {ClipboardHelper.copyToClipboard(`${getApplicationServer()}/api/v1/system/health`,);- message.success('Health-check endpoint copied to clipboard');+ message.success(t('settings.healthcheck.copied'));}}>📋</Button></div><div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- Use this endpoint to monitor your Databasus system's availability+ {t('settings.healthcheck.description')}</div></div></div>diff --git a/frontend/src/features/storages/ui/StorageCardComponent.tsx b/frontend/src/features/storages/ui/StorageCardComponent.tsxindex dc327a66..8791d2e3 100644--- a/frontend/src/features/storages/ui/StorageCardComponent.tsx+++ b/frontend/src/features/storages/ui/StorageCardComponent.tsx@@ -1,8 +1,9 @@import { InfoCircleOutlined } from '@ant-design/icons';+import { useTranslation } from 'react-i18next';-import { type Storage } from '../../../entity/storages';+import { type Storage, StorageType } from '../../../entity/storages';import { getStorageLogoFromType } from '../../../entity/storages/models/getStorageLogoFromType';-import { getStorageNameFromType } from '../../../entity/storages/models/getStorageNameFromType';+import type { TranslationKey } from '../../../shared/i18n';interface Props {storage: Storage;@@ -10,11 +11,26 @@ interface Props {setSelectedStorageId: (storageId: string) => void;}+// One sentence per type rather than STORAGE_TYPE_LABEL_KEYS: inside the sentence the type is+// written in lower case, and some languages inflect it+const STORAGE_CARD_TYPE_KEYS: Record<StorageType, TranslationKey> = {+ [StorageType.LOCAL]: 'storages.card.type.local',+ [StorageType.S3]: 'storages.card.type.s3',+ [StorageType.GOOGLE_DRIVE]: 'storages.card.type.googleDrive',+ [StorageType.NAS]: 'storages.card.type.nas',+ [StorageType.AZURE_BLOB]: 'storages.card.type.azureBlob',+ [StorageType.FTP]: 'storages.card.type.ftp',+ [StorageType.SFTP]: 'storages.card.type.sftp',+ [StorageType.RCLONE]: 'storages.card.type.rclone',+};+export const StorageCardComponent = ({storage,selectedStorageId,setSelectedStorageId,}: Props) => {+ const { t } = useTranslation();+return (<divclassName={`mb-3 cursor-pointer rounded p-3 shadow ${selectedStorageId === storage.id ? 'bg-blue-100 dark:bg-blue-800' : 'bg-white dark:bg-gray-800'}`}@@ -24,20 +40,16 @@ export const StorageCardComponent = ({<div className="flex items-center"><div className="text-sm text-gray-500 dark:text-gray-400">- Type: {getStorageNameFromType(storage.type)}+ {t(STORAGE_CARD_TYPE_KEYS[storage.type])}</div>- <img- src={getStorageLogoFromType(storage.type)}- alt="storageIcon"- className="ml-1 h-4 w-4"- />+ <img src={getStorageLogoFromType(storage.type)} alt="" className="ml-1 h-4 w-4" /></div>{storage.lastSaveError && (<div className="mt-1 flex items-center text-sm text-red-600 underline dark:text-red-400"><InfoCircleOutlined className="mr-1" style={{ color: 'red' }} />- Has save error+ {t('storages.card.hasSaveError')}</div>)}</div>diff --git a/frontend/src/features/storages/ui/StorageComponent.tsx b/frontend/src/features/storages/ui/StorageComponent.tsxindex f98704c8..9aa8ac7e 100644--- a/frontend/src/features/storages/ui/StorageComponent.tsx+++ b/frontend/src/features/storages/ui/StorageComponent.tsx@@ -7,10 +7,12 @@ import {import { Button, Input, Spin } from 'antd';import { useState } from 'react';import { useEffect } from 'react';+import { useTranslation } from 'react-i18next';import { logicalBackupConfigApi } from '../../../entity/backups/logical';import { storageApi } from '../../../entity/storages';import type { Storage } from '../../../entity/storages';+import { translateApiError } from '../../../shared/i18n';import { ToastHelper } from '../../../shared/toast';import { ConfirmationComponent } from '../../../shared/ui';import { StorageTransferDialogComponent } from './StorageTransferDialogComponent';@@ -32,6 +34,7 @@ export const StorageComponent = ({onStorageTransferred,isCanManageStorages,}: Props) => {+ const { t } = useTranslation();const [storage, setStorage] = useState<Storage | undefined>();const [isEditName, setIsEditName] = useState(false);@@ -56,8 +59,8 @@ export const StorageComponent = ({.testStorageConnection(storage.id).then(() => {ToastHelper.showToast({- title: 'Connection test successful!',- description: 'Storage connection tested successfully',+ title: t('storages.connectionTestSucceeded.title'),+ description: t('storages.connectionTestSucceeded.description'),});if (storage.lastSaveError) {@@ -65,8 +68,8 @@ export const StorageComponent = ({onStorageChanged(storage);}})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));}).finally(() => {setIsTestingConnection(false);@@ -81,14 +84,14 @@ export const StorageComponent = ({try {const isStorageUsing = await logicalBackupConfigApi.isStorageUsing(storage.id);if (isStorageUsing) {- alert('Storage is used by some databases. Please remove the storage from databases first.');+ alert(t('storages.config.removeBlockedByDatabases'));setIsShowRemoveConfirm(false);} else {await storageApi.deleteStorage(storage.id);onStorageDeleted();}} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsRemoving(false);@@ -114,8 +117,8 @@ export const StorageComponent = ({setIsEditName(false);onStorageChanged(editStorage);})- .catch((e: Error) => {- alert(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));setIsSaving(false);});};@@ -160,7 +163,7 @@ export const StorageComponent = ({setEditStorage({ ...editStorage, name: e.target.value });setIsNameUnsaved(true);}}- placeholder="Enter name..."+ placeholder={t('storages.config.namePlaceholder')}size="large"/>@@ -187,7 +190,7 @@ export const StorageComponent = ({loading={isSaving}disabled={!editStorage?.name}>- Save+ {t('common.actions.save')}</Button>)}</div>@@ -197,27 +200,27 @@ export const StorageComponent = ({<div className="max-w-[400px] rounded border border-red-600 px-3 py-3"><div className="mt-1 flex items-center text-sm font-bold text-red-600"><InfoCircleOutlined className="mr-2" style={{ color: 'red' }} />- Save error+ {t('storages.config.lastSaveError.title')}</div><div className="mt-3 text-sm">- The error:+ {t('storages.config.lastSaveError.errorLabel')}<br />{storage.lastSaveError}</div><div className="mt-3 text-sm break-words whitespace-pre-wrap text-gray-500 dark:text-gray-400">- To clean this error (choose any):+ {t('storages.config.lastSaveError.clearHint')}<ul>- <li>- test connection via button below (even if you updated settings);</li>- <li>- wait until the next save is done without errors;</li>+ <li>{t('storages.config.lastSaveError.clearByTestingConnection')}</li>+ <li>{t('storages.config.lastSaveError.clearByNextSave')}</li></ul></div></div>)}<div className="mt-5 flex items-center font-bold">- <div>Storage settings</div>+ <div>{t('storages.config.settingsTitle')}</div>{!isEditSettings && isCanManageStorages ? (<div className="ml-2 h-4 w-4 cursor-pointer" onClick={() => startEdit('settings')}>@@ -256,7 +259,7 @@ export const StorageComponent = ({loading={isTestingConnection}disabled={isTestingConnection}>- Test connection+ {t('storages.actions.testConnection')}</Button>{isCanManageStorages && (@@ -289,8 +292,8 @@ export const StorageComponent = ({<ConfirmationComponentonConfirm={remove}onDecline={() => setIsShowRemoveConfirm(false)}- description="Are you sure you want to remove this storage? This action cannot be undone. If some backups are using this storage, they will be removed too."- actionText="Remove"+ description={t('storages.config.removeConfirmation')}+ actionText={t('common.actions.remove')}actionButtonColor="red"/>)}diff --git a/frontend/src/features/storages/ui/StorageTransferDialogComponent.tsx b/frontend/src/features/storages/ui/StorageTransferDialogComponent.tsxindex 84a720a1..b47905b5 100644--- a/frontend/src/features/storages/ui/StorageTransferDialogComponent.tsx+++ b/frontend/src/features/storages/ui/StorageTransferDialogComponent.tsx@@ -1,9 +1,11 @@import { Button, Modal, Select, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { logicalBackupConfigApi } from '../../../entity/backups/logical';import { type Storage, storageApi } from '../../../entity/storages';import { type WorkspaceResponse, workspaceApi } from '../../../entity/workspaces';+import { translateApiError } from '../../../shared/i18n';interface Props {storage: Storage;@@ -12,6 +14,7 @@ interface Props {}export const StorageTransferDialogComponent = ({ storage, onClose, onTransferred }: Props) => {+ const { t } = useTranslation();const [isLoading, setIsLoading] = useState(true);const [isStorageInUse, setIsStorageInUse] = useState(false);const [workspaces, setWorkspaces] = useState<WorkspaceResponse[]>([]);@@ -31,7 +34,7 @@ export const StorageTransferDialogComponent = ({ storage, onClose, onTransferredsetWorkspaces(filteredWorkspaces);}} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsLoading(false);@@ -46,7 +49,7 @@ export const StorageTransferDialogComponent = ({ storage, onClose, onTransferredawait storageApi.transferStorage(storage.id, selectedWorkspaceId);onTransferred();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsTransferring(false);@@ -58,7 +61,7 @@ export const StorageTransferDialogComponent = ({ storage, onClose, onTransferredreturn (<Modal- title="Transfer storage to another workspace"+ title={t('storages.transfer.title')}footer={null}open={true}onCancel={onClose}@@ -71,37 +74,36 @@ export const StorageTransferDialogComponent = ({ storage, onClose, onTransferred) : isStorageInUse ? (<div className="py-3"><div className="text-gray-700 dark:text-gray-300">- This storage is used by some databases. Please transfer or remove related databases- first.+ {t('storages.transfer.blockedByDatabases')}</div><div className="mt-5"><Button type="primary" onClick={onClose}>- OK+ {t('common.actions.ok')}</Button></div></div>) : (<div className="py-3"><div className="mb-3 text-gray-500 dark:text-gray-400">- Select a workspace to transfer this storage to.+ {t('storages.transfer.description')}</div><div className="mb-5 flex items-center">- <div className="min-w-[120px]">Target workspace</div>+ <div className="min-w-[120px] pr-2">{t('storages.transfer.targetWorkspace')}</div><Selectvalue={selectedWorkspaceId}onChange={setSelectedWorkspaceId}className="min-w-[200px] grow"- placeholder="Select workspace"+ placeholder={t('storages.transfer.selectWorkspace')}options={workspaces.map((w) => ({ label: w.name, value: w.id }))}/></div><div className="flex gap-2"><Button type="default" onClick={onClose}>- Cancel+ {t('common.actions.cancel')}</Button><Button@@ -110,7 +112,7 @@ export const StorageTransferDialogComponent = ({ storage, onClose, onTransferredloading={isTransferring}disabled={!selectedWorkspaceId || isTransferring}>- Transfer+ {t('storages.transfer.submit')}</Button></div></div>diff --git a/frontend/src/features/storages/ui/StoragesComponent.tsx b/frontend/src/features/storages/ui/StoragesComponent.tsxindex 8a61535b..563b4af2 100644--- a/frontend/src/features/storages/ui/StoragesComponent.tsx+++ b/frontend/src/features/storages/ui/StoragesComponent.tsx@@ -1,10 +1,12 @@import { Button, Modal, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { storageApi } from '../../../entity/storages';import type { Storage } from '../../../entity/storages';import type { WorkspaceResponse } from '../../../entity/workspaces';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError } from '../../../shared/i18n';import { StorageCardComponent } from './StorageCardComponent';import { StorageComponent } from './StorageComponent';import { EditStorageComponent } from './edit/EditStorageComponent';@@ -15,9 +17,11 @@ interface Props {isCanManageStorages: boolean;}+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst SELECTED_STORAGE_STORAGE_KEY = 'selectedStorageId';export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorages }: Props) => {+ const { t } = useTranslation();const isMobile = useIsMobile();const [isLoading, setIsLoading] = useState(true);const [storages, setStorages] = useState<Storage[]>([]);@@ -57,7 +61,7 @@ export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorageupdateSelectedStorageId(storageToSelect);}})- .catch((e: Error) => alert(e.message))+ .catch((e: unknown) => alert(translateApiError(e, t))).finally(() => setIsLoading(false));};@@ -75,7 +79,7 @@ export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorageconst addStorageButton = (<Button type="primary" className="mb-2 w-full" onClick={() => setIsShowAddStorage(true)}>- Add storage+ {t('storages.list.addStorage')}</Button>);@@ -105,7 +109,7 @@ export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorage{storages.length < 5 && isCanManageStorages && addStorageButton}<div className="mx-3 text-center text-xs text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, etc.)+ {t('storages.list.description')}</div></div>)}@@ -119,7 +123,7 @@ export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorageonClick={() => updateSelectedStorageId(undefined)}className="w-full">- ← Back to storages+ {t('storages.list.backToList')}</Button></div>)}@@ -151,14 +155,14 @@ export const StoragesComponent = ({ contentHeight, workspace, isCanManageStorage{isShowAddStorage && (<Modal- title="Add storage"+ title={t('storages.list.addStorage')}footer={<div />}open={isShowAddStorage}onCancel={() => setIsShowAddStorage(false)}maskClosable={false}><div className="my-3 max-w-[250px] text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, etc.)+ {t('storages.list.description')}</div><EditStorageComponentdiff --git a/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx b/frontend/src/features/storages/ui/edit/EditStorageComponent.tsxindex 1b2346b1..e6b45c80 100644--- a/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/EditStorageComponent.tsx@@ -1,12 +1,15 @@import { Button, Input, Select } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import {+ STORAGE_TYPE_LABEL_KEYS,type Storage,StorageType,getStorageLogoFromType,storageApi,} from '../../../../entity/storages';+import { translateApiError } from '../../../../shared/i18n';import { ToastHelper } from '../../../../shared/toast';import { EditAzureBlobStorageComponent } from './storages/EditAzureBlobStorageComponent';import { EditFTPStorageComponent } from './storages/EditFTPStorageComponent';@@ -37,13 +40,14 @@ export function EditStorageComponent({editingStorage,onChanged,}: Props) {+ const { t } = useTranslation();const [storage, setStorage] = useState<Storage | undefined>();const [isUnsaved, setIsUnsaved] = useState(false);const [isSaving, setIsSaving] = useState(false);const [isTestingConnection, setIsTestingConnection] = useState(false);const [isTestConnectionSuccess, setIsTestConnectionSuccess] = useState(false);- const [connectionError, setConnectionError] = useState<string | undefined>();+ const [connectionError, setConnectionError] = useState<unknown>();const save = async () => {if (!storage) return;@@ -55,7 +59,7 @@ export function EditStorageComponent({onChanged(savedStorage);setIsUnsaved(false);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -71,13 +75,12 @@ export function EditStorageComponent({await storageApi.testStorageConnectionDirect(storage);setIsTestConnectionSuccess(true);ToastHelper.showToast({- title: 'Connection test successful!',- description: 'Storage connection tested successfully',+ title: t('storages.connectionTestSucceeded.title'),+ description: t('storages.connectionTestSucceeded.description'),});} catch (e) {- const errorMessage = (e as Error).message;- setConnectionError(errorMessage);- alert(errorMessage);+ setConnectionError(e);+ alert(translateApiError(e, t));}setIsTestingConnection(false);@@ -312,22 +315,16 @@ export function EditStorageComponent({if (!storage) return <div />;- const storageTypeOptions = [- { label: 'Local storage', value: StorageType.LOCAL },- { label: 'S3', value: StorageType.S3 },- { label: 'Google Drive', value: StorageType.GOOGLE_DRIVE },- { label: 'NAS', value: StorageType.NAS },- { label: 'Azure Blob Storage', value: StorageType.AZURE_BLOB },- { label: 'FTP', value: StorageType.FTP },- { label: 'SFTP', value: StorageType.SFTP },- { label: 'Rclone', value: StorageType.RCLONE },- ];+ const storageTypeOptions = Object.values(StorageType).map((storageType) => ({+ label: t(STORAGE_TYPE_LABEL_KEYS[storageType]),+ value: storageType,+ }));return (<div>{isShowName && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Name</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.name')}</div><Inputvalue={storage?.name || ''}@@ -337,13 +334,13 @@ export function EditStorageComponent({}}size="small"className="w-full max-w-[250px]"- placeholder="My Storage"+ placeholder={t('storages.edit.namePlaceholder')}/></div>)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Type</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.type')}</div><div className="flex items-center"><Select@@ -455,7 +452,7 @@ export function EditStorageComponent({type="primary"onClick={testConnection}>- Test connection+ {t('storages.actions.testConnection')}</Button>) : (<div />@@ -469,7 +466,7 @@ export function EditStorageComponent({type="primary"onClick={save}>- Save+ {t('common.actions.save')}</Button>) : (<div />@@ -484,7 +481,7 @@ export function EditStorageComponent({ghostonClick={onClose}>- Cancel+ {t('common.actions.cancel')}</Button>) : (<div />diff --git a/frontend/src/features/storages/ui/edit/storages/EditAzureBlobStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditAzureBlobStorageComponent.tsxindex 67bbc3f6..e72ad28d 100644--- a/frontend/src/features/storages/ui/edit/storages/EditAzureBlobStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditAzureBlobStorageComponent.tsx@@ -1,8 +1,9 @@import { DownOutlined, InfoCircleOutlined, UpOutlined } from '@ant-design/icons';import { Input, Radio, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';-import type { Storage } from '../../../../../entity/storages';+import { AZURE_BLOB_AUTH_METHOD_LABEL_KEYS, type Storage } from '../../../../../entity/storages';interface Props {storage: Storage;@@ -11,6 +12,7 @@ interface Props {}export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();const hasAdvancedValues =!!storage?.azureBlobStorage?.prefix || !!storage?.azureBlobStorage?.endpoint;const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);@@ -18,7 +20,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsavedreturn (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Auth method</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.authMethod')}</div><Radio.Groupvalue={storage?.azureBlobStorage?.authMethod || 'ACCOUNT_KEY'}onChange={(e) => {@@ -35,14 +37,18 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small">- <Radio value="ACCOUNT_KEY">Account key</Radio>- <Radio value="CONNECTION_STRING">Connection string</Radio>+ <Radio value="ACCOUNT_KEY">{t(AZURE_BLOB_AUTH_METHOD_LABEL_KEYS.ACCOUNT_KEY)}</Radio>+ <Radio value="CONNECTION_STRING">+ {t(AZURE_BLOB_AUTH_METHOD_LABEL_KEYS.CONNECTION_STRING)}+ </Radio></Radio.Group></div>{storage?.azureBlobStorage?.authMethod === 'CONNECTION_STRING' && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Connection</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.connection')}+ </div><div className="flex items-center"><Input.Passwordvalue={storage?.azureBlobStorage?.connectionString || ''}@@ -60,6 +66,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- connection string format exampleplaceholder="DefaultEndpointsProtocol=https;AccountName=..."autoComplete="off"data-1p-ignore@@ -69,7 +76,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved<TooltipclassName="cursor-pointer"- title="Azure Storage connection string from Azure Portal"+ title={t('storages.edit.azureBlob.connectionStringTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -80,7 +87,9 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved{storage?.azureBlobStorage?.authMethod === 'ACCOUNT_KEY' && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Account name</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.accountName')}+ </div><Inputvalue={storage?.azureBlobStorage?.accountName || ''}onChange={(e) => {@@ -97,12 +106,15 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example account nameplaceholder="mystorageaccount"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Account key</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.accountKey')}+ </div><Input.Passwordvalue={storage?.azureBlobStorage?.accountKey || ''}onChange={(e) => {@@ -119,6 +131,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example key valueplaceholder="your-account-key"autoComplete="off"data-1p-ignore@@ -130,7 +143,9 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Container name</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.containerName')}+ </div><Inputvalue={storage?.azureBlobStorage?.containerName || ''}onChange={(e) => {@@ -147,6 +162,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example container nameplaceholder="my-container"/></div>@@ -156,7 +172,7 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsavedclassName="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!showAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('storages.edit.advancedSettings')}</span>{showAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -170,7 +186,9 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved<>{storage?.azureBlobStorage?.authMethod === 'ACCOUNT_KEY' && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Endpoint</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.endpoint')}+ </div><div className="flex items-center"><Inputvalue={storage?.azureBlobStorage?.endpoint || ''}@@ -188,12 +206,14 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"- placeholder="https://myaccount.blob.core.windows.net (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', {+ example: 'https://myaccount.blob.core.windows.net',+ })}/><TooltipclassName="cursor-pointer"- title="Custom endpoint URL (optional, leave empty for standard Azure)"+ title={t('storages.edit.azureBlob.endpointTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -202,7 +222,9 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Blob prefix</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.blobPrefix')}+ </div><div className="flex items-center"><Inputvalue={storage?.azureBlobStorage?.prefix || ''}@@ -220,12 +242,12 @@ export function EditAzureBlobStorageComponent({ storage, setStorage, setUnsaved}}size="small"className="w-full max-w-[250px]"- placeholder="my-prefix/ (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: 'my-prefix/' })}/><TooltipclassName="cursor-pointer"- title="Optional prefix for all blob names (e.g., 'backups/' or 'my_team/')"+ title={t('storages.edit.azureBlob.prefixTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>diff --git a/frontend/src/features/storages/ui/edit/storages/EditFTPStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditFTPStorageComponent.tsxindex 05e438f5..285a327e 100644--- a/frontend/src/features/storages/ui/edit/storages/EditFTPStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditFTPStorageComponent.tsx@@ -1,6 +1,7 @@import { DownOutlined, InfoCircleOutlined, UpOutlined } from '@ant-design/icons';import { Checkbox, Input, InputNumber, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import type { Storage } from '../../../../../entity/storages';@@ -11,13 +12,14 @@ interface Props {}export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();const hasAdvancedValues = !!storage?.ftpStorage?.skipTlsVerify;const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Host</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.host')}</div><Inputvalue={storage?.ftpStorage?.host || ''}onChange={(e) => {@@ -34,12 +36,13 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example hostnameplaceholder="ftp.example.com"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Port</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.port')}</div><InputNumbervalue={storage?.ftpStorage?.port}onChange={(value) => {@@ -63,7 +66,7 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Username</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.username')}</div><Inputvalue={storage?.ftpStorage?.username || ''}onChange={(e) => {@@ -80,12 +83,12 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="username"+ placeholder={t('storages.edit.usernamePlaceholder')}/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Password</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={storage?.ftpStorage?.password || ''}onChange={(e) => {@@ -102,7 +105,7 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="password"+ placeholder={t('storages.edit.passwordPlaceholder')}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -111,7 +114,7 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Path</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.path')}</div><div className="flex items-center"><Inputvalue={storage?.ftpStorage?.path || ''}@@ -134,20 +137,17 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="backups (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: 'backups' })}/>- <Tooltip- className="cursor-pointer"- title="Remote directory path for storing backups (optional)"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.remotePathTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Use SSL/TLS</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.useSslTls')}</div><div className="flex items-center"><Checkboxchecked={storage?.ftpStorage?.useSsl || false}@@ -164,13 +164,10 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: ProsetUnsaved();}}>- Enable FTPS+ {t('storages.edit.ftp.enableFtps')}</Checkbox>- <Tooltip- className="cursor-pointer"- title="Use explicit TLS encryption (FTPS) for secure file transfer"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.ftp.useSslTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -181,7 +178,7 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: ProclassName="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!showAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('storages.edit.advancedSettings')}</span>{showAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -195,7 +192,9 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: Pro<>{storage?.ftpStorage?.useSsl && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Skip TLS verify</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.skipTlsVerify')}+ </div><div className="flex items-center"><Checkboxchecked={storage?.ftpStorage?.skipTlsVerify || false}@@ -212,12 +211,12 @@ export function EditFTPStorageComponent({ storage, setStorage, setUnsaved }: ProsetUnsaved();}}>- Skip certificate verification+ {t('storages.edit.ftp.skipCertificateVerification')}</Checkbox><TooltipclassName="cursor-pointer"- title="Skip TLS certificate verification. Enable this if your FTP server uses a self-signed certificate. Warning: this reduces security."+ title={t('storages.edit.ftp.skipTlsVerifyTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>diff --git a/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsxindex 5b62408e..e5e0c936 100644--- a/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditGoogleDriveStorageComponent.tsx@@ -1,7 +1,9 @@import { Button, Input } from 'antd';+import { useTranslation } from 'react-i18next';import type { Storage } from '../../../../../entity/storages';import type { StorageOauthDto } from '../../../../../entity/storages/models/StorageOauthDto';+import { getWebsitePageUrl, useLocale } from '../../../../../shared/i18n';interface Props {storage: Storage;@@ -10,6 +12,9 @@ interface Props {}export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();+const goToAuthUrl = () => {if (!storage?.googleDriveStorage?.clientId || !storage?.googleDriveStorage?.clientSecret) {return;@@ -24,6 +29,7 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsaveauthCode: '',};+ // eslint-disable-next-line i18next/no-literal-string -- OAuth request URL, not copyconst authUrl = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${clientId}&redirect_uri=${redirectUri}&response_type=code&scope=${encodeURIComponent(scope)}&access_type=offline&prompt=consent&state=${encodeURIComponent(JSON.stringify(oauthDto))}`;@@ -37,14 +43,18 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsave<div className="hidden min-w-[110px] sm:block" /><div className="text-xs text-blue-600">- <a href="https://databasus.com/storages/google-drive" target="_blank" rel="noreferrer">- How to connect Google Drive?+ <a+ href={getWebsitePageUrl('storagesGoogleDrive', locale)}+ target="_blank"+ rel="noreferrer"+ >+ {t('storages.edit.googleDrive.guideLink')}</a></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Client ID</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.clientId')}</div><Inputvalue={storage?.googleDriveStorage?.clientId || ''}onChange={(e: React.ChangeEvent<HTMLInputElement>) => {@@ -61,13 +71,16 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsave}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example client IDplaceholder="my-client-id"disabled={!!storage?.googleDriveStorage?.tokenJson}/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Client Secret</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.clientSecret')}+ </div><Inputvalue={storage?.googleDriveStorage?.clientSecret || ''}onChange={(e: React.ChangeEvent<HTMLInputElement>) => {@@ -84,6 +97,7 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsave}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example client secretplaceholder="my-client-secret"disabled={!!storage?.googleDriveStorage?.tokenJson}/>@@ -92,12 +106,15 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsave{storage?.googleDriveStorage?.tokenJson && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">User Token</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.userToken')}+ </div><Inputvalue={storage?.googleDriveStorage?.tokenJson || ''}disabledsize="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example tokenplaceholder="my-user-token"/></div>@@ -112,7 +129,7 @@ export function EditGoogleDriveStorageComponent({ storage, setStorage, setUnsave}onClick={goToAuthUrl}>- Authorize+ {t('storages.edit.googleDrive.authorize')}</Button>)}</>diff --git a/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsxindex 75f1f62c..67a7e790 100644--- a/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx@@ -1,11 +1,13 @@import { ExclamationCircleOutlined } from '@ant-design/icons';+import { useTranslation } from 'react-i18next';export function EditLocalStorageComponent() {+ const { t } = useTranslation();+return (<><div className="max-w-[360px] text-yellow-600 dark:text-yellow-400">- <ExclamationCircleOutlined /> Be careful: with local storage you may run out of ROM memory.- It is recommended to use S3 or unlimited storages+ <ExclamationCircleOutlined /> {t('storages.edit.local.diskSpaceWarning')}</div><div className="mb-5" />diff --git a/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsxindex 0e8e460d..d7a07a59 100644--- a/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx@@ -1,5 +1,6 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Input, InputNumber, Switch, Tooltip } from 'antd';+import { useTranslation } from 'react-i18next';import type { Storage } from '../../../../../entity/storages';@@ -10,13 +11,14 @@ interface Props {}export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();const shareHasSlash =storage?.nasStorage?.share?.includes('/') || storage?.nasStorage?.share?.includes('\\');return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Host</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.host')}</div><Inputvalue={storage?.nasStorage?.host || ''}onChange={(e) => {@@ -38,7 +40,7 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Port</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.port')}</div><InputNumbervalue={storage?.nasStorage?.port}onChange={(value) => {@@ -62,7 +64,7 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Share</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.share')}</div><div className="flex flex-col"><Inputvalue={storage?.nasStorage?.share || ''}@@ -80,20 +82,20 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example share nameplaceholder="shared_folder"status={shareHasSlash ? 'warning' : undefined}/>{shareHasSlash && (<div className="mt-1 max-w-[250px] text-xs text-yellow-600">- Share must be a single share name. Use the Path field for subdirectories (e.g. Share:- Databasus, Path: DB1)+ {t('storages.edit.nas.shareWithSlashWarning')}</div>)}</div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Username</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.username')}</div><Inputvalue={storage?.nasStorage?.username || ''}onChange={(e) => {@@ -110,12 +112,12 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="username"+ placeholder={t('storages.edit.usernamePlaceholder')}/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Password</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={storage?.nasStorage?.password || ''}onChange={(e) => {@@ -132,7 +134,7 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="password"+ placeholder={t('storages.edit.passwordPlaceholder')}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -141,7 +143,7 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Use SSL</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.useSsl')}</div><div className="flex items-center"><Switchchecked={storage?.nasStorage?.useSsl || false}@@ -160,17 +162,14 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Prosize="small"/>- <Tooltip- className="cursor-pointer"- title="Enable SSL/TLS encryption for secure connection"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.nas.useSslTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Domain</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.domain')}</div><div className="flex items-center"><Inputvalue={storage?.nasStorage?.domain || ''}@@ -188,20 +187,17 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="WORKGROUP (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: 'WORKGROUP' })}/>- <Tooltip- className="cursor-pointer"- title="Windows domain name (optional, leave empty if not using domain authentication)"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.nas.domainTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Path</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.path')}</div><div className="flex items-center"><Inputvalue={storage?.nasStorage?.path || ''}@@ -225,10 +221,10 @@ export function EditNASStorageComponent({ storage, setStorage, setUnsaved }: Pro}}size="small"className="w-full max-w-[250px]"- placeholder="backups (optional, no leading slash)"+ placeholder={t('storages.edit.nas.pathPlaceholder', { example: 'backups' })}/>- <Tooltip className="cursor-pointer" title="Subdirectory path within the share (optional)">+ <Tooltip className="cursor-pointer" title={t('storages.edit.nas.pathTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>diff --git a/frontend/src/features/storages/ui/edit/storages/EditRcloneStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditRcloneStorageComponent.tsxindex a32032a1..ea1afed4 100644--- a/frontend/src/features/storages/ui/edit/storages/EditRcloneStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditRcloneStorageComponent.tsx@@ -1,5 +1,6 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Input, Tooltip } from 'antd';+import { useTranslation } from 'react-i18next';import type { Storage } from '../../../../../entity/storages';@@ -10,10 +11,12 @@ interface Props {}export function EditRcloneStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mb-1 min-w-[110px] pt-1 sm:mb-0">Config</div>+ <div className="mb-1 min-w-[110px] pt-1 sm:mb-0 sm:pr-2">{t('storages.fields.config')}</div><div className="flex w-full flex-col"><div className="flex items-start"><Input.TextArea@@ -31,6 +34,7 @@ export function EditRcloneStorageComponent({ storage, setStorage, setUnsaved }:setUnsaved();}}className="w-full max-w-[400px] font-mono text-xs"+ // eslint-disable-next-line i18next/no-literal-string -- rclone.conf example, not copyplaceholder={`[myremote]type = s3provider = AWS@@ -41,10 +45,7 @@ region = us-east-1`}style={{ resize: 'vertical' }}/>- <Tooltip- className="cursor-pointer"- title="Paste your rclone.conf content here. You can get it by running 'rclone config file' and copying the contents. This config supports 70+ cloud storage providers."- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.rclone.configTooltip')}><InfoCircleOutlined className="mt-2 ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -56,8 +57,7 @@ region = us-east-1`}<div className="hidden min-w-[110px] sm:block" /><div className="max-w-[300px] text-xs text-gray-400">- *content is hidden to not expose sensitive data. If you want to update existing config,- put a new one here+ {t('storages.edit.rclone.configHiddenNote')}</div></div>)}@@ -67,13 +67,13 @@ region = us-east-1`}<div className="text-xs text-blue-600"><a href="https://rclone.org/docs/" target="_blank" rel="noreferrer">- Rclone documentation+ {t('storages.edit.rclone.docsLink')}</a></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Remote path</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.remotePath')}</div><div className="flex items-center"><Inputvalue={storage?.rcloneStorage?.remotePath || ''}@@ -91,13 +91,10 @@ region = us-east-1`}}}size="small"className="w-full max-w-[250px]"- placeholder="/backups (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: '/backups' })}/>- <Tooltip- className="cursor-pointer"- title="Optional path prefix on the remote where backups will be stored (e.g., '/backups' or 'my-folder/backups')"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.rclone.remotePathTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>diff --git a/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsxindex dc932143..09e71046 100644--- a/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx@@ -1,14 +1,21 @@import { DownOutlined, InfoCircleOutlined, UpOutlined } from '@ant-design/icons';import { Checkbox, Input, Select, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';-import { S3StorageClass, S3StorageClassLabels, type Storage } from '../../../../../entity/storages';+import {+ S3StorageClass,+ S3_STORAGE_CLASS_LABEL_KEYS,+ type Storage,+} from '../../../../../entity/storages';+import { ApiError } from '../../../../../shared/api';+import { getWebsitePageUrl, useLocale } from '../../../../../shared/i18n';interface Props {storage: Storage;setStorage: (storage: Storage) => void;setUnsaved: () => void;- connectionError?: string;+ connectionError?: unknown;}export function EditS3StorageComponent({@@ -17,6 +24,8 @@ export function EditS3StorageComponent({setUnsaved,connectionError,}: Props) {+ const { t } = useTranslation();+ const { locale } = useLocale();const hasAdvancedValues =!!storage?.s3Storage?.s3Prefix ||!!storage?.s3Storage?.s3UseVirtualHostedStyle ||@@ -25,7 +34,10 @@ export function EditS3StorageComponent({const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);useEffect(() => {- if (connectionError?.includes('failed to verify certificate')) {+ if (+ connectionError instanceof ApiError &&+ connectionError.message.includes('failed to verify certificate')+ ) {setShowAdvanced(true);}}, [connectionError]);@@ -36,14 +48,18 @@ export function EditS3StorageComponent({<div className="hidden min-w-[110px] sm:block" /><div className="text-xs text-blue-600">- <a href="https://databasus.com/storages/cloudflare-r2" target="_blank" rel="noreferrer">- How to use with Cloudflare R2?+ <a+ href={getWebsitePageUrl('storagesCloudflareR2', locale)}+ target="_blank"+ rel="noreferrer"+ >+ {t('storages.edit.s3.cloudflareR2Guide')}</a></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">S3 Bucket</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.s3Bucket')}</div><Inputvalue={storage?.s3Storage?.s3Bucket || ''}onChange={(e) => {@@ -60,12 +76,13 @@ export function EditS3StorageComponent({}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example bucket nameplaceholder="my-bucket-name"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Region</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.region')}</div><Inputvalue={storage?.s3Storage?.s3Region || ''}onChange={(e) => {@@ -82,12 +99,13 @@ export function EditS3StorageComponent({}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example region codeplaceholder="us-east-1"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Access key</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.accessKey')}</div><Input.Passwordvalue={storage?.s3Storage?.s3AccessKey || ''}onChange={(e) => {@@ -104,6 +122,7 @@ export function EditS3StorageComponent({}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- AWS example access keyplaceholder="AKIAIOSFODNN7EXAMPLE"autoComplete="off"data-1p-ignore@@ -113,7 +132,7 @@ export function EditS3StorageComponent({</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Secret key</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.secretKey')}</div><Input.Passwordvalue={storage?.s3Storage?.s3SecretKey || ''}onChange={(e) => {@@ -134,12 +153,13 @@ export function EditS3StorageComponent({data-lpignore="true"data-form-type="other"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- AWS example secret keyplaceholder="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Endpoint</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.endpoint')}</div><div className="flex items-center"><Inputvalue={storage?.s3Storage?.s3Endpoint || ''}@@ -157,13 +177,12 @@ export function EditS3StorageComponent({}}size="small"className="w-full max-w-[250px]"- placeholder="https://s3.example.com (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', {+ example: 'https://s3.example.com',+ })}/>- <Tooltip- className="cursor-pointer"- title="Custom S3-compatible endpoint URL (optional, leave empty for AWS S3)"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.s3.endpointTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -174,7 +193,7 @@ export function EditS3StorageComponent({className="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!showAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('storages.edit.advancedSettings')}</span>{showAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -187,7 +206,9 @@ export function EditS3StorageComponent({{showAdvanced && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Folder prefix</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.folderPrefix')}+ </div><div className="flex items-center"><Inputvalue={storage?.s3Storage?.s3Prefix || ''}@@ -205,23 +226,22 @@ export function EditS3StorageComponent({}}size="small"className="w-full max-w-[250px]"- placeholder="my-prefix/ (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: 'my-prefix/' })}// we do not allow to change the prefix after creation,// otherwise we will have to migrate all the data to the new prefixdisabled={!!storage.id}/>- <Tooltip- className="cursor-pointer"- title="Optional prefix for all object keys (e.g., 'backups/' or 'my_team/'). May not work with some S3-compatible storages. Cannot be changed after creation (otherwise backups will be lost)."- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.s3.prefixTooltip')}><InfoCircleOutlined className="ml-4" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Virtual host</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.virtualHost')}+ </div><div className="flex items-center"><Checkboxchecked={storage?.s3Storage?.s3UseVirtualHostedStyle || false}@@ -238,20 +258,19 @@ export function EditS3StorageComponent({setUnsaved();}}>- Use virtual-styled domains+ {t('storages.edit.s3.useVirtualHostedStyle')}</Checkbox>- <Tooltip- className="cursor-pointer"- title="Use virtual-hosted-style URLs (bucket.s3.region.amazonaws.com) instead of path-style (s3.region.amazonaws.com/bucket). May be required if you see COS errors."- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.s3.virtualHostTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Skip TLS verify</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.skipTlsVerify')}+ </div><div className="flex items-center"><Checkboxchecked={storage?.s3Storage?.skipTLSVerify || false}@@ -268,12 +287,12 @@ export function EditS3StorageComponent({setUnsaved();}}>- Skip TLS+ {t('storages.edit.s3.skipTls')}</Checkbox><TooltipclassName="cursor-pointer"- title="Skip TLS certificate verification. Enable this if your S3-compatible storage uses a self-signed certificate. Warning: this reduces security."+ title={t('storages.edit.s3.skipTlsVerifyTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>@@ -281,13 +300,15 @@ export function EditS3StorageComponent({</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Storage class</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.storageClass')}+ </div><div className="flex items-center"><Selectvalue={storage?.s3Storage?.s3StorageClass || S3StorageClass.DEFAULT}- options={Object.entries(S3StorageClassLabels).map(([value, label]) => ({- value,- label,+ options={Object.values(S3StorageClass).map((storageClass) => ({+ value: storageClass,+ label: t(S3_STORAGE_CLASS_LABEL_KEYS[storageClass]),}))}onChange={(value) => {if (!storage?.s3Storage) return;@@ -305,10 +326,7 @@ export function EditS3StorageComponent({className="w-[250px] max-w-[250px]"/>- <Tooltip- className="cursor-pointer"- title="S3 storage class for uploaded objects. Leave as default for Standard. Some providers offer cheaper classes like One Zone IA. Do not use Glacier/Deep Archive — files must be immediately accessible for restores."- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.s3.storageClassTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>diff --git a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsxindex a9d20f28..b0a24e9d 100644--- a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx+++ b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx@@ -1,6 +1,7 @@import { DownOutlined, InfoCircleOutlined, UpOutlined } from '@ant-design/icons';import { Checkbox, Input, InputNumber, Radio, Tooltip } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';import type { Storage } from '../../../../../entity/storages';@@ -10,17 +11,22 @@ interface Props {setUnsaved: () => void;}+type SftpAuthMethod = 'password' | 'privateKey';+export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Props) {+ const { t } = useTranslation();const hasAdvancedValues = !!storage?.sftpStorage?.skipHostKeyVerify;const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);- const initialAuthMethod = storage?.sftpStorage?.privateKey ? 'privateKey' : 'password';- const [authMethod, setAuthMethod] = useState<'password' | 'privateKey'>(initialAuthMethod);+ const initialAuthMethod: SftpAuthMethod = storage?.sftpStorage?.privateKey+ ? 'privateKey'+ : 'password';+ const [authMethod, setAuthMethod] = useState<SftpAuthMethod>(initialAuthMethod);return (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Host</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.host')}</div><Inputvalue={storage?.sftpStorage?.host || ''}onChange={(e) => {@@ -37,12 +43,13 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small"className="w-full max-w-[250px]"+ // eslint-disable-next-line i18next/no-literal-string -- example hostnameplaceholder="sftp.example.com"/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Port</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.port')}</div><InputNumbervalue={storage?.sftpStorage?.port}onChange={(value) => {@@ -66,7 +73,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr</div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Username</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.username')}</div><Inputvalue={storage?.sftpStorage?.username || ''}onChange={(e) => {@@ -83,18 +90,18 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small"className="w-full max-w-[250px]"- placeholder="username"+ placeholder={t('storages.edit.usernamePlaceholder')}/></div><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Auth Method</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.authMethod')}</div><Radio.Groupvalue={authMethod}onChange={(e) => {if (!storage?.sftpStorage) return;- const newMethod = e.target.value as 'password' | 'privateKey';+ const newMethod = e.target.value as SftpAuthMethod;setAuthMethod(newMethod);if (newMethod === 'password') {@@ -118,14 +125,14 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small">- <Radio value="password">Password</Radio>- <Radio value="privateKey">Private Key</Radio>+ <Radio value="password">{t('storages.sftpAuthMethods.password')}</Radio>+ <Radio value="privateKey">{t('storages.sftpAuthMethods.privateKey')}</Radio></Radio.Group></div>{authMethod === 'password' && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Password</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('common.fields.password')}</div><Input.Passwordvalue={storage?.sftpStorage?.password || ''}onChange={(e) => {@@ -142,7 +149,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small"className="w-full max-w-[250px]"- placeholder="password"+ placeholder={t('storages.edit.passwordPlaceholder')}autoComplete="off"data-1p-ignoredata-lpignore="true"@@ -153,7 +160,9 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr{authMethod === 'privateKey' && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Private Key</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.privateKey')}+ </div><div className="flex w-full max-w-[250px] flex-col"><Input.TextAreavalue={storage?.sftpStorage?.privateKey || ''}@@ -171,12 +180,13 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small"className="w-full"+ // eslint-disable-next-line i18next/no-literal-string -- key format example, not copyplaceholder="-----BEGIN OPENSSH PRIVATE KEY-----"rows={4}/><TooltipclassName="mt-1 cursor-pointer"- title="Paste your SSH private key (PEM format). Supports RSA, DSA, ECDSA, and Ed25519 keys."+ title={t('storages.edit.sftp.privateKeyTooltip')}><InfoCircleOutlined style={{ color: 'gray' }} /></Tooltip>@@ -185,7 +195,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr)}<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Path</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">{t('storages.fields.path')}</div><div className="flex items-center"><Inputvalue={storage?.sftpStorage?.path || ''}@@ -208,13 +218,10 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr}}size="small"className="w-full max-w-[250px]"- placeholder="backups (optional)"+ placeholder={t('storages.edit.optionalPlaceholder', { example: 'backups' })}/>- <Tooltip- className="cursor-pointer"- title="Remote directory path for storing backups (optional)"- >+ <Tooltip className="cursor-pointer" title={t('storages.edit.remotePathTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip></div>@@ -225,7 +232,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: PrclassName="flex cursor-pointer items-center text-sm text-blue-600 hover:text-blue-800"onClick={() => setShowAdvanced(!showAdvanced)}>- <span className="mr-2">Advanced settings</span>+ <span className="mr-2">{t('storages.edit.advancedSettings')}</span>{showAdvanced ? (<UpOutlined style={{ fontSize: '12px' }} />@@ -238,7 +245,9 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr{showAdvanced && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[110px] sm:mb-0">Skip host key</div>+ <div className="mb-1 min-w-[110px] sm:mb-0 sm:pr-2">+ {t('storages.fields.skipHostKey')}+ </div><div className="flex items-center"><Checkboxchecked={storage?.sftpStorage?.skipHostKeyVerify || false}@@ -255,12 +264,12 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: PrsetUnsaved();}}>- Skip host key verification+ {t('storages.edit.sftp.skipHostKeyVerification')}</Checkbox><TooltipclassName="cursor-pointer"- title="Skip SSH host key verification. Enable this if you trust the server. Warning: this reduces security."+ title={t('storages.edit.sftp.skipHostKeyTooltip')}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} /></Tooltip>diff --git a/frontend/src/features/storages/ui/show/ShowStorageComponent.tsx b/frontend/src/features/storages/ui/show/ShowStorageComponent.tsxindex 985bf283..209f4b8a 100644--- a/frontend/src/features/storages/ui/show/ShowStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/ShowStorageComponent.tsx@@ -1,6 +1,7 @@-import { type Storage, StorageType } from '../../../../entity/storages';+import { useTranslation } from 'react-i18next';++import { STORAGE_TYPE_LABEL_KEYS, type Storage, StorageType } from '../../../../entity/storages';import { getStorageLogoFromType } from '../../../../entity/storages/models/getStorageLogoFromType';-import { getStorageNameFromType } from '../../../../entity/storages/models/getStorageNameFromType';import { ShowAzureBlobStorageComponent } from './storages/ShowAzureBlobStorageComponent';import { ShowFTPStorageComponent } from './storages/ShowFTPStorageComponent';import { ShowGoogleDriveStorageComponent } from './storages/ShowGoogleDriveStorageComponent';@@ -14,20 +15,18 @@ interface Props {}export function ShowStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+if (!storage) return null;return (<div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Type</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.type')}</div>- {getStorageNameFromType(storage.type)}+ {t(STORAGE_TYPE_LABEL_KEYS[storage.type])}- <img- src={getStorageLogoFromType(storage.type)}- alt="storageIcon"- className="ml-1 h-4 w-4"- />+ <img src={getStorageLogoFromType(storage.type)} alt="" className="ml-1 h-4 w-4" /></div><div>diff --git a/frontend/src/features/storages/ui/show/storages/ShowAzureBlobStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowAzureBlobStorageComponent.tsxindex 58d5dfab..b249c6e2 100644--- a/frontend/src/features/storages/ui/show/storages/ShowAzureBlobStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowAzureBlobStorageComponent.tsx@@ -1,22 +1,26 @@-import type { Storage } from '../../../../../entity/storages';+import { useTranslation } from 'react-i18next';++import { AZURE_BLOB_AUTH_METHOD_LABEL_KEYS, type Storage } from '../../../../../entity/storages';interface Props {storage: Storage;}export function ShowAzureBlobStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Auth method</div>- {storage?.azureBlobStorage?.authMethod === 'CONNECTION_STRING'- ? 'Connection string'- : 'Account key'}+ <div className="min-w-[110px] pr-2">{t('storages.fields.authMethod')}</div>+ {t(+ AZURE_BLOB_AUTH_METHOD_LABEL_KEYS[storage?.azureBlobStorage?.authMethod ?? 'ACCOUNT_KEY'],+ )}</div>{storage?.azureBlobStorage?.authMethod === 'CONNECTION_STRING' && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Connection string</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.connectionString')}</div>{'*************'}</div>)}@@ -24,30 +28,30 @@ export function ShowAzureBlobStorageComponent({ storage }: Props) {{storage?.azureBlobStorage?.authMethod === 'ACCOUNT_KEY' && (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Account name</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.accountName')}</div>{storage?.azureBlobStorage?.accountName || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Account key</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.accountKey')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Endpoint</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.endpoint')}</div>{storage?.azureBlobStorage?.endpoint || '-'}</div></>)}<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Container name</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.containerName')}</div>{storage?.azureBlobStorage?.containerName || '-'}</div>{storage?.azureBlobStorage?.prefix && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Prefix</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.prefix')}</div>{storage.azureBlobStorage.prefix}</div>)}diff --git a/frontend/src/features/storages/ui/show/storages/ShowFTPStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowFTPStorageComponent.tsxindex 67ca36d1..9faa513f 100644--- a/frontend/src/features/storages/ui/show/storages/ShowFTPStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowFTPStorageComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Storage } from '../../../../../entity/storages';interface Props {@@ -5,42 +7,44 @@ interface Props {}export function ShowFTPStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Host</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.host')}</div>{storage?.ftpStorage?.host || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Port</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.port')}</div>{storage?.ftpStorage?.port || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Username</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.username')}</div>{storage?.ftpStorage?.username || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Password</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.password')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Path</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.path')}</div>{storage?.ftpStorage?.path || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Use SSL/TLS</div>- {storage?.ftpStorage?.useSsl ? 'Yes' : 'No'}+ <div className="min-w-[110px] pr-2">{t('storages.fields.useSslTls')}</div>+ {storage?.ftpStorage?.useSsl ? t('common.answers.yes') : t('common.answers.no')}</div>{storage?.ftpStorage?.useSsl && storage?.ftpStorage?.skipTlsVerify && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Skip TLS</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('storages.fields.skipTls')}</div>+ {t('common.states.enabled')}</div>)}</>diff --git a/frontend/src/features/storages/ui/show/storages/ShowGoogleDriveStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowGoogleDriveStorageComponent.tsxindex 66617d20..c67a40fa 100644--- a/frontend/src/features/storages/ui/show/storages/ShowGoogleDriveStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowGoogleDriveStorageComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Storage } from '../../../../../entity/storages';interface Props {@@ -5,22 +7,24 @@ interface Props {}export function ShowGoogleDriveStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Client ID</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.clientId')}</div>{storage?.googleDriveStorage?.clientId? `${storage?.googleDriveStorage?.clientId.slice(0, 10)}***`: '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Client Secret</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.clientSecret')}</div>{`*************`}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">User Token</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.userToken')}</div>{`*************`}</div></>diff --git a/frontend/src/features/storages/ui/show/storages/ShowNASStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowNASStorageComponent.tsxindex faae8b20..076d5501 100644--- a/frontend/src/features/storages/ui/show/storages/ShowNASStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowNASStorageComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Storage } from '../../../../../entity/storages';interface Props {@@ -5,45 +7,47 @@ interface Props {}export function ShowNASStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Host</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.host')}</div>{storage?.nasStorage?.host || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Port</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.port')}</div>{storage?.nasStorage?.port || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Share</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.share')}</div>{storage?.nasStorage?.share || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Username</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.username')}</div>{storage?.nasStorage?.username || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Password</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.password')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Use SSL</div>- {storage?.nasStorage?.useSsl ? 'Yes' : 'No'}+ <div className="min-w-[110px] pr-2">{t('storages.fields.useSsl')}</div>+ {storage?.nasStorage?.useSsl ? t('common.answers.yes') : t('common.answers.no')}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Domain</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.domain')}</div>{storage?.nasStorage?.domain || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Path</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.path')}</div>{storage?.nasStorage?.path || '-'}</div></>diff --git a/frontend/src/features/storages/ui/show/storages/ShowRcloneStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowRcloneStorageComponent.tsxindex 12d381ec..dd8c9d90 100644--- a/frontend/src/features/storages/ui/show/storages/ShowRcloneStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowRcloneStorageComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Storage } from '../../../../../entity/storages';interface Props {@@ -5,15 +7,17 @@ interface Props {}export function ShowRcloneStorageComponent({ storage }: Props) {+ const { t } = useTranslation();+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Remote path</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.remotePath')}</div>{storage?.rcloneStorage?.remotePath || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Config</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.config')}</div>{'*************'}</div></>diff --git a/frontend/src/features/storages/ui/show/storages/ShowS3StorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowS3StorageComponent.tsxindex bf51bcab..9db745f0 100644--- a/frontend/src/features/storages/ui/show/storages/ShowS3StorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowS3StorageComponent.tsx@@ -1,63 +1,74 @@-import { S3StorageClass, S3StorageClassLabels, type Storage } from '../../../../../entity/storages';+import { useTranslation } from 'react-i18next';++import {+ S3StorageClass,+ S3_STORAGE_CLASS_LABEL_KEYS,+ type Storage,+} from '../../../../../entity/storages';+import type { TranslationKey } from '../../../../../shared/i18n';interface Props {storage: Storage;}export function ShowS3StorageComponent({ storage }: Props) {+ const { t } = useTranslation();++ const storageClassLabelKey: TranslationKey | undefined =+ S3_STORAGE_CLASS_LABEL_KEYS[storage?.s3Storage?.s3StorageClass as S3StorageClass];+return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">S3 Bucket</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.s3Bucket')}</div>{storage?.s3Storage?.s3Bucket}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Region</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.region')}</div>{storage?.s3Storage?.s3Region || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Access Key</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.accessKey')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Secret Key</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.secretKey')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Endpoint</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.endpoint')}</div>{storage?.s3Storage?.s3Endpoint || '-'}</div>{storage?.s3Storage?.s3Prefix && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Prefix</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.prefix')}</div>{storage.s3Storage.s3Prefix}</div>)}{storage?.s3Storage?.s3UseVirtualHostedStyle && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Virtual Host</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('storages.fields.virtualHost')}</div>+ {t('common.states.enabled')}</div>)}{storage?.s3Storage?.skipTLSVerify && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Skip TLS</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('storages.fields.skipTls')}</div>+ {t('common.states.enabled')}</div>)}{storage?.s3Storage?.s3StorageClass && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Storage Class</div>- {S3StorageClassLabels[storage.s3Storage.s3StorageClass as S3StorageClass] ||- storage.s3Storage.s3StorageClass}+ <div className="min-w-[110px] pr-2">{t('storages.fields.storageClass')}</div>+ {storageClassLabelKey ? t(storageClassLabelKey) : storage.s3Storage.s3StorageClass}</div>)}</>diff --git a/frontend/src/features/storages/ui/show/storages/ShowSFTPStorageComponent.tsx b/frontend/src/features/storages/ui/show/storages/ShowSFTPStorageComponent.tsxindex d61766b3..9249df2d 100644--- a/frontend/src/features/storages/ui/show/storages/ShowSFTPStorageComponent.tsx+++ b/frontend/src/features/storages/ui/show/storages/ShowSFTPStorageComponent.tsx@@ -1,3 +1,5 @@+import { useTranslation } from 'react-i18next';+import type { Storage } from '../../../../../entity/storages';interface Props {@@ -5,44 +7,48 @@ interface Props {}export function ShowSFTPStorageComponent({ storage }: Props) {- const authMethod = storage?.sftpStorage?.privateKey ? 'Private Key' : 'Password';+ const { t } = useTranslation();++ const authMethodLabel = storage?.sftpStorage?.privateKey+ ? t('storages.sftpAuthMethods.privateKey')+ : t('storages.sftpAuthMethods.password');return (<><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Host</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.host')}</div>{storage?.sftpStorage?.host || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Port</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.port')}</div>{storage?.sftpStorage?.port || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Username</div>+ <div className="min-w-[110px] pr-2">{t('common.fields.username')}</div>{storage?.sftpStorage?.username || '-'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Auth Method</div>- {authMethod}+ <div className="min-w-[110px] pr-2">{t('storages.fields.authMethod')}</div>+ {authMethodLabel}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Credentials</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.credentials')}</div>{'*************'}</div><div className="mb-1 flex items-center">- <div className="min-w-[110px]">Path</div>+ <div className="min-w-[110px] pr-2">{t('storages.fields.path')}</div>{storage?.sftpStorage?.path || '-'}</div>{storage?.sftpStorage?.skipHostKeyVerify && (<div className="mb-1 flex items-center">- <div className="min-w-[110px]">Skip host key</div>- Enabled+ <div className="min-w-[110px] pr-2">{t('storages.fields.skipHostKey')}</div>+ {t('common.states.enabled')}</div>)}</>diff --git a/frontend/src/features/users/ui/AdminPasswordComponent.tsx b/frontend/src/features/users/ui/AdminPasswordComponent.tsxindex cf364f12..7c0a035b 100644--- a/frontend/src/features/users/ui/AdminPasswordComponent.tsx+++ b/frontend/src/features/users/ui/AdminPasswordComponent.tsx@@ -1,8 +1,10 @@import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';import { App, Button, Input } from 'antd';import { type JSX, useState } from 'react';+import { useTranslation } from 'react-i18next';import { userApi } from '../../../entity/users';+import { translateApiError } from '../../../shared/i18n';interface AdminPasswordComponentProps {onPasswordSet?: () => void;@@ -11,6 +13,7 @@ interface AdminPasswordComponentProps {export function AdminPasswordComponent({onPasswordSet,}: AdminPasswordComponentProps): JSX.Element {+ const { t } = useTranslation();const { message } = App.useApp();const [password, setPassword] = useState('');const [passwordVisible, setPasswordVisible] = useState(false);@@ -22,7 +25,7 @@ export function AdminPasswordComponent({const [passwordError, setPasswordError] = useState(false);const [confirmPasswordError, setConfirmPasswordError] = useState(false);- const [adminPasswordError, setAdminPasswordError] = useState('');+ const [adminPasswordError, setAdminPasswordError] = useState<unknown>();const validateFields = (): boolean => {if (!password) {@@ -32,7 +35,7 @@ export function AdminPasswordComponent({if (password.length < 8) {setPasswordError(true);- message.error('Password must be at least 8 characters long');+ message.error(t('users.validation.passwordTooShort', { minLength: 8 }));return false;}setPasswordError(false);@@ -51,7 +54,7 @@ export function AdminPasswordComponent({};const onSetPassword = async () => {- setAdminPasswordError('');+ setAdminPasswordError(undefined);if (validateFields()) {setLoading(true);@@ -63,6 +66,7 @@ export function AdminPasswordComponent({// Automatically sign in as admin after setting passwordawait userApi.signIn({+ // eslint-disable-next-line i18next/no-literal-string -- login of the built-in admin accountemail: 'admin',password,});@@ -70,7 +74,7 @@ export function AdminPasswordComponent({// Notify parent component that password was set successfullyonPasswordSet?.();} catch (e) {- setAdminPasswordError((e as Error).message);+ setAdminPasswordError(e);}}@@ -79,16 +83,16 @@ export function AdminPasswordComponent({return (<div className="w-full max-w-[300px]">- <div className="mb-5 text-center text-2xl font-bold">Sign up admin</div>+ <div className="mb-5 text-center text-2xl font-bold">{t('users.adminPassword.title')}</div><div className="mx-auto mb-4 max-w-[250px] text-center text-sm text-gray-600 dark:text-gray-400">- Then you will be able to sign in with login "admin" and password you set+ {t('users.adminPassword.description')}</div>- <div className="my-1 text-xs font-semibold">Email</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.email')}</div><Input value="admin" disabled />- <div className="my-1 text-xs font-semibold">Password</div>+ <div className="my-1 text-xs font-semibold">{t('common.fields.password')}</div><Input.Passwordplaceholder="********"value={password}@@ -102,7 +106,7 @@ export function AdminPasswordComponent({autoComplete="new-password"/>- <div className="my-1 text-xs font-semibold">Confirm password</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.confirmPassword')}</div><Input.Passwordplaceholder="********"value={confirmPassword}@@ -130,12 +134,12 @@ export function AdminPasswordComponent({}}type="primary">- Set password+ {t('users.adminPassword.submit')}</Button>- {adminPasswordError && (+ {adminPasswordError !== undefined && (<div className="mt-3 flex justify-center text-center text-sm text-red-600">- {adminPasswordError}+ {translateApiError(adminPasswordError, t)}</div>)}</div>diff --git a/frontend/src/features/users/ui/AuthNavbarComponent.tsx b/frontend/src/features/users/ui/AuthNavbarComponent.tsxindex b28b3673..17cd48d1 100644--- a/frontend/src/features/users/ui/AuthNavbarComponent.tsx+++ b/frontend/src/features/users/ui/AuthNavbarComponent.tsx@@ -1,23 +1,26 @@-import { SponsorshipLinkComponent } from '../../../shared/ui';+import { useTranslation } from 'react-i18next';++import { getWebsitePageUrl, useLocale } from '../../../shared/i18n';+import { LanguageThemeControlComponent, SponsorshipLinkComponent } from '../../../shared/ui';import { StarButtonComponent } from '../../../shared/ui/StarButtonComponent';-import { ThemeToggleComponent } from '../../../shared/ui/ThemeToggleComponent';export function AuthNavbarComponent() {+ const { t } = useTranslation();+ const { locale } = useLocale();++ const homePageUrl = getWebsitePageUrl('home', locale);+return (<div className="flex h-[65px] items-center justify-center px-5 pt-5 sm:justify-start"><div className="flex items-center gap-3 hover:opacity-80">- <a href="https://databasus.com" target="_blank" rel="noreferrer">+ <a href={homePageUrl} target="_blank" rel="noreferrer"><img className="h-[45px] w-[45px] p-1" src="/logo.svg" /></a><div className="text-xl font-bold">- <a- href="https://databasus.com"- className="!text-blue-600"- target="_blank"- rel="noreferrer"- >- Databasus+ <a href={homePageUrl} className="!text-blue-600" target="_blank" rel="noreferrer">+ {/* eslint-disable-next-line i18next/no-literal-string -- product name, the same in every language */}+ {'Databasus'}</a></div></div>@@ -25,11 +28,11 @@ export function AuthNavbarComponent() {<div className="mr-3 ml-auto hidden items-center gap-5 sm:flex"><aclassName="!text-black hover:opacity-80 dark:!text-gray-200"- href="https://databasus.com/installation"+ href={getWebsitePageUrl('installation', locale)}target="_blank"rel="noreferrer">- Docs+ {t('app.navigation.docs')}</a><a@@ -38,7 +41,7 @@ export function AuthNavbarComponent() {target="_blank"rel="noreferrer">- Community+ {t('app.navigation.community')}</a><SponsorshipLinkComponent className="!text-black hover:opacity-80 dark:!text-gray-200" />@@ -46,7 +49,7 @@ export function AuthNavbarComponent() {<div className="flex items-center gap-2"><StarButtonComponent />- <ThemeToggleComponent />+ <LanguageThemeControlComponent /></div></div></div>diff --git a/frontend/src/features/users/ui/ProfileComponent.tsx b/frontend/src/features/users/ui/ProfileComponent.tsxindex 341cdd4d..d7a5babe 100644--- a/frontend/src/features/users/ui/ProfileComponent.tsx+++ b/frontend/src/features/users/ui/ProfileComponent.tsx@@ -1,30 +1,22 @@import { EyeInvisibleOutlined, EyeTwoTone, LoadingOutlined } from '@ant-design/icons';import { App, Button, Input, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';+import { USER_ROLE_LABEL_KEYS } from '../../../entity/users';import { userApi } from '../../../entity/users/api/userApi';import type { ChangePasswordRequest } from '../../../entity/users/model/ChangePasswordRequest';import type { SignInRequest } from '../../../entity/users/model/SignInRequest';import type { UpdateUserInfoRequest } from '../../../entity/users/model/UpdateUserInfoRequest';import type { UserProfile } from '../../../entity/users/model/UserProfile';-import { UserRole } from '../../../entity/users/model/UserRole';+import { translateApiError } from '../../../shared/i18n';interface Props {contentHeight: number;}-const getRoleDisplayText = (role: UserRole): string => {- switch (role) {- case UserRole.ADMIN:- return 'Admin';- case UserRole.MEMBER:- return 'Member';- default:- return role;- }-};-export function ProfileComponent({ contentHeight }: Props) {+ const { t } = useTranslation();const { message } = App.useApp();const [user, setUser] = useState<UserProfile | undefined>(undefined);const [isChangingPassword, setIsChangingPassword] = useState(false);@@ -59,7 +51,7 @@ export function ProfileComponent({ contentHeight }: Props) {setEditEmail(user.email);}).catch((error) => {- message.error(error.message);+ message.error(translateApiError(error, t));});};@@ -71,7 +63,7 @@ export function ProfileComponent({ contentHeight }: Props) {isValid = false;} else if (newPassword.length < 6) {setNewPasswordError(true);- message.error('Password must be at least 6 characters long');+ message.error(t('users.validation.passwordTooShort', { minLength: 6 }));isValid = false;} else {setNewPasswordError(false);@@ -82,7 +74,7 @@ export function ProfileComponent({ contentHeight }: Props) {isValid = false;} else if (newPassword !== confirmPassword) {setConfirmPasswordError(true);- message.error('New passwords do not match');+ message.error(t('users.profile.changePassword.passwordsDoNotMatch'));isValid = false;} else {setConfirmPasswordError(false);@@ -117,13 +109,9 @@ export function ProfileComponent({ contentHeight }: Props) {password: newPassword,};await userApi.signIn(signInRequest);- message.success('Successfully signed in with new password');+ message.success(t('users.profile.changePassword.signedInWithNewPassword'));} catch (signInError: unknown) {- const errorMessage =- signInError instanceof Error- ? signInError.message- : 'Failed to sign in with new password';- message.error(errorMessage);+ message.error(translateApiError(signInError, t));// If sign in fails, logout and redirect to login pageuserApi.logout();userApi.notifyAuthListeners();@@ -131,8 +119,7 @@ export function ProfileComponent({ contentHeight }: Props) {}}} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to change password';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsChangingPassword(false);}@@ -142,7 +129,7 @@ export function ProfileComponent({ contentHeight }: Props) {// Validate nameif (!editName || editName.trim() === '') {setEditNameError(true);- message.error('Name is required');+ message.error(t('users.validation.nameRequired'));return;}setEditNameError(false);@@ -151,7 +138,7 @@ export function ProfileComponent({ contentHeight }: Props) {if (user?.email !== 'admin') {if (!editEmail || editEmail.trim() === '') {setEditEmailError(true);- message.error('Email is required');+ message.error(t('users.validation.emailRequired'));return;}setEditEmailError(false);@@ -173,19 +160,18 @@ export function ProfileComponent({ contentHeight }: Props) {// If nothing changed, just show a messageif (Object.keys(request).length === 0) {- message.info('No changes to save');+ message.info(t('users.profile.noChanges'));setIsUpdatingProfile(false);return;}await userApi.updateUserInfo(request);- message.success('Profile updated successfully');+ message.success(t('users.profile.updated'));// Reload user profileloadUserProfile();} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to update profile';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsUpdatingProfile(false);}@@ -203,20 +189,24 @@ export function ProfileComponent({ contentHeight }: Props) {className="grow overflow-y-auto rounded bg-white p-5 shadow dark:bg-gray-800"style={{ height: contentHeight }}>- <h1 className="text-2xl font-bold dark:text-white">Profile</h1>+ <h1 className="text-2xl font-bold dark:text-white">{t('users.profile.title')}</h1><div className="mt-5">{user ? (<><div className="mb-6"><h3 className="mb-4 text-lg font-semibold dark:text-white">- Profile Information+ {t('users.profile.information')}</h3><div className="max-w-md">- <div className="text-xs font-semibold dark:text-gray-200">User ID</div>+ <div className="text-xs font-semibold dark:text-gray-200">+ {t('users.profile.userId')}+ </div><div className="mb-4 text-sm text-gray-600 dark:text-gray-400">{user.id}</div>- <div className="mb-1 text-xs font-semibold dark:text-gray-200">Name</div>+ <div className="mb-1 text-xs font-semibold dark:text-gray-200">+ {t('users.fields.name')}+ </div><Inputvalue={editName}onChange={(e) => {@@ -224,11 +214,13 @@ export function ProfileComponent({ contentHeight }: Props) {setEditName(e.currentTarget.value);}}status={editNameError ? 'error' : undefined}- placeholder="Enter your name"+ placeholder={t('users.profile.namePlaceholder')}className="mb-4"/>- <div className="mt-2 mb-1 text-xs font-semibold dark:text-gray-200">Email</div>+ <div className="mt-2 mb-1 text-xs font-semibold dark:text-gray-200">+ {t('users.fields.email')}+ </div><Inputvalue={editEmail}onChange={(e) => {@@ -236,21 +228,23 @@ export function ProfileComponent({ contentHeight }: Props) {setEditEmail(e.currentTarget.value.trim().toLowerCase());}}status={editEmailError ? 'error' : undefined}- placeholder="Enter your email"+ placeholder={t('users.profile.emailPlaceholder')}type="email"className="mb-4"disabled={user.email === 'admin'}/>{user.email === 'admin' && (<div className="mb-4 text-xs text-gray-500 dark:text-gray-400">- Admin email cannot be changed+ {t('users.profile.adminEmailReadOnly')}</div>)}- <div className="mt-2 mb-1 text-xs font-semibold dark:text-gray-200">Role</div>+ <div className="mt-2 mb-1 text-xs font-semibold dark:text-gray-200">+ {t('users.profile.role')}+ </div><div className="mb-4"><span className="inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200">- {getRoleDisplayText(user.role)}+ {t(USER_ROLE_LABEL_KEYS[user.role])}</span></div>@@ -262,7 +256,7 @@ export function ProfileComponent({ contentHeight }: Props) {disabled={isUpdatingProfile}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- Save changes+ {t('users.profile.saveChanges')}</Button>)}</div>@@ -270,19 +264,21 @@ export function ProfileComponent({ contentHeight }: Props) {<div className="mb-8"><Button type="primary" ghost onClick={handleLogout} danger>- Logout+ {t('users.profile.logout')}</Button></div><div className="max-w-xs">- <h3 className="mb-4 text-lg font-semibold dark:text-white">Change Password</h3>+ <h3 className="mb-4 text-lg font-semibold dark:text-white">+ {t('users.profile.changePassword.title')}+ </h3><div className="max-w-sm"><div className="my-1 text-xs font-semibold dark:text-gray-200">- New Password+ {t('users.fields.newPassword')}</div><Input.Password- placeholder="Enter new password"+ placeholder={t('users.profile.changePassword.newPasswordPlaceholder')}value={newPassword}onChange={(e) => {setNewPasswordError(false);@@ -300,10 +296,10 @@ export function ProfileComponent({ contentHeight }: Props) {/><div className="mt-2 mb-1 text-xs font-semibold dark:text-gray-200">- Confirm New Password+ {t('users.profile.changePassword.confirmPassword')}</div><Input.Password- placeholder="Confirm new password"+ placeholder={t('users.profile.changePassword.confirmPasswordPlaceholder')}value={confirmPassword}onChange={(e) => {setConfirmPasswordError(false);@@ -330,7 +326,9 @@ export function ProfileComponent({ contentHeight }: Props) {disabled={isChangingPassword}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- {isChangingPassword ? 'Changing password...' : 'Change password'}+ {isChangingPassword+ ? t('users.profile.changePassword.changing')+ : t('users.profile.changePassword.submit')}</Button>)}</div>diff --git a/frontend/src/features/users/ui/RequestResetPasswordComponent.tsx b/frontend/src/features/users/ui/RequestResetPasswordComponent.tsxindex 2e7cc77c..43b4089f 100644--- a/frontend/src/features/users/ui/RequestResetPasswordComponent.tsx+++ b/frontend/src/features/users/ui/RequestResetPasswordComponent.tsx@@ -1,10 +1,11 @@import { Button, Input } from 'antd';import { type JSX, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { useCloudflareTurnstile } from '../../../shared/hooks/useCloudflareTurnstile';import { userApi } from '../../../entity/users';-import { StringUtils } from '../../../shared/lib';+import { translateApiError } from '../../../shared/i18n';import { FormValidator } from '../../../shared/lib/FormValidator';import { CloudflareTurnstileWidget } from '../../../shared/ui/CloudflareTurnstileWidget';@@ -17,11 +18,12 @@ export function RequestResetPasswordComponent({onSwitchToSignIn,onSwitchToResetPassword,}: RequestResetPasswordComponentProps): JSX.Element {+ const { t } = useTranslation();const [email, setEmail] = useState('');const [isLoading, setLoading] = useState(false);const [isEmailError, setEmailError] = useState(false);- const [error, setError] = useState('');- const [successMessage, setSuccessMessage] = useState('');+ const [sendCodeError, setSendCodeError] = useState<unknown>();+ const [isCodeSent, setIsCodeSent] = useState(false);const { token, containerRef, resetCloudflareTurnstile } = useCloudflareTurnstile();@@ -40,18 +42,18 @@ export function RequestResetPasswordComponent({};const onSendCode = async () => {- setError('');- setSuccessMessage('');+ setSendCodeError(undefined);+ setIsCodeSent(false);if (validateEmail()) {setLoading(true);try {- const response = await userApi.sendResetPasswordCode({+ await userApi.sendResetPasswordCode({email,cloudflareTurnstileToken: token,});- setSuccessMessage(response.message);+ setIsCodeSent(true);// After successful code send, switch to reset password formsetTimeout(() => {@@ -60,7 +62,7 @@ export function RequestResetPasswordComponent({}}, 2000);} catch (e) {- setError(StringUtils.capitalizeFirstLetter((e as Error).message));+ setSendCodeError(e);resetCloudflareTurnstile();}@@ -70,13 +72,15 @@ export function RequestResetPasswordComponent({return (<div className="w-full max-w-[300px]">- <div className="mb-5 text-center text-2xl font-bold">Reset password</div>+ <div className="mb-5 text-center text-2xl font-bold">+ {t('users.requestPasswordReset.title')}+ </div><div className="mb-4 text-center text-sm text-gray-600 dark:text-gray-400">- Enter your email address and we'll send you a reset code.+ {t('users.requestPasswordReset.description')}</div>- <div className="my-1 text-xs font-semibold">Your email</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.yourEmail')}</div><Inputplaceholder="[email protected]"value={email}@@ -104,29 +108,35 @@ export function RequestResetPasswordComponent({}}type="primary">- Send reset code+ {t('users.requestPasswordReset.submit')}</Button>- {error && (- <div className="mt-3 flex justify-center text-center text-sm text-red-600">{error}</div>+ {sendCodeError !== undefined && (+ <div className="mt-3 flex justify-center text-center text-sm text-red-600">+ {translateApiError(sendCodeError, t)}+ </div>)}- {successMessage && (+ {isCodeSent && (<div className="mt-3 flex justify-center text-center text-sm text-green-600">- {successMessage}+ {t('users.requestPasswordReset.codeSent')}</div>)}{onSwitchToSignIn && (<div className="mt-4 text-center text-sm text-gray-600 dark:text-gray-400">- Remember your password?{' '}- <button- type="button"- onClick={onSwitchToSignIn}- className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"- >- Sign in- </button>+ <Trans+ i18nKey="users.requestPasswordReset.rememberPassword"+ components={{+ signInLink: (+ <button+ type="button"+ onClick={onSwitchToSignIn}+ className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"+ />+ ),+ }}+ /></div>)}</div>diff --git a/frontend/src/features/users/ui/ResetPasswordComponent.tsx b/frontend/src/features/users/ui/ResetPasswordComponent.tsxindex 88cfdac1..1635b935 100644--- a/frontend/src/features/users/ui/ResetPasswordComponent.tsx+++ b/frontend/src/features/users/ui/ResetPasswordComponent.tsx@@ -1,9 +1,10 @@import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';import { App, Button, Input } from 'antd';import { type JSX, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { userApi } from '../../../entity/users';-import { StringUtils } from '../../../shared/lib';+import { translateApiError } from '../../../shared/i18n';import { FormValidator } from '../../../shared/lib/FormValidator';interface ResetPasswordComponentProps {@@ -17,6 +18,7 @@ export function ResetPasswordComponent({onSwitchToRequestCode,initialEmail = '',}: ResetPasswordComponentProps): JSX.Element {+ const { t } = useTranslation();const { message } = App.useApp();const [email, setEmail] = useState(initialEmail);const [code, setCode] = useState('');@@ -32,7 +34,7 @@ export function ResetPasswordComponent({const [passwordError, setPasswordError] = useState(false);const [confirmPasswordError, setConfirmPasswordError] = useState(false);- const [error, setError] = useState('');+ const [resetError, setResetError] = useState<unknown>();const validateFields = (): boolean => {let isValid = true;@@ -52,7 +54,7 @@ export function ResetPasswordComponent({isValid = false;} else if (!/^\d{6}$/.test(code)) {setCodeError(true);- message.error('Code must be 6 digits');+ message.error(t('users.resetPassword.invalidCode'));isValid = false;} else {setCodeError(false);@@ -63,7 +65,7 @@ export function ResetPasswordComponent({isValid = false;} else if (newPassword.length < 8) {setPasswordError(true);- message.error('Password must be at least 8 characters long');+ message.error(t('users.validation.passwordTooShort', { minLength: 8 }));isValid = false;} else {setPasswordError(false);@@ -74,7 +76,7 @@ export function ResetPasswordComponent({isValid = false;} else if (newPassword !== confirmPassword) {setConfirmPasswordError(true);- message.error('Passwords do not match');+ message.error(t('users.validation.passwordsDoNotMatch'));isValid = false;} else {setConfirmPasswordError(false);@@ -84,7 +86,7 @@ export function ResetPasswordComponent({};const onResetPassword = async () => {- setError('');+ setResetError(undefined);if (validateFields()) {setLoading(true);@@ -96,7 +98,7 @@ export function ResetPasswordComponent({newPassword,});- message.success('Password reset successfully! Redirecting to sign in...');+ message.success(t('users.resetPassword.succeeded'));// Redirect to sign in after successful resetsetTimeout(() => {@@ -105,7 +107,7 @@ export function ResetPasswordComponent({}}, 2000);} catch (e) {- setError(StringUtils.capitalizeFirstLetter((e as Error).message));+ setResetError(e);}setLoading(false);@@ -114,13 +116,13 @@ export function ResetPasswordComponent({return (<div className="w-full max-w-[300px]">- <div className="mb-5 text-center text-2xl font-bold">Reset Password</div>+ <div className="mb-5 text-center text-2xl font-bold">{t('users.resetPassword.title')}</div><div className="mb-4 text-center text-sm text-gray-600 dark:text-gray-400">- Enter the code sent to your email and your new password.+ {t('users.resetPassword.description')}</div>- <div className="my-1 text-xs font-semibold">Your email</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.yourEmail')}</div><Inputplaceholder="[email protected]"value={email}@@ -132,7 +134,7 @@ export function ResetPasswordComponent({type="email"/>- <div className="my-1 text-xs font-semibold">Reset Code</div>+ <div className="my-1 text-xs font-semibold">{t('users.resetPassword.code')}</div><Inputplaceholder="123456"value={code}@@ -145,7 +147,7 @@ export function ResetPasswordComponent({maxLength={6}/>- <div className="my-1 text-xs font-semibold">New Password</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.newPassword')}</div><Input.Passwordplaceholder="********"value={newPassword}@@ -158,7 +160,7 @@ export function ResetPasswordComponent({visibilityToggle={{ visible: passwordVisible, onVisibleChange: setPasswordVisible }}/>- <div className="my-1 text-xs font-semibold">Confirm Password</div>+ <div className="my-1 text-xs font-semibold">{t('users.resetPassword.confirmPassword')}</div><Input.Passwordplaceholder="********"value={confirmPassword}@@ -185,24 +187,30 @@ export function ResetPasswordComponent({}}type="primary">- Reset password+ {t('users.resetPassword.submit')}</Button>- {error && (- <div className="mt-3 flex justify-center text-center text-sm text-red-600">{error}</div>+ {resetError !== undefined && (+ <div className="mt-3 flex justify-center text-center text-sm text-red-600">+ {translateApiError(resetError, t)}+ </div>)}<div className="mt-4 text-center text-sm text-gray-600 dark:text-gray-400">{onSwitchToRequestCode && (<>- Didn't receive a code?{' '}- <button- type="button"- onClick={onSwitchToRequestCode}- className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"- >- Request new code- </button>+ <Trans+ i18nKey="users.resetPassword.noCode"+ components={{+ requestCodeLink: (+ <button+ type="button"+ onClick={onSwitchToRequestCode}+ className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"+ />+ ),+ }}+ /><br /></>)}@@ -212,7 +220,7 @@ export function ResetPasswordComponent({onClick={onSwitchToSignIn}className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500">- Back to sign in+ {t('users.resetPassword.backToSignIn')}</button>)}</div>diff --git a/frontend/src/features/users/ui/SignInComponent.tsx b/frontend/src/features/users/ui/SignInComponent.tsxindex 777a7b5a..d51555fd 100644--- a/frontend/src/features/users/ui/SignInComponent.tsx+++ b/frontend/src/features/users/ui/SignInComponent.tsx@@ -1,6 +1,7 @@import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';import { Button, Input } from 'antd';import { type JSX, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { useCloudflareTurnstile } from '../../../shared/hooks/useCloudflareTurnstile';@@ -11,7 +12,7 @@ import {IS_EMAIL_CONFIGURED,} from '../../../constants';import { userApi } from '../../../entity/users';-import { StringUtils } from '../../../shared/lib';+import { translateApiError } from '../../../shared/i18n';import { FormValidator } from '../../../shared/lib/FormValidator';import { CloudflareTurnstileWidget } from '../../../shared/ui/CloudflareTurnstileWidget';import { GithubOAuthComponent } from './oauth/GithubOAuthComponent';@@ -26,6 +27,7 @@ export function SignInComponent({onSwitchToSignUp,onSwitchToResetPassword,}: SignInComponentProps): JSX.Element {+ const { t } = useTranslation();const [email, setEmail] = useState('');const [password, setPassword] = useState('');const [passwordVisible, setPasswordVisible] = useState(false);@@ -35,7 +37,7 @@ export function SignInComponent({const [isEmailError, setEmailError] = useState(false);const [passwordError, setPasswordError] = useState(false);- const [signInError, setSignInError] = useState('');+ const [signInError, setSignInError] = useState<unknown>();const { token, containerRef, resetCloudflareTurnstile } = useCloudflareTurnstile();@@ -60,7 +62,7 @@ export function SignInComponent({};const onSignIn = async () => {- setSignInError('');+ setSignInError(undefined);if (validateFieldsForSignIn()) {setLoading(true);@@ -72,7 +74,7 @@ export function SignInComponent({cloudflareTurnstileToken: token,});} catch (e) {- setSignInError(StringUtils.capitalizeFirstLetter((e as Error).message));+ setSignInError(e);resetCloudflareTurnstile();}@@ -82,7 +84,7 @@ export function SignInComponent({return (<div className="w-full max-w-[300px]">- <div className="mb-5 text-center text-2xl font-bold">Sign in</div>+ <div className="mb-5 text-center text-2xl font-bold">{t('users.signIn.title')}</div><div className="mt-4"><div className="space-y-2">@@ -98,13 +100,13 @@ export function SignInComponent({</div><div className="relative flex justify-center text-sm"><span className="bg-white px-2 text-gray-500 dark:bg-gray-900 dark:text-gray-400">- or continue+ {t('users.oauth.divider')}</span></div></div>)}- <div className="my-1 text-xs font-semibold">Your email</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.yourEmail')}</div><Inputplaceholder="[email protected]"value={email}@@ -116,7 +118,7 @@ export function SignInComponent({type="email"/>- <div className="my-1 text-xs font-semibold">Password</div>+ <div className="my-1 text-xs font-semibold">{t('common.fields.password')}</div><Input.Passwordplaceholder="********"value={password}@@ -142,24 +144,28 @@ export function SignInComponent({}}type="primary">- Sign in+ {t('users.signIn.submit')}</Button>- {signInError && (+ {signInError !== undefined && (<div className="mt-3 flex justify-center text-center text-sm text-red-600">- {signInError}+ {translateApiError(signInError, t)}</div>)}<div className="mt-4 text-center text-sm text-gray-600 dark:text-gray-400">- Don't have an account?{' '}- <button- type="button"- onClick={onSwitchToSignUp}- className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"- >- Sign up- </button>+ <Trans+ i18nKey="users.signIn.noAccount"+ components={{+ signUpLink: (+ <button+ type="button"+ onClick={onSwitchToSignUp}+ className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"+ />+ ),+ }}+ /><br />{IS_EMAIL_CONFIGURED && (<button@@ -167,7 +173,7 @@ export function SignInComponent({onClick={onSwitchToResetPassword}className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500">- Forgot password?+ {t('users.signIn.forgotPassword')}</button>)}</div>diff --git a/frontend/src/features/users/ui/SignUpComponent.tsx b/frontend/src/features/users/ui/SignUpComponent.tsxindex 34d71e1f..04f53c67 100644--- a/frontend/src/features/users/ui/SignUpComponent.tsx+++ b/frontend/src/features/users/ui/SignUpComponent.tsx@@ -1,6 +1,7 @@import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';import { App, Button, Input } from 'antd';import { type JSX, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { useCloudflareTurnstile } from '../../../shared/hooks/useCloudflareTurnstile';@@ -10,7 +11,7 @@ import {GOOGLE_CLIENT_ID,} from '../../../constants';import { userApi } from '../../../entity/users';-import { StringUtils } from '../../../shared/lib';+import { translateApiError } from '../../../shared/i18n';import { FormValidator } from '../../../shared/lib/FormValidator';import { CloudflareTurnstileWidget } from '../../../shared/ui/CloudflareTurnstileWidget';import { GithubOAuthComponent } from './oauth/GithubOAuthComponent';@@ -21,6 +22,7 @@ interface SignUpComponentProps {}export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSX.Element {+ const { t } = useTranslation();const { message } = App.useApp();const [name, setName] = useState('');const [email, setEmail] = useState('');@@ -36,14 +38,14 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXconst [passwordError, setPasswordError] = useState(false);const [confirmPasswordError, setConfirmPasswordError] = useState(false);- const [signUpError, setSignUpError] = useState('');+ const [signUpError, setSignUpError] = useState<unknown>();const { token, containerRef, resetCloudflareTurnstile } = useCloudflareTurnstile();const validateFieldsForSignUp = (): boolean => {if (!name || name.trim() === '') {setNameError(true);- message.error('Name is required');+ message.error(t('users.validation.nameRequired'));return false;}setNameError(false);@@ -65,7 +67,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXif (password.length < 8) {setPasswordError(true);- message.error('Password must be at least 8 characters long');+ message.error(t('users.validation.passwordTooShort', { minLength: 8 }));return false;}setPasswordError(false);@@ -84,7 +86,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSX};const onSignUp = async () => {- setSignUpError('');+ setSignUpError(undefined);if (validateFieldsForSignUp()) {setLoading(true);@@ -97,7 +99,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXcloudflareTurnstileToken: token,});} catch (e) {- setSignUpError(StringUtils.capitalizeFirstLetter((e as Error).message));+ setSignUpError(e);resetCloudflareTurnstile();}}@@ -107,7 +109,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXreturn (<div className="w-full max-w-[300px]">- <div className="mb-5 text-center text-2xl font-bold">Sign up</div>+ <div className="mb-5 text-center text-2xl font-bold">{t('users.signUp.title')}</div><div className="mt-4"><div className="space-y-2">@@ -123,15 +125,15 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSX</div><div className="relative flex justify-center text-sm"><span className="bg-white px-2 text-gray-500 dark:bg-gray-900 dark:text-gray-400">- or continue+ {t('users.oauth.divider')}</span></div></div>)}- <div className="my-1 text-xs font-semibold">Your name</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.yourName')}</div><Input- placeholder="John Doe"+ placeholder={t('users.signUp.namePlaceholder')}value={name}onChange={(e) => {setNameError(false);@@ -140,7 +142,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXstatus={nameError ? 'error' : undefined}/>- <div className="my-1 text-xs font-semibold">Your email</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.yourEmail')}</div><Inputplaceholder="[email protected]"value={email}@@ -152,7 +154,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXtype="email"/>- <div className="my-1 text-xs font-semibold">Password</div>+ <div className="my-1 text-xs font-semibold">{t('common.fields.password')}</div><Input.Passwordplaceholder="********"value={password}@@ -165,7 +167,7 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSXvisibilityToggle={{ visible: passwordVisible, onVisibleChange: setPasswordVisible }}/>- <div className="my-1 text-xs font-semibold">Confirm password</div>+ <div className="my-1 text-xs font-semibold">{t('users.fields.confirmPassword')}</div><Input.Passwordplaceholder="********"value={confirmPassword}@@ -194,25 +196,29 @@ export function SignUpComponent({ onSwitchToSignIn }: SignUpComponentProps): JSX}}type="primary">- Sign up+ {t('users.signUp.submit')}</Button>- {signUpError && (+ {signUpError !== undefined && (<div className="mt-3 flex justify-center text-center text-sm text-red-600">- {signUpError}+ {translateApiError(signUpError, t)}</div>)}{onSwitchToSignIn && (<div className="mt-4 text-center text-sm text-gray-600 dark:text-gray-400">- Already have an account?{' '}- <button- type="button"- onClick={onSwitchToSignIn}- className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"- >- Sign in- </button>+ <Trans+ i18nKey="users.signUp.hasAccount"+ components={{+ signInLink: (+ <button+ type="button"+ onClick={onSwitchToSignIn}+ className="cursor-pointer font-medium text-blue-600 hover:text-blue-700 dark:!text-blue-500"+ />+ ),+ }}+ /></div>)}diff --git a/frontend/src/features/users/ui/UserAuditLogsSidebarComponent.tsx b/frontend/src/features/users/ui/UserAuditLogsSidebarComponent.tsxindex aabf195c..da3a92b5 100644--- a/frontend/src/features/users/ui/UserAuditLogsSidebarComponent.tsx+++ b/frontend/src/features/users/ui/UserAuditLogsSidebarComponent.tsx@@ -3,11 +3,13 @@ import { App, Spin, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';import { useCallback, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import { auditLogApi } from '../../../entity/audit-logs/api/auditLogApi';import type { AuditLog } from '../../../entity/audit-logs/model/AuditLog';import type { GetAuditLogsRequest } from '../../../entity/audit-logs/model/GetAuditLogsRequest';import type { UserProfile } from '../../../entity/users/model/UserProfile';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserTimeFormat } from '../../../shared/time';interface Props {@@ -15,6 +17,8 @@ interface Props {}export function UserAuditLogsSidebarComponent({ user }: Props) {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const [auditLogs, setAuditLogs] = useState<AuditLog[]>([]);const [isLoading, setIsLoading] = useState(true);@@ -86,8 +90,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {setTotal(response.total);setHasMore(response.auditLogs.length === pageSize);} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to load audit logs';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {loadingRef.current = false;setIsLoading(false);@@ -97,7 +100,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {const columns: ColumnsType<AuditLog> = [{- title: 'Message',+ title: t('auditLogs.columns.message'),dataIndex: 'message',key: 'message',width: 350,@@ -106,7 +109,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {),},{- title: 'Workspace',+ title: t('auditLogs.columns.workspace'),dataIndex: 'workspaceName',key: 'workspaceName',width: 200,@@ -123,7 +126,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {),},{- title: 'Created',+ title: t('auditLogs.columns.created'),dataIndex: 'createdAt',key: 'createdAt',width: 200,@@ -132,7 +135,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {const timeFormat = getUserTimeFormat();return (<span className="text-xs text-gray-700 dark:text-white">- {`${date.format(timeFormat.format)} (${date.fromNow()})`}+ {`${date.format(timeFormat.format)} (${formatRelativeTime(date)})`}</span>);},@@ -147,7 +150,7 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {{isLoading ? (<Spin indicator={<LoadingOutlined spin />} />) : (- `${auditLogs.length} of ${total} logs`+ t('auditLogs.loadedOfTotal', { loaded: auditLogs.length, total }))}</div></div>@@ -171,20 +174,20 @@ export function UserAuditLogsSidebarComponent({ user }: Props) {<div className="flex justify-center py-4"><Spin indicator={<LoadingOutlined spin />} /><span className="ml-2 text-sm text-gray-500 dark:text-gray-400">- Loading more logs...+ {t('auditLogs.loadingMore')}</span></div>)}{!hasMore && auditLogs.length > 0 && (<div className="py-4 text-center text-sm text-gray-500 dark:text-gray-400">- All logs loaded ({total} total)+ {t('auditLogs.allLoaded', { count: total })}</div>)}{!isLoading && auditLogs.length === 0 && (<div className="py-8 text-center text-sm text-gray-500 dark:text-gray-400">- No audit logs found for this user.+ {t('users.auditLogs.empty')}</div>)}</>diff --git a/frontend/src/features/users/ui/UsersComponent.tsx b/frontend/src/features/users/ui/UsersComponent.tsxindex 3e1223dc..23a56666 100644--- a/frontend/src/features/users/ui/UsersComponent.tsx+++ b/frontend/src/features/users/ui/UsersComponent.tsx@@ -3,13 +3,15 @@ import { App, Button, Drawer, Input, Select, Spin, Switch, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';import { useCallback, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';+import { USER_ROLE_LABEL_KEYS, UserRole } from '../../../entity/users';import { userManagementApi } from '../../../entity/users/api/userManagementApi';import type { ChangeUserRoleRequest } from '../../../entity/users/model/ChangeUserRoleRequest';import type { ListUsersRequest } from '../../../entity/users/model/ListUsersRequest';import type { UserProfile } from '../../../entity/users/model/UserProfile';-import { UserRole } from '../../../entity/users/model/UserRole';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserTimeFormat } from '../../../shared/time';import { UserAuditLogsSidebarComponent } from './UserAuditLogsSidebarComponent';@@ -29,6 +31,8 @@ const getRoleColor = (role: UserRole): string => {};export function UsersComponent({ contentHeight }: Props) {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const isMobile = useIsMobile();const [users, setUsers] = useState<UserProfile[]>([]);@@ -123,8 +127,7 @@ export function UsersComponent({ contentHeight }: Props) {setTotal(response.total);setHasMore(response.users.length === pageSize);} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to load users';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {loadingRef.current = false;setIsLoading(false);@@ -142,14 +145,13 @@ export function UsersComponent({ contentHeight }: Props) {try {if (isActive) {await userManagementApi.deactivateUser(userId);- message.success('User deactivated successfully');+ message.success(t('users.list.deactivated'));} else {await userManagementApi.activateUser(userId);- message.success('User activated successfully');+ message.success(t('users.list.activated'));}} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Operation failed';- message.error(errorMessage);+ message.error(translateApiError(error, t));setUsers((prev) =>prev.map((user) => (user.id === userId ? { ...user, isActive: isActive } : user)),@@ -176,10 +178,9 @@ export function UsersComponent({ contentHeight }: Props) {try {const request: ChangeUserRoleRequest = { role: newRole };await userManagementApi.changeUserRole(userId, request);- message.success('User role changed successfully');+ message.success(t('users.list.roleChanged'));} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to change user role';- message.error(errorMessage);+ message.error(translateApiError(error, t));if (originalRole) {setUsers((prev) =>@@ -205,9 +206,14 @@ export function UsersComponent({ contentHeight }: Props) {setSelectedUser(null);};+ const roleOptions = Object.values(UserRole).map((role) => ({+ label: <span style={{ color: getRoleColor(role) }}>{t(USER_ROLE_LABEL_KEYS[role])}</span>,+ value: role,+ }));+const columns: ColumnsType<UserProfile> = [{- title: 'User',+ title: t('users.list.columns.user'),key: 'user',width: 350,render: (_, record: UserProfile) => (@@ -217,7 +223,7 @@ export function UsersComponent({ contentHeight }: Props) {),},{- title: 'System role',+ title: t('users.list.columns.systemRole'),dataIndex: 'role',key: 'role',width: 200,@@ -228,25 +234,16 @@ export function UsersComponent({ contentHeight }: Props) {loading={changingRoleUsers.has(record.id)}disabled={changingRoleUsers.has(record.id)}size="small"- className="w-24"+ className="w-36"style={{color: getRoleColor(role),}}- options={[- {- label: <span style={{ color: getRoleColor(UserRole.ADMIN) }}>Admin</span>,- value: UserRole.ADMIN,- },- {- label: <span style={{ color: getRoleColor(UserRole.MEMBER) }}>Member</span>,- value: UserRole.MEMBER,- },- ]}+ options={roleOptions}/>),},{- title: 'Is active?',+ title: t('users.list.columns.isActive'),dataIndex: 'isActive',key: 'isActive',width: 200,@@ -264,7 +261,7 @@ export function UsersComponent({ contentHeight }: Props) {),},{- title: 'Created',+ title: t('users.list.columns.created'),dataIndex: 'createdAt',key: 'createdAt',width: 300,@@ -274,7 +271,9 @@ export function UsersComponent({ contentHeight }: Props) {return (<div className="text-sm text-gray-600 dark:text-gray-400"><div>{date.format(timeFormat.format)}</div>- <div className="text-xs text-gray-400 dark:text-gray-500">{date.fromNow()}</div>+ <div className="text-xs text-gray-400 dark:text-gray-500">+ {formatRelativeTime(date)}+ </div></div>);},@@ -285,7 +284,7 @@ export function UsersComponent({ contentHeight }: Props) {render: (_, record: UserProfile) => (<div><Button type="primary" ghost size="small" onClick={() => handleRowClick(record)}>- View audit logs+ {t('users.list.viewAuditLogs')}</Button></div>),@@ -308,37 +307,32 @@ export function UsersComponent({ contentHeight }: Props) {</div><div className="text-right text-xs text-gray-500 dark:text-gray-400"><div>{date.format(timeFormat.format)}</div>- <div className="text-gray-400">{date.fromNow()}</div>+ <div className="text-gray-400">{formatRelativeTime(date)}</div></div></div><div className="mb-3 flex items-center justify-between"><div className="flex items-center gap-2">- <span className="text-sm text-gray-600 dark:text-gray-400">Role:</span>+ <span className="text-sm text-gray-600 dark:text-gray-400">+ {t('users.list.roleLabel')}+ </span><Selectvalue={user.role}onChange={(value) => handleRoleChange(user.id, value)}loading={changingRoleUsers.has(user.id)}disabled={changingRoleUsers.has(user.id)}size="small"- className="w-24"+ className="w-36"style={{color: getRoleColor(user.role),}}- options={[- {- label: <span style={{ color: getRoleColor(UserRole.ADMIN) }}>Admin</span>,- value: UserRole.ADMIN,- },- {- label: <span style={{ color: getRoleColor(UserRole.MEMBER) }}>Member</span>,- value: UserRole.MEMBER,- },- ]}+ options={roleOptions}/></div><div className="flex items-center gap-2">- <span className="text-sm text-gray-600 dark:text-gray-400">Active:</span>+ <span className="text-sm text-gray-600 dark:text-gray-400">+ {t('users.list.activeLabel')}+ </span><Switchchecked={user.isActive}onChange={() => handleActivationToggle(user.id, user.isActive)}@@ -359,7 +353,7 @@ export function UsersComponent({ contentHeight }: Props) {onClick={() => handleRowClick(user)}className="w-full">- View audit logs+ {t('users.list.viewAuditLogs')}</Button></div>);@@ -374,15 +368,17 @@ export function UsersComponent({ contentHeight }: Props) {style={{ height: contentHeight }}><div className="mb-4 flex items-center justify-between">- <h1 className="text-2xl font-bold dark:text-white">Databasus users</h1>+ <h1 className="text-2xl font-bold dark:text-white">{t('users.list.title')}</h1><div className="text-sm text-gray-500 dark:text-gray-400">- {isLoading ? 'Loading...' : `${users.length} of ${total} users`}+ {isLoading+ ? t('common.states.loading')+ : t('users.list.loadedOfTotal', { loaded: users.length, total })}</div></div><div className="mb-4"><Input- placeholder="Search by email or name..."+ placeholder={t('users.list.searchPlaceholder')}allowClearvalue={inputValue}onChange={(e) => setInputValue(e.target.value)}@@ -396,7 +392,7 @@ export function UsersComponent({ contentHeight }: Props) {</div>) : users.length === 0 ? (<div className="flex h-32 items-center justify-center text-gray-500 dark:text-gray-400">- No users found.+ {t('users.list.empty')}</div>) : (<>@@ -421,7 +417,7 @@ export function UsersComponent({ contentHeight }: Props) {{!hasMore && users.length > 0 && (<div className="py-4 text-center text-sm text-gray-500 dark:text-gray-400">- All users loaded ({total} total)+ {t('users.list.allLoaded', { count: total })}</div>)}</>@@ -434,7 +430,7 @@ export function UsersComponent({ contentHeight }: Props) {title={<div><div className="text-lg font-semibold text-gray-900 dark:text-white">- User Audit Logs+ {t('users.auditLogs.title')}</div><div className="text-sm text-gray-600 dark:text-gray-400">{selectedUser?.email}</div></div>diff --git a/frontend/src/features/users/ui/oauth/GithubOAuthComponent.tsx b/frontend/src/features/users/ui/oauth/GithubOAuthComponent.tsxindex de95af11..0015eb48 100644--- a/frontend/src/features/users/ui/oauth/GithubOAuthComponent.tsx+++ b/frontend/src/features/users/ui/oauth/GithubOAuthComponent.tsx@@ -1,9 +1,12 @@import { GithubOutlined } from '@ant-design/icons';import { Button, message } from 'antd';+import { useTranslation } from 'react-i18next';import { GITHUB_CLIENT_ID, getOAuthRedirectUri } from '../../../../constants';export function GithubOAuthComponent() {+ const { t } = useTranslation();+if (!GITHUB_CLIENT_ID) {return null;}@@ -25,14 +28,14 @@ export function GithubOAuthComponent() {new URL(githubAuthUrl);window.location.href = githubAuthUrl;} catch (error) {- message.error('Invalid OAuth configuration');+ message.error(t('users.oauth.invalidConfiguration'));console.error('GitHub OAuth URL error:', error);}};return (<Button icon={<GithubOutlined />} onClick={handleGitHubLogin} className="w-full" size="large">- Continue with GitHub+ {t('users.oauth.continueWithGithub')}</Button>);}diff --git a/frontend/src/features/users/ui/oauth/GoogleOAuthComponent.tsx b/frontend/src/features/users/ui/oauth/GoogleOAuthComponent.tsxindex 0ca00479..e118e0d8 100644--- a/frontend/src/features/users/ui/oauth/GoogleOAuthComponent.tsx+++ b/frontend/src/features/users/ui/oauth/GoogleOAuthComponent.tsx@@ -1,9 +1,12 @@import { GoogleOutlined } from '@ant-design/icons';import { Button, message } from 'antd';+import { useTranslation } from 'react-i18next';import { GOOGLE_CLIENT_ID, getOAuthRedirectUri } from '../../../../constants';export function GoogleOAuthComponent() {+ const { t } = useTranslation();+if (!GOOGLE_CLIENT_ID) {return null;}@@ -26,14 +29,14 @@ export function GoogleOAuthComponent() {new URL(googleAuthUrl);window.location.href = googleAuthUrl;} catch (error) {- message.error('Invalid OAuth configuration');+ message.error(t('users.oauth.invalidConfiguration'));console.error('Google OAuth URL error:', error);}};return (<Button icon={<GoogleOutlined />} onClick={handleGoogleLogin} className="w-full" size="large">- Continue with Google+ {t('users.oauth.continueWithGoogle')}</Button>);}diff --git a/frontend/src/features/verification/agents/lib/verificationAgentCommands.ts b/frontend/src/features/verification/agents/lib/verificationAgentCommands.tsnew file mode 100644index 00000000..a46782b9--- /dev/null+++ b/frontend/src/features/verification/agents/lib/verificationAgentCommands.ts@@ -0,0 +1,24 @@+/* eslint-disable i18next/no-literal-string -- shell commands and their token placeholder, identical in every language */+export type AgentArchitecture = 'amd64' | 'arm64';++export const TOKEN_PLACEHOLDER = '<YOUR_AGENT_TOKEN>';++export const buildInstallCommand = (arch: AgentArchitecture): string => {+ const host = window.location.origin;+ return `curl -L -o verification-agent "${host}/api/v1/system/verification-agent?arch=${arch}" && chmod +x verification-agent`;+};++export const buildLaunchCommand = (agentId: string, token: string): string => {+ const host = window.location.origin;++ return [+ './verification-agent start \\',+ ` --databasus-host=${host} \\`,+ ` --agent-id=${agentId} \\`,+ ` --token=${token} \\`,+ ' --max-cpu=2 \\',+ ' --max-ram-mb=2048 \\',+ ' --max-disk-gb=20 \\',+ ' --max-concurrent-jobs=1',+ ].join('\n');+};diff --git a/frontend/src/features/verification/agents/model/agentStatus.ts b/frontend/src/features/verification/agents/model/agentStatus.tsindex b7f4dea3..aa2257bb 100644--- a/frontend/src/features/verification/agents/model/agentStatus.ts+++ b/frontend/src/features/verification/agents/model/agentStatus.ts@@ -1,4 +1,7 @@-// Thresholds for translating last_seen_at into a status badge.+import type { TagProps } from 'antd';++import type { TranslationKey } from '../../../../shared/i18n';+// Agents are expected to heartbeat every 30 seconds; the 15-second list poll on// the page gives a snappy transition between Online and Stale.const ONLINE_WINDOW_MS = 90 * 1000;@@ -18,16 +21,16 @@ export const getAgentStatus = (return 'offline';};-export const AGENT_STATUS_COLORS: Record<AgentStatus, string> = {+export const AGENT_STATUS_COLORS: Record<AgentStatus, TagProps['color']> = {'never-seen': 'default',online: 'green',stale: 'orange',offline: 'red',};-export const AGENT_STATUS_LABELS: Record<AgentStatus, string> = {- 'never-seen': 'Never seen',- online: 'Online',- stale: 'Stale',- offline: 'Offline',+export const AGENT_STATUS_LABEL_KEYS: Record<AgentStatus, TranslationKey> = {+ 'never-seen': 'status.agent.neverSeen',+ online: 'status.agent.online',+ stale: 'status.agent.stale',+ offline: 'status.agent.offline',};diff --git a/frontend/src/features/verification/agents/ui/VerificationAgentsComponent.tsx b/frontend/src/features/verification/agents/ui/VerificationAgentsComponent.tsxindex 9e2198a7..7e4905bf 100644--- a/frontend/src/features/verification/agents/ui/VerificationAgentsComponent.tsx+++ b/frontend/src/features/verification/agents/ui/VerificationAgentsComponent.tsx@@ -8,62 +8,59 @@ import {} from '@ant-design/icons';import { App, Button, Input, Modal, Popconfirm, Spin, Table, Tag, Tooltip } from 'antd';import type { ColumnsType } from 'antd/es/table';-import dayjs from 'dayjs';import { useCallback, useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import {type VerificationAgent,verificationAgentApi,} from '../../../../entity/verification/agents';+import {+ type LocalizedText,+ getWebsitePageUrl,+ translateApiError,+ translateLocalizedText,+ useLocale,+} from '../../../../shared/i18n';import { ClipboardHelper } from '../../../../shared/lib/ClipboardHelper';-import { AGENT_STATUS_COLORS, AGENT_STATUS_LABELS, getAgentStatus } from '../model/agentStatus';+import { InlineCodeComponent } from '../../../../shared/ui';+import {+ type AgentArchitecture,+ TOKEN_PLACEHOLDER,+ buildInstallCommand,+ buildLaunchCommand,+} from '../lib/verificationAgentCommands';+import { AGENT_STATUS_COLORS, AGENT_STATUS_LABEL_KEYS, getAgentStatus } from '../model/agentStatus';const LIST_REFRESH_MS = 15_000;+// eslint-disable-next-line i18next/no-literal-string -- Tailwind classesconst MUTED_TEXT_CLASS = 'text-gray-400 dark:text-gray-500';-type AgentArchitecture = 'amd64' | 'arm64';+const getCapacityParts = (agent: VerificationAgent): LocalizedText[] => {+ const parts: LocalizedText[] = [];-const formatCapacity = (agent: VerificationAgent): string => {- if (- agent.maxCpu <= 0 &&- agent.maxRamGb <= 0 &&- agent.maxDiskGb <= 0 &&- agent.maxConcurrentJobs <= 0- ) {- return '';+ if (agent.maxCpu > 0) {+ parts.push({ key: 'verification.agents.capacity.cpu', params: { count: agent.maxCpu } });+ }+ if (agent.maxRamGb > 0) {+ parts.push({ key: 'verification.agents.capacity.ram', params: { count: agent.maxRamGb } });+ }+ if (agent.maxDiskGb > 0) {+ parts.push({ key: 'verification.agents.capacity.disk', params: { count: agent.maxDiskGb } });+ }+ if (agent.maxConcurrentJobs > 0) {+ parts.push({+ key: 'verification.agents.capacity.jobs',+ params: { count: agent.maxConcurrentJobs },+ });}- const parts: string[] = [];- if (agent.maxCpu > 0) parts.push(`${agent.maxCpu} CPU`);- if (agent.maxRamGb > 0) parts.push(`${agent.maxRamGb} GB RAM`);- if (agent.maxDiskGb > 0) parts.push(`${agent.maxDiskGb} GB disk`);- if (agent.maxConcurrentJobs > 0) parts.push(`${agent.maxConcurrentJobs} jobs`);- return parts.join(' · ');-};--const TOKEN_PLACEHOLDER = '<YOUR_AGENT_TOKEN>';--const buildInstallCommand = (arch: AgentArchitecture): string => {- const host = window.location.origin;- return `curl -L -o verification-agent "${host}/api/v1/system/verification-agent?arch=${arch}" && chmod +x verification-agent`;-};--const buildLaunchCommand = (agentId: string, token: string): string => {- const host = window.location.origin;-- return [- './verification-agent start \\',- ` --databasus-host=${host} \\`,- ` --agent-id=${agentId} \\`,- ` --token=${token} \\`,- ' --max-cpu=2 \\',- ' --max-ram-mb=2048 \\',- ' --max-disk-gb=20 \\',- ' --max-concurrent-jobs=1',- ].join('\n');+ return parts;};export const VerificationAgentsComponent = () => {+ const { t } = useTranslation();+ const { locale, formatRelativeTime } = useLocale();const { message } = App.useApp();const [agents, setAgents] = useState<VerificationAgent[]>([]);@@ -89,9 +86,9 @@ export const VerificationAgentsComponent = () => {const copyToClipboard = async (text: string) => {try {await ClipboardHelper.copyToClipboard(text);- message.success('Copied to clipboard');+ message.success(t('common.messages.copiedToClipboard'));} catch {- message.error('Failed to copy');+ message.error(t('verification.agents.copyFailed'));}};@@ -106,7 +103,7 @@ export const VerificationAgentsComponent = () => {<pre className="rounded-md bg-gray-900 p-4 pr-10 font-mono text-sm break-all whitespace-pre-wrap text-gray-100">{code}</pre>- <Tooltip title="Copy">+ <Tooltip title={t('common.actions.copy')}><buttonclassName="absolute top-2 right-2 cursor-pointer rounded p-1 text-gray-400 hover:text-white"onClick={() => copyToClipboard(code)}@@ -130,9 +127,9 @@ export const VerificationAgentsComponent = () => {const renderAgentIdRow = (agentId: string) => (<div className="mt-3 flex items-center text-sm text-gray-500 dark:text-gray-400">- <span className="mr-1">Agent ID:</span>+ <span className="mr-1">{t('verification.agents.agentId')}</span><code className="rounded bg-gray-100 px-2 py-0.5 text-xs dark:bg-gray-700">{agentId}</code>- <Tooltip title="Copy">+ <Tooltip title={t('common.actions.copy')}><buttonclassName="ml-1 cursor-pointer rounded p-1 text-gray-400 hover:text-gray-700 dark:hover:text-white"onClick={() => copyToClipboard(agentId)}@@ -145,7 +142,9 @@ export const VerificationAgentsComponent = () => {const renderArchitecturePicker = () => (<div className="mt-4">- <div className="mb-1 text-sm font-medium text-gray-700 dark:text-gray-300">Architecture</div>+ <div className="mb-1 text-sm font-medium text-gray-700 dark:text-gray-300">+ {t('verification.agents.install.architecture')}+ </div><div className="flex">{renderArchButton('amd64')}{renderArchButton('arm64')}@@ -155,30 +154,49 @@ export const VerificationAgentsComponent = () => {const renderInstallAndLaunchSteps = (agentId: string, token: string) => (<>- <div className="mt-4 font-semibold dark:text-white">Step 1 - Install</div>+ <div className="mt-4 font-semibold dark:text-white">+ {t('verification.agents.install.stepInstall')}+ </div>{renderCodeBlock(buildInstallCommand(selectedArch))}- <div className="mt-4 font-semibold dark:text-white">Step 2 - Launch</div>+ <div className="mt-4 font-semibold dark:text-white">+ {t('verification.agents.install.stepLaunch')}+ </div><p className="mt-1 text-sm text-gray-600 dark:text-gray-400">- The capacity values below are starting defaults - tune <code>--max-cpu</code>,{' '}- <code>--max-ram-mb</code>, <code>--max-disk-gb</code> and <code>--max-concurrent-jobs</code>{' '}- to the machine running the agent.+ <Trans+ i18nKey="verification.agents.install.capacityDefaults"+ components={{ code: <InlineCodeComponent /> }}+ /></p>{renderCodeBlock(buildLaunchCommand(agentId, token))}- <div className="mt-4 font-semibold dark:text-white">After installation</div>+ <div className="mt-4 font-semibold dark:text-white">+ {t('verification.agents.install.afterInstallation')}+ </div><ul className="mt-1 list-disc space-y-1 pl-5 text-sm text-gray-600 dark:text-gray-400"><li>- The agent runs in the background after <code>start</code>+ <Trans+ i18nKey="verification.agents.install.runsInBackground"+ components={{ code: <InlineCodeComponent /> }}+ /></li><li>- Check status: <code>./verification-agent status</code>+ <Trans+ i18nKey="verification.agents.install.checkStatus"+ components={{ code: <InlineCodeComponent /> }}+ /></li><li>- View logs: <code>databasus-verification.log</code> in the working directory+ <Trans+ i18nKey="verification.agents.install.viewLogs"+ components={{ code: <InlineCodeComponent /> }}+ /></li><li>- Stop the agent: <code>./verification-agent stop</code>+ <Trans+ i18nKey="verification.agents.install.stop"+ components={{ code: <InlineCodeComponent /> }}+ /></li></ul></>@@ -191,7 +209,7 @@ export const VerificationAgentsComponent = () => {const handleCreate = async () => {const name = newAgentName.trim();if (!name) {- message.error('Name is required');+ message.error(t('verification.agents.create.nameRequired'));return;}@@ -206,7 +224,7 @@ export const VerificationAgentsComponent = () => {setIsCreateModalOpen(false);setNewAgentName('');} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));} finally {setIsCreating(false);}@@ -224,7 +242,7 @@ export const VerificationAgentsComponent = () => {setRevealedTokenAgentId(rotatingAgent.id);setRotatingAgent(null);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));} finally {setIsRotating(false);}@@ -236,9 +254,9 @@ export const VerificationAgentsComponent = () => {try {await verificationAgentApi.deleteAgent(agent.id);setAgents((prev) => prev.filter((a) => a.id !== agent.id));- message.success(`Agent "${agent.name}" deleted`);+ message.success(t('verification.agents.deleted', { name: agent.name }));} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));} finally {setDeletingAgentId(null);}@@ -257,9 +275,9 @@ export const VerificationAgentsComponent = () => {const list = await verificationAgentApi.listAgents();setAgents(list);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}- }, [message]);+ }, [message, t]);useEffect(() => {setIsLoading(true);@@ -280,7 +298,7 @@ export const VerificationAgentsComponent = () => {const columns: ColumnsType<VerificationAgent> = [{- title: 'Name',+ title: t('common.fields.name'),dataIndex: 'name',key: 'name',render: (name: string) => (@@ -288,7 +306,7 @@ export const VerificationAgentsComponent = () => {),},{- title: 'Status',+ title: t('common.fields.status'),key: 'status',width: 180,render: (_, record) => {@@ -296,11 +314,11 @@ export const VerificationAgentsComponent = () => {return (<div className="flex items-center gap-2"><Tag color={AGENT_STATUS_COLORS[status]} className="!m-0">- {AGENT_STATUS_LABELS[status]}+ {t(AGENT_STATUS_LABEL_KEYS[status])}</Tag>{record.lastSeenAt && (<span className={`text-xs ${MUTED_TEXT_CLASS}`}>- {dayjs(record.lastSeenAt).fromNow()}+ {formatRelativeTime(record.lastSeenAt)}</span>)}</div>@@ -308,24 +326,28 @@ export const VerificationAgentsComponent = () => {},},{- title: 'Capacity',+ title: t('verification.agents.columns.capacity'),key: 'capacity',render: (_, record) => {- const capacity = formatCapacity(record);- return capacity ? (- <span className="text-xs text-gray-700 dark:text-gray-300">{capacity}</span>+ const capacityParts = getCapacityParts(record);+ return capacityParts.length > 0 ? (+ <span className="text-xs text-gray-700 dark:text-gray-300">+ {capacityParts.map((part) => translateLocalizedText(part, t)).join(' · ')}+ </span>) : (- <span className={`text-xs ${MUTED_TEXT_CLASS}`}>not yet reported</span>+ <span className={`text-xs ${MUTED_TEXT_CLASS}`}>+ {t('verification.agents.capacity.notReported')}+ </span>);},},{- title: 'Created',+ title: t('verification.agents.columns.created'),dataIndex: 'createdAt',key: 'createdAt',width: 110,render: (createdAt: string) => (- <span className={`text-xs ${MUTED_TEXT_CLASS}`}>{dayjs(createdAt).fromNow()}</span>+ <span className={`text-xs ${MUTED_TEXT_CLASS}`}>{formatRelativeTime(createdAt)}</span>),},{@@ -335,7 +357,7 @@ export const VerificationAgentsComponent = () => {align: 'right',render: (_, record) => (<div className="flex items-center justify-end gap-1">- <Tooltip title="View install commands">+ <Tooltip title={t('verification.agents.actions.viewInstallCommands')}><Buttontype="text"size="small"@@ -344,7 +366,7 @@ export const VerificationAgentsComponent = () => {/></Tooltip>- <Tooltip title="Rotate token">+ <Tooltip title={t('verification.agents.actions.rotateToken')}><Buttontype="text"size="small"@@ -354,13 +376,13 @@ export const VerificationAgentsComponent = () => {</Tooltip><Popconfirm- title="Delete this agent?"- okText="Delete"+ title={t('verification.agents.deleteConfirmation')}+ okText={t('common.actions.delete')}okButtonProps={{ danger: true, loading: deletingAgentId === record.id }}- cancelText="Cancel"+ cancelText={t('common.actions.cancel')}onConfirm={() => handleDelete(record)}>- <Tooltip title="Delete">+ <Tooltip title={t('common.actions.delete')}><Button type="text" size="small" danger icon={<DeleteOutlined />} /></Tooltip></Popconfirm>@@ -373,7 +395,7 @@ export const VerificationAgentsComponent = () => {<section className="my-8 max-w-[800px]"><div className="mb-3 flex items-center justify-between"><div className="flex items-baseline gap-3">- <h2 className="text-xl font-bold dark:text-white">Verification agents</h2>+ <h2 className="text-xl font-bold dark:text-white">{t('verification.agents.title')}</h2></div><div className="flex items-center gap-2">@@ -383,21 +405,24 @@ export const VerificationAgentsComponent = () => {icon={<PlusOutlined />}onClick={() => setIsCreateModalOpen(true)}>- Create+ {t('common.actions.create')}</Button></div></div><p className="mb-4 max-w-2xl text-sm text-gray-500 dark:text-gray-400">- Agents that run restore verifications to confirm a backup is restorable (- <a- href="https://databasus.com/restore-verification"- target="_blank"- rel="noopener noreferrer"- >- read more- </a>- )+ <Trans+ i18nKey="verification.agents.description"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('restoreVerification', locale)}+ target="_blank"+ rel="noopener noreferrer"+ />+ ),+ }}+ /></p>{isLoading ? (@@ -405,7 +430,7 @@ export const VerificationAgentsComponent = () => {<Spin indicator={<LoadingOutlined spin />} /></div>) : agents.length === 0 ? (- <p className="text-sm text-gray-500 dark:text-gray-400">No agents registered yet.</p>+ <p className="text-sm text-gray-500 dark:text-gray-400">{t('verification.agents.empty')}</p>) : (<Tablecolumns={columns}@@ -418,7 +443,7 @@ export const VerificationAgentsComponent = () => {)}<Modal- title="Create verification agent"+ title={t('verification.agents.create.title')}open={isCreateModalOpen}onCancel={() => {setIsCreateModalOpen(false);@@ -432,18 +457,18 @@ export const VerificationAgentsComponent = () => {setNewAgentName('');}}>- Cancel+ {t('common.actions.cancel')}</Button>,<Button key="create" type="primary" loading={isCreating} onClick={handleCreate}>- Create+ {t('common.actions.create')}</Button>,]}><p className="mb-2 text-sm text-gray-500 dark:text-gray-400">- A token will be generated and shown exactly once on the next screen.+ {t('verification.agents.create.tokenNotice')}</p><Input- placeholder="Agent name"+ placeholder={t('verification.agents.create.namePlaceholder')}value={newAgentName}onChange={(e) => setNewAgentName(e.target.value)}onPressEnter={handleCreate}@@ -453,12 +478,12 @@ export const VerificationAgentsComponent = () => {</Modal><Modal- title="Rotate token"+ title={t('verification.agents.rotate.title')}open={rotatingAgent !== null}onCancel={() => setRotatingAgent(null)}footer={[<Button key="cancel" onClick={() => setRotatingAgent(null)}>- Cancel+ {t('common.actions.cancel')}</Button>,<Buttonkey="rotate"@@ -467,31 +492,35 @@ export const VerificationAgentsComponent = () => {loading={isRotating}onClick={handleConfirmRotate}>- Rotate token+ {t('verification.agents.actions.rotateToken')}</Button>,]}><p className="text-sm text-gray-700 dark:text-gray-300">- Rotating the token for <strong>{rotatingAgent?.name}</strong> invalidates the existing- token immediately. Any worker still using the old token will be rejected on its next- heartbeat.+ <Trans+ i18nKey="verification.agents.rotate.description"+ components={{ agentName: <strong>{rotatingAgent?.name}</strong> }}+ /></p></Modal><Modal- title="Agent token"+ title={t('verification.agents.token.title')}open={revealedToken !== null}onCancel={closeRevealedTokenModal}width={640}footer={<Button type="primary" onClick={closeRevealedTokenModal}>- I've saved the token+ {t('verification.agents.token.confirmSaved')}</Button>}maskClosable={false}><p className="text-sm text-gray-700 dark:text-gray-300">- Token for <strong>{revealedTokenAgentName}</strong>:+ <Trans+ i18nKey="verification.agents.token.tokenFor"+ components={{ agentName: <strong>{revealedTokenAgentName}</strong> }}+ /></p>{renderCodeBlock(revealedToken ?? '')}@@ -500,27 +529,33 @@ export const VerificationAgentsComponent = () => {{renderInstallAndLaunchSteps(revealedTokenAgentId, revealedToken ?? '')}<p className="mt-3 text-sm text-amber-600 dark:text-amber-400">- Shown once. Store it securely - you won't be able to retrieve it again.+ {t('verification.agents.token.shownOnce')}</p></Modal><Modal- title="Install commands"+ title={t('verification.agents.install.title')}open={viewingInstallAgent !== null}onCancel={closeViewingInstallModal}width={640}footer={<Button type="primary" onClick={closeViewingInstallModal}>- Close+ {t('common.actions.close')}</Button>}><p className="text-sm text-gray-700 dark:text-gray-300">- Install commands for <strong>{viewingInstallAgent?.name}</strong>. Replace{' '}- <code className="rounded bg-gray-100 px-1 text-xs dark:bg-gray-700">- {TOKEN_PLACEHOLDER}- </code>{' '}- with the token you saved when you created or last rotated this agent.+ <Trans+ i18nKey="verification.agents.install.description"+ components={{+ agentName: <strong>{viewingInstallAgent?.name}</strong>,+ tokenPlaceholder: (+ <code className="rounded bg-gray-100 px-1 text-xs dark:bg-gray-700">+ {TOKEN_PLACEHOLDER}+ </code>+ ),+ }}+ /></p>{viewingInstallAgent && (diff --git a/frontend/src/features/verification/config/ui/EditBackupVerificationConfigComponent.tsx b/frontend/src/features/verification/config/ui/EditBackupVerificationConfigComponent.tsxindex 36a3f789..1163e9cc 100644--- a/frontend/src/features/verification/config/ui/EditBackupVerificationConfigComponent.tsx+++ b/frontend/src/features/verification/config/ui/EditBackupVerificationConfigComponent.tsx@@ -13,14 +13,23 @@ import {import { CronExpressionParser } from 'cron-parser';import dayjs, { type Dayjs } from 'dayjs';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';-import { type Interval, IntervalType } from '../../../../entity/intervals';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ type Interval,+ IntervalType,+ WEEKDAYS,+ WEEKDAY_LABEL_KEYS,+} from '../../../../entity/intervals';import {type BackupVerificationConfig,+ VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS,VerificationNotificationType,VerificationScheduleType,verificationConfigApi,} from '../../../../entity/verification/config';+import { getWebsitePageUrl, translateApiError, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -35,17 +44,9 @@ interface Props {onClose: () => void;}-const weekdayOptions = [- { value: 1, label: 'Mon' },- { value: 2, label: 'Tue' },- { value: 3, label: 'Wed' },- { value: 4, label: 'Thu' },- { value: 5, label: 'Fri' },- { value: 6, label: 'Sat' },- { value: 7, label: 'Sun' },-];-export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: Props) => {+ const { t } = useTranslation();+ const { locale, formatRelativeTime } = useLocale();const [config, setConfig] = useState<BackupVerificationConfig>();const [isLoading, setIsLoading] = useState(true);const [isSaving, setIsSaving] = useState(false);@@ -109,7 +110,7 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: PsetIsUnsaved(false);onClose();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));}setIsSaving(false);@@ -120,7 +121,7 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: PverificationConfigApi.getByDatabaseId(databaseId).then(setConfig)- .catch((error: Error) => alert(error.message))+ .catch((error: unknown) => alert(translateApiError(error, t))).finally(() => setIsLoading(false));}, [databaseId]);@@ -169,7 +170,9 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: Preturn (<div className="space-y-3"><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Scheduled verification</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.scheduledVerification')}+ </div><Switchchecked={config.isScheduledVerificationEnabled}onChange={(checked) => updateConfig({ isScheduledVerificationEnabled: checked })}@@ -178,18 +181,19 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P<TooltipclassName="cursor-pointer"title={- <>- Periodically restore the latest backup into an ephemeral Postgres container to verify- it is restorable.{' '}- <a- href="https://databasus.com/restore-verification"- target="_blank"- rel="noopener noreferrer"- className="underline"- >- Read here how it works- </a>- </>+ <Trans+ i18nKey="verification.config.scheduledVerificationTooltip"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('restoreVerification', locale)}+ target="_blank"+ rel="noopener noreferrer"+ className="underline"+ />+ ),+ }}+ />}><InfoCircleOutlined className="ml-2" style={{ color: 'gray' }} />@@ -199,7 +203,9 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P{config.isScheduledVerificationEnabled && (<><div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Verification interval</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.interval')}+ </div><Selectvalue={isAfterBackup ? VerificationScheduleType.AFTER_BACKUP : verificationInterval?.type@@ -208,30 +214,30 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: Psize="small"className="w-full max-w-[200px] grow"options={[- { label: 'After backup', value: VerificationScheduleType.AFTER_BACKUP },- { label: 'Hourly', value: IntervalType.HOURLY },- { label: 'Daily', value: IntervalType.DAILY },- { label: 'Weekly', value: IntervalType.WEEKLY },- { label: 'Monthly', value: IntervalType.MONTHLY },- { label: 'Cron', value: IntervalType.CRON },+ {+ label: t('verification.config.afterBackup'),+ value: VerificationScheduleType.AFTER_BACKUP,+ },+ ...Object.values(IntervalType).map((intervalType) => ({+ label: t(INTERVAL_TYPE_LABEL_KEYS[intervalType]),+ value: intervalType,+ })),]}/></div>{isAfterBackup && (<div className="mb-1 flex w-full flex-col items-start text-xs text-gray-600 sm:flex-row sm:items-center dark:text-gray-400">- <div className="mb-1 min-w-[180px] sm:mb-0" />- <div>- Runs automatically after each successful backup. If there are pending in the queue,- they are canceled to not cause infinite queue when backups are faster than- verifications.- </div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2" />+ <div>{t('verification.config.afterBackupHint')}</div></div>)}{!isAfterBackup && verificationInterval?.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Verification weekday</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.weekday')}+ </div><Selectvalue={displayedWeekday}onChange={(localWeekday) => {@@ -241,14 +247,19 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P}}size="small"className="w-full max-w-[200px] grow"- options={weekdayOptions}+ options={WEEKDAYS.map((weekday) => ({+ value: weekday,+ label: t(WEEKDAY_LABEL_KEYS[weekday]),+ }))}/></div>)}{!isAfterBackup && verificationInterval?.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Verification day of month</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.dayOfMonth')}+ </div><InputNumbermin={1}max={31}@@ -267,7 +278,9 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P{!isAfterBackup && verificationInterval?.type === IntervalType.CRON && (<><div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Cron expression (UTC)</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.cron.expression')}+ </div><div className="flex items-center"><Inputvalue={verificationInterval?.cronExpression || ''}@@ -280,12 +293,18 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: PclassName="cursor-pointer"title={<div>- <div className="font-bold">- Cron format: minute hour day month weekday (UTC)+ <div className="font-bold">{t('verification.config.cron.format')}</div>+ <div className="mt-1">{t('verification.config.cron.examples')}</div>+ <div>+ {t('verification.config.cron.exampleEverySunday', {+ expression: '0 4 * * 0',+ })}+ </div>+ <div>+ {t('verification.config.cron.exampleEverySixHours', {+ expression: '0 */6 * * *',+ })}</div>- <div className="mt-1">Examples:</div>- <div>- 0 4 * * 0 - Every Sunday at 4:00 AM UTC</div>- <div>- 0 */6 * * * - Every 6 hours</div></div>}>@@ -305,18 +324,24 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: Pconst nextRun = interval.next().toDate();return (<div className="mb-1 flex w-full flex-col items-start text-xs text-gray-600 sm:flex-row sm:items-center dark:text-gray-400">- <div className="mb-1 min-w-[180px] sm:mb-0" />+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2" /><div className="text-gray-600 dark:text-gray-400">- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ <Trans+ i18nKey="verification.config.cron.nextRun"+ values={{+ dateTime: dayjs(nextRun).local().format(dateTimeFormat.format),+ relativeTime: formatRelativeTime(nextRun),+ }}+ components={{ lineBreak: <br /> }}+ /></div></div>);} catch {return (<div className="mb-1 flex w-full flex-col items-start text-red-500 sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0" />- <div className="text-red-500">Invalid cron expression</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2" />+ <div className="text-red-500">{t('verification.config.cron.invalid')}</div></div>);}@@ -328,7 +353,9 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: PverificationInterval?.type !== IntervalType.HOURLY &&verificationInterval?.type !== IntervalType.CRON && (<div className="mb-1 flex w-full flex-col items-start sm:flex-row sm:items-center">- <div className="mb-1 min-w-[180px] sm:mb-0">Verification time of day</div>+ <div className="mb-1 min-w-[180px] sm:mb-0 sm:pr-2">+ {t('verification.config.timeOfDay')}+ </div><TimePickervalue={localTime}format={timeFormat.format}@@ -336,18 +363,20 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: PallowClear={false}size="small"className="w-full max-w-[200px] grow"- onChange={(t) => {- if (!t) return;- const patch: Partial<Interval> = { timeOfDay: t.utc().format('HH:mm') };+ onChange={(pickedTime) => {+ if (!pickedTime) return;+ const patch: Partial<Interval> = {+ timeOfDay: pickedTime.utc().format('HH:mm'),+ };if (verificationInterval?.type === IntervalType.WEEKLY && displayedWeekday) {- patch.weekday = getUtcWeekday(displayedWeekday, t);+ patch.weekday = getUtcWeekday(displayedWeekday, pickedTime);}if (verificationInterval?.type === IntervalType.MONTHLY &&displayedDayOfMonth) {- patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, t);+ patch.dayOfMonth = getUtcDayOfMonth(displayedDayOfMonth, pickedTime);}saveInterval(patch);@@ -357,34 +386,19 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P)}<div className="mt-5 mb-1 flex w-full flex-col items-start sm:flex-row sm:items-start">- <div className="mt-0 mb-1 min-w-[180px] sm:mt-1 sm:mb-0">Notifications</div>+ <div className="mt-0 mb-1 min-w-[180px] sm:mt-1 sm:mb-0 sm:pr-2">+ {t('verification.config.notifications')}+ </div><div className="flex flex-col space-y-2">- <Checkbox- checked={config.sendNotificationsOn.includes(- VerificationNotificationType.VerificationSuccess,- )}- onChange={(e) =>- toggleNotification(- VerificationNotificationType.VerificationSuccess,- e.target.checked,- )- }- >- Verification success- </Checkbox>- <Checkbox- checked={config.sendNotificationsOn.includes(- VerificationNotificationType.VerificationFailed,- )}- onChange={(e) =>- toggleNotification(- VerificationNotificationType.VerificationFailed,- e.target.checked,- )- }- >- Verification failed- </Checkbox>+ {Object.values(VerificationNotificationType).map((notificationType) => (+ <Checkbox+ key={notificationType}+ checked={config.sendNotificationsOn.includes(notificationType)}+ onChange={(e) => toggleNotification(notificationType, e.target.checked)}+ >+ {t(VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS[notificationType])}+ </Checkbox>+ ))}</div></div></>@@ -392,7 +406,7 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: P<div className="mt-6 flex justify-end space-x-2"><Button onClick={onClose} disabled={isSaving}>- Cancel+ {t('common.actions.cancel')}</Button><Button@@ -401,7 +415,7 @@ export const EditBackupVerificationConfigComponent = ({ databaseId, onClose }: Ploading={isSaving}disabled={!isUnsaved || !isAllFieldsFilled}>- Save+ {t('common.actions.save')}</Button></div></div>diff --git a/frontend/src/features/verification/config/ui/ShowBackupVerificationConfigComponent.tsx b/frontend/src/features/verification/config/ui/ShowBackupVerificationConfigComponent.tsxindex 46f149dd..83920d7c 100644--- a/frontend/src/features/verification/config/ui/ShowBackupVerificationConfigComponent.tsx+++ b/frontend/src/features/verification/config/ui/ShowBackupVerificationConfigComponent.tsx@@ -2,14 +2,21 @@ import { Spin } from 'antd';import { CronExpressionParser } from 'cron-parser';import dayjs from 'dayjs';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';-import { IntervalType } from '../../../../entity/intervals';+import {+ INTERVAL_TYPE_LABEL_KEYS,+ IntervalType,+ WEEKDAY_LABEL_KEYS,+ type Weekday,+} from '../../../../entity/intervals';import {type BackupVerificationConfig,- VerificationNotificationType,+ VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS,VerificationScheduleType,verificationConfigApi,} from '../../../../entity/verification/config';+import { translateApiError, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import {getUserTimeFormat as getIs12Hour,@@ -21,30 +28,9 @@ interface Props {databaseId: string;}-const weekdayLabels: Record<number, string> = {- 1: 'Mon',- 2: 'Tue',- 3: 'Wed',- 4: 'Thu',- 5: 'Fri',- 6: 'Sat',- 7: 'Sun',-};--const intervalLabels: Record<IntervalType, string> = {- [IntervalType.HOURLY]: 'Hourly',- [IntervalType.DAILY]: 'Daily',- [IntervalType.WEEKLY]: 'Weekly',- [IntervalType.MONTHLY]: 'Monthly',- [IntervalType.CRON]: 'Cron',-};--const notificationLabels: Record<VerificationNotificationType, string> = {- [VerificationNotificationType.VerificationSuccess]: 'Verification success',- [VerificationNotificationType.VerificationFailed]: 'Verification failed',-};-export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) => {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const [config, setConfig] = useState<BackupVerificationConfig>();const [isLoading, setIsLoading] = useState(true);@@ -53,7 +39,7 @@ export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) =>verificationConfigApi.getByDatabaseId(databaseId).then(setConfig)- .catch((error: Error) => alert(error.message))+ .catch((error: unknown) => alert(translateApiError(error, t))).finally(() => setIsLoading(false));}, [databaseId]);@@ -94,35 +80,37 @@ export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) =>return (<div><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Scheduled verification</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.scheduledVerification')}</div><div className={config.isScheduledVerificationEnabled ? '' : 'text-gray-500'}>- {config.isScheduledVerificationEnabled ? 'Yes' : 'No'}+ {config.isScheduledVerificationEnabled ? t('common.answers.yes') : t('common.answers.no')}</div></div>{config.isScheduledVerificationEnabled && (<><div className="mt-5 mb-1 flex w-full items-center">- <div className="min-w-[180px]">Verification interval</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.interval')}</div><div>{isAfterBackup- ? 'After backup'+ ? t('verification.config.afterBackup'): verificationInterval?.type- ? intervalLabels[verificationInterval.type]+ ? t(INTERVAL_TYPE_LABEL_KEYS[verificationInterval.type]): ''}</div></div>{!isAfterBackup && verificationInterval?.type === IntervalType.WEEKLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Verification weekday</div>- <div>{displayedWeekday ? weekdayLabels[displayedWeekday] : ''}</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.weekday')}</div>+ <div>+ {displayedWeekday ? t(WEEKDAY_LABEL_KEYS[displayedWeekday as Weekday]) : ''}+ </div></div>)}{!isAfterBackup && verificationInterval?.type === IntervalType.MONTHLY && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Verification day of month</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.dayOfMonth')}</div><div>{displayedDayOfMonth || ''}</div></div>)}@@ -130,7 +118,7 @@ export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) =>{!isAfterBackup && verificationInterval?.type === IntervalType.CRON && (<><div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Cron expression (UTC)</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.cron.expression')}</div><code className="rounded bg-gray-100 px-2 py-0.5 text-sm dark:bg-gray-700">{verificationInterval?.cronExpression || ''}</code>@@ -147,10 +135,16 @@ export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) =>const nextRun = interval.next().toDate();return (<div className="mb-1 flex w-full items-center text-xs text-gray-600 dark:text-gray-400">- <div className="min-w-[180px]" />+ <div className="min-w-[180px] pr-2" /><div>- Next run {dayjs(nextRun).local().format(dateTimeFormat.format)}- <br />({dayjs(nextRun).fromNow()})+ <Trans+ i18nKey="verification.config.cron.nextRun"+ values={{+ dateTime: dayjs(nextRun).local().format(dateTimeFormat.format),+ relativeTime: formatRelativeTime(nextRun),+ }}+ components={{ lineBreak: <br /> }}+ /></div></div>);@@ -165,17 +159,19 @@ export const ShowBackupVerificationConfigComponent = ({ databaseId }: Props) =>verificationInterval?.type !== IntervalType.HOURLY &&verificationInterval?.type !== IntervalType.CRON && (<div className="mb-1 flex w-full items-center">- <div className="min-w-[180px]">Verification time of day</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.timeOfDay')}</div><div>{formattedTime}</div></div>)}<div className="mt-5 mb-1 flex w-full items-center">- <div className="min-w-[180px]">Notifications</div>+ <div className="min-w-[180px] pr-2">{t('verification.config.notifications')}</div><div>{config.sendNotificationsOn.length > 0- ? config.sendNotificationsOn.map((type) => notificationLabels[type]).join(', ')- : 'None'}+ ? config.sendNotificationsOn+ .map((type) => t(VERIFICATION_NOTIFICATION_TYPE_LABEL_KEYS[type]))+ .join(', ')+ : t('verification.config.noNotifications')}</div></div></>diff --git a/frontend/src/features/verification/runs/ui/VerificationDetailDrawer.tsx b/frontend/src/features/verification/runs/ui/VerificationDetailDrawer.tsxindex 2333dfdf..e9a17553 100644--- a/frontend/src/features/verification/runs/ui/VerificationDetailDrawer.tsx+++ b/frontend/src/features/verification/runs/ui/VerificationDetailDrawer.tsx@@ -1,15 +1,20 @@-import { Button, Drawer, Skeleton, Table, Tag } from 'antd';+import { Button, Drawer, Skeleton, Table, Tag, type TagProps } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';+import type { TFunction } from 'i18next';import { useEffect, useMemo, useState } from 'react';+import { useTranslation } from 'react-i18next';import {type RestoreVerification,type RestoreVerificationTableStat,+ VERIFICATION_STATUS_LABEL_KEYS,+ VERIFICATION_TRIGGER_LABEL_KEYS,VerificationStatus,VerificationTrigger,verificationRunsApi,} from '../../../../entity/verification/runs';+import { type LocaleContextValue, translateApiError, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';interface Props {@@ -25,16 +30,21 @@ const formatDurationMs = (durationMs?: number) => {const totalSeconds = Math.floor(durationMs / 1000);if (totalSeconds < 60) {+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languagereturn `${totalSeconds}s`;}const minutes = Math.floor(totalSeconds / 60);const seconds = totalSeconds % 60;+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languagereturn `${minutes}m ${seconds}s`;};-const formatSizeBytes = (sizeBytes?: number) => {+const formatSizeBytes = (+ sizeBytes: number | undefined,+ formatNumber: LocaleContextValue['formatNumber'],+) => {if (sizeBytes === undefined || sizeBytes === null || sizeBytes <= 0) {return '-';}@@ -42,49 +52,40 @@ const formatSizeBytes = (sizeBytes?: number) => {const sizeMb = sizeBytes / (1024 * 1024);if (sizeMb >= 1024) {- return `${Number((sizeMb / 1024).toFixed(2)).toLocaleString()} GB`;+ return `${formatNumber(Number((sizeMb / 1024).toFixed(2)))} GB`;}- return `${Number(sizeMb.toFixed(2)).toLocaleString()} MB`;+ return `${formatNumber(Number(sizeMb.toFixed(2)))} MB`;};-const renderStatusTag = (status: VerificationStatus) => {- if (status === VerificationStatus.COMPLETED) {- return <Tag color="green">Successful</Tag>;- }-- if (status === VerificationStatus.FAILED) {- return <Tag color="red">Failed</Tag>;- }-- if (status === VerificationStatus.RUNNING) {- return <Tag color="blue">Running</Tag>;- }-- if (status === VerificationStatus.PENDING) {- return <Tag>Pending</Tag>;- }-- if (status === VerificationStatus.CANCELED) {- return <Tag color="default">Canceled</Tag>;- }-- return <Tag>{status}</Tag>;+const VERIFICATION_STATUS_TAG_COLORS: Record<VerificationStatus, TagProps['color']> = {+ [VerificationStatus.COMPLETED]: 'green',+ [VerificationStatus.FAILED]: 'red',+ [VerificationStatus.RUNNING]: 'blue',+ [VerificationStatus.PENDING]: 'default',+ [VerificationStatus.CANCELED]: 'default',};-const renderTriggerTag = (trigger: VerificationTrigger) => {- if (trigger === VerificationTrigger.MANUAL) {- return <Tag color="blue">Manual</Tag>;- }+const renderStatusTag = (status: VerificationStatus, t: TFunction) => (+ <Tag color={VERIFICATION_STATUS_TAG_COLORS[status]}>+ {t(VERIFICATION_STATUS_LABEL_KEYS[status])}+ </Tag>+);- return <Tag color="purple">Scheduled</Tag>;-};+const renderTriggerTag = (trigger: VerificationTrigger, t: TFunction) => (+ <Tag color={trigger === VerificationTrigger.MANUAL ? 'blue' : 'purple'}>+ {t(VERIFICATION_TRIGGER_LABEL_KEYS[trigger])}+ </Tag>+);-const renderTimestamp = (iso: string) => (+const renderTimestamp = (+ iso: string,+ formatRelativeTime: LocaleContextValue['formatRelativeTime'],+) => (<span className="flex flex-col items-end"><span>{dayjs.utc(iso).local().format(getUserTimeFormat().format)}</span><span className="text-xs text-gray-500 dark:text-gray-400">- ({dayjs.utc(iso).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(iso))})</span></span>);@@ -106,20 +107,22 @@ const renderSection = (title: string, children: React.ReactNode) => ();export const VerificationDetailDrawer = ({ verificationId, onClose }: Props) => {+ const { t } = useTranslation();+ const { formatNumber, formatRelativeTime } = useLocale();const [verification, setVerification] = useState<RestoreVerification | undefined>();const [isLoading, setIsLoading] = useState(true);- const [loadError, setLoadError] = useState<string | undefined>();+ const [hasLoadError, setHasLoadError] = useState(false);const loadVerification = () => {setIsLoading(true);- setLoadError(undefined);+ setHasLoadError(false);verificationRunsApi.getById(verificationId).then(setVerification)- .catch((e: Error) => {- alert(e.message);- setLoadError(e.message);+ .catch((e: unknown) => {+ alert(translateApiError(e, t));+ setHasLoadError(true);}).finally(() => setIsLoading(false));};@@ -135,34 +138,32 @@ export const VerificationDetailDrawer = ({ verificationId, onClose }: Props) =>const tableStatColumns: ColumnsType<RestoreVerificationTableStat> = [{- title: 'Schema',+ title: t('verification.runs.details.tableStats.schema'),dataIndex: 'schemaName',key: 'schemaName',width: 140,render: (schemaName: string) => <span className="font-mono text-xs">{schemaName}</span>,},{- title: 'Table',+ title: t('verification.runs.details.tableStats.table'),dataIndex: 'name',key: 'name',render: (name: string) => <span className="font-mono text-xs">{name}</span>,},{- title: 'Rows',+ title: t('verification.runs.details.tableStats.rows'),dataIndex: 'rowCount',key: 'rowCount',width: 120,align: 'right',- render: (rowCount: number) => (- <span className="tabular-nums">{rowCount.toLocaleString()}</span>- ),+ render: (rowCount: number) => <span className="tabular-nums">{formatNumber(rowCount)}</span>,sorter: (a, b) => a.rowCount - b.rowCount,},];return (<Drawer- title="Restore check details"+ title={t('verification.runs.details.title')}placement="right"width={520}onClose={onClose}@@ -171,71 +172,103 @@ export const VerificationDetailDrawer = ({ verificationId, onClose }: Props) =>>{isLoading ? (<Skeleton active paragraph={{ rows: 10 }} />- ) : loadError || !verification ? (+ ) : hasLoadError || !verification ? (<div className="flex flex-col items-center gap-3 py-12 text-center"><div className="text-sm text-gray-500 dark:text-gray-400">- Could not load restore check details.+ {t('verification.runs.details.loadFailed')}</div>- <Button onClick={loadVerification}>Retry</Button>+ <Button onClick={loadVerification}>{t('common.actions.retry')}</Button></div>) : (<div>{verification.failMessage &&(verification.status === VerificationStatus.CANCELED ? (<div className="mb-4 rounded-md border border-gray-200 bg-gray-50 p-3 text-sm text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300">- <div className="mb-1 font-semibold">Cancellation reason</div>+ <div className="mb-1 font-semibold">+ {t('verification.runs.details.cancellationReason')}+ </div><div className="break-words whitespace-pre-wrap">{verification.failMessage}</div></div>) : (<div className="mb-4 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-300">- <div className="mb-1 font-semibold">Failure</div>+ <div className="mb-1 font-semibold">{t('verification.runs.details.failure')}</div><div className="break-words whitespace-pre-wrap">{verification.failMessage}</div></div>))}{renderSection(- 'Status',+ t('verification.runs.details.sections.status'),<>- {renderInfoRow('Status', renderStatusTag(verification.status))}- {renderInfoRow('Trigger', renderTriggerTag(verification.trigger))}- {renderInfoRow('Attempt', verification.attemptCount)}+ {renderInfoRow(t('common.fields.status'), renderStatusTag(verification.status, t))}+ {renderInfoRow(+ t('verification.runs.fields.trigger'),+ renderTriggerTag(verification.trigger, t),+ )}+ {renderInfoRow(+ t('verification.runs.details.fields.attempt'),+ verification.attemptCount,+ )}</>,)}{renderSection(- 'Timeline',+ t('verification.runs.details.sections.timeline'),<>- {renderInfoRow('Created at', renderTimestamp(verification.createdAt))}+ {renderInfoRow(+ t('verification.runs.fields.createdAt'),+ renderTimestamp(verification.createdAt, formatRelativeTime),+ )}{verification.startedAt &&- renderInfoRow('Started at', renderTimestamp(verification.startedAt))}+ renderInfoRow(+ t('verification.runs.details.fields.startedAt'),+ renderTimestamp(verification.startedAt, formatRelativeTime),+ )}{verification.finishedAt &&- renderInfoRow('Finished at', renderTimestamp(verification.finishedAt))}+ renderInfoRow(+ t('verification.runs.details.fields.finishedAt'),+ renderTimestamp(verification.finishedAt, formatRelativeTime),+ )}</>,)}{renderSection(- 'Results & diagnostics',+ t('verification.runs.details.sections.results'),<>- {renderInfoRow('Restore duration', formatDurationMs(verification.restoreDurationMs))}- {renderInfoRow('Verify duration', formatDurationMs(verification.verifyDurationMs))}{renderInfoRow(- 'Restored DB size',- formatSizeBytes(verification.dbSizeBytesAfterRestore),+ t('verification.runs.details.fields.restoreDuration'),+ formatDurationMs(verification.restoreDurationMs),+ )}+ {renderInfoRow(+ t('verification.runs.details.fields.verifyDuration'),+ formatDurationMs(verification.verifyDurationMs),+ )}+ {renderInfoRow(+ t('verification.runs.details.fields.restoredDbSize'),+ formatSizeBytes(verification.dbSizeBytesAfterRestore, formatNumber),+ )}+ {renderInfoRow(+ t('verification.runs.details.fields.schemas'),+ verification.schemaCount ?? '-',+ )}+ {renderInfoRow(+ t('verification.runs.details.fields.tables'),+ verification.tableCount ?? '-',)}- {renderInfoRow('Schemas', verification.schemaCount ?? '-')}- {renderInfoRow('Tables', verification.tableCount ?? '-')}{verification.pgRestoreExitCode !== undefined &&verification.pgRestoreExitCode !== null &&- renderInfoRow('pg_restore exit code', verification.pgRestoreExitCode)}+ renderInfoRow(+ t('verification.runs.details.fields.pgRestoreExitCode'),+ verification.pgRestoreExitCode,+ )}</>,)}<h3 className="mt-2 mb-2 text-base font-semibold dark:text-white">- Per-table row counts+ {t('verification.runs.details.tableStats.title')}</h3>{sortedStats.length === 0 ? (<div className="text-sm text-gray-500 dark:text-gray-400">- No per-table stats reported.+ {t('verification.runs.details.tableStats.empty')}</div>) : (<Tablediff --git a/frontend/src/features/verification/runs/ui/VerificationsComponent.tsx b/frontend/src/features/verification/runs/ui/VerificationsComponent.tsxindex 9f6472b4..87de3277 100644--- a/frontend/src/features/verification/runs/ui/VerificationsComponent.tsx+++ b/frontend/src/features/verification/runs/ui/VerificationsComponent.tsx@@ -10,16 +10,21 @@ import {import { Spin, Table, Tag, Tooltip } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';+import type { TFunction } from 'i18next';import { useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import type { Database } from '../../../../entity/databases';import { verificationAgentApi } from '../../../../entity/verification/agents';import {type RestoreVerification,+ VERIFICATION_STATUS_LABEL_KEYS,+ VERIFICATION_TRIGGER_LABEL_KEYS,VerificationStatus,VerificationTrigger,verificationRunsApi,} from '../../../../entity/verification/runs';+import { getWebsitePageUrl, translateApiError, useLocale } from '../../../../shared/i18n';import { getUserTimeFormat } from '../../../../shared/time';import { VerificationDetailDrawer } from './VerificationDetailDrawer';@@ -45,22 +50,27 @@ const formatDurationMs = (durationMs?: number) => {const seconds = totalSeconds % 60;if (hours > 0) {+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languagereturn `${hours}h ${minutes}m ${seconds}s`;}if (minutes > 0) {+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languagereturn `${minutes}m ${seconds}s`;}+ // eslint-disable-next-line i18next/no-literal-string -- unit letters stay English in every languagereturn `${seconds}s`;};-const renderStatus = (status: VerificationStatus) => {+const renderStatus = (status: VerificationStatus, t: TFunction) => {+ const label = t(VERIFICATION_STATUS_LABEL_KEYS[status]);+if (status === VerificationStatus.COMPLETED) {return (<div className="flex items-center text-green-600"><CheckCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <span>Successful</span>+ <span>{label}</span></div>);}@@ -69,7 +79,7 @@ const renderStatus = (status: VerificationStatus) => {return (<div className="flex items-center text-red-600"><ExclamationCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <span>Failed</span>+ <span>{label}</span></div>);}@@ -78,7 +88,7 @@ const renderStatus = (status: VerificationStatus) => {return (<div className="flex items-center font-bold text-blue-600"><SyncOutlined spin />- <span className="ml-2">Running</span>+ <span className="ml-2">{label}</span></div>);}@@ -87,7 +97,7 @@ const renderStatus = (status: VerificationStatus) => {return (<div className="flex items-center text-gray-600"><ClockCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <span>Pending</span>+ <span>{label}</span></div>);}@@ -96,7 +106,7 @@ const renderStatus = (status: VerificationStatus) => {return (<div className="flex items-center text-gray-500"><CloseCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <span>Canceled</span>+ <span>{label}</span></div>);}@@ -104,18 +114,16 @@ const renderStatus = (status: VerificationStatus) => {return (<div className="flex items-center"><PauseCircleOutlined className="mr-2" style={{ fontSize: 16 }} />- <span>{status}</span>+ <span>{label}</span></div>);};-const renderTrigger = (trigger: VerificationTrigger) => {- if (trigger === VerificationTrigger.MANUAL) {- return <Tag color="blue">Manual</Tag>;- }-- return <Tag color="purple">Scheduled</Tag>;-};+const renderTrigger = (trigger: VerificationTrigger, t: TFunction) => (+ <Tag color={trigger === VerificationTrigger.MANUAL ? 'blue' : 'purple'}>+ {t(VERIFICATION_TRIGGER_LABEL_KEYS[trigger])}+ </Tag>+);export const VerificationsComponent = ({database,@@ -123,6 +131,8 @@ export const VerificationsComponent = ({isDirectlyUnderTab,scrollContainerRef,}: Props) => {+ const { t } = useTranslation();+ const { locale, formatRelativeTime } = useLocale();const [verifications, setVerifications] = useState<RestoreVerification[]>([]);const [isLoading, setIsLoading] = useState(true);const [selectedVerificationId, setSelectedVerificationId] = useState<string | undefined>();@@ -150,7 +160,7 @@ export const VerificationsComponent = ({setTotalVerifications(response.total);setHasMore(response.verifications.length < response.total);} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {isVerificationsRequestInFlightRef.current = false;}@@ -178,7 +188,7 @@ export const VerificationsComponent = ({await verificationRunsApi.cancel(id);await loadVerifications();} catch (e) {- alert((e as Error).message);+ alert(translateApiError(e, t));} finally {setCancellingVerificationId(undefined);}@@ -200,7 +210,7 @@ export const VerificationsComponent = ({{isCancelling ? (<SyncOutlined spin />) : (- <Tooltip title="Cancel verification">+ <Tooltip title={t('verification.runs.actions.cancel')}><CloseCircleOutlinedclassName="cursor-pointer"onClick={() => {@@ -222,7 +232,7 @@ export const VerificationsComponent = ({) {return (<div className="flex gap-2 text-lg">- <Tooltip title="View details">+ <Tooltip title={t('verification.runs.actions.viewDetails')}><EyeOutlinedclassName="cursor-pointer"onClick={() => setSelectedVerificationId(record.id)}@@ -298,7 +308,7 @@ export const VerificationsComponent = ({const columns: ColumnsType<RestoreVerification> = [{- title: 'Created at',+ title: t('verification.runs.fields.createdAt'),dataIndex: 'createdAt',key: 'createdAt',width: 220,@@ -306,30 +316,30 @@ export const VerificationsComponent = ({<div>{dayjs.utc(createdAt).local().format(getUserTimeFormat().format)} <br /><span className="text-gray-500 dark:text-gray-400">- ({dayjs.utc(createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(createdAt))})</span></div>),},{- title: 'Status',+ title: t('common.fields.status'),dataIndex: 'status',key: 'status',width: 160,- render: (status: VerificationStatus) => renderStatus(status),+ render: (status: VerificationStatus) => renderStatus(status, t),},{- title: 'Trigger',+ title: t('verification.runs.fields.trigger'),dataIndex: 'trigger',key: 'trigger',width: 110,- render: (trigger: VerificationTrigger) => renderTrigger(trigger),+ render: (trigger: VerificationTrigger) => renderTrigger(trigger, t),},{title: (<div className="flex items-center">- Duration- <Tooltip className="ml-1" title="Restore + verify time reported by the agent.">+ {t('verification.runs.fields.duration')}+ <Tooltip className="ml-1" title={t('verification.runs.durationTooltip')}><ExclamationCircleOutlined /></Tooltip></div>@@ -349,14 +359,14 @@ export const VerificationsComponent = ({<div className="text-sm"><div>{formatDurationMs(total)}</div><div className="text-xs text-gray-500 dark:text-gray-400">- restore {formatDurationMs(restoreMs)}+ {t('verification.runs.restoreDuration', { duration: formatDurationMs(restoreMs) })}</div></div>);},},{- title: 'Actions',+ title: t('verification.runs.fields.actions'),key: 'actions',width: 120,render: (_, record: RestoreVerification) => renderActions(record),@@ -367,26 +377,31 @@ export const VerificationsComponent = ({<divclassName={`w-full bg-white p-3 shadow md:p-5 dark:bg-gray-800 ${isDirectlyUnderTab ? 'rounded-tr-md rounded-br-md rounded-bl-md' : 'rounded-md'}`}>- <h2 className="text-lg font-bold md:text-xl dark:text-white">Restore verifications</h2>+ <h2 className="text-lg font-bold md:text-xl dark:text-white">+ {t('verification.runs.title')}+ </h2><p className="mt-2 max-w-2xl text-sm text-gray-500 dark:text-gray-400">- Each row is one attempt to restore a backup of this database into a temporary copy+ {t('verification.runs.description')}</p>{hasAgents === false && (<div className="mt-3 flex max-w-2xl max-w-[400px] items-center gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/40 dark:text-amber-200"><ExclamationCircleOutlined className="shrink-0" /><span>- No verification agents registered - please add it in Databasus settings tab in- "Verification agents" section.{' '}- <a- href="https://databasus.com/restore-verification"- target="_blank"- rel="noopener noreferrer"- className="underline hover:no-underline"- >- Learn more- </a>+ <Trans+ i18nKey="verification.runs.noAgentsWarning"+ components={{+ docsLink: (+ <a+ href={getWebsitePageUrl('restoreVerification', locale)}+ target="_blank"+ rel="noopener noreferrer"+ className="underline hover:no-underline"+ />+ ),+ }}+ /></span></div>)}@@ -405,7 +420,7 @@ export const VerificationsComponent = ({/>{!isLoading && verifications.length === 0 && (<div className="mt-3 text-center text-sm text-gray-500 dark:text-gray-400">- No restore checks yet+ {t('verification.runs.empty')}</div>)}{isLoadingMore && (@@ -415,7 +430,7 @@ export const VerificationsComponent = ({)}{!hasMore && verifications.length > 0 && (<div className="mt-2 text-center text-gray-500 dark:text-gray-400">- All restore checks loaded ({totalVerifications} total)+ {t('verification.runs.allLoaded', { total: totalVerifications })}</div>)}</div>@@ -428,7 +443,7 @@ export const VerificationsComponent = ({</div>) : verifications.length === 0 ? (<div className="py-8 text-center text-gray-500 dark:text-gray-400">- No restore checks yet+ {t('verification.runs.empty')}</div>) : (verifications.map((verification) => (@@ -438,22 +453,24 @@ export const VerificationsComponent = ({><div className="flex items-start justify-between"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Created at</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('verification.runs.fields.createdAt')}+ </div><div className="text-sm font-medium">{dayjs.utc(verification.createdAt).local().format(getUserTimeFormat().format)}</div><div className="text-xs text-gray-500 dark:text-gray-400">- ({dayjs.utc(verification.createdAt).local().fromNow()})+ ({formatRelativeTime(dayjs.utc(verification.createdAt))})</div></div>- <div>{renderStatus(verification.status)}</div>+ <div>{renderStatus(verification.status, t)}</div></div><div className="mt-3 flex items-center gap-2">- {renderTrigger(verification.trigger)}+ {renderTrigger(verification.trigger, t)}{verification.attemptCount > 1 && (<span className="text-xs text-gray-500">- attempt {verification.attemptCount}+ {t('verification.runs.attempt', { attempt: verification.attemptCount })}</span>)}</div>@@ -484,7 +501,7 @@ export const VerificationsComponent = ({)}{!hasMore && verifications.length > 0 && (<div className="mt-3 text-center text-sm text-gray-500 dark:text-gray-400">- All restore checks loaded ({totalVerifications} total)+ {t('verification.runs.allLoaded', { total: totalVerifications })}</div>)}</div>diff --git a/frontend/src/features/workspaces/ui/CreateWorkspaceDialogComponent.tsx b/frontend/src/features/workspaces/ui/CreateWorkspaceDialogComponent.tsxindex 521ad385..82313447 100644--- a/frontend/src/features/workspaces/ui/CreateWorkspaceDialogComponent.tsx+++ b/frontend/src/features/workspaces/ui/CreateWorkspaceDialogComponent.tsx@@ -2,10 +2,12 @@ import { LoadingOutlined } from '@ant-design/icons';import { App, Button, Input, Modal } from 'antd';import { Spin } from 'antd';import { useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { type UserProfile, UserRole, type UsersSettings } from '../../../entity/users';import type { WorkspaceResponse } from '../../../entity/workspaces';import { workspaceApi } from '../../../entity/workspaces';+import { translateApiError } from '../../../shared/i18n';interface Props {user: UserProfile;@@ -24,16 +26,19 @@ export const CreateWorkspaceDialogComponent = ({onWorkspaceCreated,workspacesCount,}: Props) => {+ const { t } = useTranslation();const { message } = App.useApp();const [isCreating, setIsCreating] = useState(false);- const [workspaceName, setWorkspaceName] = useState(workspacesCount === 0 ? 'My workspace' : '');+ const [workspaceName, setWorkspaceName] = useState(+ workspacesCount === 0 ? t('workspaces.create.defaultName') : '',+ );const isAllowedToCreateWorkspaces =globalSettings.isMemberAllowedToCreateWorkspaces || user.role === UserRole.ADMIN;const handleCreateWorkspace = async () => {if (!workspaceName.trim()) {- message.error('Please enter a workspace name');+ message.error(t('workspaces.create.nameRequired'));return;}@@ -44,11 +49,11 @@ export const CreateWorkspaceDialogComponent = ({name: workspaceName.trim(),});- message.success('Workspace created successfully');+ message.success(t('workspaces.create.created'));onWorkspaceCreated(newWorkspace);onClose();} catch (error) {- message.error((error as Error).message || 'Failed to create workspace');+ message.error(translateApiError(error, t));} finally {setIsCreating(false);}@@ -57,31 +62,28 @@ export const CreateWorkspaceDialogComponent = ({if (!isAllowedToCreateWorkspaces) {return (<Modal- title="Permission denied"+ title={t('workspaces.create.permissionDenied.title')}openonCancel={onClose}footer={[<Button key="ok" type="primary" onClick={onClose}>- OK+ {t('common.actions.ok')}</Button>,]}>- <p>- You don't have permission to create workspaces. Please ask the administrator to- create the workspace for you.- </p>+ <p>{t('workspaces.create.permissionDenied.description')}</p></Modal>);}return (<Modal- title="Create workspace"+ title={t('workspaces.create.title')}openonCancel={onClose}footer={[<Button key="cancel" onClick={onClose} disabled={isCreating}>- Cancel+ {t('common.actions.cancel')}</Button>,<Button@@ -94,30 +96,23 @@ export const CreateWorkspaceDialogComponent = ({{isCreating ? (<Spin indicator={<LoadingOutlined spin />} size="small" />) : (- 'Create workspace'+ t('workspaces.create.submit'))}</Button>,]}><div className="mb-4"><div className="dark:text-gray-300">- Workspace is a place where you group:- <br />- - your databases;- <br />- - storages (like local drive, S3, Google Drive, etc.)- <br />- - notifiers (like email, Slack, Telegram, etc.);- <br />- access control (if you have team);+ <Trans i18nKey="workspaces.create.description" components={{ lineBreak: <br /> }} /></div><label className="mt-5 mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">- Workspace name+ {t('workspaces.fields.name')}</label><Inputvalue={workspaceName}onChange={(e) => setWorkspaceName(e.target.value)}- placeholder="Enter workspace name"+ placeholder={t('workspaces.fields.namePlaceholder')}disabled={isCreating}onPressEnter={handleCreateWorkspace}autoFocusdiff --git a/frontend/src/features/workspaces/ui/WorkspaceAuditLogsComponent.tsx b/frontend/src/features/workspaces/ui/WorkspaceAuditLogsComponent.tsxindex 0a9fe75d..789eb694 100644--- a/frontend/src/features/workspaces/ui/WorkspaceAuditLogsComponent.tsx+++ b/frontend/src/features/workspaces/ui/WorkspaceAuditLogsComponent.tsx@@ -3,10 +3,12 @@ import { App, Spin, Table } from 'antd';import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';import { useCallback, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import type { AuditLog } from '../../../entity/audit-logs/model/AuditLog';import { workspaceApi } from '../../../entity/workspaces/api/workspaceApi';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserShortTimeFormat } from '../../../shared/time';interface Props {@@ -18,6 +20,8 @@ export function WorkspaceAuditLogsComponent({workspaceId,scrollContainerRef: externalScrollRef,}: Props) {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const isMobile = useIsMobile();const [auditLogs, setAuditLogs] = useState<AuditLog[]>([]);@@ -79,9 +83,7 @@ export function WorkspaceAuditLogsComponent({setTotal(response.total);setHasMore(response.auditLogs.length === pageSize);} catch (error: unknown) {- const errorMessage =- error instanceof Error ? error.message : 'Failed to load workspace audit logs';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {loadingRef.current = false;setIsLoading(false);@@ -105,14 +107,14 @@ export function WorkspaceAuditLogsComponent({const columns: ColumnsType<AuditLog> = [{- title: 'User',+ title: t('auditLogs.columns.user'),key: 'user',width: 300,render: (_, record: AuditLog) => {if (!record.userEmail && !record.userName) {return (<span className="inline-block rounded-full bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300">- System+ {t('auditLogs.systemUser')}</span>);}@@ -129,7 +131,7 @@ export function WorkspaceAuditLogsComponent({},},{- title: 'Message',+ title: t('auditLogs.columns.message'),dataIndex: 'message',key: 'message',render: (message: string) => (@@ -137,7 +139,7 @@ export function WorkspaceAuditLogsComponent({),},{- title: 'Created',+ title: t('auditLogs.columns.created'),dataIndex: 'createdAt',key: 'createdAt',width: 250,@@ -146,7 +148,7 @@ export function WorkspaceAuditLogsComponent({const timeFormat = getUserShortTimeFormat();return (<span className="text-xs text-gray-700 dark:text-gray-300">- {`${date.format(timeFormat.format)} (${date.fromNow()})`}+ {`${date.format(timeFormat.format)} (${formatRelativeTime(date)})`}</span>);},@@ -161,7 +163,7 @@ export function WorkspaceAuditLogsComponent({if (!log.userEmail && !log.userName) {return (<span className="inline-block rounded-full bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300">- System+ {t('auditLogs.systemUser')}</span>);}@@ -184,7 +186,7 @@ export function WorkspaceAuditLogsComponent({<div className="flex-1">{getUserDisplay()}</div><div className="text-right text-xs text-gray-500 dark:text-gray-400"><div>{date.format(timeFormat.format)}</div>- <div className="text-gray-400 dark:text-gray-500">{date.fromNow()}</div>+ <div className="text-gray-400 dark:text-gray-500">{formatRelativeTime(date)}</div></div></div><div className="mt-2 text-sm text-gray-900 dark:text-gray-100">{log.message}</div>@@ -199,12 +201,12 @@ export function WorkspaceAuditLogsComponent({return (<div className="max-w-[1200px]"><div className="mb-4 flex items-center justify-between">- <h2 className="text-xl font-bold text-gray-900 dark:text-white">Audit logs</h2>+ <h2 className="text-xl font-bold text-gray-900 dark:text-white">{t('auditLogs.title')}</h2><div className="text-sm text-gray-500 dark:text-gray-400">{isLoading ? (<Spin indicator={<LoadingOutlined spin />} />) : (- `${auditLogs.length} of ${total} logs`+ t('auditLogs.loadedOfTotal', { loaded: auditLogs.length, total }))}</div></div>@@ -215,7 +217,7 @@ export function WorkspaceAuditLogsComponent({</div>) : auditLogs.length === 0 ? (<div className="flex h-32 items-center justify-center text-gray-500 dark:text-gray-400">- No audit logs found for this workspace.+ {t('workspaces.auditLogs.empty')}</div>) : (<>@@ -236,14 +238,14 @@ export function WorkspaceAuditLogsComponent({<div className="flex justify-center py-4"><Spin indicator={<LoadingOutlined spin />} /><span className="ml-2 text-sm text-gray-500 dark:text-gray-400">- Loading more logs...+ {t('auditLogs.loadingMore')}</span></div>)}{!hasMore && auditLogs.length > 0 && (<div className="py-4 text-center text-sm text-gray-500 dark:text-gray-400">- All logs loaded ({auditLogs.length} total)+ {t('auditLogs.allLoaded', { count: auditLogs.length })}</div>)}</>diff --git a/frontend/src/features/workspaces/ui/WorkspaceMembershipComponent.tsx b/frontend/src/features/workspaces/ui/WorkspaceMembershipComponent.tsxindex 2b442f98..21a67424 100644--- a/frontend/src/features/workspaces/ui/WorkspaceMembershipComponent.tsx+++ b/frontend/src/features/workspaces/ui/WorkspaceMembershipComponent.tsx@@ -22,8 +22,9 @@ import {import type { ColumnsType } from 'antd/es/table';import dayjs from 'dayjs';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';-import type { UserProfile } from '../../../entity/users';+import { type UserProfile, WORKSPACE_ROLE_LABEL_KEYS } from '../../../entity/users';import { userManagementApi } from '../../../entity/users/api/userManagementApi';import { UserRole } from '../../../entity/users/model/UserRole';import { WorkspaceRole } from '../../../entity/users/model/WorkspaceRole';@@ -38,7 +39,7 @@ import type {} from '../../../entity/workspaces';import { AddMemberStatusEnum, workspaceMembershipApi } from '../../../entity/workspaces';import { useIsMobile } from '../../../shared/hooks';-import { StringUtils } from '../../../shared/lib';+import { translateApiError, useLocale } from '../../../shared/i18n';import { getUserShortTimeFormat } from '../../../shared/time';interface Props {@@ -46,7 +47,11 @@ interface Props {user: UserProfile;}+type RoleTagColor = 'purple' | 'orange' | 'blue' | 'green' | 'default';+export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props) {+ const { t } = useTranslation();+ const { formatRelativeTime } = useLocale();const { message } = App.useApp();const isMobile = useIsMobile();@@ -103,11 +108,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props));setMembers(response.members);} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to load members';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsLoadingMembers(false);}@@ -125,11 +126,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)const activeUsers = response.users.filter((u) => u.isActive);setUserSearchResults(activeUsers);} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to search users';- message.error(errorMessage);+ message.error(translateApiError(error, t));setUserSearchResults([]);} finally {setIsSearchingUsers(false);@@ -149,7 +146,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)const handleAddMember = async () => {if (!addMemberForm.email.trim()) {setAddMemberEmailError(true);- message.error('Email is required');+ message.error(t('workspaces.members.add.emailRequired'));return;}setAddMemberEmailError(false);@@ -170,7 +167,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)setIsAddMemberModalOpen(false);if (response.status === AddMemberStatusEnum.ADDED) {- message.success('Member added successfully');+ message.success(t('workspaces.members.add.added'));loadMembers();} else if (response.status === AddMemberStatusEnum.INVITED) {setInvitedEmail(emailToRemember);@@ -178,11 +175,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)loadMembers();}} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to add member';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsAddingMember(false);}@@ -200,13 +193,9 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)prev.map((member) => (member.userId === userId ? { ...member, role: newRole } : member)),);- message.success('Member role updated successfully');+ message.success(t('workspaces.members.roleChanged'));} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to change member role';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setChangingRoleFor(null);setIsChangingRole(false);@@ -219,13 +208,9 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)try {await workspaceMembershipApi.removeMember(workspaceResponse.id, userId);setMembers((prev) => prev.filter((member) => member.userId !== userId));- message.success(`Member "${memberEmail}" removed successfully`);+ message.success(t('workspaces.members.remove.removed', { email: memberEmail }));} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to remove member';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setRemovingMembers((prev) => {const newSet = new Set(prev);@@ -238,7 +223,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)const handleTransferOwnership = async () => {if (!transferForm.selectedMemberId) {setTransferMemberError(true);- message.error('Please select a member to transfer ownership to');+ message.error(t('workspaces.transferOwnership.memberRequired'));return;}@@ -246,7 +231,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)(member) => member.userId === transferForm.selectedMemberId,);if (!selectedMember) {- message.error('Selected member not found');+ message.error(t('workspaces.transferOwnership.memberNotFound'));return;}@@ -261,20 +246,16 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)setTransferForm({ selectedMemberId: '' });setIsTransferOwnershipModalOpen(false);- message.success('Ownership transferred successfully');+ message.success(t('workspaces.transferOwnership.transferred'));loadMembers();} catch (error: unknown) {- const errorMessage =- error instanceof Error- ? StringUtils.capitalizeFirstLetter(error.message)- : 'Failed to transfer ownership';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsTransferringOwnership(false);}};- const getRoleColor = (role: WorkspaceRole): string => {+ const getRoleColor = (role: WorkspaceRole): RoleTagColor => {switch (role) {case WorkspaceRole.OWNER:return 'purple';@@ -289,28 +270,28 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)}};- const getRoleDisplayText = (role: WorkspaceRole): string => {- switch (role) {- case WorkspaceRole.OWNER:- return 'Owner';- case WorkspaceRole.ADMIN:- return 'Admin';- case WorkspaceRole.MEMBER:- return 'Member';- case WorkspaceRole.VIEWER:- return 'Viewer';- default:- return role;- }- };+ const toRoleOptions = (roles: WorkspaceRole[]) =>+ roles.map((role) => ({ label: t(WORKSPACE_ROLE_LABEL_KEYS[role]), value: role }));useEffect(() => {loadMembers();}, [workspaceResponse.id]);+ const memberRoleOptions = toRoleOptions([+ WorkspaceRole.ADMIN,+ WorkspaceRole.MEMBER,+ WorkspaceRole.VIEWER,+ ]);++ const newMemberRoleOptions = toRoleOptions([+ WorkspaceRole.VIEWER,+ WorkspaceRole.MEMBER,+ WorkspaceRole.ADMIN,+ ]);+const columns: ColumnsType<WorkspaceMemberResponse> = [{- title: 'Member',+ title: t('workspaces.members.fields.member'),key: 'member',width: 300,render: (_, record: WorkspaceMemberResponse) => (@@ -324,7 +305,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)),},{- title: 'Role',+ title: t('workspaces.members.fields.role'),dataIndex: 'role',key: 'role',width: 150,@@ -339,20 +320,16 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)loading={changingRoleFor === record.userId && isChangingRole}disabled={changingRoleFor === record.userId && isChangingRole}size="small"- style={{ width: 110 }}- options={[- { label: 'Admin', value: WorkspaceRole.ADMIN },- { label: 'Member', value: WorkspaceRole.MEMBER },- { label: 'Viewer', value: WorkspaceRole.VIEWER },- ]}+ style={{ width: 150 }}+ options={memberRoleOptions}/>);}- return <Tag color={getRoleColor(role)}>{getRoleDisplayText(role)}</Tag>;+ return <Tag color={getRoleColor(role)}>{t(WORKSPACE_ROLE_LABEL_KEYS[role])}</Tag>;},},{- title: 'Joined',+ title: t('workspaces.members.fields.joined'),dataIndex: 'createdAt',key: 'createdAt',width: 200,@@ -362,13 +339,15 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)return (<div className="text-sm text-gray-600 dark:text-gray-300"><div>{date.format(timeFormat.format)}</div>- <div className="text-xs text-gray-400 dark:text-gray-500">{date.fromNow()}</div>+ <div className="text-xs text-gray-400 dark:text-gray-500">+ {formatRelativeTime(date)}+ </div></div>);},},{- title: 'Actions',+ title: t('workspaces.members.fields.actions'),key: 'actions',width: 120,render: (_, record: WorkspaceMemberResponse) => {@@ -378,13 +357,13 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)return (<div className="flex items-center space-x-2">- <Tooltip title="Remove member">+ <Tooltip title={t('workspaces.members.remove.tooltip')}><Popconfirm- title="Remove member"- description={`Are you sure you want to remove "${record.email}" from this workspace?`}+ title={t('workspaces.members.remove.title')}+ description={t('workspaces.members.remove.question', { email: record.email })}onConfirm={() => handleRemoveMember(record.userId, record.email)}- okText="Remove"- cancelText="Cancel"+ okText={t('common.actions.remove')}+ cancelText={t('common.actions.cancel')}okButtonProps={{ danger: true }}><Button@@ -423,11 +402,11 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)</div>{canManageMembers && member.role !== WorkspaceRole.OWNER && !isCurrentUser && (<Popconfirm- title="Remove member"- description={`Are you sure you want to remove "${member.email}" from this workspace?`}+ title={t('workspaces.members.remove.title')}+ description={t('workspaces.members.remove.question', { email: member.email })}onConfirm={() => handleRemoveMember(member.userId, member.email)}- okText="Remove"- cancelText="Cancel"+ okText={t('common.actions.remove')}+ cancelText={t('common.actions.cancel')}okButtonProps={{ danger: true }}><Button@@ -444,7 +423,9 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)<div className="mt-3 flex items-center justify-between"><div>- <div className="text-xs text-gray-500 dark:text-gray-400">Role</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('workspaces.members.fields.role')}+ </div>{canManageMembers && member.role !== WorkspaceRole.OWNER && !isCurrentUser ? (<Selectvalue={member.role}@@ -452,23 +433,25 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)loading={changingRoleFor === member.userId && isChangingRole}disabled={changingRoleFor === member.userId && isChangingRole}size="small"- style={{ width: 110 }}- options={[- { label: 'Admin', value: WorkspaceRole.ADMIN },- { label: 'Member', value: WorkspaceRole.MEMBER },- { label: 'Viewer', value: WorkspaceRole.VIEWER },- ]}+ style={{ width: 150 }}+ options={memberRoleOptions}/>) : (- <Tag color={getRoleColor(member.role)}>{getRoleDisplayText(member.role)}</Tag>+ <Tag color={getRoleColor(member.role)}>+ {t(WORKSPACE_ROLE_LABEL_KEYS[member.role])}+ </Tag>)}</div><div className="text-right">- <div className="text-xs text-gray-500 dark:text-gray-400">Joined</div>+ <div className="text-xs text-gray-500 dark:text-gray-400">+ {t('workspaces.members.fields.joined')}+ </div><div className="text-sm text-gray-600 dark:text-gray-300">{date.format(timeFormat.format)}</div>- <div className="text-xs text-gray-400 dark:text-gray-500">{date.fromNow()}</div>+ <div className="text-xs text-gray-400 dark:text-gray-500">+ {formatRelativeTime(date)}+ </div></div></div></div>@@ -478,7 +461,9 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)return (<div className="max-w-[850px]"><div className="mb-6 flex flex-col gap-3 md:flex-row md:items-center md:justify-between">- <h2 className="text-xl font-bold text-gray-900 dark:text-white">Users</h2>+ <h2 className="text-xl font-bold text-gray-900 dark:text-white">+ {t('workspaces.members.title')}+ </h2><div className="flex flex-col gap-2 md:flex-row md:space-x-2">{canTransferOwnership && (@@ -488,7 +473,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)disabled={isLoadingMembers || eligibleMembers.length === 0}className="w-full md:w-auto">- Transfer ownership+ {t('workspaces.transferOwnership.button')}</Button>)}{canManageMembers && (@@ -499,7 +484,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)disabled={isLoadingMembers}className="w-full border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700 md:w-auto">- Add member+ {t('workspaces.members.add.button')}</Button>)}</div>@@ -513,16 +498,16 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)<div><div className="mb-4 text-sm text-gray-500 dark:text-gray-400">{members.length === 0- ? 'No members found'- : `${members.length} member${members.length !== 1 ? 's' : ''}`}+ ? t('workspaces.members.empty')+ : t('workspaces.members.count', { count: members.length })}</div>{isMobile ? (members.length === 0 ? (<div className="py-8 text-center text-gray-500 dark:text-gray-400">- <div className="mb-2">No members found</div>+ <div className="mb-2">{t('workspaces.members.empty')}</div>{canManageMembers && (- <div className="text-sm">Click "Add member" to get started</div>+ <div className="text-sm">{t('workspaces.members.emptyHint')}</div>)}</div>) : (@@ -538,9 +523,9 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)locale={{emptyText: (<div className="py-8 text-center text-gray-500 dark:text-gray-400">- <div className="mb-2">No members found</div>+ <div className="mb-2">{t('workspaces.members.empty')}</div>{canManageMembers && (- <div className="text-sm">Click "Add member" to get started</div>+ <div className="text-sm">{t('workspaces.members.emptyHint')}</div>)}</div>),@@ -552,7 +537,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props){/* Add Member Modal */}<Modal- title="Add member"+ title={t('workspaces.members.add.title')}open={isAddMemberModalOpen}onOk={handleAddMember}onCancel={() => {@@ -563,15 +548,17 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)setUserSearchResults([]);}}confirmLoading={isAddingMember}- okText="Add member"- cancelText="Cancel"+ okText={t('workspaces.members.add.submit')}+ cancelText={t('common.actions.cancel')}okButtonProps={{className: 'border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700',}}><div className="py-4"><div className="mb-4">- <div className="mb-2 font-medium text-gray-900 dark:text-white">Email address</div>+ <div className="mb-2 font-medium text-gray-900 dark:text-white">+ {t('workspaces.members.fields.email')}+ </div>{user.role === UserRole.ADMIN ? (<AutoCompletevalue={addMemberForm.email}@@ -592,7 +579,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)onFocus={() => {searchUsers('');}}- placeholder="Enter email address"+ placeholder={t('workspaces.members.fields.emailPlaceholder')}status={addMemberEmailError ? 'error' : undefined}options={userSearchResults.map((user) => ({value: user.email,@@ -617,27 +604,24 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)email: e.target.value.toLowerCase().trim(),});}}- placeholder="Enter email address"+ placeholder={t('workspaces.members.fields.emailPlaceholder')}status={addMemberEmailError ? 'error' : undefined}/>)}<div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- If the user exists, they will be added directly. Otherwise, an invitation will be- sent.+ {t('workspaces.members.add.hint')}</div></div><div className="mb-4">- <div className="mb-2 font-medium text-gray-900 dark:text-white">Role</div>+ <div className="mb-2 font-medium text-gray-900 dark:text-white">+ {t('workspaces.members.fields.role')}+ </div><Selectvalue={addMemberForm.role}onChange={(role) => setAddMemberForm({ ...addMemberForm, role })}style={{ width: '100%' }}- options={[- { label: 'Viewer', value: WorkspaceRole.VIEWER },- { label: 'Member', value: WorkspaceRole.MEMBER },- { label: 'Admin', value: WorkspaceRole.ADMIN },- ]}+ options={newMemberRoleOptions}/></div></div>@@ -645,11 +629,11 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props){/* Invite Dialog */}<Modal- title="User invited"+ title={t('workspaces.members.invited.title')}open={isInviteDialogOpen}onOk={() => setIsInviteDialogOpen(false)}onCancel={() => setIsInviteDialogOpen(false)}- okText="OK"+ okText={t('common.actions.ok')}cancelButtonProps={{ style: { display: 'none' } }}okButtonProps={{className: 'border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700',@@ -660,12 +644,10 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)<UserAddOutlined className="mr-3 text-2xl text-blue-600 dark:text-blue-400" /><div><div className="font-medium text-gray-900 dark:text-white">- Invitation sent to {invitedEmail}+ {t('workspaces.members.invited.sentTo', { email: invitedEmail })}</div><div className="mt-1 text-sm text-gray-600 dark:text-gray-300">- The user is not present in the system yet, but has been invited to the workspace.- After the user signs up via specified email, they will automatically become a member- of the workspace.+ {t('workspaces.members.invited.description')}</div></div></div>@@ -674,7 +656,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props){/* Transfer Ownership Modal */}<Modal- title="Transfer workspace ownership"+ title={t('workspaces.transferOwnership.title')}open={isTransferOwnershipModalOpen}onOk={handleTransferOwnership}onCancel={() => {@@ -683,8 +665,8 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)setTransferMemberError(false);}}confirmLoading={isTransferringOwnership}- okText="Transfer ownership"- cancelText="Cancel"+ okText={t('workspaces.transferOwnership.submit')}+ cancelText={t('common.actions.cancel')}okButtonProps={{danger: true,disabled: eligibleMembers.length === 0,@@ -693,28 +675,31 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)<div className="py-4"><div className="mb-4 rounded-md bg-yellow-50 p-3 dark:bg-yellow-900/30"><div className="text-sm text-yellow-800 dark:text-yellow-200">- <strong>Warning:</strong> This action cannot be undone. You will lose ownership of- this workspace and the new owner will have full control.+ <Trans+ i18nKey="workspaces.transferOwnership.warning"+ components={{ bold: <strong /> }}+ /></div></div>{eligibleMembers.length === 0 ? (<div className="rounded-md bg-gray-50 p-4 text-center dark:bg-gray-700"><div className="text-sm text-gray-600 dark:text-gray-300">- No members available to transfer ownership to. You need to have at least one other- member in the workspace to transfer ownership.+ {t('workspaces.transferOwnership.noEligibleMembers')}</div></div>) : (<div className="mb-4">- <div className="mb-2 font-medium text-gray-900 dark:text-white">Select new owner</div>+ <div className="mb-2 font-medium text-gray-900 dark:text-white">+ {t('workspaces.transferOwnership.newOwner')}+ </div><Selectvalue={transferForm.selectedMemberId || undefined}onChange={(memberId) => {setTransferMemberError(false);setTransferForm({ selectedMemberId: memberId });}}- placeholder="Select a member to transfer ownership to"+ placeholder={t('workspaces.transferOwnership.newOwnerPlaceholder')}style={{ width: '100%' }}status={transferMemberError ? 'error' : undefined}options={eligibleMembers.map((member) => ({@@ -730,7 +715,7 @@ export function WorkspaceMembershipComponent({ workspaceResponse, user }: Props)}))}/><div className="mt-1 text-xs text-gray-500 dark:text-gray-400">- The selected member will become the workspace owner+ {t('workspaces.transferOwnership.newOwnerHint')}</div></div>)}diff --git a/frontend/src/features/workspaces/ui/WorkspaceSettingsComponent.tsx b/frontend/src/features/workspaces/ui/WorkspaceSettingsComponent.tsxindex 91c04c60..75b7e630 100644--- a/frontend/src/features/workspaces/ui/WorkspaceSettingsComponent.tsx+++ b/frontend/src/features/workspaces/ui/WorkspaceSettingsComponent.tsx@@ -1,6 +1,7 @@import { LoadingOutlined } from '@ant-design/icons';import { App, Button, Input, Spin } from 'antd';import { useEffect, useRef, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { databaseApi } from '../../../entity/databases/api/databaseApi';import type { UserProfile } from '../../../entity/users/model/UserProfile';@@ -10,6 +11,7 @@ import { workspaceApi } from '../../../entity/workspaces/api/workspaceApi';import type { Workspace } from '../../../entity/workspaces/model/Workspace';import type { WorkspaceResponse } from '../../../entity/workspaces/model/WorkspaceResponse';import { useIsMobile } from '../../../shared/hooks';+import { translateApiError } from '../../../shared/i18n';import { WorkspaceAuditLogsComponent } from './WorkspaceAuditLogsComponent';import { WorkspaceMembershipComponent } from './WorkspaceMembershipComponent';@@ -20,6 +22,7 @@ interface Props {}export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeight }: Props) {+ const { t } = useTranslation();const { message, modal } = App.useApp();const isMobile = useIsMobile();const [workspace, setWorkspace] = useState<Workspace | undefined>(undefined);@@ -61,8 +64,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeisetBasicInfoChanges(false);} catch (error: unknown) {- const errorMessage = error instanceof Error ? error.message : 'Failed to load workspace';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsLoading(false);}@@ -82,7 +84,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeiif (!formWorkspace.name?.trim()) {setNameError(true);- message.error('Workspace name is required');+ message.error(t('workspaces.settings.nameRequired'));return;}setNameError(false);@@ -100,11 +102,9 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeisetBasicInfoChanges(false);setNameError(false);- message.success('Basic information updated successfully');+ message.success(t('workspaces.settings.updated'));} catch (error: unknown) {- const errorMessage =- error instanceof Error ? error.message : 'Failed to update basic information';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsSaving(false);}@@ -112,31 +112,36 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeiconst handleDeleteWorkspace = async () => {if (!workspace) {- message.error('Workspace not found');+ message.error(t('workspaces.delete.notFound'));return;}if (!canEdit) {- message.error('You do not have permission to delete this workspace');+ message.error(t('workspaces.delete.noPermission'));return;}modal.confirm({- title: 'Delete Workspace',+ title: t('workspaces.delete.confirmation.title'),content: (<div><p>- Are you sure you want to delete the workspace <strong>{workspace.name}</strong>?+ <Trans+ i18nKey="workspaces.delete.confirmation.question"+ components={{ workspaceName: <strong>{workspace.name}</strong> }}+ /></p><p className="mt-2 text-red-600">- <strong>This action cannot be undone.</strong> All data and associated resources will be- permanently removed.+ <Trans+ i18nKey="workspaces.delete.confirmation.warning"+ components={{ bold: <strong /> }}+ /></p></div>),- okText: 'Delete Workspace',+ okText: t('workspaces.delete.confirmation.submit'),okType: 'danger',- cancelText: 'Cancel',+ cancelText: t('common.actions.cancel'),onOk: async () => {setIsDeleting(true);try {@@ -144,19 +149,15 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeiconst databases = await databaseApi.getDatabases(workspace.id);if (databases && databases.length > 0) {- message.error(- `Cannot delete workspace. Please remove all databases first. Found ${databases.length} database(s).`,- );+ message.error(t('workspaces.delete.hasDatabases', { count: databases.length }));return;}await workspaceApi.deleteWorkspace(workspace.id);- message.success('Workspace deleted successfully');+ message.success(t('workspaces.delete.deleted'));window.location.href = '/';} catch (error: unknown) {- const errorMessage =- error instanceof Error ? error.message : 'Failed to delete workspace';- message.error(errorMessage);+ message.error(translateApiError(error, t));} finally {setIsDeleting(false);}@@ -172,7 +173,9 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeiclassName={`grow overflow-y-auto rounded bg-white shadow dark:bg-gray-800 ${isMobile ? 'p-3' : 'p-5'}`}style={{ height: contentHeight }}>- <h1 className="mb-6 text-2xl font-bold dark:text-white">Workspace settings</h1>+ <h1 className="mb-6 text-2xl font-bold dark:text-white">+ {t('workspaces.settings.title')}+ </h1>{isLoading || !workspace ? (<Spin indicator={<LoadingOutlined spin />} size="large" />@@ -181,7 +184,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHei{!canEdit && (<div className="my-4 max-w-[500px] rounded-md bg-yellow-50 p-3 dark:bg-yellow-900/30"><div className="text-sm text-yellow-800 dark:text-yellow-200">- You don't have permission to modify these settings+ {t('workspaces.settings.readOnly')}</div></div>)}@@ -190,7 +193,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHei<div className="max-w-2xl border-b border-gray-200 pb-6 dark:border-gray-700"><div className="max-w-md"><div className="mb-1 font-medium text-gray-900 dark:text-white">- Workspace name+ {t('workspaces.fields.name')}</div><Inputvalue={formWorkspace.name || ''}@@ -199,7 +202,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeihandleFieldChange('name', e.target.value);}}disabled={!canEdit}- placeholder="Enter workspace name"+ placeholder={t('workspaces.fields.namePlaceholder')}maxLength={100}status={nameError ? 'error' : undefined}/>@@ -214,7 +217,9 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeidisabled={isSaving}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- {isSaving ? 'Saving...' : 'Save Changes'}+ {isSaving+ ? t('workspaces.settings.saving')+ : t('workspaces.settings.saveChanges')}</Button><Button@@ -229,7 +234,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHei}}disabled={isSaving}>- Reset+ {t('workspaces.settings.reset')}</Button></div>)}@@ -242,7 +247,7 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHei{canEdit && (<div className="max-w-2xl border-b border-gray-200 pb-6 dark:border-gray-700"><h2 className="mb-4 text-xl font-bold text-gray-900 dark:text-white">- Danger Zone+ {t('workspaces.delete.dangerZone')}</h2><div className="rounded-lg border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/30">@@ -251,11 +256,10 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHei><div className="flex-1"><div className="font-medium text-red-900 dark:text-red-200">- Delete this workspace+ {t('workspaces.delete.title')}</div><div className="mt-1 text-sm text-red-700 dark:text-red-300">- Once you delete a workspace, there is no going back. All data and- resources associated with this workspace will be permanently removed.+ {t('workspaces.delete.description')}</div></div>@@ -268,7 +272,9 @@ export function WorkspaceSettingsComponent({ workspaceResponse, user, contentHeiloading={isDeleting}className={`bg-red-600 hover:bg-red-700 ${isMobile ? 'w-full' : ''}`}>- {isDeleting ? 'Deleting...' : 'Delete workspace'}+ {isDeleting+ ? t('workspaces.delete.deleting')+ : t('workspaces.delete.submit')}</Button></div></div>diff --git a/frontend/src/main.tsx b/frontend/src/main.tsxindex 2a7b2bd9..11378d3a 100644--- a/frontend/src/main.tsx+++ b/frontend/src/main.tsx@@ -1,5 +1,4 @@import dayjs from 'dayjs';-import relativeTime from 'dayjs/plugin/relativeTime';import utc from 'dayjs/plugin/utc';import { createRoot } from 'react-dom/client';@@ -8,6 +7,5 @@ import './index.css';import App from './App.tsx';dayjs.extend(utc);-dayjs.extend(relativeTime);createRoot(document.getElementById('root')!).render(<App />);diff --git a/frontend/src/pages/AuthPageComponent.tsx b/frontend/src/pages/AuthPageComponent.tsxindex 2d6a9442..ea12b8c8 100644--- a/frontend/src/pages/AuthPageComponent.tsx+++ b/frontend/src/pages/AuthPageComponent.tsx@@ -1,6 +1,7 @@import { LoadingOutlined } from '@ant-design/icons';import { Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { userApi } from '../entity/users';import {@@ -12,8 +13,10 @@ import {SignUpComponent,} from '../features/users';import { useScreenHeight } from '../shared/hooks';+import { translateApiError } from '../shared/i18n';export function AuthPageComponent() {+ const { t } = useTranslation();const [isAdminHasPassword, setIsAdminHasPassword] = useState(false);const [authMode, setAuthMode] = useState<'signIn' | 'signUp' | 'requestReset' | 'resetPassword'>('signUp',@@ -32,7 +35,7 @@ export function AuthPageComponent() {setLoading(false);}).catch((e) => {- alert('Failed to check admin password status: ' + (e as Error).message);+ alert(t('app.auth.adminPasswordCheckFailed', { error: translateApiError(e, t) }));});};diff --git a/frontend/src/pages/OAuthCallbackPage.tsx b/frontend/src/pages/OAuthCallbackPage.tsxindex 395b0278..0848061e 100644--- a/frontend/src/pages/OAuthCallbackPage.tsx+++ b/frontend/src/pages/OAuthCallbackPage.tsx@@ -1,15 +1,20 @@import { LoadingOutlined } from '@ant-design/icons';import { Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { useNavigate, useSearchParams } from 'react-router';import { getOAuthRedirectUri } from '../constants';import { userApi } from '../entity/users';+import { type TranslationKey, translateApiError } from '../shared/i18n';++type CallbackFailure = { detectedFailureKey: TranslationKey } | { signInError: unknown };export function OAuthCallbackPage() {const [searchParams] = useSearchParams();const navigate = useNavigate();- const [error, setError] = useState<string>('');+ const { t } = useTranslation();+ const [failure, setFailure] = useState<CallbackFailure>();useEffect(() => {const handleOAuthCallback = async () => {@@ -17,12 +22,12 @@ export function OAuthCallbackPage() {const state = searchParams.get('state');if (!code) {- setError('Authorization code not found');+ setFailure({ detectedFailureKey: 'app.oauthCallback.codeNotFound' });return;}if (!state) {- setError('OAuth state parameter missing');+ setFailure({ detectedFailureKey: 'app.oauthCallback.stateMissing' });return;}@@ -34,13 +39,13 @@ export function OAuthCallbackPage() {} else if (state === 'google') {await userApi.handleGoogleOAuth({ code, redirectUri });} else {- setError('Invalid OAuth provider');+ setFailure({ detectedFailureKey: 'app.oauthCallback.invalidProvider' });return;}navigate('/');} catch (e) {- setError((e as Error).message || 'OAuth authentication failed');+ setFailure({ signInError: e });}};@@ -49,26 +54,30 @@ export function OAuthCallbackPage() {return (<div className="flex h-screen w-screen flex-col items-center justify-center">- {error ? (+ {failure ? (<div><div className="mb-4 text-center text-xl font-semibold text-red-600">- Authentication Failed+ {t('app.oauthCallback.failedTitle')}+ </div>+ <div className="text-center text-sm text-gray-600">+ {'detectedFailureKey' in failure+ ? t(failure.detectedFailureKey)+ : translateApiError(failure.signInError, t)}</div>- <div className="text-center text-sm text-gray-600">{error}</div><div className="mt-6 text-center"><buttontype="button"onClick={() => navigate('/')}className="cursor-pointer font-medium text-blue-600 hover:text-blue-700">- Return to sign in+ {t('app.oauthCallback.returnToSignIn')}</button></div></div>) : (<div className="flex flex-col items-center"><Spin indicator={<LoadingOutlined spin />} size="large" />- <div className="mt-4 text-gray-600">Completing authentication...</div>+ <div className="mt-4 text-gray-600">{t('app.oauthCallback.completing')}</div></div>)}</div>diff --git a/frontend/src/pages/OauthStorageComponent.tsx b/frontend/src/pages/OauthStorageComponent.tsxindex f2bbdd4c..11fd41b6 100644--- a/frontend/src/pages/OauthStorageComponent.tsx+++ b/frontend/src/pages/OauthStorageComponent.tsx@@ -1,5 +1,6 @@import { Modal, Spin } from 'antd';import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';import { type Storage, StorageType } from '../entity/storages';import type { StorageOauthDto } from '../entity/storages/models/StorageOauthDto';@@ -8,12 +9,13 @@ import { userApi } from '../entity/users';import { EditStorageComponent } from '../features/storages/ui/edit/EditStorageComponent';export function OauthStorageComponent() {+ const { t } = useTranslation();const [storage, setStorage] = useState<Storage | undefined>();const [user, setUser] = useState<UserProfile | undefined>();const exchangeGoogleOauthCode = async (oauthDto: StorageOauthDto) => {if (!oauthDto.storage.googleDriveStorage) {- alert('Google Drive storage configuration not found');+ alert(t('app.oauthStorage.configNotFound'));return;}@@ -50,7 +52,9 @@ export function OauthStorageComponent() {oauthDto.storage.googleDriveStorage.tokenJson = JSON.stringify(tokenData);setStorage(oauthDto.storage);} catch (error) {- alert(`Failed to exchange OAuth code: ${error}`);+ // Google's own error description is English and technical: it goes to the console only+ console.error('Failed to exchange OAuth code:', error);+ alert(t('app.oauthStorage.exchangeFailed'));// Return to home if exchange failssetTimeout(() => {window.location.href = '/';@@ -64,13 +68,13 @@ export function OauthStorageComponent() {const processOauthDto = (oauthDto: StorageOauthDto) => {if (oauthDto.storage.type === StorageType.GOOGLE_DRIVE) {if (!oauthDto.storage.googleDriveStorage) {- alert('Google Drive storage configuration not found in DTO');+ alert(t('app.oauthStorage.configNotFound'));return;}exchangeGoogleOauthCode(oauthDto);} else {- alert('Unsupported storage type for OAuth');+ alert(t('app.oauthStorage.unsupportedType'));}};@@ -97,12 +101,12 @@ export function OauthStorageComponent() {return;} catch (e) {console.error('Error parsing OAuth state:', e);- alert('OAuth state parameter is invalid');+ alert(t('app.oauthStorage.invalidState'));return;}}- alert('OAuth param not found. Ensure the redirect URL is configured correctly.');+ alert(t('app.oauthStorage.paramNotFound'));}, []);if (!storage || !user) {@@ -116,7 +120,7 @@ export function OauthStorageComponent() {return (<div><Modal- title="Add storage"+ title={t('app.oauthStorage.addStorageTitle')}footer={<div />}openonCancel={() => {@@ -124,7 +128,7 @@ export function OauthStorageComponent() {}}><div className="my-3 max-w-[250px] text-gray-500 dark:text-gray-400">- Storage - is a place where backups will be stored (local disk, S3, etc.)+ {t('app.oauthStorage.storageDescription')}</div><EditStorageComponentdiff --git a/frontend/src/shared/api/ApiError.ts b/frontend/src/shared/api/ApiError.tsindex f3758e38..269da63f 100644--- a/frontend/src/shared/api/ApiError.ts+++ b/frontend/src/shared/api/ApiError.ts@@ -1,12 +1,29 @@-// Thrown by apiHelper for non-2xx responses. Extends Error so existing callers that only read-// `.message` keep working, while callers that care can branch on the machine-readable `code` the-// backend returns (e.g. a classified connection-test failure).+// Codes the frontend assigns to failures the backend does not describe itself. They use the same+// snake_case form as the backend's codes, so translateApiError resolves both the same way.+export const API_ERROR_CODES = {+ // The request never got an answer: the server is down or the network is unreachable+ networkUnreachable: 'network_unreachable',+ // The server answered with an error status but no JSON error body (e.g. a 502 from a proxy)+ requestFailed: 'request_failed',+} as const;++interface ApiErrorFields {+ // Only the backend's own message, which may be empty+ message?: string;+ // The backend's machine-readable code, or one of API_ERROR_CODES+ code?: string;+ status?: number;+}++// Thrown by apiHelper for failed requests. Show it to users through translateApiError.export class ApiError extends Error {readonly code?: string;+ readonly status?: number;- constructor(message: string, code?: string) {+ constructor({ message = '', code, status }: ApiErrorFields) {super(message);this.name = 'ApiError';this.code = code;+ this.status = status;}}diff --git a/frontend/src/shared/api/apiHelper.test.ts b/frontend/src/shared/api/apiHelper.test.tsnew file mode 100644index 00000000..0aa11645--- /dev/null+++ b/frontend/src/shared/api/apiHelper.test.ts@@ -0,0 +1,138 @@+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';++import { API_ERROR_CODES, type ApiError } from './ApiError';+import { apiHelper } from './apiHelper';++const REPEAT_TRIES_COUNT = 30;+const REPEAT_INTERVAL_MS = 3_000;++const jsonResponse = (status: number, body: unknown) =>+ new Response(JSON.stringify(body), {+ status,+ headers: { 'Content-Type': 'application/json' },+ });++// Compared by name rather than instanceof: the retry tests load a fresh copy of the module graph.+const catchError = async (request: Promise<unknown>): Promise<ApiError> => {+ try {+ await request;+ } catch (e) {+ if (e instanceof Error && e.name === 'ApiError') {+ return e as ApiError;+ }+ throw e;+ }+ throw new Error('request did not fail');+};++beforeEach(() => {+ vi.stubGlobal('localStorage', { getItem: () => null, removeItem: () => {} });+});++afterEach(() => {+ vi.unstubAllGlobals();+ vi.useRealTimers();+});++describe('apiHelper failures, first try is the last', () => {+ it('turns a fetch rejection into network_unreachable', async () => {+ vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new TypeError('Failed to fetch')));++ const error = await catchError(apiHelper.fetchGetJson('/api/v1/x'));++ expect(error.code).toBe(API_ERROR_CODES.networkUnreachable);+ expect(error.status).toBeUndefined();+ expect(error.message).toBe('');+ });++ it('turns a 502 into request_failed with its status', async () => {+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response('Bad Gateway', { status: 502 })));++ const error = await catchError(apiHelper.fetchGetJson('/api/v1/x'));++ expect(error.code).toBe(API_ERROR_CODES.requestFailed);+ expect(error.status).toBe(502);+ expect(error.message).toBe('');+ });++ it('turns a 500 without a JSON body into request_failed with its status', async () => {+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response('oops', { status: 500 })));++ const error = await catchError(apiHelper.fetchPostJson('/api/v1/x'));++ expect(error.code).toBe(API_ERROR_CODES.requestFailed);+ expect(error.status).toBe(500);+ expect(error.message).toBe('');+ });++ it('keeps the code, message and status of a JSON error', async () => {+ vi.stubGlobal(+ 'fetch',+ vi+ .fn()+ .mockResolvedValue(jsonResponse(400, { message: 'bad host', code: 'host_unreachable' })),+ );++ const error = await catchError(apiHelper.fetchPostJson('/api/v1/x'));++ expect(error.code).toBe('host_unreachable');+ expect(error.message).toBe('bad host');+ expect(error.status).toBe(400);+ });++ it('keeps an error without code or message empty rather than filling in the URL', async () => {+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(jsonResponse(404, {})));++ const error = await catchError(apiHelper.fetchGetJson('/api/v1/x'));++ expect(error.code).toBeUndefined();+ expect(error.message).toBe('');+ expect(error.status).toBe(404);+ });+});++describe('apiHelper failures with isRetryOnError', () => {+ // The rate limiter starts its refill interval when the module loads, so the module is loaded+ // again after the fake timers are installed; otherwise the 31st try waits for a real refill.+ const runWithRetries = async (fetchMock: ReturnType<typeof vi.fn>) => {+ vi.useFakeTimers();+ vi.resetModules();+ vi.stubGlobal('fetch', fetchMock);+ const { apiHelper: freshApiHelper } = await import('./apiHelper');++ const result = catchError(freshApiHelper.fetchGetJson('/api/v1/x', undefined, true));+ await vi.advanceTimersByTimeAsync((REPEAT_TRIES_COUNT + 1) * REPEAT_INTERVAL_MS * 2);++ return result;+ };++ it('gives network_unreachable after the last retry', async () => {+ const fetchMock = vi.fn().mockRejectedValue(new TypeError('Failed to fetch'));++ const error = await runWithRetries(fetchMock);++ expect(error.code).toBe(API_ERROR_CODES.networkUnreachable);+ expect(fetchMock).toHaveBeenCalledTimes(REPEAT_TRIES_COUNT + 1);+ });++ it('gives request_failed with the status after the last retry', async () => {+ const error = await runWithRetries(+ vi.fn().mockImplementation(async () => new Response('Gateway Timeout', { status: 504 })),+ );++ expect(error.code).toBe(API_ERROR_CODES.requestFailed);+ expect(error.status).toBe(504);+ });++ it('keeps a backend code through the retries', async () => {+ const error = await runWithRetries(+ vi+ .fn()+ .mockImplementation(async () => jsonResponse(422, { message: 'wal gap', code: 'wal_gap' })),+ );++ expect(error.code).toBe('wal_gap');+ expect(error.message).toBe('wal gap');+ expect(error.status).toBe(422);+ });+});diff --git a/frontend/src/shared/api/apiHelper.ts b/frontend/src/shared/api/apiHelper.tsindex 7859dca0..ca9af705 100644--- a/frontend/src/shared/api/apiHelper.ts+++ b/frontend/src/shared/api/apiHelper.ts@@ -1,5 +1,5 @@import { accessTokenHelper } from '.';-import { ApiError } from './ApiError';+import { API_ERROR_CODES, ApiError } from './ApiError';import { RateLimiter } from './RateLimiter';import RequestOptions from './RequestOptions';@@ -7,44 +7,42 @@ const REPEAT_TRIES_COUNT = 30;const REPEAT_INTERVAL_MS = 3_000;const rateLimiter = new RateLimiter(30, 1_000);-const handleOrThrowMessageIfResponseError = async (- url: string,- response: Response,- handleNotAuthorizedError = true,-) => {- if (handleNotAuthorizedError && response.status === 401) {+const clearTokenAndReloadIfUnauthorized = (response: Response) => {+ if (response.status === 401) {accessTokenHelper?.cleanAccessToken();window.location.reload();}+};+const throwIfErrorResponse = async (response: Response) => {if (response.status === 502 || response.status === 504) {- throw new Error('failed to fetch');+ throw new ApiError({ code: API_ERROR_CODES.requestFailed, status: response.status });}if (response.status >= 400 && response.status <= 600) {- let errorMessage: string | undefined;- let errorCode: string | undefined;+ let body: { message?: string; error?: string; code?: string } | null;try {- const json = (await response.json()) as {- message?: string;- error?: string;- code?: string;- };- errorMessage = json.message || json.error;- errorCode = json.code;+ body = await response.json();} catch {- try {- errorMessage = await response.text();- } catch {- /* ignore */- }+ throw new ApiError({ code: API_ERROR_CODES.requestFailed, status: response.status });}- throw new ApiError(- errorMessage ?? errorCode ?? `${url}: request failed with status ${response.status}`,- errorCode,- );+ throw new ApiError({+ message: body?.message || body?.error,+ code: body?.code,+ status: response.status,+ });+ }+};++// Only the rejection of fetch itself means the server was never reached. ApiErrors thrown for an+// answered request must not be mistaken for it.+const fetchOrThrowNetworkError = async (url: string, optionsWrapper: RequestOptions) => {+ try {+ return await fetch(url, optionsWrapper.toRequestInit());+ } catch {+ throw new ApiError({ code: API_ERROR_CODES.networkUnreachable });}};@@ -56,8 +54,9 @@ const makeRequest = async (await rateLimiter.acquire();try {- const response = await fetch(url, optionsWrapper.toRequestInit());- await handleOrThrowMessageIfResponseError(url, response);+ const response = await fetchOrThrowNetworkError(url, optionsWrapper);+ clearTokenAndReloadIfUnauthorized(response);+ await throwIfErrorResponse(response);return response;} catch (e) {if (currentTry < REPEAT_TRIES_COUNT) {diff --git a/frontend/src/shared/api/index.ts b/frontend/src/shared/api/index.tsindex 3dee1ca3..2d3c8309 100644--- a/frontend/src/shared/api/index.ts+++ b/frontend/src/shared/api/index.ts@@ -2,4 +2,4 @@ import { accessTokenHelper } from './accessTokenHelper';import { apiHelper } from './apiHelper';export { apiHelper, accessTokenHelper };-export { ApiError } from './ApiError';+export { API_ERROR_CODES, ApiError } from './ApiError';diff --git a/frontend/src/shared/hooks/useIsNewGitHubVersionAvailable.ts b/frontend/src/shared/hooks/useIsNewGitHubVersionAvailable.tsindex 58c7c37c..bd94f212 100644--- a/frontend/src/shared/hooks/useIsNewGitHubVersionAvailable.ts+++ b/frontend/src/shared/hooks/useIsNewGitHubVersionAvailable.ts@@ -4,6 +4,7 @@ import { APP_VERSION } from '../../constants';import { compareVersions, parseGitHubTag } from '../lib';const GITHUB_RELEASES_API = 'https://api.github.com/repos/databasus/databasus/releases/latest';+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst CACHE_KEY = 'githubLatestVersion';const CACHE_TTL_MS = 15 * 60 * 1000;diff --git a/frontend/src/shared/hooks/useVersionCheck.ts b/frontend/src/shared/hooks/useVersionCheck.tsindex edd3bd7a..5e9a077d 100644--- a/frontend/src/shared/hooks/useVersionCheck.ts+++ b/frontend/src/shared/hooks/useVersionCheck.ts@@ -5,6 +5,7 @@ import { systemApi } from '../../entity/system';const VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1000;const RELOAD_COOLDOWN_MS = 10 * 1000;+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst LAST_RELOAD_KEY = 'lastVersionReload';export function useVersionCheck() {diff --git a/frontend/src/shared/i18n/LocaleProvider.tsx b/frontend/src/shared/i18n/LocaleProvider.tsxnew file mode 100644index 00000000..bfe883bf--- /dev/null+++ b/frontend/src/shared/i18n/LocaleProvider.tsx@@ -0,0 +1,82 @@+import dayjs from 'dayjs';+import { useCallback, useEffect, useMemo, useState } from 'react';+import type { ReactNode } from 'react';+import { I18nextProvider } from 'react-i18next';++import { createI18n } from './createI18n';+import { DEFAULT_LOCALE, type Locale, SUPPORTED_LOCALES } from './dictionaries';+import { formatNumber } from './formatNumber';+import { formatRelativeTime } from './formatRelativeTime';+import { LocaleContext } from './localeContext';+import { LOCALE_SETTINGS } from './localeSettings';+import { resolveInitialLocale } from './resolveInitialLocale';++// eslint-disable-next-line i18next/no-literal-string -- localStorage key+const LOCALE_STORAGE_KEY = 'databasus-locale';++function getInitialLocale(): Locale {+ if (typeof window === 'undefined') {+ return DEFAULT_LOCALE;+ }++ return resolveInitialLocale({+ storedLocale: localStorage.getItem(LOCALE_STORAGE_KEY),+ browserLanguages: navigator.languages ?? [navigator.language],+ supportedLocales: SUPPORTED_LOCALES,+ });+}++interface LocaleProviderProps {+ children: ReactNode;+}++export function LocaleProvider({ children }: LocaleProviderProps) {+ const [locale, setLocaleState] = useState<Locale>(getInitialLocale);++ // Created once with the resolved language, before the first render, so the first paint is+ // already in that language. dayjs is global, so its locale is set here for the same reason.+ const [i18n] = useState(() => {+ dayjs.locale(LOCALE_SETTINGS[locale].dayjsLocale);+ return createI18n(locale);+ });++ // The document is outside the React tree: its lang attribute (screen readers, the browser's+ // translate prompt) and its title follow the selection here. index.html keeps the English+ // values as what is shown before this runs.+ useEffect(() => {+ document.documentElement.lang = LOCALE_SETTINGS[locale].languageTag;+ document.title = i18n.t('app.documentTitle');+ }, [locale, i18n]);++ // The libraries switch before the new locale is published, so everything that re-renders from+ // the context or from useTranslation already reads the new language. The tree is never+ // remounted: open drawers and unsaved form input survive a switch.+ const setLocale = useCallback(+ (newLocale: Locale) => {+ dayjs.locale(LOCALE_SETTINGS[newLocale].dayjsLocale);+ void i18n.changeLanguage(newLocale);+ localStorage.setItem(LOCALE_STORAGE_KEY, newLocale);+ setLocaleState(newLocale);+ },+ [i18n],+ );++ const value = useMemo(() => {+ const { languageTag, dayjsLocale, antdLocale } = LOCALE_SETTINGS[locale];++ return {+ locale,+ setLocale,+ antdLocale,+ formatNumber: (number: number, options?: Intl.NumberFormatOptions) =>+ formatNumber(number, languageTag, options),+ formatRelativeTime: (date: dayjs.ConfigType) => formatRelativeTime(date, dayjsLocale),+ };+ }, [locale, setLocale]);++ return (+ <I18nextProvider i18n={i18n}>+ <LocaleContext.Provider value={value}>{children}</LocaleContext.Provider>+ </I18nextProvider>+ );+}diff --git a/frontend/src/shared/i18n/LocalizedText.ts b/frontend/src/shared/i18n/LocalizedText.tsnew file mode 100644index 00000000..9ab34788--- /dev/null+++ b/frontend/src/shared/i18n/LocalizedText.ts@@ -0,0 +1,14 @@+import type { TFunction } from 'i18next';++import type { TranslationKey } from './TranslationKey';++// Returned by code outside components that needs to hand a message with parameters to the UI.+// It carries the key, not the text, so the component translates it in the current language on+// every render.+export interface LocalizedText {+ key: TranslationKey;+ params?: Record<string, string | number>;+}++export const translateLocalizedText = (text: LocalizedText, t: TFunction): string =>+ t(text.key, text.params ?? {});diff --git a/frontend/src/shared/i18n/TransByKey.tsx b/frontend/src/shared/i18n/TransByKey.tsxnew file mode 100644index 00000000..fb7fdb7b--- /dev/null+++ b/frontend/src/shared/i18n/TransByKey.tsx@@ -0,0 +1,17 @@+import type { ReactElement } from 'react';+import { Trans } from 'react-i18next';++import type { TranslationKey } from './TranslationKey';++interface Props {+ i18nKey: TranslationKey;+ components?: Record<string, ReactElement>;+ values?: Record<string, string | number>;+}++// Renders a key held as data (a label table entry, a parser result) through Trans. Trans cannot+// type-check an i18nKey typed as the whole TranslationKey union: TypeScript gives up with TS2590+// because the union is too large. The key is checked here instead, where it is typed.+export function TransByKey({ i18nKey, components, values }: Props) {+ return <Trans i18nKey={i18nKey as never} components={components} values={values} />;+}diff --git a/frontend/src/shared/i18n/TranslationKey.ts b/frontend/src/shared/i18n/TranslationKey.tsnew file mode 100644index 00000000..d6c992c1--- /dev/null+++ b/frontend/src/shared/i18n/TranslationKey.ts@@ -0,0 +1,5 @@+import type { ParseKeys } from 'i18next';++// A dictionary key held as data, e.g. in a label table or a parser result. It gets the same+// compile-time check as a literal key passed to t().+export type TranslationKey = ParseKeys;diff --git a/frontend/src/shared/i18n/createI18n.security.test.tsx b/frontend/src/shared/i18n/createI18n.security.test.tsxnew file mode 100644index 00000000..cd1d8038--- /dev/null+++ b/frontend/src/shared/i18n/createI18n.security.test.tsx@@ -0,0 +1,90 @@+import type { i18n as I18nInstance } from 'i18next';+import { renderToStaticMarkup } from 'react-dom/server';+import { I18nextProvider, Trans } from 'react-i18next';+import { beforeAll, describe, expect, it } from 'vitest';++import { createI18n } from './createI18n';++// Names a user could give a workspace, a database or themselves. Each must reach the page as the+// exact text entered, never as markup.+const HOSTILE_NAMES = ['<img src=x onerror=alert(1)>', '<strong>bold</strong>', 'a {{name}} b'];++const escapeHtml = (text: string) =>+ text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');++const getElementNames = (markup: string) =>+ [...markup.matchAll(/<([a-z][a-z0-9]*)/g)].map((match) => match[1]);++let i18n: I18nInstance;++const render = (node: React.ReactNode) =>+ renderToStaticMarkup(<I18nextProvider i18n={i18n}>{node}</I18nextProvider>);++beforeAll(() => {+ i18n = createI18n('en');+ i18n.addResourceBundle('en', 'translation', {+ securityTest: {+ plain: 'Delete {{name}}?',+ withValues: 'Delete <strong>{{name}}</strong>?',+ withElement: 'Delete <workspaceName/>? This cannot be <bold>undone</bold>.',+ unsuppliedMarkup: 'Run <strong>now</strong> on <host>:<port>',+ },+ });+});++describe('translated text renders as text', () => {+ it.each(HOSTILE_NAMES)('shows %s literally when t() output is rendered', (name) => {+ const markup = render(<p>{i18n.t('securityTest.plain' as never, { name })}</p>);++ expect(markup).toBe(`<p>Delete ${escapeHtml(name)}?</p>`);+ });++ // Trans interpolates values before it parses tags, so a value that spells a supplied tag would+ // become that element without the escaping configured in createI18n.+ it.each(HOSTILE_NAMES)('creates no element from %s passed through Trans values', (name) => {+ const markup = render(+ <p>+ <Trans+ i18nKey={'securityTest.withValues' as never}+ values={{ name }}+ components={{ strong: <strong /> }}+ />+ </p>,+ );++ expect(getElementNames(markup)).toEqual(['p', 'strong']);+ expect(markup).not.toContain('<img');++ // Trans expands placeholder syntax inside a value a second time, which is why user-entered+ // values go through a supplied element instead (next test). Other names come out verbatim.+ if (!name.includes('{{')) {+ expect(markup).toBe(`<p>Delete <strong>${escapeHtml(name)}</strong>?</p>`);+ }+ });++ it.each(HOSTILE_NAMES)('shows %s exactly as entered through a supplied element', (name) => {+ const markup = render(+ <p>+ <Trans+ i18nKey={'securityTest.withElement' as never}+ components={{ workspaceName: <strong>{name}</strong>, bold: <b /> }}+ />+ </p>,+ );++ expect(markup).toBe(+ `<p>Delete <strong>${escapeHtml(name)}</strong>? This cannot be <b>undone</b>.</p>`,+ );+ });++ it('shows tags the component does not supply as text', () => {+ const markup = render(+ <p>+ <Trans i18nKey={'securityTest.unsuppliedMarkup' as never} />+ </p>,+ );++ expect(getElementNames(markup)).toEqual(['p']);+ expect(markup).toBe('<p>Run <strong>now</strong> on <host>:<port></p>');+ });+});diff --git a/frontend/src/shared/i18n/createI18n.ts b/frontend/src/shared/i18n/createI18n.tsnew file mode 100644index 00000000..f5d6e4bf--- /dev/null+++ b/frontend/src/shared/i18n/createI18n.ts@@ -0,0 +1,42 @@+import i18next, { type i18n as I18nInstance } from 'i18next';+import { initReactI18next } from 'react-i18next';++import { DEFAULT_LOCALE, DICTIONARIES, type Locale } from './dictionaries';++const resources = Object.fromEntries(+ Object.entries(DICTIONARIES).map(([locale, dictionary]) => [locale, { translation: dictionary }]),+);++// Resources are passed inline, so init() completes synchronously and the first render already has+// the chosen language's dictionary: no flash of English.+export const createI18n = (locale: Locale): I18nInstance => {+ const instance = i18next.createInstance();++ void instance.use(initReactI18next).init({+ lng: locale,+ // A last-resort guard only: completeness is enforced by `typeof en` at build time.+ fallbackLng: DEFAULT_LOCALE,+ resources,+ // Keys never contain a namespace prefix, so a colon inside a key must not be parsed as one.+ nsSeparator: false,+ interpolation: {+ // React escapes the string t() returns when it is rendered as a child.+ escapeValue: false,+ },+ react: {+ useSuspense: false,+ // Only the tags a component supplies through `components` become elements. A tag a+ // dictionary contains on its own, such as <strong>, is shown as text.+ transKeepBasicHtmlNodesFor: [],+ // Trans interpolates `values` before it parses the sentence for tags, so values are escaped+ // first and unescaped back into plain React text afterwards. Without this a value such as+ // "<strong>x</strong>" would become an element.+ transDefaultProps: {+ shouldUnescape: true,+ tOptions: { interpolation: { escapeValue: true } },+ },+ },+ });++ return instance;+};diff --git a/frontend/src/shared/i18n/dictionaries.test.ts b/frontend/src/shared/i18n/dictionaries.test.tsnew file mode 100644index 00000000..624ac80d--- /dev/null+++ b/frontend/src/shared/i18n/dictionaries.test.ts@@ -0,0 +1,84 @@+import { describe, expect, it } from 'vitest';++import { DICTIONARIES } from './dictionaries';++type Dictionary = { [key: string]: string | Dictionary };++const flatten = (dictionary: Dictionary, prefix = ''): Map<string, string> => {+ const entries = new Map<string, string>();++ for (const [key, value] of Object.entries(dictionary)) {+ const path = prefix ? `${prefix}.${key}` : key;++ if (typeof value === 'string') {+ entries.set(path, value);+ } else {+ flatten(value, path).forEach((nestedValue, nestedPath) =>+ entries.set(nestedPath, nestedValue),+ );+ }+ }++ return entries;+};++const uniqueSorted = (values: string[]) => [...new Set(values)].sort();++// {{name}} and {{name, format}} both count as the placeholder "name"+const getPlaceholders = (text: string) =>+ uniqueSorted([...text.matchAll(/\{\{\s*([^}\s,]+)[^}]*\}\}/g)].map((match) => match[1]));++// <bold>, </bold> and <workspaceName/> all count as the Trans tag of that name+const getTransTags = (text: string) =>+ uniqueSorted([...text.matchAll(/<\/?([A-Za-z][\w-]*)\s*\/?>/g)].map((match) => match[1]));++// Commands and identifiers inside <code> are technical text and stay byte-identical+const getCodeSpans = (text: string) =>+ [...text.matchAll(/<code>(.*?)<\/code>/g)].map((match) => match[1]).sort();++const english = flatten(DICTIONARIES.en);++const translations = Object.entries(DICTIONARIES).filter(([locale]) => locale !== 'en');++describe.each(translations)('the %s dictionary', (locale, dictionary) => {+ const translated = flatten(dictionary);++ it('uses the same {{placeholders}} as English in every message', () => {+ const mismatches = [...english]+ .filter(([key, text]) => {+ const translatedText = translated.get(key) ?? '';+ return getPlaceholders(translatedText).join() !== getPlaceholders(text).join();+ })+ .map(([key, text]) => `${locale}: ${key}: "${translated.get(key)}" vs en "${text}"`);++ expect(mismatches).toEqual([]);+ });++ it('uses the same Trans tags as English in every message', () => {+ const mismatches = [...english]+ .filter(([key, text]) => {+ const translatedText = translated.get(key) ?? '';+ return getTransTags(translatedText).join() !== getTransTags(text).join();+ })+ .map(([key, text]) => `${locale}: ${key}: "${translated.get(key)}" vs en "${text}"`);++ expect(mismatches).toEqual([]);+ });++ it('keeps every <code> span identical to English', () => {+ const mismatches = [...english]+ .filter(([key, text]) => {+ const translatedText = translated.get(key) ?? '';+ return getCodeSpans(translatedText).join('|') !== getCodeSpans(text).join('|');+ })+ .map(([key]) => `${locale}: ${key}`);++ expect(mismatches).toEqual([]);+ });++ it('has no empty message', () => {+ const emptyKeys = [...translated].filter(([, text]) => text.trim() === '').map(([key]) => key);++ expect(emptyKeys).toEqual([]);+ });+});diff --git a/frontend/src/shared/i18n/dictionaries.ts b/frontend/src/shared/i18n/dictionaries.tsnew file mode 100644index 00000000..67e88923--- /dev/null+++ b/frontend/src/shared/i18n/dictionaries.ts@@ -0,0 +1,19 @@+import { en } from './locales/en';+import { es } from './locales/es';+import { fr } from './locales/fr';+import { pt } from './locales/pt';+import { ru } from './locales/ru';+import { zh } from './locales/zh';++// The supported languages are exactly the dictionaries that exist. Adding a language means adding+// its dictionary here and its settings in localeSettings.ts.+export const DICTIONARIES = { en, ru, es, pt, zh, fr };++export type Locale = keyof typeof DICTIONARIES;++export const SUPPORTED_LOCALES = Object.keys(DICTIONARIES) as Locale[];++export const DEFAULT_LOCALE: Locale = 'en';++export const isSupportedLocale = (value: string | null | undefined): value is Locale =>+ value !== null && value !== undefined && SUPPORTED_LOCALES.includes(value as Locale);diff --git a/frontend/src/shared/i18n/formatNumber.ts b/frontend/src/shared/i18n/formatNumber.tsnew file mode 100644index 00000000..58ca9003--- /dev/null+++ b/frontend/src/shared/i18n/formatNumber.ts@@ -0,0 +1,8 @@+// Groups digits by the selected language rather than the browser's, so numbers agree with the+// words and dates on the same screen. Always full numerals: compact forms such as the Chinese 万+// lose the precision a size or a count needs.+export const formatNumber = (+ value: number,+ languageTag: string,+ options?: Intl.NumberFormatOptions,+): string => new Intl.NumberFormat(languageTag, options).format(value);diff --git a/frontend/src/shared/i18n/formatRelativeTime.ts b/frontend/src/shared/i18n/formatRelativeTime.tsnew file mode 100644index 00000000..70a4d032--- /dev/null+++ b/frontend/src/shared/i18n/formatRelativeTime.ts@@ -0,0 +1,9 @@+import dayjs, { type ConfigType } from 'dayjs';+import relativeTime from 'dayjs/plugin/relativeTime';++dayjs.extend(relativeTime);++// The only place that calls fromNow(). Components read it through useLocale(), so a language+// switch re-renders every relative time on screen instead of leaving it in the old language.+export const formatRelativeTime = (date: ConfigType, dayjsLocale: string): string =>+ dayjs(date).locale(dayjsLocale).fromNow();diff --git a/frontend/src/shared/i18n/formatters.test.ts b/frontend/src/shared/i18n/formatters.test.tsnew file mode 100644index 00000000..6f5de071--- /dev/null+++ b/frontend/src/shared/i18n/formatters.test.ts@@ -0,0 +1,49 @@+import dayjs from 'dayjs';+import 'dayjs/locale/ru';+import { describe, expect, it } from 'vitest';++import { formatNumber } from './formatNumber';+import { formatRelativeTime } from './formatRelativeTime';++// Intl uses U+202F (narrow no-break space) or U+00A0 as the group separator depending on the+// language and ICU version; the tests compare with any whitespace normalized to a plain space.+const normalizeSpaces = (value: string) => value.replace(/\s/g, ' ');++describe('formatNumber', () => {+ it('groups digits by the selected language, not by the environment', () => {+ expect(normalizeSpaces(formatNumber(1_800_000, 'fr'))).toBe('1 800 000');+ expect(formatNumber(1_800_000, 'en')).toBe('1,800,000');+ });++ it('keeps full Western grouping for Chinese instead of the 万 form', () => {+ expect(formatNumber(1_800_000, 'zh-CN')).toBe('1,800,000');+ });++ it('groups Spanish, Portuguese and Russian the way each language does', () => {+ expect(formatNumber(1_800_000, 'es')).toBe('1.800.000');+ expect(formatNumber(1_800_000, 'pt-BR')).toBe('1.800.000');+ expect(normalizeSpaces(formatNumber(1_800_000, 'ru'))).toBe('1 800 000');+ });++ it('formats only the number, leaving unit words to the caller', () => {+ expect(formatNumber(1234.56, 'en')).toBe('1,234.56');+ expect(formatNumber(1234.56, 'ru')).toMatch(/^1\s234,56$/);+ });+});++describe('formatRelativeTime', () => {+ it('writes a relative time in the selected language', () => {+ const twoHoursAgo = dayjs().subtract(2, 'hour');++ expect(formatRelativeTime(twoHoursAgo, 'ru')).toMatch(+ /^2 \p{Script=Cyrillic}+ \p{Script=Cyrillic}+$/u,+ );+ expect(formatRelativeTime(twoHoursAgo, 'en')).toBe('2 hours ago');+ });++ it('does not change the global dayjs locale', () => {+ formatRelativeTime(dayjs(), 'ru');++ expect(dayjs.locale()).toBe('en');+ });+});diff --git a/frontend/src/shared/i18n/i18next.d.ts b/frontend/src/shared/i18n/i18next.d.tsnew file mode 100644index 00000000..e2b97657--- /dev/null+++ b/frontend/src/shared/i18n/i18next.d.ts@@ -0,0 +1,13 @@+import 'i18next';++import type { en } from './locales/en';++declare module 'i18next' {+ interface CustomTypeOptions {+ defaultNS: 'translation';+ nsSeparator: false;+ resources: {+ translation: typeof en;+ };+ }+}diff --git a/frontend/src/shared/i18n/index.ts b/frontend/src/shared/i18n/index.tsnew file mode 100644index 00000000..8ae1d479--- /dev/null+++ b/frontend/src/shared/i18n/index.ts@@ -0,0 +1,9 @@+export { LocaleProvider } from './LocaleProvider';+export { useLocale } from './useLocale';+export type { LocaleContextValue } from './localeContext';+export { DICTIONARIES, SUPPORTED_LOCALES, type Locale } from './dictionaries';+export type { TranslationKey } from './TranslationKey';+export { type LocalizedText, translateLocalizedText } from './LocalizedText';+export { WEBSITE_PAGES, getWebsitePageUrl, type WebsitePageId } from './websitePages';+export { translateApiError } from './translateApiError';+export { TransByKey } from './TransByKey';diff --git a/frontend/src/shared/i18n/localeContext.ts b/frontend/src/shared/i18n/localeContext.tsnew file mode 100644index 00000000..c01fab01--- /dev/null+++ b/frontend/src/shared/i18n/localeContext.ts@@ -0,0 +1,15 @@+import type { Locale as AntdLocale } from 'antd/lib/locale';+import type { ConfigType } from 'dayjs';+import { createContext } from 'react';++import type { Locale } from './dictionaries';++export interface LocaleContextValue {+ locale: Locale;+ setLocale: (locale: Locale) => void;+ antdLocale: AntdLocale;+ formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;+ formatRelativeTime: (date: ConfigType) => string;+}++export const LocaleContext = createContext<LocaleContextValue | undefined>(undefined);diff --git a/frontend/src/shared/i18n/localeSettings.ts b/frontend/src/shared/i18n/localeSettings.tsnew file mode 100644index 00000000..640a6489--- /dev/null+++ b/frontend/src/shared/i18n/localeSettings.ts@@ -0,0 +1,33 @@+/* eslint-disable i18next/no-literal-string -- locale codes */+import type { Locale as AntdLocale } from 'antd/lib/locale';+import enUS from 'antd/locale/en_US';+import esES from 'antd/locale/es_ES';+import frFR from 'antd/locale/fr_FR';+import ptBR from 'antd/locale/pt_BR';+import ruRU from 'antd/locale/ru_RU';+import zhCN from 'antd/locale/zh_CN';+import 'dayjs/locale/es';+import 'dayjs/locale/fr';+import 'dayjs/locale/pt-br';+import 'dayjs/locale/ru';+import 'dayjs/locale/zh-cn';++import type { Locale } from './dictionaries';++interface LocaleSettings {+ // BCP 47 tag for the document's lang attribute and for Intl number formatting+ languageTag: string;+ dayjsLocale: string;+ antdLocale: AntdLocale;+}++export const LOCALE_SETTINGS: Record<Locale, LocaleSettings> = {+ en: { languageTag: 'en', dayjsLocale: 'en', antdLocale: enUS },+ ru: { languageTag: 'ru', dayjsLocale: 'ru', antdLocale: ruRU },+ es: { languageTag: 'es', dayjsLocale: 'es', antdLocale: esES },+ // Brazilian Portuguese is the one Portuguese variant shipped+ pt: { languageTag: 'pt-BR', dayjsLocale: 'pt-br', antdLocale: ptBR },+ // Simplified Chinese is the one Chinese variant shipped+ zh: { languageTag: 'zh-CN', dayjsLocale: 'zh-cn', antdLocale: zhCN },+ fr: { languageTag: 'fr', dayjsLocale: 'fr', antdLocale: frFR },+};diff --git a/frontend/src/shared/i18n/locales/en.ts b/frontend/src/shared/i18n/locales/en.tsnew file mode 100644index 00000000..62b7bcb7--- /dev/null+++ b/frontend/src/shared/i18n/locales/en.ts@@ -0,0 +1,1790 @@+// The source of truth for the set of keys. Every other dictionary is typed `typeof en`.+// Keep it one object literal: see frontend/AGENTS.md - Interface languages (i18n).+export const en = {+ language: {+ nativeName: 'English',+ },+ common: {+ actions: {+ add: 'Add',+ back: 'Back',+ cancel: 'Cancel',+ close: 'Close',+ confirm: 'Confirm',+ continue: 'Continue',+ copy: 'Copy',+ create: 'Create',+ delete: 'Delete',+ download: 'Download',+ edit: 'Edit',+ ok: 'OK',+ refresh: 'Refresh',+ remove: 'Remove',+ retry: 'Retry',+ save: 'Save',+ },+ answers: {+ no: 'No',+ yes: 'Yes',+ },+ fields: {+ host: 'Host',+ name: 'Name',+ password: 'Password',+ port: 'Port',+ status: 'Status',+ type: 'Type',+ username: 'Username',+ },+ states: {+ disabled: 'Disabled',+ enabled: 'Enabled',+ loading: 'Loading...',+ },+ messages: {+ copiedToClipboard: 'Copied to clipboard',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: ', ',+ confirmation: {+ title: 'Confirmation',+ },+ },+ app: {+ documentTitle: 'Databasus - databases backups (PostgreSQL, MySQL, MongoDB)',+ languageControl: {+ title: 'Language: {{language}}',+ },+ theme: {+ title: 'Theme: {{theme}}',+ light: 'Light',+ dark: 'Dark',+ system: 'System',+ },+ navigation: {+ databases: 'Databases',+ storages: 'Storages',+ notifiers: 'Notifiers',+ workspaceSettings: 'Settings',+ profile: 'Profile',+ databasusSettings: 'Databasus settings',+ users: 'Users',+ docs: 'Docs',+ documentation: 'Documentation',+ community: 'Community',+ newVersionAvailable: 'New version available',+ },+ diskUsage: {+ title: 'Disk Usage',+ hint: 'To make backups locally and restore them, you need to have enough space on your disk. For restore, you need to have same amount of space that the backup size.',+ compactSummary: '{{used}} of {{total}} GB<lineBreak/>ROM used ({{percent}}%)',+ summary: '{{used}} of {{total}} GB used ({{percent}}%)',+ },+ workspaceSelection: {+ createShort: 'Create',+ create: 'Create workspace',+ selected: 'Selected workspace',+ placeholder: 'Select a workspace',+ search: 'Search workspaces...',+ notFound: 'No workspaces found',+ createNew: '+ Create new workspace',+ },+ sponsorship: {+ link: 'Sponsorship',+ hint: 'Databasus saved your data? You can support Databasus as well to keep it free, maintained and independent',+ },+ starButton: {+ label: 'Star on GitHub',+ ariaLabel: 'Star databasus/databasus on GitHub',+ },+ clipboardPaste: {+ title: 'Paste from clipboard',+ submit: 'Submit',+ description: 'Automatic clipboard access is not available. Please paste your content below.',+ placeholder: 'Paste your connection string here...',+ },+ auth: {+ adminPasswordCheckFailed: 'Failed to check admin password status: {{error}}',+ },+ oauthCallback: {+ failedTitle: 'Authentication Failed',+ codeNotFound: 'Authorization code not found',+ stateMissing: 'OAuth state parameter missing',+ invalidProvider: 'Invalid OAuth provider',+ returnToSignIn: 'Return to sign in',+ completing: 'Completing authentication...',+ },+ oauthStorage: {+ configNotFound: 'Google Drive storage configuration not found',+ exchangeFailed: 'Failed to exchange OAuth code',+ unsupportedType: 'Unsupported storage type for OAuth',+ invalidState: 'OAuth state parameter is invalid',+ paramNotFound: 'OAuth param not found. Ensure the redirect URL is configured correctly.',+ addStorageTitle: 'Add storage',+ storageDescription:+ 'Storage - is a place where backups will be stored (local disk, S3, etc.)',+ },+ },+ errors: {+ unknown: 'Something went wrong. Please try again.',+ networkUnreachable: 'Cannot reach the Databasus server. Check your connection and try again.',+ requestFailed:+ 'The server could not complete the request (HTTP {{status}}). Please try again later.',+ },+ status: {+ logicalBackup: {+ inProgress: 'In progress',+ completed: 'Successful',+ failed: 'Failed',+ deleted: 'Deleted',+ canceled: 'Canceled',+ },+ physicalBackup: {+ inProgress: 'In progress',+ completed: 'Successful',+ error: 'Error',+ chainBroken: 'Chain broken',+ canceled: 'Canceled',+ },+ restoreVerification: {+ verifiedSuccessful: 'Verified',+ verificationFailed: 'Verification failed',+ },+ restore: {+ inProgress: 'In progress',+ completed: 'Successful',+ failed: 'Failed',+ canceled: 'Canceled',+ },+ verification: {+ pending: 'Pending',+ running: 'Running',+ completed: 'Successful',+ failed: 'Failed',+ canceled: 'Canceled',+ },+ health: {+ available: 'Available',+ unavailable: 'Unavailable',+ },+ agent: {+ neverSeen: 'Never seen',+ online: 'Online',+ stale: 'Stale',+ offline: 'Offline',+ },+ },+ intervals: {+ types: {+ hourly: 'Hourly',+ daily: 'Daily',+ weekly: 'Weekly',+ monthly: 'Monthly',+ cron: 'Cron',+ },+ weekdays: {+ mon: 'Mon',+ tue: 'Tue',+ wed: 'Wed',+ thu: 'Thu',+ fri: 'Fri',+ sat: 'Sat',+ sun: 'Sun',+ },+ periods: {+ day: '1 day',+ week: '1 week',+ month: '1 month',+ threeMonths: '3 months',+ sixMonths: '6 months',+ year: '1 year',+ twoYears: '2 years',+ threeYears: '3 years',+ fourYears: '4 years',+ fiveYears: '5 years',+ forever: 'Forever',+ },+ },+ auditLogs: {+ title: 'Audit Logs',+ columns: {+ user: 'User',+ message: 'Message',+ workspace: 'Workspace',+ created: 'Created',+ },+ systemUser: 'System',+ loadedOfTotal: 'Loaded: {{loaded}} of {{total}}',+ empty: 'No audit logs found.',+ loadingMore: 'Loading more logs...',+ allLoaded: 'All logs loaded ({{count}} total)',+ },+ settings: {+ title: 'Databasus settings',+ externalRegistrations: {+ title: 'Allow external registrations',+ description:+ 'When enabled, new users can register accounts in Databasus. If disabled, new users can only register via invitation',+ },+ memberInvitations: {+ title: 'Allow member invitations',+ description:+ 'When enabled, existing members can invite new users to join Databasus. If not - only admins can invite users.',+ },+ memberWorkspaceCreation: {+ title: 'Members can create workspaces',+ description:+ 'When enabled, members (non-admin users) can create new workspaces. If not - only admins can create workspaces.',+ },+ saving: 'Saving...',+ saveChanges: 'Save Changes',+ reset: 'Reset',+ updated: 'Settings updated successfully',+ readMore: 'Read more about settings you can <docsLink>here</docsLink>',+ healthcheck: {+ title: 'Health-check',+ openInNewTab: 'Click to open in new tab',+ copied: 'Health-check endpoint copied to clipboard',+ description: "Use this endpoint to monitor your Databasus system's availability",+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: 'Disable',+ require: 'Require',+ verifyCa: 'Verify CA',+ verifyFull: 'Verify full',+ },+ physicalBackupTypes: {+ full: 'Full backups only',+ fullIncremental: 'Full + incremental',+ fullIncrementalWalStream: 'Full + incremental + WAL streaming',+ },+ list: {+ addDatabase: 'Add database',+ searchPlaceholder: 'Search database',+ noSearchResults: 'No databases found matching "{{query}}"',+ description: 'Database - is a thing we are backing up',+ backToList: '← Back to databases',+ },+ card: {+ storage: 'Storage: <storageName/>',+ lastBackup: 'Last backup {{relativeTime}}',+ hasBackupError: 'Has backup error',+ },+ tabs: {+ config: 'Config',+ backups: 'Backups',+ verifications: 'Verifications',+ },+ create: {+ title: 'Add database for backup',+ namePlaceholder: 'My favourite DB',+ creating: 'Creating database...',+ complete: 'Complete',+ backupType: {+ title: 'Choose backup type',+ logical: {+ title: 'Logical',+ description: 'Recommended for databases under 50 GB. Simpler to set up.',+ },+ physical: {+ title: 'Physical',+ description:+ 'For databases over 50 GB. Enables point-in-time recovery and better RPO/RTO, but needs extra setup.',+ },+ },+ },+ config: {+ namePlaceholder: 'Enter name...',+ removing: 'Removing database...',+ lastBackupError: {+ title: 'Last backup error',+ errorLabel: 'The error:',+ clearHint: 'To clean this error (choose any):',+ clearByTestingConnection:+ '- test connection via button below (even if you updated settings);',+ clearByNextBackup: '- wait until the next backup is done without errors;',+ },+ sections: {+ database: 'Database settings',+ backupConfig: 'Backup config',+ healthcheck: 'Healthcheck settings',+ restoreVerification: 'Restore verification',+ notifiers: 'Notifiers settings',+ },+ copyConfirmation:+ 'Are you sure you want to copy this database? A new database with the same settings will be created.',+ removeConfirmation:+ 'Are you sure you want to remove this database? This action cannot be undone.',+ copied: {+ title: 'Database copied successfully!',+ description: '"{{name}}" has been created successfully',+ },+ connectionTestSucceeded: {+ title: 'Connection test successful!',+ description: 'Database connection tested successfully',+ },+ },+ actions: {+ testConnection: 'Test connection',+ replace: 'Replace',+ },+ fields: {+ databaseType: 'Database type',+ version: '{{engine}} version',+ databaseName: 'DB name',+ sslMode: 'SSL mode',+ useHttps: 'Use HTTPS',+ cpuCount: 'CPU count',+ backupType: 'Backup type',+ clientCertificate: 'Client certificate',+ clientKey: 'Client key',+ serverCaCertificate: 'Server CA certificate',+ includeSchemas: 'Include schemas',+ excludeTables: 'Exclude tables',+ skipUserMappings: 'Skip user mappings',+ excludeExtensions: 'Exclude extensions',+ restoreOwnership: 'Restore ownership',+ restorePrivileges: 'Restore privileges',+ excludeEvents: 'Exclude events',+ galeraReplication: 'Galera replication',+ useSrvConnection: 'Use SRV connection',+ directConnection: 'Direct connection',+ authDatabase: 'Auth database',+ excludeCollections: 'Exclude collections',+ },+ edit: {+ parseFromClipboard: 'Parse from clipboard',+ clipboardEmpty: 'Clipboard is empty',+ clipboardReadFailed: 'Failed to read clipboard. Please check browser permissions.',+ connectionStringParsed: 'Connection string parsed successfully',+ connectionStringParsedWithoutPassword:+ 'Connection string parsed successfully. Please enter the password manually.',+ connectionTestPassed: {+ title: 'Connection test passed',+ description: 'You can continue with the next step',+ },+ ipWhitelistHint:+ 'If your database uses IP whitelist, make sure Databasus server IP is added to the allowed list.',+ localhostHint:+ 'Please <docsLink>read this document</docsLink> to study how to backup local database',+ advancedSettings: 'Advanced settings',+ placeholders: {+ host: 'Enter {{engine}} host',+ port: 'Enter {{engine}} port',+ username: 'Enter {{engine}} username',+ password: 'Enter {{engine}} password',+ databaseName: 'Enter {{engine}} database name',+ },+ cpuCountTooltip:+ 'Number of CPU cores to use for backup and restore operations. Higher values may speed up operations but use more resources.',+ excludeTablesPlaceholder: 'No tables excluded',+ excludeTablesTooltip:+ 'Table names to exclude from the backup. You can paste a list separated by commas or new lines.',+ serverCaCertificateTooltip:+ 'Optional. When provided, the server certificate is verified against this CA (verify-ca / verify-full).',+ copyFailed: 'Failed to copy',+ postgresql: {+ supabaseHint:+ 'Please <docsLink>read this document</docsLink> to study how to backup Supabase database',+ includeSchemasPlaceholder: 'All schemas (default)',+ excludeTablesTooltip:+ "Tables to exclude from the backup. Use 'tablename' or 'schema.tablename'. Glob patterns are supported (e.g. 'logs_*'). You can paste a list separated by commas or new lines.",+ skipUserMappingsTooltip:+ 'Skip restoring user mappings (CREATE USER MAPPING statements). Enable this when the backup role cannot read the mapping credentials - otherwise they are dumped without options and break restore for FDWs like oracle_fdw.',+ excludeExtensionsTooltip:+ "Skip restoring extension definitions (CREATE EXTENSION statements). Enable this if you're restoring to a managed PostgreSQL service where extensions are managed by the provider.",+ restoreOwnershipTooltip:+ 'Apply ALTER OWNER statements from the dump so restored objects keep their original owner. The connection user must be able to assign these roles - typically a superuser.',+ restorePrivilegesTooltip:+ 'Apply GRANT and REVOKE statements from the dump so restored objects keep their original ACLs. The connection user must be able to grant to the referenced roles - typically a superuser.',+ backupTypeTooltips: {+ full: 'Periodic standalone full backups. Each backup is self-contained.',+ fullIncremental:+ 'Full backups plus incremental ones that store only the changes since the previous backup. Smaller and faster.',+ fullIncrementalWalStream:+ 'Adds continuous WAL streaming on top of full and incremental backups. Only this option enables point-in-time recovery (PITR), but it requires more space and slower in restore.',+ },+ },+ mariadb: {+ skipEvents: 'Skip events',+ skipEventsTooltip:+ 'Skip backing up database events. Enable this if the event scheduler is disabled on your MariaDB server.',+ skipGaleraDisable: 'Skip disabling on restore',+ skipGaleraDisableTooltip:+ 'By default Databasus runs SET SESSION wsrep_on=OFF during restore to avoid Galera writeset-size errors. That requires the SUPER privilege. Enable this to skip it if your managed provider denies SUPER - large restores may then hit Galera writeset limits.',+ },+ mongodb: {+ srvTooltip:+ 'Enable for MongoDB Atlas SRV connections (mongodb+srv://). Port is not required for SRV connections.',+ srvOverTunnelTooltip:+ 'Not available over an SSH tunnel - SRV resolves its own host list and bypasses the forwarded port.',+ directConnectionTooltip:+ 'Connect directly to a single server, skipping replica set discovery. Useful when the server is behind a load balancer, proxy or tunnel.',+ directConnectionOverTunnelTooltip:+ 'Forced on while the SSH tunnel is enabled - a tunnel exposes a single address, so replica set discovery cannot be used.',+ excludeCollectionsPlaceholder: 'No collections excluded',+ excludeCollectionsTooltip:+ 'Collection names to exclude from the backup. You can paste a list separated by commas or new lines.',+ },+ },+ show: {+ galeraDisableSkipped: 'Skip disabling on restore',+ },+ sshTunnel: {+ authTypes: {+ password: 'Password',+ privateKey: 'Private key',+ },+ title: 'SSH tunnel',+ tooltip:+ 'For a database inside a closed network. Databasus connects to the SSH host below, and that host reaches the database using the host and port above.',+ host: 'SSH host',+ hostTooltip:+ 'The database host above is resolved by the SSH host, not by Databasus. Use 127.0.0.1 when the database runs on the SSH host itself.',+ port: 'SSH port',+ username: 'SSH username',+ usernamePlaceholder: 'Enter SSH username',+ authType: 'SSH auth',+ credentials: 'SSH credentials',+ password: 'SSH password',+ passwordPlaceholder: 'Enter SSH password',+ privateKey: 'SSH private key',+ keyPassphrase: 'Key passphrase',+ keyPassphrasePlaceholder: 'Only for an encrypted key',+ },+ notifiers: {+ title: 'Notifiers',+ description:+ 'Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)',+ multipleHint: 'You can select several notifiers, notifications will be sent to all of them.',+ selectPlaceholder: 'Select notifiers',+ createNew: 'Create new notifier',+ addTitle: 'Add notifier',+ notifyTo: 'Notify to',+ empty: 'No notifiers configured',+ },+ readOnlyUser: {+ dialogTitle: 'Create read-only user',+ readOnly: {+ checking: 'Checking read-only user...',+ title: 'Create a read-only user for Databasus?',+ description:+ 'A read-only user is a {{databaseType}} user with limited permissions that can only read data from your database, not modify it. This is recommended for backup operations because:',+ noWriteCredentials:+ '<bold>A read-only user allows to avoid storing credentials with write access at all</bold>. Even in the worst case of hacking, nobody will be able to corrupt your data.',+ create: 'Yes, create read-only user',+ skipTitle: 'Skip read-only user creation?',+ skipQuestion: 'Are you sure you want to skip creating a read-only user?',+ },+ replicationOnly: {+ checking: 'Checking replication-only user...',+ title: 'Create a replication-only user for Databasus?',+ description:+ 'A replication-only user is a {{databaseType}} user with limited permissions that can only read data from your database, not modify it. This is recommended for backup operations because:',+ noWriteCredentials:+ '<bold>A replication-only user allows to avoid storing credentials with write access at all</bold>. Even in the worst case of hacking, nobody will be able to corrupt your data.',+ create: 'Yes, create replication-only user',+ skipTitle: 'Skip replication-only user creation?',+ skipQuestion: 'Are you sure you want to skip creating a replication-only user?',+ },+ reasons: {+ preventsModifications: 'it prevents accidental data modifications during backup',+ leastPrivilege: 'it follows the principle of least privilege',+ bestPractice: "it's a security best practice",+ },+ securityNote:+ 'Databasus enforce enterprise-grade security (<docsLink>read in details here</docsLink>). However, it is not possible to be covered from all possible risks.',+ noWritePrivileges: 'Current user has <bold>no write privileges</bold>.',+ noWriteRoles: 'Current user has <bold>no write roles</bold>.',+ writePrivileges: 'Current user has the following write privileges:',+ writeRoles: 'Current user has the following write roles:',+ expand: '(expand)',+ collapse: '(collapse)',+ skip: 'Skip',+ skipRisk:+ 'Using a user with full permissions for backups is not recommended and may pose security risks. Databasus is highly recommending you to not skip this step.',+ skipAdvice:+ "100% protection is never possible. It's better to be safe in case of 0.01% risk of full hacking. So it is better to follow the secure way with read-only user.",+ acceptRisks: 'Yes, I accept risks',+ continueSecurely: "Let's continue with the secure way",+ forcedWalRotationUnavailable:+ 'This source would not grant EXECUTE on pg_switch_wal() to the new user, which continuous WAL streaming needs to keep the recovery point close to the present. Full and incremental backups work normally with these credentials.',+ },+ transfer: {+ title: 'Transfer database to another workspace',+ targetWorkspace: 'Target workspace',+ selectWorkspace: 'Select workspace',+ storage: {+ title: 'Storage',+ transferExisting: 'Transfer with existing storage',+ selectFromTarget: 'Select storage from target workspace',+ blocked:+ 'Databases using this storage: {{count}}. Transfer is blocked because other databases depend on it.',+ canTransfer: 'Storage can be transferred',+ selectPlaceholder: 'Select storage',+ createNew: 'Create new storage',+ addTitle: 'Add storage',+ description:+ 'Storage - is a place where backups will be stored (local disk, S3, Google Drive, etc.)',+ },+ notifiers: {+ title: 'Notifiers (optional)',+ transferWithDatabase: 'Transfer notifiers with database',+ selectFromTarget: 'Select notifiers from target workspace',+ willTransfer: 'Will be transferred:',+ willNotTransfer: 'Will NOT be transferred (used by other databases):',+ usedByDatabases: '{{name}} (used by databases: {{count}})',+ noneTransferred:+ 'No notifiers will be transferred. You can select notifiers from the target workspace after transfer.',+ selectPlaceholder: 'Select notifiers (optional)',+ },+ submit: 'Transfer',+ transferred: {+ title: 'Database transferred successfully!',+ description: '"{{name}}" has been transferred to the new workspace',+ },+ },+ connectionString: {+ errors: {+ empty: 'Connection string is empty',+ unrecognizedFormat: 'Unrecognized connection string format',+ hostMissing: 'Host is missing from connection string',+ usernameMissing: 'Username is missing from connection string',+ passwordMissing: 'Password is missing from connection string',+ databaseMissing: 'Database name is missing from connection string',+ parseFailed: 'Failed to parse connection string',+ jdbc: {+ invalidFormat: 'Invalid JDBC connection string format. Expected: {{expectedFormat}}',+ queryParametersMissing:+ 'JDBC connection string is missing query parameters (user and password)',+ usernameMissing: 'Username (user parameter) is missing from JDBC connection string',+ passwordMissing: 'Password parameter is missing from JDBC connection string',+ parseFailed: 'Failed to parse JDBC connection string',+ },+ keyValue: {+ hostMissing: 'Host is missing from connection string. Use host=hostname',+ usernameMissing: 'Username is missing from connection string. Use user=username',+ passwordMissing: 'Password is missing from connection string. Use password=yourpassword',+ databaseMissing: 'Database name is missing from connection string. Use database=database',+ parseFailed: 'Failed to parse key-value connection string',+ },+ libpq: {+ databaseMissing: 'Database name is missing from connection string. Use dbname=database',+ parseFailed: 'Failed to parse libpq connection string',+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote: 'Grant it with the command below (run as a superuser).',+ applyAndRestartNote: 'Apply the change below, then restart PostgreSQL.',+ pgHbaNoEntry: {+ title: 'Replication is not allowed from this host',+ summary:+ 'PostgreSQL has no pg_hba.conf entry that permits a replication connection from Databasus. Physical backups stream via replication, which needs a "host replication" rule - an ordinary "host all" rule does not cover it.',+ addLineNote:+ 'Add the line below to pg_hba.conf. The first "all" matches any user and the second any host - narrow the user to the specific replication role and/or the host to a CIDR range if you want to restrict it.',+ reloadNote: 'After updating pg_hba.conf, <bold>reload PG</bold>.',+ managedNote:+ 'On managed PostgreSQL (RDS / Azure / GCP) you cannot edit pg_hba.conf - enable external or replication access in the provider console instead.',+ },+ badCredentials: {+ title: 'Wrong username or password',+ summary:+ 'PostgreSQL rejected the credentials. Double-check the username and password for this database.',+ },+ noReplicationPrivilege: {+ title: 'User cannot run replication',+ summary:+ 'The user connected but lacks the REPLICATION privilege that physical backups require.',+ managedNote:+ 'On AWS RDS use GRANT rds_replication TO {{username}}; on Azure / GCP enable replication for the role in the provider console.',+ },+ noWalSwitchPrivilege: {+ title: 'User cannot force a WAL segment switch',+ summary:+ 'Continuous WAL streaming only uploads a segment once the source closes it, so on a rarely-written database the newest WAL stays on the source until the 16 MB segment fills. Forcing a switch on a timer is what keeps the recovery point between backups close to the present, and it needs EXECUTE on pg_switch_wal(). Full and incremental backups do not need it: they restore to the point each backup finished and replay no archived WAL.',+ switchBackupTypeNote:+ 'Or switch the backup type to <bold>Full + incremental</bold>, which does not replay archived WAL.',+ managedNote:+ 'On managed PostgreSQL (RDS / Azure / GCP) the function belongs to the platform superuser and a customer role cannot be granted EXECUTE on it, so continuous WAL streaming is unavailable there - use full + incremental backups instead.',+ },+ walLevelInvalid: {+ title: 'wal_level is too low',+ summary:+ 'wal_level must be "replica" or "logical" for physical backups. It is currently set lower.',+ applyNote:+ 'Apply the change below, then restart PostgreSQL (wal_level only takes effect after a restart).',+ managedNote: 'On managed PostgreSQL set wal_level in the provider parameter group.',+ },+ noWalSenders: {+ title: 'No WAL sender processes available',+ summary: 'max_wal_senders is 0, so PostgreSQL cannot stream WAL for backups.',+ managedNote: 'On managed PostgreSQL set max_wal_senders in the provider parameter group.',+ },+ noReplicationSlots: {+ title: 'No replication slots available',+ summary: 'max_replication_slots is 0, so PostgreSQL cannot allocate a slot for backups.',+ managedNote:+ 'On managed PostgreSQL set max_replication_slots in the provider parameter group.',+ },+ walSummaryDisabled: {+ title: 'WAL summarization is off',+ summary:+ 'summarize_wal must be on for incremental backups. It is currently off on this server.',+ applyNote: 'Apply the change below (no restart needed).',+ thenNote: 'and then',+ managedNote: 'On managed PostgreSQL set summarize_wal in the provider parameter group.',+ },+ customTablespaces: {+ title: 'Custom tablespaces are not supported',+ summary:+ 'This cluster has tablespaces outside pg_default / pg_global, which physical backups cannot stream. Drop the custom tablespaces, or switch this database to logical backups.',+ },+ systemIdentifierMismatch: {+ title: 'This is a different cluster',+ summary:+ 'The cluster at this address has a different system identifier than the one this backup was set up for. Point Databasus at the original cluster, or create a new database entry.',+ },+ connectionFailed: {+ title: 'Could not connect',+ summary:+ 'Databasus could not open a replication connection. Check the host, port, SSL mode and that a firewall is not blocking the connection.',+ },+ },+ },+ restores: {+ list: {+ empty: 'No restores yet',+ },+ targetDatabase: {+ select: 'Select database to restore to',+ description:+ 'Enter info of the database we will restore backup to. <underline>The empty database for restore should be created before the restore</underline>. During the restore, all the current data will be cleared',+ notInUseHint:+ 'Make sure the database is not used right now (most likely you do not want to restore the data to the same DB where the backup was made)',+ submit: 'Restore to this DB',+ },+ card: {+ startedAt: 'Started at',+ duration: 'Duration',+ errorDetailsTooltip: 'Click to see error details',+ cancelTooltip: 'Cancel restore',+ expectedDurationHint:+ 'Expected restoration time usually 3x-5x longer than the backup duration (sometimes less, sometimes more depending on data type)',+ expectedDurationLimit:+ 'So it is expected to take up to {{duration}} (usually significantly faster)',+ },+ errorDetails: {+ title: 'Restore error details',+ copied: 'Error message copied to clipboard',+ excludeExtensionsTip:+ '<bold>💡 Tip:</bold> This error typically occurs when restoring to managed PostgreSQL services (like Yandex Cloud, AWS RDS or similar). Try enabling <bold>"Exclude extensions"</bold> in Advanced settings before restoring.',+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ Warning:</bold> Cancelling this restore will likely leave your database in a corrupted or incomplete state. You will need to recreate the database before attempting another restore.',+ question: 'Are you sure you want to cancel?',+ confirm: 'Yes, cancel restore',+ },+ },+ healthcheck: {+ attempts: {+ title: 'Healthcheck attempts',+ period: 'Period',+ periods: {+ today: 'Today',+ sevenDays: '7 days',+ thirtyDays: '30 days',+ allTime: 'All time',+ },+ empty: 'No data yet',+ },+ config: {+ enable: 'Enable healthcheck',+ isEnabled: 'Is health check enabled',+ notifyWhenUnavailable: 'Notify when unavailable',+ checkIntervalMinutes: 'Check interval (minutes)',+ attemptsBeforeDown: 'Attempts before down',+ storeAttemptsDays: 'Store attempts (days)',+ tooltips: {+ enable: 'Enable or disable healthcheck monitoring for this database',+ notifyWhenUnavailable: 'Send notifications when database becomes unavailable',+ checkIntervalMinutes: 'How often to check database health (in minutes)',+ attemptsBeforeDown: 'Number of failed attempts before marking database as down',+ storeAttemptsDays: 'How many days to store health check attempt history',+ },+ },+ },+ workspaces: {+ roles: {+ owner: 'Owner',+ admin: 'Admin',+ member: 'Member',+ viewer: 'Viewer',+ },+ fields: {+ name: 'Workspace name',+ namePlaceholder: 'Enter workspace name',+ },+ create: {+ title: 'Create workspace',+ submit: 'Create workspace',+ defaultName: 'My workspace',+ description:+ 'Workspace is a place where you group:<lineBreak/>- your databases;<lineBreak/>- storages (like local drive, S3, Google Drive, etc.)<lineBreak/>- notifiers (like email, Slack, Telegram, etc.);<lineBreak/>- access control (if you have team);',+ nameRequired: 'Please enter a workspace name',+ created: 'Workspace created successfully',+ permissionDenied: {+ title: 'Permission denied',+ description:+ "You don't have permission to create workspaces. Please ask the administrator to create the workspace for you.",+ },+ },+ settings: {+ title: 'Workspace settings',+ readOnly: "You don't have permission to modify these settings",+ nameRequired: 'Workspace name is required',+ saving: 'Saving...',+ saveChanges: 'Save Changes',+ reset: 'Reset',+ updated: 'Basic information updated successfully',+ },+ delete: {+ dangerZone: 'Danger Zone',+ title: 'Delete this workspace',+ description:+ 'Once you delete a workspace, there is no going back. All data and resources associated with this workspace will be permanently removed.',+ submit: 'Delete workspace',+ deleting: 'Deleting...',+ notFound: 'Workspace not found',+ noPermission: 'You do not have permission to delete this workspace',+ hasDatabases:+ 'Cannot delete workspace. Please remove all databases first. Databases found: {{count}}.',+ deleted: 'Workspace deleted successfully',+ confirmation: {+ title: 'Delete Workspace',+ question: 'Are you sure you want to delete the workspace <workspaceName/>?',+ warning:+ '<bold>This action cannot be undone.</bold> All data and associated resources will be permanently removed.',+ submit: 'Delete Workspace',+ },+ },+ members: {+ title: 'Users',+ count: 'Members: {{count}}',+ empty: 'No members found',+ emptyHint: 'Click "Add member" to get started',+ fields: {+ member: 'Member',+ role: 'Role',+ joined: 'Joined',+ actions: 'Actions',+ email: 'Email address',+ emailPlaceholder: 'Enter email address',+ },+ add: {+ button: 'Add member',+ title: 'Add member',+ submit: 'Add member',+ emailRequired: 'Email is required',+ hint: 'If the user exists, they will be added directly. Otherwise, an invitation will be sent.',+ added: 'Member added successfully',+ },+ invited: {+ title: 'User invited',+ sentTo: 'Invitation sent to {{email}}',+ description:+ 'The user is not present in the system yet, but has been invited to the workspace. After the user signs up via specified email, they will automatically become a member of the workspace.',+ },+ roleChanged: 'Member role updated successfully',+ remove: {+ tooltip: 'Remove member',+ title: 'Remove member',+ question: 'Are you sure you want to remove "{{email}}" from this workspace?',+ removed: 'Member "{{email}}" removed successfully',+ },+ },+ transferOwnership: {+ button: 'Transfer ownership',+ title: 'Transfer workspace ownership',+ submit: 'Transfer ownership',+ warning:+ '<bold>Warning:</bold> This action cannot be undone. You will lose ownership of this workspace and the new owner will have full control.',+ noEligibleMembers:+ 'No members available to transfer ownership to. You need to have at least one other member in the workspace to transfer ownership.',+ newOwner: 'Select new owner',+ newOwnerPlaceholder: 'Select a member to transfer ownership to',+ newOwnerHint: 'The selected member will become the workspace owner',+ memberRequired: 'Please select a member to transfer ownership to',+ memberNotFound: 'Selected member not found',+ transferred: 'Ownership transferred successfully',+ },+ auditLogs: {+ empty: 'No audit logs found for this workspace.',+ },+ },+ users: {+ roles: {+ admin: 'Admin',+ member: 'Member',+ },+ fields: {+ name: 'Name',+ email: 'Email',+ yourName: 'Your name',+ yourEmail: 'Your email',+ confirmPassword: 'Confirm password',+ newPassword: 'New Password',+ },+ validation: {+ nameRequired: 'Name is required',+ emailRequired: 'Email is required',+ passwordTooShort: 'Password must be at least {{minLength}} characters long',+ passwordsDoNotMatch: 'Passwords do not match',+ },+ oauth: {+ divider: 'or continue',+ continueWithGithub: 'Continue with GitHub',+ continueWithGoogle: 'Continue with Google',+ invalidConfiguration: 'Invalid OAuth configuration',+ },+ signIn: {+ title: 'Sign in',+ submit: 'Sign in',+ noAccount: "Don't have an account? <signUpLink>Sign up</signUpLink>",+ forgotPassword: 'Forgot password?',+ },+ signUp: {+ title: 'Sign up',+ namePlaceholder: 'John Doe',+ submit: 'Sign up',+ hasAccount: 'Already have an account? <signInLink>Sign in</signInLink>',+ },+ adminPassword: {+ title: 'Sign up admin',+ description: 'Then you will be able to sign in with login "admin" and password you set',+ submit: 'Set password',+ },+ requestPasswordReset: {+ title: 'Reset password',+ description: "Enter your email address and we'll send you a reset code.",+ submit: 'Send reset code',+ codeSent: 'If the email exists, a reset code has been sent',+ rememberPassword: 'Remember your password? <signInLink>Sign in</signInLink>',+ },+ resetPassword: {+ title: 'Reset Password',+ description: 'Enter the code sent to your email and your new password.',+ code: 'Reset Code',+ confirmPassword: 'Confirm Password',+ submit: 'Reset password',+ invalidCode: 'Code must be 6 digits',+ succeeded: 'Password reset successfully! Redirecting to sign in...',+ noCode: "Didn't receive a code? <requestCodeLink>Request new code</requestCodeLink>",+ backToSignIn: 'Back to sign in',+ },+ profile: {+ title: 'Profile',+ information: 'Profile Information',+ userId: 'User ID',+ namePlaceholder: 'Enter your name',+ emailPlaceholder: 'Enter your email',+ adminEmailReadOnly: 'Admin email cannot be changed',+ role: 'Role',+ saveChanges: 'Save changes',+ noChanges: 'No changes to save',+ updated: 'Profile updated successfully',+ logout: 'Logout',+ changePassword: {+ title: 'Change Password',+ newPasswordPlaceholder: 'Enter new password',+ confirmPassword: 'Confirm New Password',+ confirmPasswordPlaceholder: 'Confirm new password',+ passwordsDoNotMatch: 'New passwords do not match',+ changing: 'Changing password...',+ submit: 'Change password',+ signedInWithNewPassword: 'Successfully signed in with new password',+ },+ },+ list: {+ title: 'Databasus users',+ loadedOfTotal: 'Users: {{loaded}} of {{total}}',+ searchPlaceholder: 'Search by email or name...',+ empty: 'No users found.',+ allLoaded: 'All users loaded ({{count}} total)',+ columns: {+ user: 'User',+ systemRole: 'System role',+ isActive: 'Is active?',+ created: 'Created',+ },+ roleLabel: 'Role:',+ activeLabel: 'Active:',+ viewAuditLogs: 'View audit logs',+ activated: 'User activated successfully',+ deactivated: 'User deactivated successfully',+ roleChanged: 'User role changed successfully',+ },+ auditLogs: {+ title: 'User Audit Logs',+ empty: 'No audit logs found for this user.',+ },+ },+ verification: {+ triggers: {+ manual: 'Manual',+ scheduled: 'Scheduled',+ },+ notificationTypes: {+ verificationSuccess: 'Verification success',+ verificationFailed: 'Verification failed',+ },+ config: {+ scheduledVerification: 'Scheduled verification',+ scheduledVerificationTooltip:+ 'Periodically restore the latest backup into an ephemeral Postgres container to verify it is restorable. <docsLink>Read here how it works</docsLink>',+ interval: 'Verification interval',+ afterBackup: 'After backup',+ afterBackupHint:+ 'Runs automatically after each successful backup. If there are pending in the queue, they are canceled to not cause infinite queue when backups are faster than verifications.',+ weekday: 'Verification weekday',+ dayOfMonth: 'Verification day of month',+ timeOfDay: 'Verification time of day',+ cron: {+ expression: 'Cron expression (UTC)',+ format: 'Cron format: minute hour day month weekday (UTC)',+ examples: 'Examples:',+ exampleEverySunday: '- {{expression}} - Every Sunday at 4:00 AM UTC',+ exampleEverySixHours: '- {{expression}} - Every 6 hours',+ nextRun: 'Next run {{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: 'Invalid cron expression',+ },+ notifications: 'Notifications',+ noNotifications: 'None',+ },+ runs: {+ title: 'Restore verifications',+ description:+ 'Each row is one attempt to restore a backup of this database into a temporary copy',+ noAgentsWarning:+ 'No verification agents registered - please add it in Databasus settings tab in "Verification agents" section. <docsLink>Learn more</docsLink>',+ empty: 'No restore checks yet',+ allLoaded: 'All restore checks loaded ({{total}} total)',+ attempt: 'attempt {{attempt}}',+ restoreDuration: 'restore {{duration}}',+ durationTooltip: 'Restore + verify time reported by the agent.',+ fields: {+ createdAt: 'Created at',+ trigger: 'Trigger',+ duration: 'Duration',+ actions: 'Actions',+ },+ actions: {+ cancel: 'Cancel verification',+ viewDetails: 'View details',+ },+ details: {+ title: 'Restore check details',+ loadFailed: 'Could not load restore check details.',+ cancellationReason: 'Cancellation reason',+ failure: 'Failure',+ sections: {+ status: 'Status',+ timeline: 'Timeline',+ results: 'Results & diagnostics',+ },+ fields: {+ attempt: 'Attempt',+ startedAt: 'Started at',+ finishedAt: 'Finished at',+ restoreDuration: 'Restore duration',+ verifyDuration: 'Verify duration',+ restoredDbSize: 'Restored DB size',+ schemas: 'Schemas',+ tables: 'Tables',+ pgRestoreExitCode: 'pg_restore exit code',+ },+ tableStats: {+ title: 'Per-table row counts',+ empty: 'No per-table stats reported.',+ schema: 'Schema',+ table: 'Table',+ rows: 'Rows',+ },+ },+ },+ agents: {+ title: 'Verification agents',+ description:+ 'Agents that run restore verifications to confirm a backup is restorable (<docsLink>read more</docsLink>)',+ empty: 'No agents registered yet.',+ columns: {+ capacity: 'Capacity',+ created: 'Created',+ },+ capacity: {+ cpu: '{{count}} CPU',+ ram: '{{count}} GB RAM',+ disk: '{{count}} GB disk',+ jobs: 'jobs: {{count}}',+ notReported: 'not yet reported',+ },+ actions: {+ viewInstallCommands: 'View install commands',+ rotateToken: 'Rotate token',+ },+ deleteConfirmation: 'Delete this agent?',+ deleted: 'Agent "{{name}}" deleted',+ copyFailed: 'Failed to copy',+ agentId: 'Agent ID:',+ create: {+ title: 'Create verification agent',+ tokenNotice: 'A token will be generated and shown exactly once on the next screen.',+ namePlaceholder: 'Agent name',+ nameRequired: 'Name is required',+ },+ rotate: {+ title: 'Rotate token',+ description:+ 'Rotating the token for <agentName/> invalidates the existing token immediately. Any worker still using the old token will be rejected on its next heartbeat.',+ },+ token: {+ title: 'Agent token',+ tokenFor: 'Token for <agentName/>:',+ shownOnce: "Shown once. Store it securely - you won't be able to retrieve it again.",+ confirmSaved: "I've saved the token",+ },+ install: {+ title: 'Install commands',+ description:+ 'Install commands for <agentName/>. Replace <tokenPlaceholder/> with the token you saved when you created or last rotated this agent.',+ architecture: 'Architecture',+ stepInstall: 'Step 1 - Install',+ stepLaunch: 'Step 2 - Launch',+ capacityDefaults:+ 'The capacity values below are starting defaults - tune <code>--max-cpu</code>, <code>--max-ram-mb</code>, <code>--max-disk-gb</code> and <code>--max-concurrent-jobs</code> to the machine running the agent.',+ afterInstallation: 'After installation',+ runsInBackground: 'The agent runs in the background after <code>start</code>',+ checkStatus: 'Check status: <code>./verification-agent status</code>',+ viewLogs: 'View logs: <code>databasus-verification.log</code> in the working directory',+ stop: 'Stop the agent: <code>./verification-agent stop</code>',+ },+ },+ },+ notifiers: {+ types: {+ email: 'Email',+ telegram: 'Telegram',+ webhook: 'Webhook',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: 'All',+ backupSuccess: 'Backup success',+ backupFailed: 'Backup failed',+ healthcheckSuccess: 'Healthcheck success',+ healthcheckFailed: 'Healthcheck failed',+ verificationSuccess: 'Verification success',+ verificationFailed: 'Verification failed',+ },+ mattermostDeliveryModes: {+ webhook: 'Incoming webhook',+ bot: 'Bot account',+ },+ list: {+ addNotifier: 'Add notifier',+ searchPlaceholder: 'Search notifier',+ noSearchResults: 'No notifiers found matching "{{query}}"',+ description:+ 'Notifier - is a place where notifications will be sent (email, Slack, Telegram, etc.)',+ backToList: '← Back to notifiers',+ },+ card: {+ notifyTo: {+ email: 'Notify to Email',+ telegram: 'Notify to Telegram',+ webhook: 'Notify to Webhook',+ slack: 'Notify to Slack',+ discord: 'Notify to Discord',+ teams: 'Notify to Teams',+ mattermost: 'Notify to Mattermost',+ },+ hasSendError: 'Has send error',+ },+ create: {+ title: 'Add notifier',+ namePlaceholder: 'Chat with me',+ },+ config: {+ namePlaceholder: 'Enter name...',+ settingsTitle: 'Notifier settings',+ sendError: {+ title: 'Send error',+ errorLabel: 'The error:',+ clearHint: 'To clean this error (choose any):',+ clearBySendingTest:+ '- send test notification via button below (even if you updated settings);',+ clearByNextNotification: '- wait until the next notification is sent without errors;',+ },+ removeConfirmation:+ 'Are you sure you want to remove this notifier? This action cannot be undone.',+ removeBlockedByDatabases:+ 'Notifier is used by some databases. Please remove the notifier from databases first.',+ },+ testNotification: {+ send: 'Send test notification',+ sent: {+ title: 'Test notification sent!',+ description: 'Test notification sent successfully',+ },+ },+ transfer: {+ title: 'Transfer notifier to another workspace',+ blockedByDatabases:+ 'This notifier is used by some databases. Please transfer or remove related databases first.',+ description: 'Select a workspace to transfer this notifier to.',+ targetWorkspace: 'Target workspace',+ selectWorkspace: 'Select workspace',+ submit: 'Transfer',+ },+ fields: {+ botToken: 'Bot token',+ targetChatId: 'Target chat ID',+ webhookUrl: 'Webhook URL',+ channelId: 'Channel ID',+ skipTlsVerify: 'Skip TLS verify',+ skipTls: 'Skip TLS',+ },+ email: {+ targetEmail: 'Target email',+ targetEmailTooltip: 'The email where you want to receive the message',+ smtpHost: 'SMTP host',+ smtpPort: 'SMTP port',+ smtpUser: 'SMTP user',+ smtpPassword: 'SMTP password',+ smtpPasswordPlaceholder: 'password',+ from: 'From',+ fromTooltip:+ 'Optional. Email address to use as sender. If empty, will use SMTP user or auto-generate from host',+ fromAuto: '(auto)',+ advancedSettings: 'Advanced settings',+ skipTlsTooltip:+ 'Skip TLS certificate verification. Enable this if your SMTP server uses a self-signed certificate. Warning: this reduces security.',+ },+ telegram: {+ botTokenHelpLink: 'How to get Telegram bot API token?',+ targetChatIdTooltip:+ 'The chat where you want to receive the message (it can be your private chat or a group)',+ chatIdHelp: {+ toggle: 'How to get Telegram chat ID?',+ privateChat:+ 'To get your chat ID, message <botLink>@getmyid_bot</botLink> in Telegram. <underline>Make sure you started chat with the bot</underline>',+ group:+ 'If you want to get chat ID of a group, add your bot with <botLink>@getmyid_bot</botLink> to the group and write /start (you will see chat ID)',+ },+ useProxy: 'Use proxy',+ useProxyTooltip: 'Use a proxy for Telegram API requests',+ proxy: 'Proxy',+ proxyUrl: 'Proxy URL',+ proxyUrlTooltip: 'Supports http, https, socks5, socks5h. May include username and password',+ sendToGroupTopic: 'Send to group topic',+ sendToGroupTopicTooltip: 'Enable this to send messages to a specific thread in a group chat',+ threadId: 'Thread ID',+ threadIdTooltip: 'The ID of the thread where messages should be sent',+ topicId: 'Topic ID',+ threadIdHelp: {+ steps:+ 'To get the thread ID, go to the thread in your Telegram group, tap on the thread name at the top, then tap “Thread Info”. Copy the thread link and take the last number from the URL.',+ example:+ '<bold>Example:</bold> If the thread link is <code>https://t.me/c/2831948048/3</code>, the thread ID is <code>3</code>',+ note: '<bold>Note:</bold> Thread functionality only works in group chats, not in private chats.',+ },+ },+ webhook: {+ method: 'Method',+ sendOn: 'Send on',+ sendOnPlaceholder: 'Select notification types',+ customHeaders: 'Custom headers',+ customHeadersTooltip:+ 'Add custom HTTP headers to the webhook request (e.g., Authorization, X-API-Key)',+ savedHeadersHidden: '*Saved headers hidden for security reasons',+ headers: 'Headers',+ headerNamePlaceholder: 'Header name',+ headerValuePlaceholder: 'Header value',+ addHeader: 'Add header',+ hiddenHeaderValue: '(hidden)',+ bodyTemplate: {+ title: 'Body template',+ headingVariable: '<variable/> - notification title',+ messageVariable: '<variable/> - notification message',+ invalidJsonFormat: 'Invalid JSON format',+ invalidJson: 'Invalid JSON',+ },+ exampleRequest: {+ title: 'Example request',+ headers: 'Headers:',+ },+ },+ slack: {+ howToConnect: 'How to connect Slack (how to get bot token and chat ID)?',+ testFailedHint:+ 'Make sure channel is public or bot is added to the private channel (via @invite) or group. For direct messages use User ID from Slack profile.',+ },+ discord: {+ channelWebhookUrl: 'Channel webhook URL',+ howTo: {+ title: 'How to get Discord webhook URL:',+ createChannel: '1. Create or select a Discord channel',+ openChannelSettings: '2. Go to channel settings (gear icon)',+ openIntegrations: '3. Navigate to Integrations',+ createWebhook: '4. Create a new webhook',+ copyWebhookUrl: '5. Copy the webhook URL',+ privacyNote: 'Note: make sure make channel private if needed',+ },+ },+ teams: {+ howToConnect: 'How to connect Microsoft Teams?',+ powerAutomateUrl: 'Power Automate URL',+ powerAutomateUrlLabel: 'Power Automate URL:',+ powerAutomateUrlTooltip:+ 'HTTP endpoint from your Power Automate flow (When an HTTP request is received)',+ showFullUrl: 'Show',+ hideFullUrl: 'Hide',+ },+ mattermost: {+ howToConnect: 'How to connect Mattermost?',+ connectVia: 'Connect via',+ incomingWebhookUrl: 'Incoming webhook URL',+ serverUrl: 'Server URL',+ channelIdTooltip:+ '26-character channel ID, not the channel name. Open the channel, click its name and choose View Info.',+ channel: 'Channel',+ showOptionalSettings: 'Show optional settings',+ hideOptionalSettings: 'Hide optional settings',+ channelOverride: 'Channel override',+ channelOverrideTooltip:+ 'Post to this channel instead of the one the webhook was created for. Mattermost ignores it when the webhook is locked to a channel.',+ postAsUsername: 'Post as username',+ postAsUsernameTooltip:+ 'Requires Enable integrations to override usernames in the Mattermost system console, otherwise it is ignored.',+ postAsIconUrl: 'Post as icon URL',+ postAsIconUrlTooltip:+ 'Requires Enable integrations to override profile picture icons in the Mattermost system console, otherwise it is ignored.',+ skipTlsTooltip:+ 'Skip TLS certificate verification. Enable this if your Mattermost server uses a self-signed certificate. Warning: this reduces security.',+ webhookHowTo: {+ title: 'How to get an incoming webhook URL:',+ openIncomingWebhooks: '1. Main menu - Integrations - Incoming Webhooks',+ addWebhook: '2. Add Incoming Webhook, pick the channel',+ copyUrl: '3. Copy the generated URL',+ },+ botHowTo: {+ title: 'How to get a bot token:',+ addBotAccount: '1. Integrations - Bot Accounts - Add Bot Account',+ copyToken: '2. Copy the token shown once after creation',+ addBotToChannel: '3. Add the bot to the team and to the channel',+ },+ },+ },+ backups: {+ encryption: {+ none: 'None',+ encrypted: 'Enabled',+ },+ encryptionOptions: {+ none: 'None',+ encrypted: 'Encrypt backup files',+ },+ list: {+ title: 'Backups',+ scheduledBackupsDisabled:+ 'Scheduled backups are disabled (you can enable it back in the backup configuration)',+ empty: 'No backups yet',+ allLoaded: 'All backups loaded ({{count}} total)',+ clickToSeeErrorDetails: 'Click to see error details',+ errorDetailsTitle: 'Backup error details',+ restoreTitle: 'Restore from backup',+ columns: {+ createdAt: 'Created at',+ created: 'Created',+ size: 'Size',+ duration: 'Duration',+ actions: 'Actions',+ },+ actions: {+ cancelBackup: 'Cancel backup',+ deleteBackup: 'Delete backup',+ },+ },+ filters: {+ allTypes: 'All types',+ allStatuses: 'All statuses',+ before: 'Before',+ },+ config: {+ backupsEnabled: 'Backups enabled',+ storage: 'Storage',+ selectStorage: 'Select storage',+ createNewStorage: 'Create new storage',+ addStorageTitle: 'Add storage',+ storageDescription:+ 'Storage - is a place where backups will be stored (local disk, S3, Google Drive, etc.)',+ storageChangeWarning:+ 'If you change the storage, all backups in this storage will be deleted.',+ storageChangeAcknowledge: 'I understand',+ encryption: 'Encryption',+ notifications: 'Notifications',+ noNotifications: 'None',+ schedule: {+ weekday: 'Weekday',+ dayOfMonth: 'Day of month',+ cronExpression: 'Cron expression (UTC)',+ timeOfDay: 'Time of day',+ nextRun: 'Next run {{time}}',+ invalidCron: 'Invalid cron expression',+ cronHelp: {+ format: 'Cron format: minute hour day month weekday (UTC)',+ examples: 'Examples:',+ dailyAt2am: 'Daily at 2:00 AM UTC',+ every6Hours: 'Every 6 hours',+ mondaysAt3am: 'Every Monday at 3:00 AM UTC',+ twiceAMonth: '1st and 15th at 4:30 AM UTC',+ },+ },+ gfs: {+ hourly: 'Hourly: {{count}}',+ daily: 'Daily: {{count}}',+ weekly: 'Weekly: {{count}}',+ monthly: 'Monthly: {{count}}',+ yearly: 'Yearly: {{count}}',+ notConfigured: 'Not configured',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS (keep last N hourly, daily, weekly, monthly and yearly backups)',+ timePeriod: 'Time period (last N days)',+ count: 'Count (N last backups)',+ },+ notificationTypes: {+ backupSuccess: 'Backup success',+ backupFailed: 'Backup failed',+ },+ list: {+ backupNow: 'Backup now',+ makeBackupNow: 'Make backup right now',+ encrypted: 'Encrypted',+ sizeTooltip:+ 'Top: the compressed backup file size we actually store in the storage (local, S3, Google Drive, etc.). Bottom (grayed): the original uncompressed database size at backup time. Backups are usually compressed ~5x.',+ databaseSize: '{{size}} (DB size)',+ deleteConfirmation: 'Are you sure you want to delete this backup?',+ actions: {+ restore: 'Restore from backup',+ verifyRestore:+ 'Verify restore - queue an agent to restore this backup to a temporary database and report row counts',+ download: {+ postgresql:+ 'Download backup file. It can be restored manually via pg_restore (from custom format)',+ mysql:+ 'Download backup file. It can be restored manually via mysql client (from SQL dump)',+ mariadb:+ 'Download backup file. It can be restored manually via mariadb client (from SQL dump)',+ mongodb:+ 'Download backup file. It can be restored manually via mongorestore (from archive)',+ other: 'Download backup file',+ },+ },+ verifyRestore: {+ title: 'Verify restore?',+ description:+ 'An agent will restore this backup to a temporary database and report row counts. This may take a while depending on backup size. <docsLink>How it works?</docsLink>',+ queue: 'Queue check',+ queued: 'Restore check queued',+ },+ },+ config: {+ interval: 'Backup interval',+ weekday: 'Backup weekday',+ dayOfMonth: 'Backup day of month',+ timeOfDay: 'Backup time of day',+ encryptionTooltip:+ "If backup is encrypted, backup files in your storage (S3, local, etc.) cannot be used directly. You can restore backups through Databasus or download them unencrypted via the 'Download' button.",+ retentionPolicy: 'Retention policy',+ retention: {+ timePeriodTooltip:+ 'How long to keep the backups. Backups older than this period are automatically deleted.',+ count: 'Most recent backups',+ countTooltip:+ 'Keep only the specified number of most recent backups. Older backups beyond this count are automatically deleted.',+ countValue: 'Most recent backups: {{count}}',+ showGfsHint: 'What is GFS (Grandfather-Father-Son)?',+ hideGfsHint: 'Hide',+ gfsHint:+ 'GFS (Grandfather-Father-Son) rotation: keep the last N hourly, daily, weekly, monthly and yearly backups. This allows keeping backups over long periods of time within a reasonable storage space.',+ gfsTooltip:+ 'Grandfather-Father-Son rotation: keep the last N hourly, daily, weekly, monthly and yearly backups.',+ gfsFields: {+ hourly: 'Hourly backups',+ daily: 'Daily backups',+ weekly: 'Weekly backups',+ monthly: 'Monthly backups',+ yearly: 'Yearly backups',+ },+ },+ advancedSettings: 'Advanced settings',+ retryIfFailed: 'Retry backup if failed',+ retryIfFailedShort: 'Retry if failed',+ retryIfFailedTooltip:+ 'Automatically retry failed backups. Backups can fail due to network failures, storage issues or temporary database unavailability.',+ maxFailedTries: 'Max failed tries count',+ maxFailedTriesTooltip:+ 'Maximum number of retry attempts for failed backups. You will receive a notification when all tries have failed.',+ },+ },+ physical: {+ types: {+ full: 'Full',+ incremental: 'Incremental',+ wal: 'WAL',+ },+ retentions: {+ chains: 'Chains',+ fullBackups: 'Full backups',+ chainsAndFullBackups: 'Chains and full backups',+ },+ fullBackupsPolicies: {+ lastN: 'Count',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: 'Backup success',+ backupFailed: 'Backup failed',+ chainBroken: 'Chain broken',+ walGap: 'WAL gap',+ },+ list: {+ totalUsage: 'Total usage: {{size}}',+ backUpNow: 'Back up now',+ fullBackup: 'Full backup',+ incrementalBackup: 'Incremental backup',+ restore: 'Restore',+ restoreFromThisBackup: 'Restore from this backup',+ pointInTimeRestoreTitle: 'Point-in-time restore',+ deleteFullConfirmation:+ 'Deleting this full backup removes its entire chain (all incrementals that depend on it). This cannot be undone. Continue?',+ deleteIncrementalConfirmation:+ 'Deleting this incremental backup removes all later incrementals that depend on it. This cannot be undone. Continue?',+ },+ config: {+ fullBackupCadence: 'Full backup cadence',+ incrementalBackupCadence: 'Incremental backup cadence',+ incrementalMoreFrequent: 'Incremental backups must run more frequently than full backups.',+ encryptionTooltip:+ 'If backups are encrypted, the files in your storage cannot be used directly. You can restore them through Databasus or download them unencrypted.',+ retention: 'Retention',+ fullBackupsOnlyRetention:+ 'This database keeps full backups only, so retention applies to full backups.',+ retentionOptions: {+ chains: 'Keep last N chains',+ chainsAndFullBackups: 'Keep last N chains and full backups',+ },+ retentionHelp: {+ chain:+ 'A chain is one full backup plus the incrementals (and streamed WAL) that depend on it. Restoring needs the full backup and every incremental in its chain.',+ chains:+ 'Keeps only the last N chains. When a chain rolls off, its full backup and all its incrementals are deleted - you can restore only within the kept chains.',+ chainsAndFullBackups:+ 'Keeps the last N chains for recent point-in-time recovery, and additionally retains older standalone full backups by the policy below (GFS or last N) for long-term restore points after their incrementals are gone.',+ },+ chainsCount: 'Chains',+ chainsCountTooltip:+ 'Number of most recent backup chains to keep. A chain is a full backup plus its incrementals.',+ fullBackups: 'Full backups',+ fullBackupsCount: 'Most recent full backups',+ gfsFields: {+ hourly: 'Hourly',+ daily: 'Daily',+ weekly: 'Weekly',+ monthly: 'Monthly',+ yearly: 'Yearly',+ },+ chainsKept: 'Chains kept',+ fullBackupsKept: 'Full backups kept',+ fullBackupsCountValue: 'Most recent: {{count}}',+ gfsTooltip:+ 'Grandfather-Father-Son rotation: keep the last N hourly, daily, weekly, monthly and yearly full backups.',+ },+ restore: {+ errorHints: {+ downloadInProgress:+ 'A restore download is already in progress for this database. Wait for it to finish, then try again.',+ targetTimeUnreachable:+ 'The requested target time cannot be reached - there is a WAL gap or the time is out of the available range. Pick a different time or restore the latest available point.',+ },+ backupIntro:+ 'Restore command for this backup. A full backup needs only its own file; an incremental one also needs its full backup and all earlier incrementals.',+ pointInTimeIntro:+ 'Point-in-time restore. Pick a target time, or leave it empty to restore the latest available point.',+ targetTime: 'Target time',+ latestAvailable: 'Latest available',+ preparing: 'Preparing restore command...',+ linkExpiry:+ 'The download link is single-use and expires in 15 minutes. If a command fails with a 401, reopen this dialog to mint a fresh one.',+ copied: 'Copied',+ methods: {+ script: 'Via script',+ manual: 'Manual',+ },+ environments: {+ host: 'Host PostgreSQL',+ },+ fields: {+ restoreDirectory: 'Restore directory',+ pgBinPath: 'PostgreSQL bin path',+ pgBinPathPlaceholder: '{{path}} (optional)',+ pgImage: 'PostgreSQL image',+ },+ scriptTitles: {+ host: 'Run on your restore host',+ docker: 'Run where Docker is available',+ },+ manualSteps: {+ download: 'Download the bundle',+ extract: 'Extract it',+ verify: 'Verify the transfer',+ reconstruct: 'Reconstruct the data directory',+ checkConfig: "Check the cluster's configuration files",+ wireUpRecovery: 'Decompress WAL and wire up recovery',+ recoveryParameters: 'If recovery stops on parameter settings',+ },+ beforeYouRun: {+ title: 'Before you run',+ host: {+ clientTools:+ 'Install the PostgreSQL {{version}} client tools - set the bin path above if they are not on PATH.',+ zstd: 'zstd is required to decompress the backup.',+ zstdWithWal: 'zstd is required to decompress the backup and its WAL.',+ emptyDirectory: 'The restore directory must be empty and not an in-use cluster.',+ },+ docker: {+ image: 'Use a postgres:{{version}} image - the major version must match the source.',+ hostTools:+ 'The host needs zstd, tar and curl: the download and all decompression - the base backup - run on the host, and only pg_combinebackup runs in the container, so the postgres image needs no extra tools.',+ hostToolsWithWal:+ 'The host needs zstd, tar and curl: the download and all decompression - the base backup and the WAL - run on the host, and only pg_combinebackup runs in the container, so the postgres image needs no extra tools.',+ },+ },+ afterItFinishes: {+ title: 'After it finishes',+ host: {+ clusterLocation: 'The cluster is at <dataDir/>.',+ changeOwner: 'Own it as root: <command/>.',+ start: 'Start it as postgres: <command/>, or point data_directory at it.',+ walReplay:+ 'PostgreSQL replays WAL and promotes - watch the log for recovery completion.',+ },+ docker: {+ clusterLocation: '<dataDir/> on the host is the restored cluster.',+ volumeMount:+ 'PostgreSQL {{version}} keeps its data directory at <dataDir/>, under the volume <volumeDir/>. Mount the output dir as that volume root - this is what a docker-compose <code>./pgdata:/var/lib/postgresql</code> expects:',+ dataDirectoryMount: "Bind-mount the cluster at the image's data directory <dataDir/>:",+ ownership:+ 'Ownership must match the postgres uid inside the image (999 in the official one).',+ },+ missingConfigFiles:+ 'A base backup copies only the data directory. If your source PostgreSQL keeps its configuration outside it - the Debian/Ubuntu layout, <configDir/> - then <code>postgresql.conf</code>, <code>pg_hba.conf</code> and <code>pg_ident.conf</code> are not in the backup and the server will not start. Ask the source for their real paths with <code>psql -Atc "SHOW config_file"</code>, copy all three in, then comment out <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>, <code>external_pid_file</code> and the <code>ssl</code> / <code>ssl_*</code> lines, create <code>conf.d</code>, and set <code>listen_addresses = \'*\'</code> for a container. If those files are present and you still get the same error, it is the mounted directory that is wrong, not the configuration.',+ },+ },+ },+ },+ storages: {+ types: {+ local: 'Local storage',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: 'Default (Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: 'Account key',+ connectionString: 'Connection string',+ },+ sftpAuthMethods: {+ password: 'Password',+ privateKey: 'Private key',+ },+ list: {+ addStorage: 'Add storage',+ description: 'Storage - is a place where backups will be stored (local disk, S3, etc.)',+ backToList: '← Back to storages',+ },+ card: {+ type: {+ local: 'Type: local storage',+ s3: 'Type: S3',+ googleDrive: 'Type: Google Drive',+ nas: 'Type: NAS',+ azureBlob: 'Type: Azure Blob Storage',+ ftp: 'Type: FTP',+ sftp: 'Type: SFTP',+ rclone: 'Type: Rclone',+ },+ hasSaveError: 'Has save error',+ },+ config: {+ namePlaceholder: 'Enter name...',+ settingsTitle: 'Storage settings',+ lastSaveError: {+ title: 'Save error',+ errorLabel: 'The error:',+ clearHint: 'To clean this error (choose any):',+ clearByTestingConnection:+ '- test connection via button below (even if you updated settings);',+ clearByNextSave: '- wait until the next save is done without errors;',+ },+ removeConfirmation:+ 'Are you sure you want to remove this storage? This action cannot be undone. If some backups are using this storage, they will be removed too.',+ removeBlockedByDatabases:+ 'Storage is used by some databases. Please remove the storage from databases first.',+ },+ actions: {+ testConnection: 'Test connection',+ },+ connectionTestSucceeded: {+ title: 'Connection test successful!',+ description: 'Storage connection tested successfully',+ },+ transfer: {+ title: 'Transfer storage to another workspace',+ blockedByDatabases:+ 'This storage is used by some databases. Please transfer or remove related databases first.',+ description: 'Select a workspace to transfer this storage to.',+ targetWorkspace: 'Target workspace',+ selectWorkspace: 'Select workspace',+ submit: 'Transfer',+ },+ fields: {+ path: 'Path',+ remotePath: 'Remote path',+ share: 'Share',+ domain: 'Domain',+ useSsl: 'Use SSL',+ useSslTls: 'Use SSL/TLS',+ skipTls: 'Skip TLS',+ skipTlsVerify: 'Skip TLS verify',+ skipHostKey: 'Skip host key',+ authMethod: 'Auth method',+ privateKey: 'Private key',+ credentials: 'Credentials',+ s3Bucket: 'S3 Bucket',+ region: 'Region',+ accessKey: 'Access key',+ secretKey: 'Secret key',+ endpoint: 'Endpoint',+ folderPrefix: 'Folder prefix',+ prefix: 'Prefix',+ blobPrefix: 'Blob prefix',+ virtualHost: 'Virtual host',+ storageClass: 'Storage class',+ connection: 'Connection',+ connectionString: 'Connection string',+ accountName: 'Account name',+ accountKey: 'Account key',+ containerName: 'Container name',+ clientId: 'Client ID',+ clientSecret: 'Client Secret',+ userToken: 'User Token',+ config: 'Config',+ },+ edit: {+ namePlaceholder: 'My Storage',+ advancedSettings: 'Advanced settings',+ optionalPlaceholder: '{{example}} (optional)',+ usernamePlaceholder: 'username',+ passwordPlaceholder: 'password',+ remotePathTooltip: 'Remote directory path for storing backups (optional)',+ local: {+ diskSpaceWarning:+ 'Be careful: with local storage you may run out of ROM memory. It is recommended to use S3 or unlimited storages',+ },+ s3: {+ cloudflareR2Guide: 'How to use with Cloudflare R2?',+ endpointTooltip: 'Custom S3-compatible endpoint URL (optional, leave empty for AWS S3)',+ prefixTooltip:+ "Optional prefix for all object keys (e.g., 'backups/' or 'my_team/'). May not work with some S3-compatible storages. Cannot be changed after creation (otherwise backups will be lost).",+ useVirtualHostedStyle: 'Use virtual-hosted style',+ virtualHostTooltip:+ 'Use virtual-hosted-style URLs (bucket.s3.region.amazonaws.com) instead of path-style (s3.region.amazonaws.com/bucket). May be required if you see COS errors.',+ skipTls: 'Skip TLS',+ skipTlsVerifyTooltip:+ 'Skip TLS certificate verification. Enable this if your S3-compatible storage uses a self-signed certificate. Warning: this reduces security.',+ storageClassTooltip:+ 'S3 storage class for uploaded objects. Leave as default for Standard. Some providers offer cheaper classes like One Zone IA. Do not use Glacier/Deep Archive - files must be immediately accessible for restores.',+ },+ googleDrive: {+ guideLink: 'How to connect Google Drive?',+ authorize: 'Authorize',+ },+ nas: {+ shareWithSlashWarning:+ 'Share must be a single share name. Use the Path field for subdirectories (e.g. Share: Databasus, Path: DB1)',+ useSslTooltip: 'Enable SSL/TLS encryption for secure connection',+ domainTooltip:+ 'Windows domain name (optional, leave empty if not using domain authentication)',+ pathPlaceholder: '{{example}} (optional, no leading slash)',+ pathTooltip: 'Subdirectory path within the share (optional)',+ },+ azureBlob: {+ connectionStringTooltip: 'Azure Storage connection string from Azure Portal',+ endpointTooltip: 'Custom endpoint URL (optional, leave empty for standard Azure)',+ prefixTooltip: "Optional prefix for all blob names (e.g., 'backups/' or 'my_team/')",+ },+ ftp: {+ enableFtps: 'Enable FTPS',+ useSslTooltip: 'Use explicit TLS encryption (FTPS) for secure file transfer',+ skipCertificateVerification: 'Skip certificate verification',+ skipTlsVerifyTooltip:+ 'Skip TLS certificate verification. Enable this if your FTP server uses a self-signed certificate. Warning: this reduces security.',+ },+ sftp: {+ privateKeyTooltip:+ 'Paste your SSH private key (PEM format). Supports RSA, DSA, ECDSA, and Ed25519 keys.',+ skipHostKeyVerification: 'Skip host key verification',+ skipHostKeyTooltip:+ 'Skip SSH host key verification. Enable this if you trust the server. Warning: this reduces security.',+ },+ rclone: {+ configTooltip:+ "Paste your rclone.conf content here. You can get it by running 'rclone config file' and copying the contents. This config supports 70+ cloud storage providers.",+ configHiddenNote:+ '*content is hidden to not expose sensitive data. If you want to update existing config, put a new one here',+ docsLink: 'Rclone documentation',+ remotePathTooltip:+ "Optional path prefix on the remote where backups will be stored (e.g., '/backups' or 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/locales/es.ts b/frontend/src/shared/i18n/locales/es.tsnew file mode 100644index 00000000..eeeb517b--- /dev/null+++ b/frontend/src/shared/i18n/locales/es.ts@@ -0,0 +1,1827 @@+import type { en } from './en';++export const es: typeof en = {+ language: {+ nativeName: 'Español',+ },+ common: {+ actions: {+ add: 'Añadir',+ back: 'Atrás',+ cancel: 'Cancelar',+ close: 'Cerrar',+ confirm: 'Confirmar',+ continue: 'Continuar',+ copy: 'Copiar',+ create: 'Crear',+ delete: 'Eliminar',+ download: 'Descargar',+ edit: 'Editar',+ ok: 'Aceptar',+ refresh: 'Actualizar',+ remove: 'Eliminar',+ retry: 'Reintentar',+ save: 'Guardar',+ },+ answers: {+ no: 'No',+ yes: 'Sí',+ },+ fields: {+ host: 'Host',+ name: 'Nombre',+ password: 'Contraseña',+ port: 'Puerto',+ status: 'Estado',+ type: 'Tipo',+ username: 'Usuario',+ },+ states: {+ disabled: 'Desactivado',+ enabled: 'Activado',+ loading: 'Cargando...',+ },+ messages: {+ copiedToClipboard: 'Copiado al portapapeles',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: ', ',+ confirmation: {+ title: 'Confirmación',+ },+ },+ app: {+ documentTitle: 'Databasus - copias de seguridad de bases de datos (PostgreSQL, MySQL, MongoDB)',+ languageControl: {+ title: 'Idioma: {{language}}',+ },+ theme: {+ title: 'Tema: {{theme}}',+ light: 'Claro',+ dark: 'Oscuro',+ system: 'Sistema',+ },+ navigation: {+ databases: 'Bases de datos',+ storages: 'Almacenamientos',+ notifiers: 'Canales de notificación',+ workspaceSettings: 'Ajustes',+ profile: 'Perfil',+ databasusSettings: 'Ajustes de Databasus',+ users: 'Usuarios',+ docs: 'Documentación',+ documentation: 'Documentación',+ community: 'Comunidad',+ newVersionAvailable: 'Nueva versión disponible',+ },+ diskUsage: {+ title: 'Uso del disco',+ hint: 'Para crear copias de seguridad en local y restaurarlas, necesita suficiente espacio en el disco. Para restaurar una copia hace falta tanto espacio libre como el que ocupa la copia.',+ compactSummary: 'En uso: {{used}} de {{total}} GB<lineBreak/>({{percent}}%)',+ summary: 'En uso: {{used}} de {{total}} GB ({{percent}}%)',+ },+ workspaceSelection: {+ createShort: 'Crear',+ create: 'Crear espacio de trabajo',+ selected: 'Espacio de trabajo actual',+ placeholder: 'Seleccione un espacio de trabajo',+ search: 'Buscar espacios de trabajo...',+ notFound: 'No se encontraron espacios de trabajo',+ createNew: '+ Nuevo espacio de trabajo',+ },+ sponsorship: {+ link: 'Patrocinar',+ hint: '¿Databasus le ha salvado los datos? Apoye el proyecto para que siga siendo gratuito, mantenido e independiente.',+ },+ starButton: {+ label: 'Dar estrella en GitHub',+ ariaLabel: 'Dar una estrella a databasus/databasus en GitHub',+ },+ clipboardPaste: {+ title: 'Pegar desde el portapapeles',+ submit: 'Aplicar',+ description:+ 'El acceso automático al portapapeles no está disponible. Pegue el contenido a continuación.',+ placeholder: 'Pegue aquí la cadena de conexión...',+ },+ auth: {+ adminPasswordCheckFailed:+ 'No se pudo comprobar si la contraseña de administrador está configurada: {{error}}',+ },+ oauthCallback: {+ failedTitle: 'Error de autenticación',+ codeNotFound: 'No se encontró el código de autorización',+ stateMissing: 'Falta el parámetro state de OAuth',+ invalidProvider: 'Proveedor de OAuth no válido',+ returnToSignIn: 'Volver al inicio de sesión',+ completing: 'Completando la autenticación...',+ },+ oauthStorage: {+ configNotFound: 'No se encontró la configuración del almacenamiento de Google Drive',+ exchangeFailed: 'No se pudo canjear el código de OAuth',+ unsupportedType: 'Este tipo de almacenamiento no admite OAuth',+ invalidState: 'El parámetro state de OAuth no es válido',+ paramNotFound:+ 'No se encontró el parámetro de OAuth. Compruebe que la URL de redirección esté bien configurada.',+ addStorageTitle: 'Añadir almacenamiento',+ storageDescription:+ 'Un almacenamiento es el lugar donde se guardan las copias de seguridad (disco local, S3, etc.)',+ },+ },+ errors: {+ unknown: 'Algo salió mal. Inténtelo de nuevo.',+ networkUnreachable:+ 'No se puede conectar con el servidor de Databasus. Compruebe su conexión e inténtelo de nuevo.',+ requestFailed:+ 'El servidor no pudo completar la solicitud (HTTP {{status}}). Inténtelo de nuevo más tarde.',+ },+ status: {+ logicalBackup: {+ inProgress: 'En curso',+ completed: 'Correcta',+ failed: 'Fallida',+ deleted: 'Eliminada',+ canceled: 'Cancelada',+ },+ physicalBackup: {+ inProgress: 'En curso',+ completed: 'Correcta',+ error: 'Error',+ chainBroken: 'Cadena rota',+ canceled: 'Cancelada',+ },+ restoreVerification: {+ verifiedSuccessful: 'Verificada',+ verificationFailed: 'Verificación fallida',+ },+ restore: {+ inProgress: 'En curso',+ completed: 'Correcta',+ failed: 'Fallida',+ canceled: 'Cancelada',+ },+ verification: {+ pending: 'Pendiente',+ running: 'En ejecución',+ completed: 'Correcta',+ failed: 'Fallida',+ canceled: 'Cancelada',+ },+ health: {+ available: 'Disponible',+ unavailable: 'No disponible',+ },+ agent: {+ neverSeen: 'Nunca conectado',+ online: 'En línea',+ stale: 'Con retraso',+ offline: 'Desconectado',+ },+ },+ intervals: {+ types: {+ hourly: 'Cada hora',+ daily: 'Diario',+ weekly: 'Semanal',+ monthly: 'Mensual',+ cron: 'Cron',+ },+ weekdays: {+ mon: 'Lun',+ tue: 'Mar',+ wed: 'Mié',+ thu: 'Jue',+ fri: 'Vie',+ sat: 'Sáb',+ sun: 'Dom',+ },+ periods: {+ day: '1 día',+ week: '1 semana',+ month: '1 mes',+ threeMonths: '3 meses',+ sixMonths: '6 meses',+ year: '1 año',+ twoYears: '2 años',+ threeYears: '3 años',+ fourYears: '4 años',+ fiveYears: '5 años',+ forever: 'Sin límite',+ },+ },+ auditLogs: {+ title: 'Registros de auditoría',+ columns: {+ user: 'Usuario',+ message: 'Mensaje',+ workspace: 'Espacio de trabajo',+ created: 'Fecha',+ },+ systemUser: 'Sistema',+ loadedOfTotal: 'Cargados: {{loaded}} de {{total}}',+ empty: 'No hay registros de auditoría.',+ loadingMore: 'Cargando más registros...',+ allLoaded: 'Todos los registros cargados ({{count}} en total)',+ },+ settings: {+ title: 'Ajustes de Databasus',+ externalRegistrations: {+ title: 'Permitir registros externos',+ description:+ 'Si está activado, cualquier persona puede crear una cuenta en Databasus. Si está desactivado, solo es posible registrarse por invitación.',+ },+ memberInvitations: {+ title: 'Permitir invitaciones de miembros',+ description:+ 'Si está activado, los miembros pueden invitar a nuevos usuarios a Databasus. Si no, solo pueden invitar los administradores.',+ },+ memberWorkspaceCreation: {+ title: 'Los miembros pueden crear espacios de trabajo',+ description:+ 'Si está activado, los miembros (usuarios que no son administradores) pueden crear espacios de trabajo. Si no, solo pueden crearlos los administradores.',+ },+ saving: 'Guardando...',+ saveChanges: 'Guardar cambios',+ reset: 'Restablecer',+ updated: 'Ajustes guardados',+ readMore: 'Más información sobre los ajustes <docsLink>en la documentación</docsLink>',+ healthcheck: {+ title: 'Comprobación de disponibilidad',+ openInNewTab: 'Abrir en una pestaña nueva',+ copied: 'Endpoint de comprobación de disponibilidad copiado al portapapeles',+ description:+ 'Use este endpoint para supervisar la disponibilidad de su instancia de Databasus',+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: 'Desactivado',+ require: 'Obligatorio',+ verifyCa: 'Verificación de CA',+ verifyFull: 'Verificación completa',+ },+ physicalBackupTypes: {+ full: 'Solo copias completas',+ fullIncremental: 'Completas + incrementales',+ fullIncrementalWalStream: 'Completas + incrementales + streaming de WAL',+ },+ list: {+ addDatabase: 'Añadir base de datos',+ searchPlaceholder: 'Buscar base de datos',+ noSearchResults: 'No se encontraron bases de datos que coincidan con "{{query}}"',+ description: 'Una base de datos es lo que protegemos con copias de seguridad',+ backToList: '← Volver a las bases de datos',+ },+ card: {+ storage: 'Almacenamiento: <storageName/>',+ lastBackup: 'Última copia de seguridad {{relativeTime}}',+ hasBackupError: 'Error en la copia de seguridad',+ },+ tabs: {+ config: 'Configuración',+ backups: 'Copias de seguridad',+ verifications: 'Verificaciones',+ },+ create: {+ title: 'Añadir una base de datos para copias de seguridad',+ namePlaceholder: 'Mi base de datos favorita',+ creating: 'Creando la base de datos...',+ complete: 'Finalizar',+ backupType: {+ title: 'Elija el tipo de copia de seguridad',+ logical: {+ title: 'Lógica',+ description:+ 'Recomendada para bases de datos de menos de 50 GB. Más fácil de configurar.',+ },+ physical: {+ title: 'Física',+ description:+ 'Para bases de datos de más de 50 GB. Permite la recuperación a un punto en el tiempo (PITR) y mejora el RPO/RTO, pero requiere configuración adicional.',+ },+ },+ },+ config: {+ namePlaceholder: 'Introduzca un nombre...',+ removing: 'Eliminando la base de datos...',+ lastBackupError: {+ title: 'Error en la última copia de seguridad',+ errorLabel: 'Error:',+ clearHint: 'Para quitar este error, haga una de estas dos cosas:',+ clearByTestingConnection:+ '- pruebe la conexión con el botón de abajo (aunque ya haya cambiado los ajustes);',+ clearByNextBackup: '- espere a que la siguiente copia de seguridad termine sin errores;',+ },+ sections: {+ database: 'Ajustes de la base de datos',+ backupConfig: 'Configuración de copias de seguridad',+ healthcheck: 'Comprobación de disponibilidad',+ restoreVerification: 'Verificación de restauración',+ notifiers: 'Canales de notificación',+ },+ copyConfirmation:+ '¿Seguro que desea copiar esta base de datos? Se creará una base de datos nueva con los mismos ajustes.',+ removeConfirmation:+ '¿Seguro que desea eliminar esta base de datos? Esta acción no se puede deshacer.',+ copied: {+ title: 'Base de datos copiada',+ description: 'Base de datos "{{name}}" creada',+ },+ connectionTestSucceeded: {+ title: 'La conexión funciona',+ description: 'Conexión con la base de datos comprobada',+ },+ },+ actions: {+ testConnection: 'Probar conexión',+ replace: 'Reemplazar',+ },+ fields: {+ databaseType: 'Tipo de base de datos',+ version: 'Versión de {{engine}}',+ databaseName: 'Nombre de la BD',+ sslMode: 'Modo SSL',+ useHttps: 'Usar HTTPS',+ cpuCount: 'Número de CPU',+ backupType: 'Tipo de copia de seguridad',+ clientCertificate: 'Certificado de cliente',+ clientKey: 'Clave de cliente',+ serverCaCertificate: 'Certificado CA del servidor',+ includeSchemas: 'Incluir esquemas',+ excludeTables: 'Excluir tablas',+ skipUserMappings: 'Omitir user mappings',+ excludeExtensions: 'Excluir extensiones',+ restoreOwnership: 'Restaurar propietarios',+ restorePrivileges: 'Restaurar privilegios',+ excludeEvents: 'Excluir eventos',+ galeraReplication: 'Replicación de Galera',+ useSrvConnection: 'Usar conexión SRV',+ directConnection: 'Conexión directa',+ authDatabase: 'Base de datos de autenticación',+ excludeCollections: 'Excluir colecciones',+ },+ edit: {+ parseFromClipboard: 'Rellenar desde el portapapeles',+ clipboardEmpty: 'El portapapeles está vacío',+ clipboardReadFailed: 'No se pudo leer el portapapeles. Revise los permisos del navegador.',+ connectionStringParsed: 'Campos rellenados a partir de la cadena de conexión',+ connectionStringParsedWithoutPassword:+ 'Campos rellenados a partir de la cadena de conexión. Introduzca la contraseña manualmente.',+ connectionTestPassed: {+ title: 'Conexión comprobada',+ description: 'Puede pasar al siguiente paso',+ },+ ipWhitelistHint:+ 'Si su base de datos solo acepta conexiones desde una lista de IP permitidas, añada a esa lista la IP del servidor de Databasus.',+ localhostHint:+ '<docsLink>Lea este artículo</docsLink> para saber cómo hacer copias de seguridad de una base de datos local',+ advancedSettings: 'Ajustes avanzados',+ placeholders: {+ host: 'Introduzca el host de {{engine}}',+ port: 'Introduzca el puerto de {{engine}}',+ username: 'Introduzca el usuario de {{engine}}',+ password: 'Introduzca la contraseña de {{engine}}',+ databaseName: 'Introduzca el nombre de la base de datos de {{engine}}',+ },+ cpuCountTooltip:+ 'Número de núcleos de CPU que se usan para crear y restaurar copias de seguridad. Un valor más alto puede acelerar el proceso, pero consume más recursos.',+ excludeTablesPlaceholder: 'Ninguna tabla excluida',+ excludeTablesTooltip:+ 'Tablas que no se incluirán en la copia de seguridad. Puede pegar una lista separada por comas o por saltos de línea.',+ serverCaCertificateTooltip:+ 'Opcional. Si se indica, el certificado del servidor se verifica con esta CA (verify-ca / verify-full).',+ copyFailed: 'No se pudo copiar',+ postgresql: {+ supabaseHint:+ '<docsLink>Lea este artículo</docsLink> para saber cómo hacer copias de seguridad de una base de datos de Supabase',+ includeSchemasPlaceholder: 'Todos los esquemas (predeterminado)',+ excludeTablesTooltip:+ "Tablas que no se incluirán en la copia de seguridad. Use 'tablename' o 'schema.tablename'. Se admiten patrones glob (p. ej., 'logs_*'). Puede pegar una lista separada por comas o por saltos de línea.",+ skipUserMappingsTooltip:+ 'No restaura los user mappings (sentencias CREATE USER MAPPING). Active esta opción si el rol de la copia de seguridad no puede leer sus credenciales: si no, se vuelcan sin opciones y rompen la restauración con FDW como oracle_fdw.',+ excludeExtensionsTooltip:+ 'No restaura las definiciones de extensiones (sentencias CREATE EXTENSION). Active esta opción si restaura en un servicio de PostgreSQL gestionado en el que el proveedor administra las extensiones.',+ restoreOwnershipTooltip:+ 'Aplica las sentencias ALTER OWNER del volcado para que los objetos restaurados conserven su propietario original. El usuario de la conexión debe poder asignar esos roles; normalmente, un superusuario.',+ restorePrivilegesTooltip:+ 'Aplica las sentencias GRANT y REVOKE del volcado para que los objetos restaurados conserven sus ACL originales. El usuario de la conexión debe poder conceder permisos a los roles referenciados; normalmente, un superusuario.',+ backupTypeTooltips: {+ full: 'Copias completas periódicas e independientes. Cada copia se basta por sí misma.',+ fullIncremental:+ 'Copias completas más incrementales, que guardan solo los cambios desde la copia anterior. Ocupan menos y son más rápidas.',+ fullIncrementalWalStream:+ 'Añade streaming continuo de WAL a las copias completas e incrementales. Es la única opción que permite la recuperación a un punto en el tiempo (PITR), pero ocupa más espacio y la restauración es más lenta.',+ },+ },+ mariadb: {+ skipEvents: 'Omitir eventos',+ skipEventsTooltip:+ 'No incluye los eventos de la base de datos en la copia de seguridad. Active esta opción si el programador de eventos está desactivado en su servidor MariaDB.',+ skipGaleraDisable: 'No desactivar al restaurar',+ skipGaleraDisableTooltip:+ 'Por defecto, Databasus ejecuta SET SESSION wsrep_on=OFF durante la restauración para evitar errores de tamaño de writeset en Galera. Esto requiere el privilegio SUPER. Active esta opción para saltarse ese paso si su proveedor gestionado no concede SUPER; en ese caso, las restauraciones grandes pueden toparse con los límites de writeset de Galera.',+ },+ mongodb: {+ srvTooltip:+ 'Active esta opción para las conexiones SRV de MongoDB Atlas (mongodb+srv://). Las conexiones SRV no necesitan puerto.',+ srvOverTunnelTooltip:+ 'No disponible a través de un túnel SSH: SRV resuelve su propia lista de hosts y no pasa por el puerto redirigido.',+ directConnectionTooltip:+ 'Se conecta directamente a un único servidor, sin descubrir el replica set. Útil si el servidor está detrás de un balanceador de carga, un proxy o un túnel.',+ directConnectionOverTunnelTooltip:+ 'Siempre activado mientras el túnel SSH esté activo: un túnel expone una sola dirección, así que no se puede descubrir el replica set.',+ excludeCollectionsPlaceholder: 'Ninguna colección excluida',+ excludeCollectionsTooltip:+ 'Colecciones que no se incluirán en la copia de seguridad. Puede pegar una lista separada por comas o por saltos de línea.',+ },+ },+ show: {+ galeraDisableSkipped: 'No desactivar al restaurar',+ },+ sshTunnel: {+ authTypes: {+ password: 'Contraseña',+ privateKey: 'Clave privada',+ },+ title: 'Túnel SSH',+ tooltip:+ 'Para una base de datos dentro de una red cerrada. Databasus se conecta al host SSH de abajo, y ese host llega a la base de datos con el host y el puerto indicados arriba.',+ host: 'Host SSH',+ hostTooltip:+ 'El host de la base de datos indicado arriba lo resuelve el host SSH, no Databasus. Use 127.0.0.1 si la base de datos se ejecuta en el propio host SSH.',+ port: 'Puerto SSH',+ username: 'Usuario SSH',+ usernamePlaceholder: 'Introduzca el usuario SSH',+ authType: 'Autenticación SSH',+ credentials: 'Credenciales SSH',+ password: 'Contraseña SSH',+ passwordPlaceholder: 'Introduzca la contraseña SSH',+ privateKey: 'Clave privada SSH',+ keyPassphrase: 'Frase de contraseña de la clave',+ keyPassphrasePlaceholder: 'Solo para claves cifradas',+ },+ notifiers: {+ title: 'Canales de notificación',+ description:+ 'Un canal de notificación es el lugar adonde se envían las notificaciones (correo electrónico, Slack, Telegram, etc.)',+ multipleHint:+ 'Puede elegir varios canales de notificación: las notificaciones se enviarán a todos ellos.',+ selectPlaceholder: 'Seleccione canales de notificación',+ createNew: 'Crear canal de notificación',+ addTitle: 'Añadir canal de notificación',+ notifyTo: 'Notificar a',+ empty: 'No hay canales de notificación configurados',+ },+ readOnlyUser: {+ dialogTitle: 'Crear usuario de solo lectura',+ readOnly: {+ checking: 'Comprobando el usuario de solo lectura...',+ title: '¿Crear un usuario de solo lectura para Databasus?',+ description:+ 'Un usuario de solo lectura es un usuario de {{databaseType}} con permisos limitados: puede leer los datos de su base de datos, pero no modificarlos. Es lo recomendado para las copias de seguridad porque:',+ noWriteCredentials:+ '<bold>Con un usuario de solo lectura no se guardan credenciales con permisos de escritura</bold>. Aunque ocurra lo peor y alguien hackee el sistema, nadie podrá dañar sus datos.',+ create: 'Sí, crear usuario de solo lectura',+ skipTitle: '¿Omitir la creación del usuario de solo lectura?',+ skipQuestion: '¿Seguro que desea no crear un usuario de solo lectura?',+ },+ replicationOnly: {+ checking: 'Comprobando el usuario de solo replicación...',+ title: '¿Crear un usuario de solo replicación para Databasus?',+ description:+ 'Un usuario de solo replicación es un usuario de {{databaseType}} con permisos limitados: puede leer los datos de su base de datos, pero no modificarlos. Es lo recomendado para las copias de seguridad porque:',+ noWriteCredentials:+ '<bold>Con un usuario de solo replicación no se guardan credenciales con permisos de escritura</bold>. Aunque ocurra lo peor y alguien hackee el sistema, nadie podrá dañar sus datos.',+ create: 'Sí, crear usuario de solo replicación',+ skipTitle: '¿Omitir la creación del usuario de solo replicación?',+ skipQuestion: '¿Seguro que desea no crear un usuario de solo replicación?',+ },+ reasons: {+ preventsModifications:+ 'evita modificaciones accidentales de los datos durante la copia de seguridad',+ leastPrivilege: 'sigue el principio de mínimo privilegio',+ bestPractice: 'es una buena práctica de seguridad',+ },+ securityNote:+ 'Databasus aplica seguridad de nivel empresarial (<docsLink>más detalles aquí</docsLink>). Aun así, no es posible cubrir todos los riesgos.',+ noWritePrivileges: 'El usuario actual <bold>no tiene privilegios de escritura</bold>.',+ noWriteRoles: 'El usuario actual <bold>no tiene roles de escritura</bold>.',+ writePrivileges: 'El usuario actual tiene estos privilegios de escritura:',+ writeRoles: 'El usuario actual tiene estos roles de escritura:',+ expand: '(mostrar)',+ collapse: '(ocultar)',+ skip: 'Omitir',+ skipRisk:+ 'No se recomienda usar un usuario con todos los permisos para las copias de seguridad: supone riesgos de seguridad. Databasus le recomienda encarecidamente no omitir este paso.',+ skipAdvice:+ 'La protección al 100% no existe. Más vale prevenir, aunque el riesgo de un hackeo completo sea del 0,01%. Por eso es mejor seguir el camino seguro con un usuario de solo lectura.',+ acceptRisks: 'Sí, acepto los riesgos',+ continueSecurely: 'Continuar por el camino seguro',+ forcedWalRotationUnavailable:+ 'El servidor de origen no concedería al nuevo usuario EXECUTE sobre pg_switch_wal(), que el streaming continuo de WAL necesita para mantener el punto de recuperación cerca del presente. Las copias completas e incrementales funcionan con normalidad con estas credenciales.',+ },+ transfer: {+ title: 'Transferir la base de datos a otro espacio de trabajo',+ targetWorkspace: 'Espacio de trabajo de destino',+ selectWorkspace: 'Seleccione un espacio de trabajo',+ storage: {+ title: 'Almacenamiento',+ transferExisting: 'Transferir con el almacenamiento actual',+ selectFromTarget: 'Elegir un almacenamiento del espacio de trabajo de destino',+ blocked:+ 'Bases de datos que usan este almacenamiento: {{count}}. La transferencia está bloqueada porque otras bases de datos dependen de él.',+ canTransfer: 'El almacenamiento se puede transferir',+ selectPlaceholder: 'Seleccione un almacenamiento',+ createNew: 'Crear almacenamiento',+ addTitle: 'Añadir almacenamiento',+ description:+ 'Un almacenamiento es el lugar donde se guardan las copias de seguridad (disco local, S3, Google Drive, etc.)',+ },+ notifiers: {+ title: 'Canales de notificación (opcional)',+ transferWithDatabase: 'Transferir los canales de notificación con la base de datos',+ selectFromTarget: 'Elegir canales de notificación del espacio de trabajo de destino',+ willTransfer: 'Se transferirán:',+ willNotTransfer: 'NO se transferirán (los usan otras bases de datos):',+ usedByDatabases: '{{name}} (bases de datos que lo usan: {{count}})',+ noneTransferred:+ 'No se transferirá ningún canal de notificación. Después de la transferencia podrá elegir canales del espacio de trabajo de destino.',+ selectPlaceholder: 'Seleccione canales de notificación (opcional)',+ },+ submit: 'Transferir',+ transferred: {+ title: 'Base de datos transferida',+ description: 'Base de datos "{{name}}" transferida al nuevo espacio de trabajo',+ },+ },+ connectionString: {+ errors: {+ empty: 'La cadena de conexión está vacía',+ unrecognizedFormat: 'Formato de cadena de conexión no reconocido',+ hostMissing: 'Falta el host en la cadena de conexión',+ usernameMissing: 'Falta el usuario en la cadena de conexión',+ passwordMissing: 'Falta la contraseña en la cadena de conexión',+ databaseMissing: 'Falta el nombre de la base de datos en la cadena de conexión',+ parseFailed: 'No se pudo analizar la cadena de conexión',+ jdbc: {+ invalidFormat:+ 'Formato de cadena de conexión JDBC no válido. Formato esperado: {{expectedFormat}}',+ queryParametersMissing:+ 'Faltan los parámetros de consulta (user y password) en la cadena de conexión JDBC',+ usernameMissing: 'Falta el usuario (parámetro user) en la cadena de conexión JDBC',+ passwordMissing: 'Falta el parámetro password en la cadena de conexión JDBC',+ parseFailed: 'No se pudo analizar la cadena de conexión JDBC',+ },+ keyValue: {+ hostMissing: 'Falta el host en la cadena de conexión. Use host=hostname',+ usernameMissing: 'Falta el usuario en la cadena de conexión. Use user=username',+ passwordMissing:+ 'Falta la contraseña en la cadena de conexión. Use password=yourpassword',+ databaseMissing:+ 'Falta el nombre de la base de datos en la cadena de conexión. Use database=database',+ parseFailed: 'No se pudo analizar la cadena de conexión en formato clave=valor',+ },+ libpq: {+ databaseMissing:+ 'Falta el nombre de la base de datos en la cadena de conexión. Use dbname=database',+ parseFailed: 'No se pudo analizar la cadena de conexión de libpq',+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote: 'Concédalo con el comando de abajo (ejecútelo como superusuario).',+ applyAndRestartNote: 'Aplique el cambio de abajo y reinicie PostgreSQL.',+ pgHbaNoEntry: {+ title: 'No se permite la replicación desde este host',+ summary:+ 'pg_hba.conf no tiene ninguna entrada que permita a Databasus una conexión de replicación. Las copias físicas se transmiten por replicación, y eso requiere una regla "host replication": una regla "host all" normal no la cubre.',+ addLineNote:+ 'Añada la línea de abajo a pg_hba.conf. El primer "all" admite cualquier usuario y el segundo, cualquier host. Si quiere restringir el acceso, limite el usuario al rol de replicación concreto y/o el host a un rango CIDR.',+ reloadNote:+ 'Después de modificar pg_hba.conf, <bold>recargue la configuración de PG</bold>.',+ managedNote:+ 'En PostgreSQL gestionado (RDS / Azure / GCP) no se puede editar pg_hba.conf: habilite el acceso externo o de replicación en la consola del proveedor.',+ },+ badCredentials: {+ title: 'Usuario o contraseña incorrectos',+ summary:+ 'PostgreSQL rechazó las credenciales. Compruebe el usuario y la contraseña de esta base de datos.',+ },+ noReplicationPrivilege: {+ title: 'El usuario no puede usar la replicación',+ summary:+ 'El usuario se conectó, pero no tiene el privilegio REPLICATION que requieren las copias físicas.',+ managedNote:+ 'En AWS RDS use GRANT rds_replication TO {{username}}; en Azure / GCP habilite la replicación para el rol en la consola del proveedor.',+ },+ noWalSwitchPrivilege: {+ title: 'El usuario no puede forzar el cambio de segmento WAL',+ summary:+ 'El streaming continuo de WAL solo sube un segmento cuando el origen lo cierra, así que en una base de datos con pocas escrituras el WAL más reciente se queda en el origen hasta que se llena el segmento de 16 MB. Forzar el cambio con un temporizador es lo que mantiene el punto de recuperación entre copias cerca del presente, y para eso hace falta EXECUTE sobre pg_switch_wal(). Las copias completas e incrementales no lo necesitan: se restauran al momento en que terminó cada copia y no reproducen WAL archivado.',+ switchBackupTypeNote:+ 'O cambie el tipo de copia de seguridad a <bold>Completas + incrementales</bold>, que no reproduce WAL archivado.',+ managedNote:+ 'En PostgreSQL gestionado (RDS / Azure / GCP) la función pertenece al superusuario de la plataforma y no se puede conceder EXECUTE sobre ella a un rol de cliente, así que allí no está disponible el streaming continuo de WAL: use copias completas e incrementales.',+ },+ walLevelInvalid: {+ title: 'wal_level es demasiado bajo',+ summary:+ 'Para las copias físicas, wal_level debe ser "replica" o "logical". Ahora tiene un valor inferior.',+ applyNote:+ 'Aplique el cambio de abajo y reinicie PostgreSQL (wal_level solo surte efecto tras un reinicio).',+ managedNote:+ 'En PostgreSQL gestionado, configure wal_level en el grupo de parámetros del proveedor.',+ },+ noWalSenders: {+ title: 'No hay procesos WAL sender disponibles',+ summary:+ 'max_wal_senders es 0, así que PostgreSQL no puede transmitir WAL para las copias de seguridad.',+ managedNote:+ 'En PostgreSQL gestionado, configure max_wal_senders en el grupo de parámetros del proveedor.',+ },+ noReplicationSlots: {+ title: 'No hay slots de replicación disponibles',+ summary:+ 'max_replication_slots es 0, así que PostgreSQL no puede reservar un slot para las copias de seguridad.',+ managedNote:+ 'En PostgreSQL gestionado, configure max_replication_slots en el grupo de parámetros del proveedor.',+ },+ walSummaryDisabled: {+ title: 'summarize_wal está desactivado',+ summary:+ 'Las copias incrementales necesitan summarize_wal activado. Ahora está desactivado en este servidor.',+ applyNote: 'Aplique el cambio de abajo (no hace falta reiniciar).',+ thenNote: 'y después',+ managedNote:+ 'En PostgreSQL gestionado, configure summarize_wal en el grupo de parámetros del proveedor.',+ },+ customTablespaces: {+ title: 'No se admiten tablespaces personalizados',+ summary:+ 'Este clúster tiene tablespaces fuera de pg_default / pg_global, y las copias físicas no pueden transmitirlos. Elimine los tablespaces personalizados o cambie esta base de datos a copias lógicas.',+ },+ systemIdentifierMismatch: {+ title: 'Es un clúster distinto',+ summary:+ 'El clúster de esta dirección tiene un identificador de sistema distinto del clúster para el que se configuró esta copia de seguridad. Apunte Databasus al clúster original o cree una nueva entrada de base de datos.',+ },+ connectionFailed: {+ title: 'No se pudo conectar',+ summary:+ 'Databasus no pudo abrir una conexión de replicación. Compruebe el host, el puerto y el modo SSL, y que ningún cortafuegos bloquee la conexión.',+ },+ },+ },+ restores: {+ list: {+ empty: 'Todavía no hay restauraciones',+ },+ targetDatabase: {+ select: 'Elegir la base de datos de destino',+ description:+ 'Introduzca los datos de la base de datos en la que se restaurará la copia de seguridad. <underline>La base de datos vacía debe crearse antes de la restauración</underline>. Durante la restauración se borrarán todos sus datos actuales',+ notInUseHint:+ 'Asegúrese de que nadie esté usando la base de datos ahora mismo (lo más probable es que no quiera restaurar los datos en la misma BD de la que se hizo la copia)',+ submit: 'Restaurar en esta BD',+ },+ card: {+ startedAt: 'Inicio',+ duration: 'Duración',+ errorDetailsTooltip: 'Haga clic para ver los detalles del error',+ cancelTooltip: 'Cancelar restauración',+ expectedDurationHint:+ 'La restauración suele tardar de 3 a 5 veces más que la copia de seguridad (a veces menos, a veces más, según el tipo de datos)',+ expectedDurationLimit: 'Así que puede tardar hasta {{duration}} (normalmente bastante menos)',+ },+ errorDetails: {+ title: 'Detalles del error de restauración',+ copied: 'Mensaje de error copiado al portapapeles',+ excludeExtensionsTip:+ '<bold>💡 Consejo:</bold> este error suele aparecer al restaurar en servicios de PostgreSQL gestionados (como Yandex Cloud, AWS RDS o similares). Pruebe a activar <bold>"Excluir extensiones"</bold> en los ajustes avanzados antes de restaurar.',+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ Advertencia:</bold> si cancela esta restauración, lo más probable es que la base de datos quede dañada o incompleta. Tendrá que volver a crearla antes de intentar otra restauración.',+ question: '¿Seguro que desea cancelar?',+ confirm: 'Sí, cancelar la restauración',+ },+ },+ healthcheck: {+ attempts: {+ title: 'Comprobaciones de disponibilidad',+ period: 'Periodo',+ periods: {+ today: 'Hoy',+ sevenDays: '7 días',+ thirtyDays: '30 días',+ allTime: 'Todo',+ },+ empty: 'Todavía no hay datos',+ },+ config: {+ enable: 'Activar comprobación de disponibilidad',+ isEnabled: 'Comprobación de disponibilidad activada',+ notifyWhenUnavailable: 'Notificar si no está disponible',+ checkIntervalMinutes: 'Intervalo de comprobación (minutos)',+ attemptsBeforeDown: 'Intentos antes de marcar caída',+ storeAttemptsDays: 'Guardar historial (días)',+ tooltips: {+ enable: 'Activa o desactiva la comprobación de disponibilidad de esta base de datos',+ notifyWhenUnavailable:+ 'Envía notificaciones cuando la base de datos deja de estar disponible',+ checkIntervalMinutes:+ 'Con qué frecuencia se comprueba la disponibilidad de la base de datos (en minutos)',+ attemptsBeforeDown:+ 'Número de intentos fallidos antes de marcar la base de datos como no disponible',+ storeAttemptsDays:+ 'Cuántos días se guarda el historial de comprobaciones de disponibilidad',+ },+ },+ },+ workspaces: {+ roles: {+ owner: 'Propietario',+ admin: 'Administrador',+ member: 'Miembro',+ viewer: 'Lector',+ },+ fields: {+ name: 'Nombre del espacio de trabajo',+ namePlaceholder: 'Introduzca el nombre del espacio de trabajo',+ },+ create: {+ title: 'Crear espacio de trabajo',+ submit: 'Crear espacio de trabajo',+ defaultName: 'Mi espacio de trabajo',+ description:+ 'Un espacio de trabajo agrupa:<lineBreak/>- sus bases de datos;<lineBreak/>- almacenamientos (disco local, S3, Google Drive, etc.);<lineBreak/>- canales de notificación (correo electrónico, Slack, Telegram, etc.);<lineBreak/>- control de acceso (si trabaja en equipo).',+ nameRequired: 'Introduzca un nombre para el espacio de trabajo',+ created: 'Espacio de trabajo creado',+ permissionDenied: {+ title: 'Permiso denegado',+ description:+ 'No tiene permiso para crear espacios de trabajo. Pida a un administrador que lo cree por usted.',+ },+ },+ settings: {+ title: 'Ajustes del espacio de trabajo',+ readOnly: 'No tiene permiso para modificar estos ajustes',+ nameRequired: 'El nombre del espacio de trabajo es obligatorio',+ saving: 'Guardando...',+ saveChanges: 'Guardar cambios',+ reset: 'Restablecer',+ updated: 'Información básica guardada',+ },+ delete: {+ dangerZone: 'Zona de peligro',+ title: 'Eliminar este espacio de trabajo',+ description:+ 'Un espacio de trabajo eliminado no se puede recuperar. Todos sus datos y recursos asociados se eliminarán de forma permanente.',+ submit: 'Eliminar espacio de trabajo',+ deleting: 'Eliminando...',+ notFound: 'No se encontró el espacio de trabajo',+ noPermission: 'No tiene permiso para eliminar este espacio de trabajo',+ hasDatabases:+ 'No se puede eliminar el espacio de trabajo. Elimine primero todas sus bases de datos. Bases de datos encontradas: {{count}}.',+ deleted: 'Espacio de trabajo eliminado',+ confirmation: {+ title: 'Eliminar espacio de trabajo',+ question: '¿Seguro que desea eliminar el espacio de trabajo <workspaceName/>?',+ warning:+ '<bold>Esta acción no se puede deshacer.</bold> Todos los datos y recursos asociados se eliminarán de forma permanente.',+ submit: 'Eliminar espacio de trabajo',+ },+ },+ members: {+ title: 'Usuarios',+ count: 'Miembros: {{count}}',+ empty: 'No hay miembros',+ emptyHint: 'Haga clic en "Añadir miembro" para empezar',+ fields: {+ member: 'Miembro',+ role: 'Rol',+ joined: 'Miembro desde',+ actions: 'Acciones',+ email: 'Correo electrónico',+ emailPlaceholder: 'Introduzca el correo electrónico',+ },+ add: {+ button: 'Añadir miembro',+ title: 'Añadir miembro',+ submit: 'Añadir miembro',+ emailRequired: 'El correo electrónico es obligatorio',+ hint: 'Si el usuario ya existe, se añadirá directamente. Si no, se le enviará una invitación.',+ added: 'Miembro añadido',+ },+ invited: {+ title: 'Usuario invitado',+ sentTo: 'Invitación enviada a {{email}}',+ description:+ 'El usuario todavía no existe en el sistema, pero ya está invitado al espacio de trabajo. Cuando se registre con ese correo electrónico, pasará a ser miembro del espacio de trabajo automáticamente.',+ },+ roleChanged: 'Rol del miembro actualizado',+ remove: {+ tooltip: 'Eliminar miembro',+ title: 'Eliminar miembro',+ question: '¿Seguro que desea eliminar a "{{email}}" de este espacio de trabajo?',+ removed: 'Miembro "{{email}}" eliminado',+ },+ },+ transferOwnership: {+ button: 'Transferir la propiedad',+ title: 'Transferir la propiedad del espacio de trabajo',+ submit: 'Transferir la propiedad',+ warning:+ '<bold>Advertencia:</bold> esta acción no se puede deshacer. Dejará de ser el propietario de este espacio de trabajo y el nuevo propietario tendrá el control total.',+ noEligibleMembers:+ 'No hay miembros a los que transferir la propiedad. Para hacerlo, el espacio de trabajo necesita al menos otro miembro.',+ newOwner: 'Nuevo propietario',+ newOwnerPlaceholder: 'Seleccione el miembro que recibirá la propiedad',+ newOwnerHint: 'El miembro seleccionado pasará a ser el propietario del espacio de trabajo',+ memberRequired: 'Seleccione el miembro al que transferir la propiedad',+ memberNotFound: 'No se encontró el miembro seleccionado',+ transferred: 'Propiedad transferida',+ },+ auditLogs: {+ empty: 'No hay registros de auditoría de este espacio de trabajo.',+ },+ },+ users: {+ roles: {+ admin: 'Administrador',+ member: 'Miembro',+ },+ fields: {+ name: 'Nombre',+ email: 'Correo electrónico',+ yourName: 'Su nombre',+ yourEmail: 'Su correo electrónico',+ confirmPassword: 'Confirmar contraseña',+ newPassword: 'Nueva contraseña',+ },+ validation: {+ nameRequired: 'El nombre es obligatorio',+ emailRequired: 'El correo electrónico es obligatorio',+ passwordTooShort: 'La contraseña debe tener al menos {{minLength}} caracteres',+ passwordsDoNotMatch: 'Las contraseñas no coinciden',+ },+ oauth: {+ divider: 'o con correo electrónico',+ continueWithGithub: 'Continuar con GitHub',+ continueWithGoogle: 'Continuar con Google',+ invalidConfiguration: 'Configuración de OAuth no válida',+ },+ signIn: {+ title: 'Iniciar sesión',+ submit: 'Iniciar sesión',+ noAccount: '¿No tiene cuenta? <signUpLink>Regístrese</signUpLink>',+ forgotPassword: '¿Olvidó su contraseña?',+ },+ signUp: {+ title: 'Registro',+ namePlaceholder: 'Juan Pérez',+ submit: 'Registrarse',+ hasAccount: '¿Ya tiene cuenta? <signInLink>Inicie sesión</signInLink>',+ },+ adminPassword: {+ title: 'Registro del administrador',+ description:+ 'Después podrá iniciar sesión con el usuario "admin" y la contraseña que establezca',+ submit: 'Establecer contraseña',+ },+ requestPasswordReset: {+ title: 'Restablecer contraseña',+ description:+ 'Introduzca su correo electrónico y le enviaremos un código para restablecer la contraseña.',+ submit: 'Enviar código',+ codeSent: 'Si el correo electrónico existe, se ha enviado un código de restablecimiento',+ rememberPassword: '¿Recuerda su contraseña? <signInLink>Inicie sesión</signInLink>',+ },+ resetPassword: {+ title: 'Restablecer contraseña',+ description: 'Introduzca el código que recibió por correo electrónico y su nueva contraseña.',+ code: 'Código de restablecimiento',+ confirmPassword: 'Confirmar contraseña',+ submit: 'Restablecer contraseña',+ invalidCode: 'El código debe tener 6 dígitos',+ succeeded: 'Contraseña restablecida. Redirigiendo al inicio de sesión...',+ noCode: '¿No recibió el código? <requestCodeLink>Solicite uno nuevo</requestCodeLink>',+ backToSignIn: 'Volver al inicio de sesión',+ },+ profile: {+ title: 'Perfil',+ information: 'Información del perfil',+ userId: 'ID de usuario',+ namePlaceholder: 'Introduzca su nombre',+ emailPlaceholder: 'Introduzca su correo electrónico',+ adminEmailReadOnly: 'El correo electrónico del administrador no se puede cambiar',+ role: 'Rol',+ saveChanges: 'Guardar cambios',+ noChanges: 'No hay cambios que guardar',+ updated: 'Perfil actualizado',+ logout: 'Cerrar sesión',+ changePassword: {+ title: 'Cambiar contraseña',+ newPasswordPlaceholder: 'Introduzca la nueva contraseña',+ confirmPassword: 'Confirmar nueva contraseña',+ confirmPasswordPlaceholder: 'Repita la nueva contraseña',+ passwordsDoNotMatch: 'Las contraseñas nuevas no coinciden',+ changing: 'Cambiando la contraseña...',+ submit: 'Cambiar contraseña',+ signedInWithNewPassword: 'Sesión iniciada con la nueva contraseña',+ },+ },+ list: {+ title: 'Usuarios de Databasus',+ loadedOfTotal: 'Usuarios: {{loaded}} de {{total}}',+ searchPlaceholder: 'Buscar por correo electrónico o nombre...',+ empty: 'No se encontraron usuarios.',+ allLoaded: 'Todos los usuarios cargados ({{count}} en total)',+ columns: {+ user: 'Usuario',+ systemRole: 'Rol en el sistema',+ isActive: '¿Activo?',+ created: 'Fecha de creación',+ },+ roleLabel: 'Rol:',+ activeLabel: 'Activo:',+ viewAuditLogs: 'Ver registros de auditoría',+ activated: 'Usuario activado',+ deactivated: 'Usuario desactivado',+ roleChanged: 'Rol del usuario cambiado',+ },+ auditLogs: {+ title: 'Registros de auditoría del usuario',+ empty: 'No hay registros de auditoría de este usuario.',+ },+ },+ verification: {+ triggers: {+ manual: 'Manual',+ scheduled: 'Programada',+ },+ notificationTypes: {+ verificationSuccess: 'Verificación superada',+ verificationFailed: 'Verificación fallida',+ },+ config: {+ scheduledVerification: 'Verificación programada',+ scheduledVerificationTooltip:+ 'Restaura periódicamente la última copia de seguridad en un contenedor de Postgres efímero para comprobar que se puede restaurar. <docsLink>Cómo funciona</docsLink>',+ interval: 'Intervalo de verificación',+ afterBackup: 'Tras cada copia de seguridad',+ afterBackupHint:+ 'Se ejecuta automáticamente después de cada copia de seguridad correcta. Si ya hay verificaciones pendientes en la cola, se cancelan para que la cola no crezca sin fin cuando las copias se hacen más rápido que las verificaciones.',+ weekday: 'Día de la semana de la verificación',+ dayOfMonth: 'Día del mes de la verificación',+ timeOfDay: 'Hora de la verificación',+ cron: {+ expression: 'Expresión cron (UTC)',+ format: 'Formato cron: minuto, hora, día, mes, día de la semana (UTC)',+ examples: 'Ejemplos:',+ exampleEverySunday: '- {{expression}} — todos los domingos a las 4:00 UTC',+ exampleEverySixHours: '- {{expression}} — cada 6 horas',+ nextRun: 'Próxima ejecución: {{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: 'Expresión cron no válida',+ },+ notifications: 'Notificaciones',+ noNotifications: 'Ninguna',+ },+ runs: {+ title: 'Verificaciones de restauración',+ description:+ 'Cada fila es un intento de restaurar una copia de seguridad de esta base de datos en una base de datos temporal',+ noAgentsWarning:+ 'No hay agentes de verificación registrados. Añada uno en los ajustes de Databasus, en la sección "Agentes de verificación". <docsLink>Más información</docsLink>',+ empty: 'Todavía no hay verificaciones de restauración',+ allLoaded: 'Todas las verificaciones cargadas ({{total}} en total)',+ attempt: 'intento {{attempt}}',+ restoreDuration: 'restauración: {{duration}}',+ durationTooltip: 'Tiempo de restauración + verificación informado por el agente.',+ fields: {+ createdAt: 'Fecha de creación',+ trigger: 'Ejecución',+ duration: 'Duración',+ actions: 'Acciones',+ },+ actions: {+ cancel: 'Cancelar verificación',+ viewDetails: 'Ver detalles',+ },+ details: {+ title: 'Detalles de la verificación de restauración',+ loadFailed: 'No se pudieron cargar los detalles de la verificación de restauración.',+ cancellationReason: 'Motivo de la cancelación',+ failure: 'Error',+ sections: {+ status: 'Estado',+ timeline: 'Cronología',+ results: 'Resultados y diagnóstico',+ },+ fields: {+ attempt: 'Intento',+ startedAt: 'Inicio',+ finishedAt: 'Fin',+ restoreDuration: 'Duración de la restauración',+ verifyDuration: 'Duración de la verificación',+ restoredDbSize: 'Tamaño de la BD restaurada',+ schemas: 'Esquemas',+ tables: 'Tablas',+ pgRestoreExitCode: 'Código de salida de pg_restore',+ },+ tableStats: {+ title: 'Filas por tabla',+ empty: 'No hay estadísticas por tabla.',+ schema: 'Esquema',+ table: 'Tabla',+ rows: 'Filas',+ },+ },+ },+ agents: {+ title: 'Agentes de verificación',+ description:+ 'Agentes que ejecutan verificaciones de restauración para confirmar que una copia de seguridad se puede restaurar (<docsLink>más información</docsLink>)',+ empty: 'Todavía no hay agentes registrados.',+ columns: {+ capacity: 'Capacidad',+ created: 'Fecha de creación',+ },+ capacity: {+ cpu: '{{count}} CPU',+ ram: '{{count}} GB de RAM',+ disk: '{{count}} GB de disco',+ jobs: 'trabajos: {{count}}',+ notReported: 'sin datos todavía',+ },+ actions: {+ viewInstallCommands: 'Ver comandos de instalación',+ rotateToken: 'Rotar token',+ },+ deleteConfirmation: '¿Eliminar este agente?',+ deleted: 'Agente "{{name}}" eliminado',+ copyFailed: 'No se pudo copiar',+ agentId: 'ID del agente:',+ create: {+ title: 'Crear agente de verificación',+ tokenNotice: 'Se generará un token que se mostrará una sola vez en la siguiente pantalla.',+ namePlaceholder: 'Nombre del agente',+ nameRequired: 'El nombre es obligatorio',+ },+ rotate: {+ title: 'Rotar token',+ description:+ 'Al rotar el token de <agentName/>, el token actual deja de ser válido de inmediato. Cualquier agente que siga usando el token antiguo será rechazado en su siguiente heartbeat.',+ },+ token: {+ title: 'Token del agente',+ tokenFor: 'Token de <agentName/>:',+ shownOnce:+ 'Se muestra una sola vez. Guárdelo en un lugar seguro: no podrá recuperarlo después.',+ confirmSaved: 'He guardado el token',+ },+ install: {+ title: 'Comandos de instalación',+ description:+ 'Comandos de instalación de <agentName/>. Sustituya <tokenPlaceholder/> por el token que guardó al crear este agente o al rotar su token por última vez.',+ architecture: 'Arquitectura',+ stepInstall: 'Paso 1: instalar',+ stepLaunch: 'Paso 2: iniciar',+ capacityDefaults:+ 'Los valores de capacidad de abajo son solo un punto de partida: ajuste <code>--max-cpu</code>, <code>--max-ram-mb</code>, <code>--max-disk-gb</code> y <code>--max-concurrent-jobs</code> a la máquina que ejecuta el agente.',+ afterInstallation: 'Después de la instalación',+ runsInBackground: 'Tras <code>start</code>, el agente se ejecuta en segundo plano',+ checkStatus: 'Ver el estado: <code>./verification-agent status</code>',+ viewLogs:+ 'Ver los logs: <code>databasus-verification.log</code> en el directorio de trabajo',+ stop: 'Detener el agente: <code>./verification-agent stop</code>',+ },+ },+ },+ notifiers: {+ types: {+ email: 'Correo electrónico',+ telegram: 'Telegram',+ webhook: 'Webhook',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: 'Todas',+ backupSuccess: 'Copia de seguridad correcta',+ backupFailed: 'Copia de seguridad fallida',+ healthcheckSuccess: 'Comprobación de disponibilidad superada',+ healthcheckFailed: 'Comprobación de disponibilidad fallida',+ verificationSuccess: 'Verificación de restauración superada',+ verificationFailed: 'Verificación de restauración fallida',+ },+ mattermostDeliveryModes: {+ webhook: 'Webhook entrante',+ bot: 'Cuenta de bot',+ },+ list: {+ addNotifier: 'Añadir canal de notificación',+ searchPlaceholder: 'Buscar canal de notificación',+ noSearchResults: 'No se encontraron canales de notificación que coincidan con "{{query}}"',+ description:+ 'Un canal de notificación es el lugar adonde se envían las notificaciones (correo electrónico, Slack, Telegram, etc.)',+ backToList: '← Volver a los canales de notificación',+ },+ card: {+ notifyTo: {+ email: 'Notificar por correo electrónico',+ telegram: 'Notificar por Telegram',+ webhook: 'Notificar por webhook',+ slack: 'Notificar por Slack',+ discord: 'Notificar por Discord',+ teams: 'Notificar por Teams',+ mattermost: 'Notificar por Mattermost',+ },+ hasSendError: 'Error de envío',+ },+ create: {+ title: 'Añadir canal de notificación',+ namePlaceholder: 'Mi chat',+ },+ config: {+ namePlaceholder: 'Introduzca un nombre...',+ settingsTitle: 'Ajustes del canal de notificación',+ sendError: {+ title: 'Error de envío',+ errorLabel: 'Error:',+ clearHint: 'Para quitar este error, haga una de estas dos cosas:',+ clearBySendingTest:+ '- envíe una notificación de prueba con el botón de abajo (aunque ya haya cambiado los ajustes);',+ clearByNextNotification: '- espere a que la siguiente notificación se envíe sin errores;',+ },+ removeConfirmation:+ '¿Seguro que desea eliminar este canal de notificación? Esta acción no se puede deshacer.',+ removeBlockedByDatabases:+ 'Algunas bases de datos usan este canal de notificación. Quítelo primero de esas bases de datos.',+ },+ testNotification: {+ send: 'Enviar notificación de prueba',+ sent: {+ title: 'Notificación de prueba enviada',+ description: 'La notificación de prueba se envió correctamente',+ },+ },+ transfer: {+ title: 'Transferir el canal de notificación a otro espacio de trabajo',+ blockedByDatabases:+ 'Algunas bases de datos usan este canal de notificación. Transfiera o elimine primero esas bases de datos.',+ description: 'Seleccione el espacio de trabajo al que transferir este canal de notificación.',+ targetWorkspace: 'Espacio de trabajo de destino',+ selectWorkspace: 'Seleccione un espacio de trabajo',+ submit: 'Transferir',+ },+ fields: {+ botToken: 'Token del bot',+ targetChatId: 'ID del chat de destino',+ webhookUrl: 'URL del webhook',+ channelId: 'ID del canal',+ skipTlsVerify: 'Omitir verificación TLS',+ skipTls: 'No verificar TLS',+ },+ email: {+ targetEmail: 'Correo electrónico de destino',+ targetEmailTooltip:+ 'La dirección de correo electrónico en la que quiere recibir los mensajes',+ smtpHost: 'Host SMTP',+ smtpPort: 'Puerto SMTP',+ smtpUser: 'Usuario SMTP',+ smtpPassword: 'Contraseña SMTP',+ smtpPasswordPlaceholder: 'contraseña',+ from: 'Remitente',+ fromTooltip:+ 'Opcional. Dirección de correo electrónico del remitente. Si se deja vacía, se usa el usuario SMTP o una dirección generada a partir del host',+ fromAuto: '(automático)',+ advancedSettings: 'Ajustes avanzados',+ skipTlsTooltip:+ 'No verifica el certificado TLS. Active esta opción si su servidor SMTP usa un certificado autofirmado. Advertencia: esto reduce la seguridad.',+ },+ telegram: {+ botTokenHelpLink: '¿Cómo obtener el token de API del bot de Telegram?',+ targetChatIdTooltip:+ 'El chat en el que quiere recibir los mensajes (puede ser su chat privado o un grupo)',+ chatIdHelp: {+ toggle: '¿Cómo obtener el ID del chat de Telegram?',+ privateChat:+ 'Para obtener el ID de su chat, escriba a <botLink>@getmyid_bot</botLink> en Telegram. <underline>Asegúrese de haber iniciado el chat con el bot</underline>',+ group:+ 'Para obtener el ID de un chat de grupo, añada al grupo su bot y <botLink>@getmyid_bot</botLink> y escriba /start (verá el ID del chat)',+ },+ useProxy: 'Usar proxy',+ useProxyTooltip: 'Usa un proxy para las solicitudes a la API de Telegram',+ proxy: 'Proxy',+ proxyUrl: 'URL del proxy',+ proxyUrlTooltip: 'Admite http, https, socks5 y socks5h. Puede incluir usuario y contraseña',+ sendToGroupTopic: 'Enviar a un tema del grupo',+ sendToGroupTopicTooltip:+ 'Active esta opción para enviar los mensajes a un tema concreto de un chat de grupo',+ threadId: 'ID del tema',+ threadIdTooltip: 'El ID del tema al que se enviarán los mensajes',+ topicId: 'ID del tema',+ threadIdHelp: {+ steps:+ 'Para obtener el ID del tema, abra el tema en su grupo de Telegram, toque su nombre en la parte superior y abra la información del tema. Copie el enlace del tema y tome el último número de la URL.',+ example:+ '<bold>Ejemplo:</bold> si el enlace del tema es <code>https://t.me/c/2831948048/3</code>, el ID del tema es <code>3</code>',+ note: '<bold>Nota:</bold> los temas solo funcionan en chats de grupo, no en chats privados.',+ },+ },+ webhook: {+ method: 'Método',+ sendOn: 'Cuándo enviar',+ sendOnPlaceholder: 'Seleccione los tipos de notificación',+ customHeaders: 'Cabeceras personalizadas',+ customHeadersTooltip:+ 'Añada cabeceras HTTP personalizadas a la solicitud del webhook (p. ej., Authorization, X-API-Key)',+ savedHeadersHidden: '*Las cabeceras guardadas se ocultan por seguridad',+ headers: 'Cabeceras',+ headerNamePlaceholder: 'Nombre de la cabecera',+ headerValuePlaceholder: 'Valor de la cabecera',+ addHeader: 'Añadir cabecera',+ hiddenHeaderValue: '(oculto)',+ bodyTemplate: {+ title: 'Plantilla del cuerpo',+ headingVariable: '<variable/> — título de la notificación',+ messageVariable: '<variable/> — texto de la notificación',+ invalidJsonFormat: 'Formato JSON no válido',+ invalidJson: 'JSON no válido',+ },+ exampleRequest: {+ title: 'Ejemplo de solicitud',+ headers: 'Cabeceras:',+ },+ },+ slack: {+ howToConnect: '¿Cómo conectar Slack (cómo obtener el token del bot y el ID del chat)?',+ testFailedHint:+ 'Asegúrese de que el canal sea público o de que el bot se haya añadido al canal privado (con @invite) o al grupo. Para mensajes directos, use el User ID del perfil de Slack.',+ },+ discord: {+ channelWebhookUrl: 'URL del webhook del canal',+ howTo: {+ title: 'Cómo obtener la URL del webhook de Discord:',+ createChannel: '1. Cree o elija un canal de Discord',+ openChannelSettings: '2. Abra los ajustes del canal (icono del engranaje)',+ openIntegrations: '3. Vaya a Integraciones',+ createWebhook: '4. Cree un webhook nuevo',+ copyWebhookUrl: '5. Copie la URL del webhook',+ privacyNote: 'Nota: si hace falta, haga privado el canal',+ },+ },+ teams: {+ howToConnect: '¿Cómo conectar Microsoft Teams?',+ powerAutomateUrl: 'URL de Power Automate',+ powerAutomateUrlLabel: 'URL de Power Automate:',+ powerAutomateUrlTooltip:+ 'Endpoint HTTP de su flujo de Power Automate (When an HTTP request is received)',+ showFullUrl: 'Mostrar',+ hideFullUrl: 'Ocultar',+ },+ mattermost: {+ howToConnect: '¿Cómo conectar Mattermost?',+ connectVia: 'Conectar mediante',+ incomingWebhookUrl: 'URL del webhook entrante',+ serverUrl: 'URL del servidor',+ channelIdTooltip:+ 'ID del canal de 26 caracteres, no su nombre. Abra el canal, haga clic en su nombre y elija View Info.',+ channel: 'Canal',+ showOptionalSettings: 'Mostrar ajustes opcionales',+ hideOptionalSettings: 'Ocultar ajustes opcionales',+ channelOverride: 'Otro canal',+ channelOverrideTooltip:+ 'Publica en este canal en lugar de en el canal para el que se creó el webhook. Mattermost lo ignora si el webhook está restringido a un canal.',+ postAsUsername: 'Publicar con el nombre de usuario',+ postAsUsernameTooltip:+ 'Requiere activar Enable integrations to override usernames en la consola del sistema de Mattermost; si no, se ignora.',+ postAsIconUrl: 'Publicar con la URL del icono',+ postAsIconUrlTooltip:+ 'Requiere activar Enable integrations to override profile picture icons en la consola del sistema de Mattermost; si no, se ignora.',+ skipTlsTooltip:+ 'No verifica el certificado TLS. Active esta opción si su servidor de Mattermost usa un certificado autofirmado. Advertencia: esto reduce la seguridad.',+ webhookHowTo: {+ title: 'Cómo obtener la URL de un webhook entrante:',+ openIncomingWebhooks: '1. Menú principal → Integrations → Incoming Webhooks',+ addWebhook: '2. Pulse Add Incoming Webhook y elija el canal',+ copyUrl: '3. Copie la URL generada',+ },+ botHowTo: {+ title: 'Cómo obtener un token de bot:',+ addBotAccount: '1. Integrations → Bot Accounts → Add Bot Account',+ copyToken: '2. Copie el token, que solo se muestra una vez, justo después de crearlo',+ addBotToChannel: '3. Añada el bot al equipo y al canal',+ },+ },+ },+ backups: {+ encryption: {+ none: 'Ninguno',+ encrypted: 'Activado',+ },+ encryptionOptions: {+ none: 'Sin cifrado',+ encrypted: 'Cifrar los archivos de las copias de seguridad',+ },+ list: {+ title: 'Copias de seguridad',+ scheduledBackupsDisabled:+ 'Las copias de seguridad programadas están desactivadas (puede volver a activarlas en la configuración de copias de seguridad)',+ empty: 'Todavía no hay copias de seguridad',+ allLoaded: 'Todas las copias de seguridad cargadas ({{count}} en total)',+ clickToSeeErrorDetails: 'Haga clic para ver los detalles del error',+ errorDetailsTitle: 'Detalles del error de la copia de seguridad',+ restoreTitle: 'Restaurar desde la copia de seguridad',+ columns: {+ createdAt: 'Fecha de creación',+ created: 'Fecha de creación',+ size: 'Tamaño',+ duration: 'Duración',+ actions: 'Acciones',+ },+ actions: {+ cancelBackup: 'Cancelar copia de seguridad',+ deleteBackup: 'Eliminar copia de seguridad',+ },+ },+ filters: {+ allTypes: 'Todos los tipos',+ allStatuses: 'Todos los estados',+ before: 'Antes de',+ },+ config: {+ backupsEnabled: 'Copias de seguridad activadas',+ storage: 'Almacenamiento',+ selectStorage: 'Seleccione un almacenamiento',+ createNewStorage: 'Crear almacenamiento',+ addStorageTitle: 'Añadir almacenamiento',+ storageDescription:+ 'Un almacenamiento es el lugar donde se guardan las copias de seguridad (disco local, S3, Google Drive, etc.)',+ storageChangeWarning:+ 'Si cambia el almacenamiento, se eliminarán todas las copias de seguridad guardadas en él.',+ storageChangeAcknowledge: 'Entendido',+ encryption: 'Cifrado',+ notifications: 'Notificaciones',+ noNotifications: 'Ninguna',+ schedule: {+ weekday: 'Día de la semana',+ dayOfMonth: 'Día del mes',+ cronExpression: 'Expresión cron (UTC)',+ timeOfDay: 'Hora del día',+ nextRun: 'Próxima ejecución: {{time}}',+ invalidCron: 'Expresión cron no válida',+ cronHelp: {+ format: 'Formato cron: minuto, hora, día, mes, día de la semana (UTC)',+ examples: 'Ejemplos:',+ dailyAt2am: 'Todos los días a las 2:00 UTC',+ every6Hours: 'Cada 6 horas',+ mondaysAt3am: 'Todos los lunes a las 3:00 UTC',+ twiceAMonth: 'Los días 1 y 15 a las 4:30 UTC',+ },+ },+ gfs: {+ hourly: 'Horarias: {{count}}',+ daily: 'Diarias: {{count}}',+ weekly: 'Semanales: {{count}}',+ monthly: 'Mensuales: {{count}}',+ yearly: 'Anuales: {{count}}',+ notConfigured: 'Sin configurar',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS (conservar las últimas N copias horarias, diarias, semanales, mensuales y anuales)',+ timePeriod: 'Periodo de tiempo (últimos N días)',+ count: 'Cantidad (últimas N copias)',+ },+ notificationTypes: {+ backupSuccess: 'Copia de seguridad correcta',+ backupFailed: 'Copia de seguridad fallida',+ },+ list: {+ backupNow: 'Hacer copia',+ makeBackupNow: 'Hacer copia de seguridad ahora',+ encrypted: 'Cifrada',+ sizeTooltip:+ 'Arriba: el tamaño del archivo comprimido de la copia de seguridad que realmente se guarda en el almacenamiento (local, S3, Google Drive, etc.). Abajo (en gris): el tamaño original sin comprimir de la base de datos en el momento de la copia. Las copias suelen comprimirse unas 5 veces.',+ databaseSize: '{{size}} (tamaño de la BD)',+ deleteConfirmation: '¿Seguro que desea eliminar esta copia de seguridad?',+ actions: {+ restore: 'Restaurar desde la copia de seguridad',+ verifyRestore:+ 'Verificar la restauración: un agente restaurará esta copia de seguridad en una base de datos temporal e informará del número de filas',+ download: {+ postgresql:+ 'Descargar el archivo de la copia de seguridad. Se puede restaurar manualmente con pg_restore (formato custom)',+ mysql:+ 'Descargar el archivo de la copia de seguridad. Se puede restaurar manualmente con el cliente mysql (volcado SQL)',+ mariadb:+ 'Descargar el archivo de la copia de seguridad. Se puede restaurar manualmente con el cliente mariadb (volcado SQL)',+ mongodb:+ 'Descargar el archivo de la copia de seguridad. Se puede restaurar manualmente con mongorestore (formato archive)',+ other: 'Descargar el archivo de la copia de seguridad',+ },+ },+ verifyRestore: {+ title: '¿Verificar la restauración?',+ description:+ 'Un agente restaurará esta copia de seguridad en una base de datos temporal e informará del número de filas. Puede tardar un rato, según el tamaño de la copia. <docsLink>¿Cómo funciona?</docsLink>',+ queue: 'Poner en cola',+ queued: 'Verificación de restauración en cola',+ },+ },+ config: {+ interval: 'Intervalo de copia de seguridad',+ weekday: 'Día de la semana de la copia',+ dayOfMonth: 'Día del mes de la copia',+ timeOfDay: 'Hora de la copia',+ encryptionTooltip:+ 'Si la copia de seguridad está cifrada, sus archivos en el almacenamiento (S3, local, etc.) no se pueden usar directamente. Puede restaurar las copias a través de Databasus o descargarlas sin cifrar con el botón "Descargar".',+ retentionPolicy: 'Política de retención',+ retention: {+ timePeriodTooltip:+ 'Cuánto tiempo se conservan las copias de seguridad. Las copias más antiguas que este periodo se eliminan automáticamente.',+ count: 'Copias más recientes',+ countTooltip:+ 'Conserva solo el número indicado de copias más recientes. Las copias más antiguas se eliminan automáticamente.',+ countValue: 'Copias más recientes: {{count}}',+ showGfsHint: '¿Qué es GFS (Grandfather-Father-Son)?',+ hideGfsHint: 'Ocultar',+ gfsHint:+ 'Rotación GFS (Grandfather-Father-Son): conserva las últimas N copias horarias, diarias, semanales, mensuales y anuales. Así se pueden guardar copias durante largos periodos sin ocupar demasiado espacio de almacenamiento.',+ gfsTooltip:+ 'Rotación Grandfather-Father-Son: conserva las últimas N copias horarias, diarias, semanales, mensuales y anuales.',+ gfsFields: {+ hourly: 'Copias horarias',+ daily: 'Copias diarias',+ weekly: 'Copias semanales',+ monthly: 'Copias mensuales',+ yearly: 'Copias anuales',+ },+ },+ advancedSettings: 'Ajustes avanzados',+ retryIfFailed: 'Reintentar la copia si falla',+ retryIfFailedShort: 'Reintentar si falla',+ retryIfFailedTooltip:+ 'Reintenta automáticamente las copias de seguridad fallidas. Una copia puede fallar por problemas de red, del almacenamiento o porque la base de datos no esté disponible temporalmente.',+ maxFailedTries: 'Número máximo de intentos',+ maxFailedTriesTooltip:+ 'Número máximo de reintentos de una copia fallida. Recibirá una notificación cuando fallen todos los intentos.',+ },+ },+ physical: {+ types: {+ full: 'Completa',+ incremental: 'Incremental',+ wal: 'WAL',+ },+ retentions: {+ chains: 'Cadenas',+ fullBackups: 'Copias completas',+ chainsAndFullBackups: 'Cadenas y copias completas',+ },+ fullBackupsPolicies: {+ lastN: 'Cantidad',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: 'Copia de seguridad correcta',+ backupFailed: 'Copia de seguridad fallida',+ chainBroken: 'Cadena rota',+ walGap: 'Hueco en el WAL',+ },+ list: {+ totalUsage: 'Uso total: {{size}}',+ backUpNow: 'Hacer copia ahora',+ fullBackup: 'Copia completa',+ incrementalBackup: 'Copia incremental',+ restore: 'Restaurar',+ restoreFromThisBackup: 'Restaurar desde esta copia',+ pointInTimeRestoreTitle: 'Restauración a un punto en el tiempo',+ deleteFullConfirmation:+ 'Al eliminar esta copia completa se elimina toda su cadena (todas las incrementales que dependen de ella). Esta acción no se puede deshacer. ¿Continuar?',+ deleteIncrementalConfirmation:+ 'Al eliminar esta copia incremental se eliminan todas las incrementales posteriores que dependen de ella. Esta acción no se puede deshacer. ¿Continuar?',+ },+ config: {+ fullBackupCadence: 'Frecuencia de las copias completas',+ incrementalBackupCadence: 'Frecuencia de las copias incrementales',+ incrementalMoreFrequent:+ 'Las copias incrementales deben ejecutarse con más frecuencia que las completas.',+ encryptionTooltip:+ 'Si las copias están cifradas, sus archivos en el almacenamiento no se pueden usar directamente. Puede restaurarlas a través de Databasus o descargarlas sin cifrar.',+ retention: 'Retención',+ fullBackupsOnlyRetention:+ 'Esta base de datos solo guarda copias completas, así que la retención se aplica a ellas.',+ retentionOptions: {+ chains: 'Conservar las últimas N cadenas',+ chainsAndFullBackups: 'Conservar las últimas N cadenas y copias completas',+ },+ retentionHelp: {+ chain:+ 'Una cadena es una copia completa más las incrementales (y el WAL transmitido) que dependen de ella. Para restaurar hacen falta la copia completa y todas las incrementales de su cadena.',+ chains:+ 'Conserva solo las últimas N cadenas. Cuando una cadena queda fuera de ese límite, se eliminan su copia completa y todas sus incrementales: solo se puede restaurar dentro de las cadenas conservadas.',+ chainsAndFullBackups:+ 'Conserva las últimas N cadenas para la recuperación a un punto en el tiempo reciente y, además, guarda copias completas independientes más antiguas según la política de abajo (GFS o últimas N) como puntos de restauración a largo plazo una vez eliminadas sus incrementales.',+ },+ chainsCount: 'Cadenas',+ chainsCountTooltip:+ 'Número de cadenas de copias más recientes que se conservan. Una cadena es una copia completa más sus incrementales.',+ fullBackups: 'Copias completas',+ fullBackupsCount: 'Copias completas más recientes',+ gfsFields: {+ hourly: 'Horarias',+ daily: 'Diarias',+ weekly: 'Semanales',+ monthly: 'Mensuales',+ yearly: 'Anuales',+ },+ chainsKept: 'Cadenas conservadas',+ fullBackupsKept: 'Copias completas conservadas',+ fullBackupsCountValue: 'Más recientes: {{count}}',+ gfsTooltip:+ 'Rotación Grandfather-Father-Son: conserva las últimas N copias completas horarias, diarias, semanales, mensuales y anuales.',+ },+ restore: {+ errorHints: {+ downloadInProgress:+ 'Ya hay una descarga de restauración en curso para esta base de datos. Espere a que termine y vuelva a intentarlo.',+ targetTimeUnreachable:+ 'No se puede llegar al momento solicitado: hay un hueco en el WAL o el momento está fuera del rango disponible. Elija otro momento o restaure el último punto disponible.',+ },+ backupIntro:+ 'Comando de restauración de esta copia. Una copia completa solo necesita su propio archivo; una incremental necesita además su copia completa y todas las incrementales anteriores.',+ pointInTimeIntro:+ 'Restauración a un punto en el tiempo. Elija el momento objetivo o déjelo vacío para restaurar el último punto disponible.',+ targetTime: 'Momento objetivo',+ latestAvailable: 'Último punto disponible',+ preparing: 'Preparando el comando de restauración...',+ linkExpiry:+ 'El enlace de descarga es de un solo uso y caduca en 15 minutos. Si un comando falla con un error 401, vuelva a abrir este diálogo para generar uno nuevo.',+ copied: 'Copiado',+ methods: {+ script: 'Con script',+ manual: 'Manual',+ },+ environments: {+ host: 'PostgreSQL en el host',+ },+ fields: {+ restoreDirectory: 'Directorio de restauración',+ pgBinPath: 'Ruta de bin de PostgreSQL',+ pgBinPathPlaceholder: '{{path}} (opcional)',+ pgImage: 'Imagen de PostgreSQL',+ },+ scriptTitles: {+ host: 'Ejecútelo en el host de restauración',+ docker: 'Ejecútelo donde haya Docker disponible',+ },+ manualSteps: {+ download: 'Descargue el paquete',+ extract: 'Extráigalo',+ verify: 'Verifique la transferencia',+ reconstruct: 'Reconstruya el directorio de datos',+ checkConfig: 'Revise los archivos de configuración del clúster',+ wireUpRecovery: 'Descomprima el WAL y configure la recuperación',+ recoveryParameters: 'Si la recuperación se detiene por la configuración de parámetros',+ },+ beforeYouRun: {+ title: 'Antes de ejecutar',+ host: {+ clientTools:+ 'Instale las herramientas cliente de PostgreSQL {{version}}; si no están en el PATH, indique arriba la ruta de bin.',+ zstd: 'Se necesita zstd para descomprimir la copia.',+ zstdWithWal: 'Se necesita zstd para descomprimir la copia y su WAL.',+ emptyDirectory:+ 'El directorio de restauración debe estar vacío y no puede ser el de un clúster en uso.',+ },+ docker: {+ image:+ 'Use una imagen postgres:{{version}}: la versión mayor debe coincidir con la de origen.',+ hostTools:+ 'El host necesita zstd, tar y curl: la descarga y toda la descompresión (la copia base) se hacen en el host, y en el contenedor solo se ejecuta pg_combinebackup, así que la imagen de postgres no necesita herramientas adicionales.',+ hostToolsWithWal:+ 'El host necesita zstd, tar y curl: la descarga y toda la descompresión (la copia base y el WAL) se hacen en el host, y en el contenedor solo se ejecuta pg_combinebackup, así que la imagen de postgres no necesita herramientas adicionales.',+ },+ },+ afterItFinishes: {+ title: 'Cuando termine',+ host: {+ clusterLocation: 'El clúster está en <dataDir/>.',+ changeOwner: 'Como root, cambie el propietario: <command/>.',+ start: 'Inícielo como postgres: <command/>, o apunte data_directory a él.',+ walReplay:+ 'PostgreSQL reproduce el WAL y se promociona: consulte el log para ver cuándo termina la recuperación.',+ },+ docker: {+ clusterLocation: '<dataDir/> en el host es el clúster restaurado.',+ volumeMount:+ 'PostgreSQL {{version}} guarda su directorio de datos en <dataDir/>, dentro del volumen <volumeDir/>. Monte el directorio de salida como raíz de ese volumen; es lo que espera un docker-compose con <code>./pgdata:/var/lib/postgresql</code>:',+ dataDirectoryMount:+ 'Monte el clúster con un bind mount en el directorio de datos de la imagen <dataDir/>:',+ ownership:+ 'El propietario debe coincidir con el uid de postgres dentro de la imagen (999 en la oficial).',+ },+ missingConfigFiles:+ 'Una copia base solo copia el directorio de datos. Si su PostgreSQL de origen guarda la configuración fuera de él (la estructura de Debian/Ubuntu, <configDir/>), <code>postgresql.conf</code>, <code>pg_hba.conf</code> y <code>pg_ident.conf</code> no están en la copia y el servidor no arrancará. Consulte sus rutas reales en el origen con <code>psql -Atc "SHOW config_file"</code>, copie los tres archivos, comente <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>, <code>external_pid_file</code> y las líneas <code>ssl</code> / <code>ssl_*</code>, cree <code>conf.d</code> y, para un contenedor, establezca <code>listen_addresses = \'*\'</code>. Si esos archivos están y el error persiste, lo que está mal es el directorio montado, no la configuración.',+ },+ },+ },+ },+ storages: {+ types: {+ local: 'Almacenamiento local',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: 'Predeterminada (Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: 'Clave de la cuenta',+ connectionString: 'Cadena de conexión',+ },+ sftpAuthMethods: {+ password: 'Contraseña',+ privateKey: 'Clave privada',+ },+ list: {+ addStorage: 'Añadir almacenamiento',+ description:+ 'Un almacenamiento es el lugar donde se guardan las copias de seguridad (disco local, S3, etc.)',+ backToList: '← Volver a los almacenamientos',+ },+ card: {+ type: {+ local: 'Tipo: almacenamiento local',+ s3: 'Tipo: S3',+ googleDrive: 'Tipo: Google Drive',+ nas: 'Tipo: NAS',+ azureBlob: 'Tipo: Azure Blob Storage',+ ftp: 'Tipo: FTP',+ sftp: 'Tipo: SFTP',+ rclone: 'Tipo: Rclone',+ },+ hasSaveError: 'Error al guardar',+ },+ config: {+ namePlaceholder: 'Introduzca un nombre...',+ settingsTitle: 'Ajustes del almacenamiento',+ lastSaveError: {+ title: 'Error al guardar',+ errorLabel: 'Error:',+ clearHint: 'Para quitar este error, haga una de estas dos cosas:',+ clearByTestingConnection:+ '- pruebe la conexión con el botón de abajo (aunque ya haya cambiado los ajustes);',+ clearByNextSave: '- espere a que la siguiente copia de seguridad se guarde sin errores;',+ },+ removeConfirmation:+ '¿Seguro que desea eliminar este almacenamiento? Esta acción no se puede deshacer. Las copias de seguridad guardadas en este almacenamiento también se eliminarán.',+ removeBlockedByDatabases:+ 'Algunas bases de datos usan este almacenamiento. Quítelo primero de esas bases de datos.',+ },+ actions: {+ testConnection: 'Probar conexión',+ },+ connectionTestSucceeded: {+ title: 'La conexión funciona',+ description: 'Conexión con el almacenamiento comprobada',+ },+ transfer: {+ title: 'Transferir el almacenamiento a otro espacio de trabajo',+ blockedByDatabases:+ 'Algunas bases de datos usan este almacenamiento. Transfiera o elimine primero esas bases de datos.',+ description: 'Seleccione el espacio de trabajo al que transferir este almacenamiento.',+ targetWorkspace: 'Espacio de trabajo de destino',+ selectWorkspace: 'Seleccione un espacio de trabajo',+ submit: 'Transferir',+ },+ fields: {+ path: 'Ruta',+ remotePath: 'Ruta remota',+ share: 'Recurso compartido',+ domain: 'Dominio',+ useSsl: 'Usar SSL',+ useSslTls: 'Usar SSL/TLS',+ skipTls: 'No verificar TLS',+ skipTlsVerify: 'Omitir verificación TLS',+ skipHostKey: 'No verificar clave de host',+ authMethod: 'Método de autenticación',+ privateKey: 'Clave privada',+ credentials: 'Credenciales',+ s3Bucket: 'Bucket de S3',+ region: 'Región',+ accessKey: 'Clave de acceso',+ secretKey: 'Clave secreta',+ endpoint: 'Endpoint',+ folderPrefix: 'Prefijo de carpeta',+ prefix: 'Prefijo',+ blobPrefix: 'Prefijo de blobs',+ virtualHost: 'Host virtual',+ storageClass: 'Clase de almacenamiento',+ connection: 'Conexión',+ connectionString: 'Cadena de conexión',+ accountName: 'Nombre de la cuenta',+ accountKey: 'Clave de la cuenta',+ containerName: 'Nombre del contenedor',+ clientId: 'ID de cliente',+ clientSecret: 'Secreto de cliente',+ userToken: 'Token de usuario',+ config: 'Configuración',+ },+ edit: {+ namePlaceholder: 'Mi almacenamiento',+ advancedSettings: 'Ajustes avanzados',+ optionalPlaceholder: '{{example}} (opcional)',+ usernamePlaceholder: 'usuario',+ passwordPlaceholder: 'contraseña',+ remotePathTooltip:+ 'Ruta del directorio remoto en el que se guardan las copias de seguridad (opcional)',+ local: {+ diskSpaceWarning:+ 'Cuidado: con el almacenamiento local puede quedarse sin espacio en disco. Se recomienda usar S3 u otros almacenamientos sin límite de espacio',+ },+ s3: {+ cloudflareR2Guide: '¿Cómo usarlo con Cloudflare R2?',+ endpointTooltip:+ 'URL de un endpoint compatible con S3 (opcional; déjelo vacío para AWS S3)',+ prefixTooltip:+ "Prefijo opcional para las claves de todos los objetos (p. ej., 'backups/' o 'my_team/'). Puede no funcionar con algunos almacenamientos compatibles con S3. No se puede cambiar después de crearlo (si no, se perderán las copias de seguridad).",+ useVirtualHostedStyle: 'Usar URL virtual-hosted',+ virtualHostTooltip:+ 'Usa URL de estilo virtual-hosted (bucket.s3.region.amazonaws.com) en lugar de path-style (s3.region.amazonaws.com/bucket). Puede ser necesario si aparecen errores de COS.',+ skipTls: 'No verificar TLS',+ skipTlsVerifyTooltip:+ 'No verifica el certificado TLS. Active esta opción si su almacenamiento compatible con S3 usa un certificado autofirmado. Advertencia: esto reduce la seguridad.',+ storageClassTooltip:+ 'Clase de almacenamiento de S3 para los objetos subidos. Déjela en el valor predeterminado para Standard. Algunos proveedores ofrecen clases más baratas, como One Zone IA. No use Glacier/Deep Archive: los archivos deben estar accesibles de inmediato para las restauraciones.',+ },+ googleDrive: {+ guideLink: '¿Cómo conectar Google Drive?',+ authorize: 'Autorizar',+ },+ nas: {+ shareWithSlashWarning:+ 'El recurso compartido debe ser un único nombre. Use el campo Ruta para los subdirectorios (p. ej., Recurso compartido: Databasus, Ruta: DB1)',+ useSslTooltip: 'Activa el cifrado SSL/TLS para una conexión segura',+ domainTooltip:+ 'Nombre de dominio de Windows (opcional; déjelo vacío si no usa autenticación de dominio)',+ pathPlaceholder: '{{example}} (opcional, sin barra inicial)',+ pathTooltip: 'Ruta del subdirectorio dentro del recurso compartido (opcional)',+ },+ azureBlob: {+ connectionStringTooltip: 'Cadena de conexión de Azure Storage desde Azure Portal',+ endpointTooltip:+ 'URL de un endpoint personalizado (opcional; déjelo vacío para Azure estándar)',+ prefixTooltip:+ "Prefijo opcional para los nombres de todos los blobs (p. ej., 'backups/' o 'my_team/')",+ },+ ftp: {+ enableFtps: 'Activar FTPS',+ useSslTooltip:+ 'Usa cifrado TLS explícito (FTPS) para transferir los archivos de forma segura',+ skipCertificateVerification: 'No verificar el certificado',+ skipTlsVerifyTooltip:+ 'No verifica el certificado TLS. Active esta opción si su servidor FTP usa un certificado autofirmado. Advertencia: esto reduce la seguridad.',+ },+ sftp: {+ privateKeyTooltip:+ 'Pegue su clave privada SSH (formato PEM). Se admiten claves RSA, DSA, ECDSA y Ed25519.',+ skipHostKeyVerification: 'No verificar la clave de host',+ skipHostKeyTooltip:+ 'No verifica la clave de host SSH. Active esta opción si confía en el servidor. Advertencia: esto reduce la seguridad.',+ },+ rclone: {+ configTooltip:+ "Pegue aquí el contenido de rclone.conf. Puede obtenerlo ejecutando 'rclone config file' y copiando su contenido. Esta configuración admite más de 70 proveedores de almacenamiento en la nube.",+ configHiddenNote:+ '*el contenido se oculta para no exponer datos sensibles. Si quiere actualizar la configuración, pegue aquí una nueva',+ docsLink: 'Documentación de Rclone',+ remotePathTooltip:+ "Prefijo de ruta opcional en el remote de rclone en el que se guardarán las copias de seguridad (p. ej., '/backups' o 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/locales/fr.ts b/frontend/src/shared/i18n/locales/fr.tsnew file mode 100644index 00000000..5bf4031e--- /dev/null+++ b/frontend/src/shared/i18n/locales/fr.ts@@ -0,0 +1,1837 @@+import type { en } from './en';++export const fr: typeof en = {+ language: {+ nativeName: 'Français',+ },+ common: {+ actions: {+ add: 'Ajouter',+ back: 'Retour',+ cancel: 'Annuler',+ close: 'Fermer',+ confirm: 'Confirmer',+ continue: 'Continuer',+ copy: 'Copier',+ create: 'Créer',+ delete: 'Supprimer',+ download: 'Télécharger',+ edit: 'Modifier',+ ok: 'OK',+ refresh: 'Actualiser',+ remove: 'Supprimer',+ retry: 'Réessayer',+ save: 'Enregistrer',+ },+ answers: {+ no: 'Non',+ yes: 'Oui',+ },+ fields: {+ host: 'Hôte',+ name: 'Nom',+ password: 'Mot de passe',+ port: 'Port',+ status: 'Statut',+ type: 'Type',+ username: "Nom d'utilisateur",+ },+ states: {+ disabled: 'Désactivé',+ enabled: 'Activé',+ loading: 'Chargement...',+ },+ messages: {+ copiedToClipboard: 'Copié dans le presse-papiers',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: ', ',+ confirmation: {+ title: 'Confirmation',+ },+ },+ app: {+ documentTitle: 'Databasus - sauvegarde de bases de données (PostgreSQL, MySQL, MongoDB)',+ languageControl: {+ title: 'Langue : {{language}}',+ },+ theme: {+ title: 'Thème : {{theme}}',+ light: 'Clair',+ dark: 'Sombre',+ system: 'Système',+ },+ navigation: {+ databases: 'Bases de données',+ storages: 'Stockages',+ notifiers: 'Canaux de notification',+ workspaceSettings: 'Paramètres',+ profile: 'Profil',+ databasusSettings: 'Paramètres de Databasus',+ users: 'Utilisateurs',+ docs: 'Documentation',+ documentation: 'Documentation',+ community: 'Communauté',+ newVersionAvailable: 'Nouvelle version disponible',+ },+ diskUsage: {+ title: 'Espace disque',+ hint: "Pour créer des sauvegardes en local et les restaurer, il faut assez d'espace sur le disque. Une restauration demande autant d'espace libre que la taille de la sauvegarde.",+ compactSummary: '{{used}} sur {{total}} GB<lineBreak/>utilisés ({{percent}} %)',+ summary: '{{used}} sur {{total}} GB utilisés ({{percent}} %)',+ },+ workspaceSelection: {+ createShort: 'Créer',+ create: 'Créer un espace de travail',+ selected: 'Espace de travail',+ placeholder: 'Choisissez un espace de travail',+ search: 'Rechercher un espace de travail...',+ notFound: 'Aucun espace de travail trouvé',+ createNew: '+ Nouvel espace de travail',+ },+ sponsorship: {+ link: 'Soutenir',+ hint: "Databasus a sauvé vos données ? Soutenez le projet à votre tour pour qu'il reste gratuit, maintenu et indépendant.",+ },+ starButton: {+ label: 'Mettre une étoile',+ ariaLabel: 'Mettre une étoile à databasus/databasus sur GitHub',+ },+ clipboardPaste: {+ title: 'Coller depuis le presse-papiers',+ submit: 'Valider',+ description:+ "L'accès automatique au presse-papiers n'est pas disponible. Collez votre contenu ci-dessous.",+ placeholder: 'Collez votre chaîne de connexion ici...',+ },+ auth: {+ adminPasswordCheckFailed:+ 'Impossible de vérifier si le mot de passe administrateur est défini : {{error}}',+ },+ oauthCallback: {+ failedTitle: "Échec de l'authentification",+ codeNotFound: "Code d'autorisation introuvable",+ stateMissing: 'Paramètre state OAuth manquant',+ invalidProvider: 'Fournisseur OAuth non valide',+ returnToSignIn: 'Retour à la connexion',+ completing: "Finalisation de l'authentification...",+ },+ oauthStorage: {+ configNotFound: 'Configuration du stockage Google Drive introuvable',+ exchangeFailed: "Impossible d'échanger le code OAuth",+ unsupportedType: 'Ce type de stockage ne prend pas en charge OAuth',+ invalidState: 'Paramètre state OAuth non valide',+ paramNotFound:+ "Paramètre OAuth introuvable. Vérifiez que l'URL de redirection est correctement configurée.",+ addStorageTitle: 'Ajouter un stockage',+ storageDescription:+ "Un stockage est l'endroit où les sauvegardes sont conservées (disque local, S3, etc.)",+ },+ },+ errors: {+ unknown: "Une erreur s'est produite. Réessayez.",+ networkUnreachable:+ 'Impossible de joindre le serveur Databasus. Vérifiez votre connexion et réessayez.',+ requestFailed:+ "Le serveur n'a pas pu traiter la requête (HTTP {{status}}). Réessayez plus tard.",+ },+ status: {+ logicalBackup: {+ inProgress: 'En cours',+ completed: 'Réussie',+ failed: 'Échouée',+ deleted: 'Supprimée',+ canceled: 'Annulée',+ },+ physicalBackup: {+ inProgress: 'En cours',+ completed: 'Réussie',+ error: 'Erreur',+ chainBroken: 'Chaîne rompue',+ canceled: 'Annulée',+ },+ restoreVerification: {+ verifiedSuccessful: 'Vérifiée',+ verificationFailed: 'Vérification échouée',+ },+ restore: {+ inProgress: 'En cours',+ completed: 'Réussie',+ failed: 'Échouée',+ canceled: 'Annulée',+ },+ verification: {+ pending: 'En attente',+ running: 'En cours',+ completed: 'Réussie',+ failed: 'Échouée',+ canceled: 'Annulée',+ },+ health: {+ available: 'Disponible',+ unavailable: 'Indisponible',+ },+ agent: {+ neverSeen: 'Jamais connecté',+ online: 'En ligne',+ stale: 'Réponse tardive',+ offline: 'Hors ligne',+ },+ },+ intervals: {+ types: {+ hourly: 'Toutes les heures',+ daily: 'Tous les jours',+ weekly: 'Toutes les semaines',+ monthly: 'Tous les mois',+ cron: 'Cron',+ },+ weekdays: {+ mon: 'Lun.',+ tue: 'Mar.',+ wed: 'Mer.',+ thu: 'Jeu.',+ fri: 'Ven.',+ sat: 'Sam.',+ sun: 'Dim.',+ },+ periods: {+ day: '1 jour',+ week: '1 semaine',+ month: '1 mois',+ threeMonths: '3 mois',+ sixMonths: '6 mois',+ year: '1 an',+ twoYears: '2 ans',+ threeYears: '3 ans',+ fourYears: '4 ans',+ fiveYears: '5 ans',+ forever: 'Sans limite',+ },+ },+ auditLogs: {+ title: "Journaux d'audit",+ columns: {+ user: 'Utilisateur',+ message: 'Événement',+ workspace: 'Espace de travail',+ created: 'Date',+ },+ systemUser: 'Système',+ loadedOfTotal: 'Chargées : {{loaded}} sur {{total}}',+ empty: "Aucune entrée d'audit trouvée.",+ loadingMore: "Chargement d'autres entrées...",+ allLoaded: 'Toutes les entrées sont chargées ({{count}} au total)',+ },+ settings: {+ title: 'Paramètres de Databasus',+ externalRegistrations: {+ title: 'Autoriser les inscriptions externes',+ description:+ "Si l'option est activée, les nouveaux utilisateurs peuvent créer un compte dans Databasus. Sinon, ils ne peuvent s'inscrire que sur invitation.",+ },+ memberInvitations: {+ title: 'Autoriser les invitations par les membres',+ description:+ "Si l'option est activée, les membres peuvent inviter de nouveaux utilisateurs dans Databasus. Sinon, seuls les administrateurs peuvent inviter des utilisateurs.",+ },+ memberWorkspaceCreation: {+ title: 'Les membres peuvent créer des espaces de travail',+ description:+ "Si l'option est activée, les membres (utilisateurs non administrateurs) peuvent créer des espaces de travail. Sinon, seuls les administrateurs peuvent en créer.",+ },+ saving: 'Enregistrement...',+ saveChanges: 'Enregistrer les modifications',+ reset: 'Réinitialiser',+ updated: 'Paramètres enregistrés',+ readMore:+ 'Pour en savoir plus sur ces paramètres, <docsLink>consultez la documentation</docsLink>',+ healthcheck: {+ title: 'Vérification de disponibilité',+ openInNewTab: 'Cliquez pour ouvrir dans un nouvel onglet',+ copied: 'URL de vérification de disponibilité copiée dans le presse-papiers',+ description:+ 'Utilisez cette URL pour surveiller la disponibilité de votre instance Databasus',+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: 'Désactivé',+ require: 'Requis',+ verifyCa: 'Vérifier la CA',+ verifyFull: 'Vérification complète',+ },+ physicalBackupTypes: {+ full: 'Sauvegardes complètes uniquement',+ fullIncremental: 'Complète + incrémentale',+ fullIncrementalWalStream: 'Complète + incrémentale + streaming WAL',+ },+ list: {+ addDatabase: 'Ajouter une base de données',+ searchPlaceholder: 'Rechercher une base de données',+ noSearchResults: 'Aucune base de données ne correspond à « {{query}} »',+ description: "Une base de données, c'est ce que nous sauvegardons",+ backToList: '← Retour aux bases de données',+ },+ card: {+ storage: 'Stockage : <storageName/>',+ lastBackup: 'Dernière sauvegarde {{relativeTime}}',+ hasBackupError: 'Erreur de sauvegarde',+ },+ tabs: {+ config: 'Configuration',+ backups: 'Sauvegardes',+ verifications: 'Vérifications',+ },+ create: {+ title: 'Ajouter une base de données à sauvegarder',+ namePlaceholder: 'Ma base préférée',+ creating: 'Création de la base de données...',+ complete: 'Terminer',+ backupType: {+ title: 'Choisissez le type de sauvegarde',+ logical: {+ title: 'Logique',+ description: 'Recommandée pour les bases de moins de 50 GB. Plus simple à configurer.',+ },+ physical: {+ title: 'Physique',+ description:+ 'Pour les bases de plus de 50 GB. Permet la restauration à un instant donné et améliore le RPO/RTO, mais demande une configuration supplémentaire.',+ },+ },+ },+ config: {+ namePlaceholder: 'Saisissez un nom...',+ removing: 'Suppression de la base de données...',+ lastBackupError: {+ title: 'Erreur de la dernière sauvegarde',+ errorLabel: 'Erreur :',+ clearHint: 'Pour effacer cette erreur (au choix) :',+ clearByTestingConnection:+ '- testez la connexion avec le bouton ci-dessous (même si vous avez déjà modifié les paramètres) ;',+ clearByNextBackup: '- attendez que la prochaine sauvegarde se termine sans erreur ;',+ },+ sections: {+ database: 'Paramètres de la base de données',+ backupConfig: 'Configuration des sauvegardes',+ healthcheck: 'Vérification de disponibilité',+ restoreVerification: 'Vérification de restauration',+ notifiers: 'Canaux de notification',+ },+ copyConfirmation:+ 'Voulez-vous vraiment copier cette base de données ? Une nouvelle base de données avec les mêmes paramètres sera créée.',+ removeConfirmation:+ 'Voulez-vous vraiment supprimer cette base de données ? Cette action est irréversible.',+ copied: {+ title: 'Base de données copiée !',+ description: '« {{name}} » a été créée',+ },+ connectionTestSucceeded: {+ title: 'Connexion réussie !',+ description: 'La connexion à la base de données fonctionne',+ },+ },+ actions: {+ testConnection: 'Tester la connexion',+ replace: 'Remplacer',+ },+ fields: {+ databaseType: 'Type de base de données',+ version: 'Version de {{engine}}',+ databaseName: 'Nom de la base',+ sslMode: 'Mode SSL',+ useHttps: 'Utiliser HTTPS',+ cpuCount: 'Nombre de CPU',+ backupType: 'Type de sauvegarde',+ clientCertificate: 'Certificat client',+ clientKey: 'Clé client',+ serverCaCertificate: 'Certificat CA du serveur',+ includeSchemas: 'Schémas inclus',+ excludeTables: 'Tables exclues',+ skipUserMappings: "Ignorer les correspondances d'utilisateurs",+ excludeExtensions: 'Exclure les extensions',+ restoreOwnership: 'Restaurer les propriétaires',+ restorePrivileges: 'Restaurer les privilèges',+ excludeEvents: 'Exclure les événements',+ galeraReplication: 'Réplication Galera',+ useSrvConnection: 'Connexion SRV',+ directConnection: 'Connexion directe',+ authDatabase: "Base d'authentification",+ excludeCollections: 'Collections exclues',+ },+ edit: {+ parseFromClipboard: 'Remplir depuis le presse-papiers',+ clipboardEmpty: 'Le presse-papiers est vide',+ clipboardReadFailed:+ 'Impossible de lire le presse-papiers. Vérifiez les autorisations du navigateur.',+ connectionStringParsed: 'Champs remplis à partir de la chaîne de connexion',+ connectionStringParsedWithoutPassword:+ 'Champs remplis à partir de la chaîne de connexion. Saisissez le mot de passe manuellement.',+ connectionTestPassed: {+ title: 'Test de connexion réussi',+ description: "Vous pouvez passer à l'étape suivante",+ },+ ipWhitelistHint:+ "Si votre base de données n'accepte que certaines adresses IP, ajoutez l'adresse IP du serveur Databasus à la liste autorisée.",+ localhostHint:+ '<docsLink>Lisez cette page</docsLink> pour savoir comment sauvegarder une base de données locale',+ advancedSettings: 'Paramètres avancés',+ placeholders: {+ host: "Saisissez l'hôte {{engine}}",+ port: 'Saisissez le port {{engine}}',+ username: "Saisissez le nom d'utilisateur {{engine}}",+ password: 'Saisissez le mot de passe {{engine}}',+ databaseName: 'Saisissez le nom de la base {{engine}}',+ },+ cpuCountTooltip:+ 'Nombre de cœurs CPU utilisés pour la sauvegarde et la restauration. Une valeur plus élevée peut accélérer ces opérations, mais consomme plus de ressources.',+ excludeTablesPlaceholder: 'Aucune table exclue',+ excludeTablesTooltip:+ 'Noms des tables à exclure de la sauvegarde. Vous pouvez coller une liste séparée par des virgules ou des retours à la ligne.',+ serverCaCertificateTooltip:+ 'Facultatif. Si ce certificat est fourni, celui du serveur est vérifié avec cette CA (verify-ca / verify-full).',+ copyFailed: 'Échec de la copie',+ postgresql: {+ supabaseHint:+ '<docsLink>Lisez cette page</docsLink> pour savoir comment sauvegarder une base de données Supabase',+ includeSchemasPlaceholder: 'Tous les schémas (par défaut)',+ excludeTablesTooltip:+ "Tables à exclure de la sauvegarde. Utilisez 'tablename' ou 'schema.tablename'. Les motifs glob sont acceptés (par ex. 'logs_*'). Vous pouvez coller une liste séparée par des virgules ou des retours à la ligne.",+ skipUserMappingsTooltip:+ "Ne pas restaurer les correspondances d'utilisateurs (user mappings, instructions CREATE USER MAPPING). Activez cette option si le rôle de sauvegarde ne peut pas lire les identifiants de ces correspondances : sinon, elles sont exportées sans options et font échouer la restauration des FDW comme oracle_fdw.",+ excludeExtensionsTooltip:+ "Ne pas restaurer les définitions d'extensions (instructions CREATE EXTENSION). Activez cette option si vous restaurez vers un service PostgreSQL managé où le fournisseur gère les extensions.",+ restoreOwnershipTooltip:+ "Appliquer les instructions ALTER OWNER du dump pour que les objets restaurés gardent leur propriétaire d'origine. L'utilisateur de connexion doit pouvoir attribuer ces rôles, ce qui demande en général un superutilisateur.",+ restorePrivilegesTooltip:+ "Appliquer les instructions GRANT et REVOKE du dump pour que les objets restaurés gardent leurs ACL d'origine. L'utilisateur de connexion doit pouvoir accorder des droits aux rôles concernés, ce qui demande en général un superutilisateur.",+ backupTypeTooltips: {+ full: 'Sauvegardes complètes périodiques. Chaque sauvegarde se suffit à elle-même.',+ fullIncremental:+ 'Sauvegardes complètes, plus des sauvegardes incrémentales qui ne stockent que les changements depuis la sauvegarde précédente. Plus légères et plus rapides.',+ fullIncrementalWalStream:+ 'Ajoute un streaming WAL continu aux sauvegardes complètes et incrémentales. Seule cette option permet la restauration à un instant donné (PITR), mais elle prend plus de place et la restauration est plus lente.',+ },+ },+ mariadb: {+ skipEvents: 'Ignorer les événements',+ skipEventsTooltip:+ "Ne pas sauvegarder les événements de la base de données. Activez cette option si le planificateur d'événements est désactivé sur votre serveur MariaDB.",+ skipGaleraDisable: 'Ne pas désactiver à la restauration',+ skipGaleraDisableTooltip:+ "Par défaut, Databasus exécute SET SESSION wsrep_on=OFF pendant la restauration pour éviter les erreurs de taille de writeset Galera. Cela demande le privilège SUPER. Activez cette option pour sauter cette étape si votre fournisseur managé refuse SUPER : les grosses restaurations risquent alors d'atteindre les limites de writeset de Galera.",+ },+ mongodb: {+ srvTooltip:+ "Activez cette option pour les connexions SRV de MongoDB Atlas (mongodb+srv://). Le port n'est pas nécessaire pour une connexion SRV.",+ srvOverTunnelTooltip:+ "Indisponible via un tunnel SSH : SRV résout sa propre liste d'hôtes et contourne le port redirigé.",+ directConnectionTooltip:+ 'Se connecter directement à un seul serveur, sans découverte du replica set. Utile quand le serveur est derrière un répartiteur de charge, un proxy ou un tunnel.',+ directConnectionOverTunnelTooltip:+ "Toujours activée tant que le tunnel SSH est actif : un tunnel n'expose qu'une seule adresse, la découverte du replica set est donc impossible.",+ excludeCollectionsPlaceholder: 'Aucune collection exclue',+ excludeCollectionsTooltip:+ 'Noms des collections à exclure de la sauvegarde. Vous pouvez coller une liste séparée par des virgules ou des retours à la ligne.',+ },+ },+ show: {+ galeraDisableSkipped: 'Non désactivée à la restauration',+ },+ sshTunnel: {+ authTypes: {+ password: 'Mot de passe',+ privateKey: 'Clé privée',+ },+ title: 'Tunnel SSH',+ tooltip:+ "Pour une base de données dans un réseau fermé. Databasus se connecte à l'hôte SSH ci-dessous, et cet hôte joint la base de données avec l'hôte et le port indiqués plus haut.",+ host: 'Hôte SSH',+ hostTooltip:+ "L'hôte de la base de données indiqué plus haut est résolu par l'hôte SSH, pas par Databasus. Utilisez 127.0.0.1 si la base de données tourne sur l'hôte SSH lui-même.",+ port: 'Port SSH',+ username: 'Utilisateur SSH',+ usernamePlaceholder: "Saisissez l'utilisateur SSH",+ authType: 'Authentification SSH',+ credentials: 'Identifiants SSH',+ password: 'Mot de passe SSH',+ passwordPlaceholder: 'Saisissez le mot de passe SSH',+ privateKey: 'Clé privée SSH',+ keyPassphrase: 'Phrase secrète de la clé',+ keyPassphrasePlaceholder: 'Uniquement pour une clé chiffrée',+ },+ notifiers: {+ title: 'Canaux de notification',+ description:+ "Un canal de notification est l'endroit où les notifications sont envoyées (e-mail, Slack, Telegram, etc.)",+ multipleHint:+ 'Vous pouvez choisir plusieurs canaux : les notifications seront envoyées à chacun.',+ selectPlaceholder: 'Choisissez des canaux de notification',+ createNew: 'Créer un canal de notification',+ addTitle: 'Ajouter un canal de notification',+ notifyTo: 'Notifier via',+ empty: 'Aucun canal de notification configuré',+ },+ readOnlyUser: {+ dialogTitle: 'Créer un utilisateur en lecture seule',+ readOnly: {+ checking: "Vérification de l'utilisateur en lecture seule...",+ title: 'Créer un utilisateur en lecture seule pour Databasus ?',+ description:+ "Un utilisateur en lecture seule est un utilisateur {{databaseType}} aux droits limités : il peut lire les données de votre base, mais pas les modifier. C'est recommandé pour les sauvegardes, car :",+ noWriteCredentials:+ "<bold>Avec un utilisateur en lecture seule, aucun identifiant avec droits d'écriture n'est stocké</bold>. Même en cas de piratage, personne ne pourra corrompre vos données.",+ create: 'Oui, créer un utilisateur en lecture seule',+ skipTitle: "Ne pas créer d'utilisateur en lecture seule ?",+ skipQuestion: "Voulez-vous vraiment passer la création d'un utilisateur en lecture seule ?",+ },+ replicationOnly: {+ checking: "Vérification de l'utilisateur réservé à la réplication...",+ title: 'Créer un utilisateur réservé à la réplication pour Databasus ?',+ description:+ "Un utilisateur réservé à la réplication est un utilisateur {{databaseType}} aux droits limités : il peut lire les données de votre base, mais pas les modifier. C'est recommandé pour les sauvegardes, car :",+ noWriteCredentials:+ "<bold>Avec un utilisateur réservé à la réplication, aucun identifiant avec droits d'écriture n'est stocké</bold>. Même en cas de piratage, personne ne pourra corrompre vos données.",+ create: 'Oui, créer un utilisateur réservé à la réplication',+ skipTitle: "Ne pas créer d'utilisateur réservé à la réplication ?",+ skipQuestion:+ "Voulez-vous vraiment passer la création d'un utilisateur réservé à la réplication ?",+ },+ reasons: {+ preventsModifications:+ 'il évite toute modification accidentelle des données pendant la sauvegarde',+ leastPrivilege: 'il respecte le principe du moindre privilège',+ bestPractice: "c'est une bonne pratique de sécurité",+ },+ securityNote:+ 'Databasus applique une sécurité de niveau entreprise (<docsLink>en savoir plus</docsLink>). Mais aucune protection ne couvre tous les risques possibles.',+ noWritePrivileges: "L'utilisateur actuel <bold>n'a aucun privilège d'écriture</bold>.",+ noWriteRoles: "L'utilisateur actuel <bold>n'a aucun rôle d'écriture</bold>.",+ writePrivileges: "L'utilisateur actuel a les privilèges d'écriture suivants :",+ writeRoles: "L'utilisateur actuel a les rôles d'écriture suivants :",+ expand: '(afficher)',+ collapse: '(masquer)',+ skip: 'Passer',+ skipRisk:+ "Utiliser un utilisateur avec tous les droits pour les sauvegardes n'est pas recommandé et peut poser des risques de sécurité. Databasus vous recommande vivement de ne pas passer cette étape.",+ skipAdvice:+ "Une protection à 100 % n'existe pas. Mieux vaut se prémunir même contre un risque de piratage de 0,01 %. Il est donc préférable de choisir la voie sûre avec un utilisateur en lecture seule.",+ acceptRisks: "Oui, j'accepte les risques",+ continueSecurely: 'Continuer de façon sécurisée',+ forcedWalRotationUnavailable:+ "Cette source n'accorderait pas EXECUTE sur pg_switch_wal() au nouvel utilisateur, alors que le streaming WAL continu en a besoin pour garder le point de restauration proche du présent. Les sauvegardes complètes et incrémentales fonctionnent normalement avec ces identifiants.",+ },+ transfer: {+ title: 'Transférer la base de données vers un autre espace de travail',+ targetWorkspace: 'Espace de travail cible',+ selectWorkspace: 'Choisissez un espace de travail',+ storage: {+ title: 'Stockage',+ transferExisting: 'Transférer avec le stockage actuel',+ selectFromTarget: "Choisir un stockage de l'espace de travail cible",+ blocked:+ "Bases de données utilisant ce stockage : {{count}}. Le transfert est bloqué, car d'autres bases de données en dépendent.",+ canTransfer: 'Le stockage peut être transféré',+ selectPlaceholder: 'Choisissez un stockage',+ createNew: 'Créer un stockage',+ addTitle: 'Ajouter un stockage',+ description:+ "Un stockage est l'endroit où les sauvegardes sont conservées (disque local, S3, Google Drive, etc.)",+ },+ notifiers: {+ title: 'Canaux de notification (facultatif)',+ transferWithDatabase: 'Transférer les canaux de notification avec la base de données',+ selectFromTarget: "Choisir des canaux de notification de l'espace de travail cible",+ willTransfer: 'Seront transférés :',+ willNotTransfer: "Ne seront PAS transférés (utilisés par d'autres bases de données) :",+ usedByDatabases: '{{name}} (bases de données : {{count}})',+ noneTransferred:+ "Aucun canal de notification ne sera transféré. Après le transfert, vous pourrez choisir des canaux dans l'espace de travail cible.",+ selectPlaceholder: 'Choisissez des canaux de notification (facultatif)',+ },+ submit: 'Transférer',+ transferred: {+ title: 'Base de données transférée !',+ description: '« {{name}} » a été transférée dans le nouvel espace de travail',+ },+ },+ connectionString: {+ errors: {+ empty: 'La chaîne de connexion est vide',+ unrecognizedFormat: 'Format de chaîne de connexion non reconnu',+ hostMissing: "La chaîne de connexion ne contient pas l'hôte",+ usernameMissing: "La chaîne de connexion ne contient pas le nom d'utilisateur",+ passwordMissing: 'La chaîne de connexion ne contient pas le mot de passe',+ databaseMissing: 'La chaîne de connexion ne contient pas le nom de la base de données',+ parseFailed: "Impossible d'analyser la chaîne de connexion",+ jdbc: {+ invalidFormat:+ 'Format de chaîne de connexion JDBC non valide. Format attendu : {{expectedFormat}}',+ queryParametersMissing:+ 'La chaîne de connexion JDBC ne contient pas les paramètres de requête (user et password)',+ usernameMissing:+ "La chaîne de connexion JDBC ne contient pas le nom d'utilisateur (paramètre user)",+ passwordMissing: 'La chaîne de connexion JDBC ne contient pas le paramètre password',+ parseFailed: "Impossible d'analyser la chaîne de connexion JDBC",+ },+ keyValue: {+ hostMissing: "La chaîne de connexion ne contient pas l'hôte. Utilisez host=hostname",+ usernameMissing:+ "La chaîne de connexion ne contient pas le nom d'utilisateur. Utilisez user=username",+ passwordMissing:+ 'La chaîne de connexion ne contient pas le mot de passe. Utilisez password=yourpassword',+ databaseMissing:+ 'La chaîne de connexion ne contient pas le nom de la base de données. Utilisez database=database',+ parseFailed: "Impossible d'analyser la chaîne de connexion au format clé=valeur",+ },+ libpq: {+ databaseMissing:+ 'La chaîne de connexion ne contient pas le nom de la base de données. Utilisez dbname=database',+ parseFailed: "Impossible d'analyser la chaîne de connexion libpq",+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote:+ 'Accordez-le avec la commande ci-dessous (en tant que superutilisateur).',+ applyAndRestartNote: 'Appliquez la modification ci-dessous, puis redémarrez PostgreSQL.',+ pgHbaNoEntry: {+ title: 'La réplication depuis cet hôte est refusée',+ summary:+ "PostgreSQL n'a aucune entrée pg_hba.conf qui autorise une connexion de réplication depuis Databasus. Les sauvegardes physiques passent par la réplication, qui exige une règle « host replication » : une règle « host all » ordinaire ne la couvre pas.",+ addLineNote:+ "Ajoutez la ligne ci-dessous à pg_hba.conf. Le premier « all » correspond à n'importe quel utilisateur et le second à n'importe quel hôte : pour restreindre l'accès, remplacez l'utilisateur par le rôle de réplication concerné et/ou l'hôte par une plage CIDR.",+ reloadNote:+ 'Après avoir modifié pg_hba.conf, <bold>rechargez la configuration de PG</bold>.',+ managedNote:+ "Sur un PostgreSQL managé (RDS / Azure / GCP), pg_hba.conf n'est pas modifiable : activez plutôt l'accès externe ou la réplication dans la console du fournisseur.",+ },+ badCredentials: {+ title: "Nom d'utilisateur ou mot de passe incorrect",+ summary:+ "PostgreSQL a refusé les identifiants. Vérifiez le nom d'utilisateur et le mot de passe de cette base de données.",+ },+ noReplicationPrivilege: {+ title: "L'utilisateur n'a pas le droit de réplication",+ summary:+ "L'utilisateur s'est connecté, mais il n'a pas le privilège REPLICATION exigé par les sauvegardes physiques.",+ managedNote:+ 'Sur AWS RDS, exécutez GRANT rds_replication TO {{username}}. Sur Azure / GCP, activez la réplication pour le rôle dans la console du fournisseur.',+ },+ noWalSwitchPrivilege: {+ title: "L'utilisateur ne peut pas forcer un changement de segment WAL",+ summary:+ "Le streaming WAL continu n'envoie un segment qu'une fois que la source l'a fermé : sur une base peu sollicitée en écriture, les WAL les plus récents restent donc sur la source jusqu'à ce que le segment de 16 MB soit plein. Forcer un changement de segment à intervalle régulier garde le point de restauration entre deux sauvegardes proche du présent, et cela demande EXECUTE sur pg_switch_wal(). Les sauvegardes complètes et incrémentales n'en ont pas besoin : elles restaurent l'état à la fin de chaque sauvegarde et ne rejouent aucun WAL archivé.",+ switchBackupTypeNote:+ 'Ou passez le type de sauvegarde à <bold>Complète + incrémentale</bold>, qui ne rejoue pas de WAL archivé.',+ managedNote:+ 'Sur un PostgreSQL managé (RDS / Azure / GCP), la fonction appartient au superutilisateur de la plateforme et un rôle client ne peut pas obtenir EXECUTE dessus : le streaming WAL continu y est donc indisponible. Utilisez plutôt des sauvegardes complètes + incrémentales.',+ },+ walLevelInvalid: {+ title: 'wal_level est trop bas',+ summary:+ 'wal_level doit valoir « replica » ou « logical » pour les sauvegardes physiques. Sa valeur actuelle est inférieure.',+ applyNote:+ "Appliquez la modification ci-dessous, puis redémarrez PostgreSQL (wal_level ne prend effet qu'après un redémarrage).",+ managedNote:+ 'Sur un PostgreSQL managé, définissez wal_level dans le groupe de paramètres du fournisseur.',+ },+ noWalSenders: {+ title: 'Aucun processus walsender disponible',+ summary:+ 'max_wal_senders vaut 0 : PostgreSQL ne peut donc pas diffuser les WAL pour les sauvegardes.',+ managedNote:+ 'Sur un PostgreSQL managé, définissez max_wal_senders dans le groupe de paramètres du fournisseur.',+ },+ noReplicationSlots: {+ title: 'Aucun slot de réplication disponible',+ summary:+ 'max_replication_slots vaut 0 : PostgreSQL ne peut donc pas allouer de slot pour les sauvegardes.',+ managedNote:+ 'Sur un PostgreSQL managé, définissez max_replication_slots dans le groupe de paramètres du fournisseur.',+ },+ walSummaryDisabled: {+ title: 'summarize_wal est désactivé',+ summary:+ 'summarize_wal doit être activé pour les sauvegardes incrémentales. Il est actuellement désactivé sur ce serveur.',+ applyNote: 'Appliquez la modification ci-dessous (sans redémarrage).',+ thenNote: 'puis',+ managedNote:+ 'Sur un PostgreSQL managé, définissez summarize_wal dans le groupe de paramètres du fournisseur.',+ },+ customTablespaces: {+ title: 'Les tablespaces personnalisés ne sont pas pris en charge',+ summary:+ 'Ce cluster contient des tablespaces autres que pg_default / pg_global, que les sauvegardes physiques ne peuvent pas diffuser. Supprimez les tablespaces personnalisés ou passez cette base de données en sauvegardes logiques.',+ },+ systemIdentifierMismatch: {+ title: "Il s'agit d'un autre cluster",+ summary:+ "Le cluster à cette adresse n'a pas le même identifiant système que celui pour lequel cette sauvegarde a été configurée. Pointez Databasus vers le cluster d'origine ou créez une nouvelle entrée de base de données.",+ },+ connectionFailed: {+ title: 'Connexion impossible',+ summary:+ "Databasus n'a pas pu ouvrir de connexion de réplication. Vérifiez l'hôte, le port et le mode SSL, et qu'aucun pare-feu ne bloque la connexion.",+ },+ },+ },+ restores: {+ list: {+ empty: 'Aucune restauration pour le moment',+ },+ targetDatabase: {+ select: 'Choisir la base de données de destination',+ description:+ "Saisissez les informations de la base de données où la sauvegarde sera restaurée. <underline>Créez d'abord une base de données vide pour la restauration</underline>. Pendant la restauration, toutes ses données actuelles seront effacées",+ notInUseHint:+ "Assurez-vous que la base de données n'est pas utilisée en ce moment (vous ne voulez probablement pas restaurer les données dans la base d'où vient la sauvegarde)",+ submit: 'Restaurer dans cette base',+ },+ card: {+ startedAt: 'Début',+ duration: 'Durée',+ errorDetailsTooltip: "Cliquez pour voir le détail de l'erreur",+ cancelTooltip: 'Annuler la restauration',+ expectedDurationHint:+ 'Une restauration prend en général 3 à 5 fois plus de temps que la sauvegarde (parfois moins, parfois plus selon le type de données)',+ expectedDurationLimit:+ "Elle peut donc prendre jusqu'à {{duration}} (en général beaucoup moins)",+ },+ errorDetails: {+ title: "Détail de l'erreur de restauration",+ copied: "Message d'erreur copié dans le presse-papiers",+ excludeExtensionsTip:+ "<bold>💡 Astuce :</bold> cette erreur survient en général lors d'une restauration vers un service PostgreSQL managé (Yandex Cloud, AWS RDS ou similaire). Essayez d'activer <bold>« Exclure les extensions »</bold> dans les paramètres avancés avant de restaurer.",+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ Attention :</bold> si vous annulez cette restauration, votre base de données restera probablement corrompue ou incomplète. Vous devrez la recréer avant de tenter une nouvelle restauration.',+ question: 'Voulez-vous vraiment annuler ?',+ confirm: 'Oui, annuler la restauration',+ },+ },+ healthcheck: {+ attempts: {+ title: 'Vérifications de disponibilité',+ period: 'Période',+ periods: {+ today: "Aujourd'hui",+ sevenDays: '7 jours',+ thirtyDays: '30 jours',+ allTime: 'Depuis le début',+ },+ empty: 'Aucune donnée pour le moment',+ },+ config: {+ enable: 'Vérifier la disponibilité',+ isEnabled: 'Vérification activée',+ notifyWhenUnavailable: "Notifier en cas d'indisponibilité",+ checkIntervalMinutes: 'Intervalle de vérification (min)',+ attemptsBeforeDown: 'Tentatives avant indisponibilité',+ storeAttemptsDays: "Conserver l'historique (jours)",+ tooltips: {+ enable: 'Active ou désactive la vérification de disponibilité de cette base de données',+ notifyWhenUnavailable:+ 'Envoyer des notifications quand la base de données devient indisponible',+ checkIntervalMinutes:+ 'Fréquence de vérification de la disponibilité de la base de données (en minutes)',+ attemptsBeforeDown:+ 'Nombre de tentatives échouées avant de considérer la base de données comme indisponible',+ storeAttemptsDays:+ "Nombre de jours pendant lesquels l'historique des vérifications de disponibilité est conservé",+ },+ },+ },+ workspaces: {+ roles: {+ owner: 'Propriétaire',+ admin: 'Administrateur',+ member: 'Membre',+ viewer: 'Lecteur',+ },+ fields: {+ name: "Nom de l'espace de travail",+ namePlaceholder: "Saisissez le nom de l'espace de travail",+ },+ create: {+ title: 'Créer un espace de travail',+ submit: "Créer l'espace de travail",+ defaultName: 'Mon espace de travail',+ description:+ "Un espace de travail regroupe :<lineBreak/>- vos bases de données ;<lineBreak/>- les stockages (disque local, S3, Google Drive, etc.) ;<lineBreak/>- les canaux de notification (e-mail, Slack, Telegram, etc.) ;<lineBreak/>- le contrôle d'accès (si vous travaillez en équipe).",+ nameRequired: "Saisissez un nom d'espace de travail",+ created: 'Espace de travail créé',+ permissionDenied: {+ title: 'Accès refusé',+ description:+ "Vous n'avez pas le droit de créer des espaces de travail. Demandez à l'administrateur de le créer pour vous.",+ },+ },+ settings: {+ title: "Paramètres de l'espace de travail",+ readOnly: "Vous n'avez pas le droit de modifier ces paramètres",+ nameRequired: "Le nom de l'espace de travail est obligatoire",+ saving: 'Enregistrement...',+ saveChanges: 'Enregistrer les modifications',+ reset: 'Réinitialiser',+ updated: 'Informations générales enregistrées',+ },+ delete: {+ dangerZone: 'Zone de danger',+ title: 'Supprimer cet espace de travail',+ description:+ "La suppression d'un espace de travail est définitive. Toutes les données et ressources associées à cet espace de travail seront supprimées pour toujours.",+ submit: "Supprimer l'espace de travail",+ deleting: 'Suppression...',+ notFound: 'Espace de travail introuvable',+ noPermission: "Vous n'avez pas le droit de supprimer cet espace de travail",+ hasDatabases:+ "Impossible de supprimer l'espace de travail. Supprimez d'abord toutes ses bases de données. Bases de données trouvées : {{count}}.",+ deleted: 'Espace de travail supprimé',+ confirmation: {+ title: "Supprimer l'espace de travail",+ question: "Voulez-vous vraiment supprimer l'espace de travail <workspaceName/> ?",+ warning:+ '<bold>Cette action est irréversible.</bold> Toutes les données et les ressources associées seront supprimées définitivement.',+ submit: "Supprimer l'espace de travail",+ },+ },+ members: {+ title: 'Utilisateurs',+ count: 'Membres : {{count}}',+ empty: 'Aucun membre',+ emptyHint: 'Cliquez sur « Ajouter un membre » pour commencer',+ fields: {+ member: 'Membre',+ role: 'Rôle',+ joined: 'Ajouté le',+ actions: 'Actions',+ email: 'Adresse e-mail',+ emailPlaceholder: "Saisissez l'adresse e-mail",+ },+ add: {+ button: 'Ajouter un membre',+ title: 'Ajouter un membre',+ submit: 'Ajouter',+ emailRequired: "L'adresse e-mail est obligatoire",+ hint: "Si l'utilisateur existe déjà, il est ajouté directement. Sinon, une invitation lui est envoyée.",+ added: 'Membre ajouté',+ },+ invited: {+ title: 'Utilisateur invité',+ sentTo: 'Invitation envoyée à {{email}}',+ description:+ "Cet utilisateur n'a pas encore de compte, mais il a été invité dans l'espace de travail. Dès qu'il s'inscrira avec cette adresse e-mail, il en deviendra automatiquement membre.",+ },+ roleChanged: 'Rôle du membre modifié',+ remove: {+ tooltip: 'Supprimer le membre',+ title: 'Supprimer le membre',+ question: 'Voulez-vous vraiment supprimer « {{email}} » de cet espace de travail ?',+ removed: 'Membre « {{email}} » supprimé',+ },+ },+ transferOwnership: {+ button: 'Transférer la propriété',+ title: "Transférer la propriété de l'espace de travail",+ submit: 'Transférer la propriété',+ warning:+ '<bold>Attention :</bold> cette action est irréversible. Vous ne serez plus propriétaire de cet espace de travail et le nouveau propriétaire en aura le contrôle total.',+ noEligibleMembers:+ "Aucun membre à qui transférer la propriété. L'espace de travail doit compter au moins un autre membre.",+ newOwner: 'Nouveau propriétaire',+ newOwnerPlaceholder: 'Choisissez le membre qui deviendra propriétaire',+ newOwnerHint: "Le membre choisi deviendra propriétaire de l'espace de travail",+ memberRequired: 'Choisissez le membre à qui transférer la propriété',+ memberNotFound: 'Membre introuvable',+ transferred: 'Propriété transférée',+ },+ auditLogs: {+ empty: "Aucune entrée d'audit pour cet espace de travail.",+ },+ },+ users: {+ roles: {+ admin: 'Administrateur',+ member: 'Membre',+ },+ fields: {+ name: 'Nom',+ email: 'E-mail',+ yourName: 'Votre nom',+ yourEmail: 'Votre e-mail',+ confirmPassword: 'Confirmez le mot de passe',+ newPassword: 'Nouveau mot de passe',+ },+ validation: {+ nameRequired: 'Le nom est obligatoire',+ emailRequired: "L'e-mail est obligatoire",+ passwordTooShort: 'Mot de passe trop court. Longueur minimale : {{minLength}}',+ passwordsDoNotMatch: 'Les mots de passe ne correspondent pas',+ },+ oauth: {+ divider: 'ou par e-mail',+ continueWithGithub: 'Continuer avec GitHub',+ continueWithGoogle: 'Continuer avec Google',+ invalidConfiguration: 'Configuration OAuth non valide',+ },+ signIn: {+ title: 'Connexion',+ submit: 'Se connecter',+ noAccount: 'Pas encore de compte ? <signUpLink>Inscrivez-vous</signUpLink>',+ forgotPassword: 'Mot de passe oublié ?',+ },+ signUp: {+ title: 'Inscription',+ namePlaceholder: 'Jean Dupont',+ submit: "S'inscrire",+ hasAccount: 'Vous avez déjà un compte ? <signInLink>Connectez-vous</signInLink>',+ },+ adminPassword: {+ title: 'Créer le compte administrateur',+ description:+ "Vous pourrez ensuite vous connecter avec l'identifiant « admin » et le mot de passe choisi",+ submit: 'Définir le mot de passe',+ },+ requestPasswordReset: {+ title: 'Réinitialiser le mot de passe',+ description:+ 'Saisissez votre adresse e-mail et nous vous enverrons un code de réinitialisation.',+ submit: 'Envoyer le code',+ codeSent: 'Si cette adresse e-mail existe, un code de réinitialisation a été envoyé',+ rememberPassword:+ 'Vous vous souvenez de votre mot de passe ? <signInLink>Connectez-vous</signInLink>',+ },+ resetPassword: {+ title: 'Réinitialiser le mot de passe',+ description: 'Saisissez le code reçu par e-mail et votre nouveau mot de passe.',+ code: 'Code de réinitialisation',+ confirmPassword: 'Confirmez le mot de passe',+ submit: 'Réinitialiser le mot de passe',+ invalidCode: 'Le code doit comporter 6 chiffres',+ succeeded: 'Mot de passe réinitialisé ! Redirection vers la connexion...',+ noCode:+ "Vous n'avez pas reçu de code ? <requestCodeLink>Demander un nouveau code</requestCodeLink>",+ backToSignIn: 'Retour à la connexion',+ },+ profile: {+ title: 'Profil',+ information: 'Informations du profil',+ userId: 'ID utilisateur',+ namePlaceholder: 'Saisissez votre nom',+ emailPlaceholder: 'Saisissez votre e-mail',+ adminEmailReadOnly: "L'e-mail de l'administrateur ne peut pas être modifié",+ role: 'Rôle',+ saveChanges: 'Enregistrer les modifications',+ noChanges: 'Aucune modification à enregistrer',+ updated: 'Profil mis à jour',+ logout: 'Se déconnecter',+ changePassword: {+ title: 'Changer le mot de passe',+ newPasswordPlaceholder: 'Saisissez le nouveau mot de passe',+ confirmPassword: 'Confirmez le nouveau mot de passe',+ confirmPasswordPlaceholder: 'Ressaisissez le nouveau mot de passe',+ passwordsDoNotMatch: 'Les nouveaux mots de passe ne correspondent pas',+ changing: 'Changement du mot de passe...',+ submit: 'Changer le mot de passe',+ signedInWithNewPassword: 'Vous êtes connecté avec votre nouveau mot de passe',+ },+ },+ list: {+ title: 'Utilisateurs de Databasus',+ loadedOfTotal: 'Utilisateurs : {{loaded}} sur {{total}}',+ searchPlaceholder: 'Rechercher par e-mail ou par nom...',+ empty: 'Aucun utilisateur trouvé.',+ allLoaded: 'Tous les utilisateurs sont chargés ({{count}} au total)',+ columns: {+ user: 'Utilisateur',+ systemRole: 'Rôle système',+ isActive: 'Actif',+ created: 'Créé le',+ },+ roleLabel: 'Rôle :',+ activeLabel: 'Actif :',+ viewAuditLogs: "Voir les journaux d'audit",+ activated: 'Utilisateur activé',+ deactivated: 'Utilisateur désactivé',+ roleChanged: "Rôle de l'utilisateur modifié",+ },+ auditLogs: {+ title: "Journaux d'audit de l'utilisateur",+ empty: "Aucune entrée d'audit pour cet utilisateur.",+ },+ },+ verification: {+ triggers: {+ manual: 'Manuelle',+ scheduled: 'Planifiée',+ },+ notificationTypes: {+ verificationSuccess: 'Vérification réussie',+ verificationFailed: 'Vérification échouée',+ },+ config: {+ scheduledVerification: 'Vérification planifiée',+ scheduledVerificationTooltip:+ "Restaure régulièrement la dernière sauvegarde dans un conteneur Postgres éphémère pour vérifier qu'elle est restaurable. <docsLink>Voir comment ça marche</docsLink>",+ interval: 'Intervalle de vérification',+ afterBackup: 'Après chaque sauvegarde',+ afterBackupHint:+ 'Se lance automatiquement après chaque sauvegarde réussie. Les vérifications encore en attente dans la file sont annulées, pour que la file ne grossisse pas sans fin quand les sauvegardes vont plus vite que les vérifications.',+ weekday: 'Jour de la semaine',+ dayOfMonth: 'Jour du mois',+ timeOfDay: 'Heure de vérification',+ cron: {+ expression: 'Expression cron (UTC)',+ format: 'Format cron : minute, heure, jour, mois, jour de la semaine (UTC)',+ examples: 'Exemples :',+ exampleEverySunday: '- {{expression}} : tous les dimanches à 4 h 00 UTC',+ exampleEverySixHours: '- {{expression}} : toutes les 6 heures',+ nextRun: 'Prochaine exécution : {{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: 'Expression cron non valide',+ },+ notifications: 'Notifications',+ noNotifications: 'Aucune',+ },+ runs: {+ title: 'Vérifications de restauration',+ description:+ "Chaque ligne correspond à une tentative de restauration d'une sauvegarde de cette base de données dans une copie temporaire",+ noAgentsWarning:+ 'Aucun agent de vérification enregistré : ajoutez-en un dans les paramètres de Databasus, section « Agents de vérification ». <docsLink>En savoir plus</docsLink>',+ empty: 'Aucune vérification de restauration pour le moment',+ allLoaded: 'Toutes les vérifications sont chargées ({{total}} au total)',+ attempt: 'tentative {{attempt}}',+ restoreDuration: 'restauration : {{duration}}',+ durationTooltip: "Durée de restauration + vérification communiquée par l'agent.",+ fields: {+ createdAt: 'Créée le',+ trigger: 'Déclenchement',+ duration: 'Durée',+ actions: 'Actions',+ },+ actions: {+ cancel: 'Annuler la vérification',+ viewDetails: 'Voir les détails',+ },+ details: {+ title: 'Détails de la vérification de restauration',+ loadFailed: 'Impossible de charger les détails de la vérification.',+ cancellationReason: "Motif de l'annulation",+ failure: 'Échec',+ sections: {+ status: 'Statut',+ timeline: 'Chronologie',+ results: 'Résultats et diagnostic',+ },+ fields: {+ attempt: 'Tentative',+ startedAt: 'Début',+ finishedAt: 'Fin',+ restoreDuration: 'Durée de restauration',+ verifyDuration: 'Durée de vérification',+ restoredDbSize: 'Taille de la base restaurée',+ schemas: 'Schémas',+ tables: 'Tables',+ pgRestoreExitCode: 'Code de sortie de pg_restore',+ },+ tableStats: {+ title: 'Nombre de lignes par table',+ empty: 'Aucune statistique par table.',+ schema: 'Schéma',+ table: 'Table',+ rows: 'Lignes',+ },+ },+ },+ agents: {+ title: 'Agents de vérification',+ description:+ "Les agents exécutent les vérifications de restauration pour confirmer qu'une sauvegarde est restaurable (<docsLink>en savoir plus</docsLink>)",+ empty: 'Aucun agent enregistré pour le moment.',+ columns: {+ capacity: 'Ressources',+ created: 'Créé le',+ },+ capacity: {+ cpu: '{{count}} CPU',+ ram: '{{count}} GB de RAM',+ disk: '{{count}} GB de disque',+ jobs: 'tâches : {{count}}',+ notReported: 'pas encore communiquées',+ },+ actions: {+ viewInstallCommands: "Voir les commandes d'installation",+ rotateToken: 'Renouveler le jeton',+ },+ deleteConfirmation: 'Supprimer cet agent ?',+ deleted: 'Agent « {{name}} » supprimé',+ copyFailed: 'Échec de la copie',+ agentId: "ID de l'agent :",+ create: {+ title: 'Créer un agent de vérification',+ tokenNotice: "Un jeton sera généré et affiché une seule fois sur l'écran suivant.",+ namePlaceholder: "Nom de l'agent",+ nameRequired: 'Le nom est obligatoire',+ },+ rotate: {+ title: 'Renouveler le jeton',+ description:+ "Renouveler le jeton de <agentName/> invalide immédiatement le jeton actuel. Un agent qui utilise encore l'ancien jeton sera refusé à son prochain heartbeat.",+ },+ token: {+ title: "Jeton de l'agent",+ tokenFor: 'Jeton pour <agentName/> :',+ shownOnce:+ 'Affiché une seule fois. Conservez-le en lieu sûr : vous ne pourrez plus le récupérer.',+ confirmSaved: "J'ai enregistré le jeton",+ },+ install: {+ title: "Commandes d'installation",+ description:+ "Commandes d'installation pour <agentName/>. Remplacez <tokenPlaceholder/> par le jeton que vous avez enregistré à la création de l'agent ou lors du dernier renouvellement du jeton.",+ architecture: 'Architecture',+ stepInstall: 'Étape 1 : installation',+ stepLaunch: 'Étape 2 : lancement',+ capacityDefaults:+ "Les valeurs de ressources ci-dessous sont des valeurs de départ : ajustez <code>--max-cpu</code>, <code>--max-ram-mb</code>, <code>--max-disk-gb</code> et <code>--max-concurrent-jobs</code> à la machine qui exécute l'agent.",+ afterInstallation: "Après l'installation",+ runsInBackground: "Après <code>start</code>, l'agent tourne en arrière-plan",+ checkStatus: 'Vérifier le statut : <code>./verification-agent status</code>',+ viewLogs:+ 'Voir les logs : <code>databasus-verification.log</code> dans le répertoire de travail',+ stop: "Arrêter l'agent : <code>./verification-agent stop</code>",+ },+ },+ },+ notifiers: {+ types: {+ email: 'E-mail',+ telegram: 'Telegram',+ webhook: 'Webhook',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: 'Toutes',+ backupSuccess: 'Sauvegarde réussie',+ backupFailed: 'Sauvegarde échouée',+ healthcheckSuccess: 'Vérification de disponibilité réussie',+ healthcheckFailed: 'Vérification de disponibilité échouée',+ verificationSuccess: 'Vérification de restauration réussie',+ verificationFailed: 'Vérification de restauration échouée',+ },+ mattermostDeliveryModes: {+ webhook: 'Webhook entrant',+ bot: 'Compte bot',+ },+ list: {+ addNotifier: 'Ajouter un canal de notification',+ searchPlaceholder: 'Rechercher un canal de notification',+ noSearchResults: 'Aucun canal de notification ne correspond à « {{query}} »',+ description:+ "Un canal de notification est l'endroit où les notifications sont envoyées (e-mail, Slack, Telegram, etc.)",+ backToList: '← Retour aux canaux de notification',+ },+ card: {+ notifyTo: {+ email: 'Notifications par e-mail',+ telegram: 'Notifications sur Telegram',+ webhook: 'Notifications par webhook',+ slack: 'Notifications sur Slack',+ discord: 'Notifications sur Discord',+ teams: 'Notifications sur Teams',+ mattermost: 'Notifications sur Mattermost',+ },+ hasSendError: "Erreur d'envoi",+ },+ create: {+ title: 'Ajouter un canal de notification',+ namePlaceholder: 'Mes alertes',+ },+ config: {+ namePlaceholder: 'Saisissez un nom...',+ settingsTitle: 'Paramètres du canal de notification',+ sendError: {+ title: "Erreur d'envoi",+ errorLabel: 'Erreur :',+ clearHint: 'Pour effacer cette erreur (au choix) :',+ clearBySendingTest:+ '- envoyez une notification de test avec le bouton ci-dessous (même si vous avez déjà modifié les paramètres) ;',+ clearByNextNotification: '- attendez que la prochaine notification parte sans erreur ;',+ },+ removeConfirmation:+ 'Voulez-vous vraiment supprimer ce canal de notification ? Cette action est irréversible.',+ removeBlockedByDatabases:+ "Ce canal de notification est utilisé par des bases de données. Retirez-le d'abord de ces bases de données.",+ },+ testNotification: {+ send: 'Envoyer une notification de test',+ sent: {+ title: 'Notification de test envoyée !',+ description: 'La notification de test est bien partie',+ },+ },+ transfer: {+ title: 'Transférer le canal de notification vers un autre espace de travail',+ blockedByDatabases:+ "Ce canal de notification est utilisé par des bases de données. Transférez ou supprimez d'abord ces bases de données.",+ description:+ "Choisissez l'espace de travail vers lequel transférer ce canal de notification.",+ targetWorkspace: 'Espace de travail cible',+ selectWorkspace: 'Choisissez un espace de travail',+ submit: 'Transférer',+ },+ fields: {+ botToken: 'Jeton du bot',+ targetChatId: 'ID du chat',+ webhookUrl: 'URL du webhook',+ channelId: 'ID du canal',+ skipTlsVerify: 'Ignorer la vérification TLS',+ skipTls: 'Sans vérification TLS',+ },+ email: {+ targetEmail: 'E-mail du destinataire',+ targetEmailTooltip: "L'adresse e-mail à laquelle vous voulez recevoir les messages",+ smtpHost: 'Hôte SMTP',+ smtpPort: 'Port SMTP',+ smtpUser: 'Utilisateur SMTP',+ smtpPassword: 'Mot de passe SMTP',+ smtpPasswordPlaceholder: 'mot de passe',+ from: 'Expéditeur',+ fromTooltip:+ "Facultatif. Adresse e-mail de l'expéditeur. Si le champ est vide, l'utilisateur SMTP est utilisé, ou une adresse est générée à partir de l'hôte",+ fromAuto: '(automatique)',+ advancedSettings: 'Paramètres avancés',+ skipTlsTooltip:+ 'Ne pas vérifier le certificat TLS. Activez cette option si votre serveur SMTP utilise un certificat auto-signé. Attention : cela réduit la sécurité.',+ },+ telegram: {+ botTokenHelpLink: "Comment obtenir le jeton d'API d'un bot Telegram ?",+ targetChatIdTooltip:+ 'Le chat où vous voulez recevoir les messages (votre chat privé ou un groupe)',+ chatIdHelp: {+ toggle: "Comment obtenir l'ID d'un chat Telegram ?",+ privateChat:+ "Pour obtenir l'ID de votre chat, écrivez à <botLink>@getmyid_bot</botLink> dans Telegram. <underline>Assurez-vous d'avoir démarré une conversation avec le bot</underline>",+ group:+ "Pour obtenir l'ID d'un groupe, ajoutez votre bot et <botLink>@getmyid_bot</botLink> au groupe, puis écrivez /start (l'ID du chat s'affichera)",+ },+ useProxy: 'Utiliser un proxy',+ useProxyTooltip: "Passer par un proxy pour les requêtes vers l'API Telegram",+ proxy: 'Proxy',+ proxyUrl: 'URL du proxy',+ proxyUrlTooltip:+ "Prend en charge http, https, socks5 et socks5h. Peut inclure un nom d'utilisateur et un mot de passe",+ sendToGroupTopic: 'Envoyer dans un sujet du groupe',+ sendToGroupTopicTooltip:+ "Activez cette option pour envoyer les messages dans un sujet précis d'un groupe",+ threadId: 'ID du sujet',+ threadIdTooltip: "L'ID du sujet où envoyer les messages",+ topicId: 'ID du sujet',+ threadIdHelp: {+ steps:+ "Pour obtenir l'ID du sujet, ouvrez-le dans votre groupe Telegram, puis appuyez sur son nom en haut de l'écran pour afficher ses informations. Copiez le lien du sujet et prenez le dernier nombre de l'URL.",+ example:+ "<bold>Exemple :</bold> si le lien du sujet est <code>https://t.me/c/2831948048/3</code>, l'ID du sujet est <code>3</code>",+ note: '<bold>Remarque :</bold> les sujets ne fonctionnent que dans les groupes, pas dans les chats privés.',+ },+ },+ webhook: {+ method: 'Méthode',+ sendOn: 'Envoyer pour',+ sendOnPlaceholder: 'Choisissez les types de notification',+ customHeaders: 'En-têtes personnalisés',+ customHeadersTooltip:+ 'Ajoute des en-têtes HTTP personnalisés à la requête du webhook (par ex. Authorization, X-API-Key)',+ savedHeadersHidden: '*Les en-têtes enregistrés sont masqués pour des raisons de sécurité',+ headers: 'En-têtes',+ headerNamePlaceholder: "Nom de l'en-tête",+ headerValuePlaceholder: "Valeur de l'en-tête",+ addHeader: 'Ajouter un en-tête',+ hiddenHeaderValue: '(masqué)',+ bodyTemplate: {+ title: 'Modèle du corps de la requête',+ headingVariable: '<variable/> : titre de la notification',+ messageVariable: '<variable/> : texte de la notification',+ invalidJsonFormat: 'Format JSON non valide',+ invalidJson: 'JSON non valide',+ },+ exampleRequest: {+ title: 'Exemple de requête',+ headers: 'En-têtes :',+ },+ },+ slack: {+ howToConnect: "Comment connecter Slack (obtenir le jeton du bot et l'ID du chat) ?",+ testFailedHint:+ "Vérifiez que le canal est public, ou que le bot a été ajouté au canal privé (via @invite) ou au groupe. Pour les messages directs, utilisez l'ID utilisateur indiqué dans le profil Slack.",+ },+ discord: {+ channelWebhookUrl: 'URL du webhook du salon',+ howTo: {+ title: "Comment obtenir l'URL du webhook Discord :",+ createChannel: '1. Créez ou choisissez un salon Discord',+ openChannelSettings: '2. Ouvrez les paramètres du salon (icône en forme de roue dentée)',+ openIntegrations: '3. Allez dans Intégrations',+ createWebhook: '4. Créez un nouveau webhook',+ copyWebhookUrl: "5. Copiez l'URL du webhook",+ privacyNote: 'Remarque : rendez le salon privé si nécessaire',+ },+ },+ teams: {+ howToConnect: 'Comment connecter Microsoft Teams ?',+ powerAutomateUrl: 'URL Power Automate',+ powerAutomateUrlLabel: 'URL Power Automate :',+ powerAutomateUrlTooltip:+ 'URL HTTP de votre flux Power Automate (déclencheur When an HTTP request is received)',+ showFullUrl: 'Afficher',+ hideFullUrl: 'Masquer',+ },+ mattermost: {+ howToConnect: 'Comment connecter Mattermost ?',+ connectVia: 'Connexion via',+ incomingWebhookUrl: 'URL du webhook entrant',+ serverUrl: 'URL du serveur',+ channelIdTooltip:+ 'ID du canal (26 caractères), pas son nom. Ouvrez le canal, cliquez sur son nom et choisissez View Info.',+ channel: 'Canal',+ showOptionalSettings: 'Afficher les paramètres facultatifs',+ hideOptionalSettings: 'Masquer les paramètres facultatifs',+ channelOverride: 'Canal de remplacement',+ channelOverrideTooltip:+ "Publier dans ce canal plutôt que dans celui pour lequel le webhook a été créé. Mattermost l'ignore si le webhook est verrouillé sur un canal.",+ postAsUsername: "Nom de l'expéditeur",+ postAsUsernameTooltip:+ "Nécessite l'option Enable integrations to override usernames dans la console système de Mattermost, sinon ce champ est ignoré.",+ postAsIconUrl: "URL de l'icône de l'expéditeur",+ postAsIconUrlTooltip:+ "Nécessite l'option Enable integrations to override profile picture icons dans la console système de Mattermost, sinon ce champ est ignoré.",+ skipTlsTooltip:+ 'Ne pas vérifier le certificat TLS. Activez cette option si votre serveur Mattermost utilise un certificat auto-signé. Attention : cela réduit la sécurité.',+ webhookHowTo: {+ title: "Comment obtenir l'URL d'un webhook entrant :",+ openIncomingWebhooks: '1. Menu principal → Integrations → Incoming Webhooks',+ addWebhook: '2. Cliquez sur Add Incoming Webhook et choisissez le canal',+ copyUrl: "3. Copiez l'URL générée",+ },+ botHowTo: {+ title: "Comment obtenir le jeton d'un bot :",+ addBotAccount: '1. Integrations → Bot Accounts → Add Bot Account',+ copyToken: '2. Copiez le jeton, affiché une seule fois après la création',+ addBotToChannel: "3. Ajoutez le bot à l'équipe et au canal",+ },+ },+ },+ backups: {+ encryption: {+ none: 'Aucun',+ encrypted: 'Activé',+ },+ encryptionOptions: {+ none: 'Sans chiffrement',+ encrypted: 'Chiffrer les fichiers de sauvegarde',+ },+ list: {+ title: 'Sauvegardes',+ scheduledBackupsDisabled:+ 'Les sauvegardes planifiées sont désactivées (vous pouvez les réactiver dans la configuration des sauvegardes)',+ empty: 'Aucune sauvegarde pour le moment',+ allLoaded: 'Toutes les sauvegardes sont chargées ({{count}} au total)',+ clickToSeeErrorDetails: "Cliquez pour voir le détail de l'erreur",+ errorDetailsTitle: "Détail de l'erreur de sauvegarde",+ restoreTitle: 'Restauration depuis une sauvegarde',+ columns: {+ createdAt: 'Créée le',+ created: 'Créée le',+ size: 'Taille',+ duration: 'Durée',+ actions: 'Actions',+ },+ actions: {+ cancelBackup: 'Annuler la sauvegarde',+ deleteBackup: 'Supprimer la sauvegarde',+ },+ },+ filters: {+ allTypes: 'Tous les types',+ allStatuses: 'Tous les statuts',+ before: 'Avant le',+ },+ config: {+ backupsEnabled: 'Sauvegardes activées',+ storage: 'Stockage',+ selectStorage: 'Choisissez un stockage',+ createNewStorage: 'Créer un stockage',+ addStorageTitle: 'Ajouter un stockage',+ storageDescription:+ "Un stockage est l'endroit où les sauvegardes sont conservées (disque local, S3, Google Drive, etc.)",+ storageChangeWarning:+ 'Si vous changez de stockage, toutes les sauvegardes de ce stockage seront supprimées.',+ storageChangeAcknowledge: "J'ai compris",+ encryption: 'Chiffrement',+ notifications: 'Notifications',+ noNotifications: 'Aucune',+ schedule: {+ weekday: 'Jour de la semaine',+ dayOfMonth: 'Jour du mois',+ cronExpression: 'Expression cron (UTC)',+ timeOfDay: 'Heure',+ nextRun: 'Prochaine exécution : {{time}}',+ invalidCron: 'Expression cron non valide',+ cronHelp: {+ format: 'Format cron : minute, heure, jour, mois, jour de la semaine (UTC)',+ examples: 'Exemples :',+ dailyAt2am: 'Tous les jours à 2 h 00 UTC',+ every6Hours: 'Toutes les 6 heures',+ mondaysAt3am: 'Tous les lundis à 3 h 00 UTC',+ twiceAMonth: 'Le 1er et le 15 du mois à 4 h 30 UTC',+ },+ },+ gfs: {+ hourly: 'Horaires : {{count}}',+ daily: 'Quotidiennes : {{count}}',+ weekly: 'Hebdomadaires : {{count}}',+ monthly: 'Mensuelles : {{count}}',+ yearly: 'Annuelles : {{count}}',+ notConfigured: 'Non configuré',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS (conserver les N dernières sauvegardes horaires, quotidiennes, hebdomadaires, mensuelles et annuelles)',+ timePeriod: 'Période (N derniers jours)',+ count: 'Nombre (N dernières sauvegardes)',+ },+ notificationTypes: {+ backupSuccess: 'Sauvegarde réussie',+ backupFailed: 'Sauvegarde échouée',+ },+ list: {+ backupNow: 'Sauvegarder maintenant',+ makeBackupNow: 'Lancer une sauvegarde maintenant',+ encrypted: 'Chiffrée',+ sizeTooltip:+ "En haut : la taille du fichier de sauvegarde compressé réellement conservé dans le stockage (local, S3, Google Drive, etc.). En bas (en gris) : la taille d'origine de la base de données non compressée au moment de la sauvegarde. Une sauvegarde est en général environ 5 fois plus petite que la base.",+ databaseSize: '{{size}} (taille de la base)',+ deleteConfirmation: 'Voulez-vous vraiment supprimer cette sauvegarde ?',+ actions: {+ restore: 'Restaurer depuis la sauvegarde',+ verifyRestore:+ 'Vérifier la restauration : un agent restaurera cette sauvegarde dans une base de données temporaire et indiquera le nombre de lignes',+ download: {+ postgresql:+ 'Télécharger le fichier de sauvegarde. Il peut être restauré manuellement avec pg_restore (format custom)',+ mysql:+ 'Télécharger le fichier de sauvegarde. Il peut être restauré manuellement avec le client mysql (dump SQL)',+ mariadb:+ 'Télécharger le fichier de sauvegarde. Il peut être restauré manuellement avec le client mariadb (dump SQL)',+ mongodb:+ 'Télécharger le fichier de sauvegarde. Il peut être restauré manuellement avec mongorestore (archive)',+ other: 'Télécharger le fichier de sauvegarde',+ },+ },+ verifyRestore: {+ title: 'Vérifier la restauration ?',+ description:+ 'Un agent restaurera cette sauvegarde dans une base de données temporaire et indiquera le nombre de lignes. Selon la taille de la sauvegarde, cela peut prendre un moment. <docsLink>Comment ça marche ?</docsLink>',+ queue: "Mettre en file d'attente",+ queued: "Vérification de restauration mise en file d'attente",+ },+ },+ config: {+ interval: 'Intervalle de sauvegarde',+ weekday: 'Jour de la semaine',+ dayOfMonth: 'Jour du mois',+ timeOfDay: 'Heure de la sauvegarde',+ encryptionTooltip:+ 'Si la sauvegarde est chiffrée, les fichiers de sauvegarde dans votre stockage (S3, local, etc.) ne sont pas utilisables directement. Vous pouvez restaurer les sauvegardes via Databasus ou les télécharger déchiffrées avec le bouton « Télécharger ».',+ retentionPolicy: 'Politique de rétention',+ retention: {+ timePeriodTooltip:+ 'Durée de conservation des sauvegardes. Les sauvegardes plus anciennes sont supprimées automatiquement.',+ count: 'Sauvegardes les plus récentes',+ countTooltip:+ 'Ne conserve que le nombre indiqué de sauvegardes, les plus récentes. Les plus anciennes sont supprimées automatiquement.',+ countValue: 'Sauvegardes les plus récentes : {{count}}',+ showGfsHint: "Qu'est-ce que GFS (Grandfather-Father-Son) ?",+ hideGfsHint: 'Masquer',+ gfsHint:+ "Rotation GFS (Grandfather-Father-Son) : conserve les N dernières sauvegardes horaires, quotidiennes, hebdomadaires, mensuelles et annuelles. Vous gardez ainsi des sauvegardes sur de longues périodes sans occuper trop d'espace de stockage.",+ gfsTooltip:+ 'Rotation Grandfather-Father-Son : conserve les N dernières sauvegardes horaires, quotidiennes, hebdomadaires, mensuelles et annuelles.',+ gfsFields: {+ hourly: 'Sauvegardes horaires',+ daily: 'Sauvegardes quotidiennes',+ weekly: 'Sauvegardes hebdomadaires',+ monthly: 'Sauvegardes mensuelles',+ yearly: 'Sauvegardes annuelles',+ },+ },+ advancedSettings: 'Paramètres avancés',+ retryIfFailed: "Relancer la sauvegarde en cas d'échec",+ retryIfFailedShort: "Relance en cas d'échec",+ retryIfFailedTooltip:+ "Relancer automatiquement les sauvegardes échouées. Une sauvegarde peut échouer à cause d'une panne réseau, d'un problème de stockage ou d'une indisponibilité temporaire de la base de données.",+ maxFailedTries: 'Nombre maximal de tentatives',+ maxFailedTriesTooltip:+ 'Nombre maximal de nouvelles tentatives après un échec. Vous recevrez une notification quand toutes les tentatives auront échoué.',+ },+ },+ physical: {+ types: {+ full: 'Complète',+ incremental: 'Incrémentale',+ wal: 'WAL',+ },+ retentions: {+ chains: 'Chaînes',+ fullBackups: 'Sauvegardes complètes',+ chainsAndFullBackups: 'Chaînes et sauvegardes complètes',+ },+ fullBackupsPolicies: {+ lastN: 'Nombre',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: 'Sauvegarde réussie',+ backupFailed: 'Sauvegarde échouée',+ chainBroken: 'Chaîne rompue',+ walGap: 'Trou dans les WAL',+ },+ list: {+ totalUsage: 'Espace utilisé : {{size}}',+ backUpNow: 'Sauvegarder maintenant',+ fullBackup: 'Sauvegarde complète',+ incrementalBackup: 'Sauvegarde incrémentale',+ restore: 'Restaurer',+ restoreFromThisBackup: 'Restaurer depuis cette sauvegarde',+ pointInTimeRestoreTitle: 'Restauration à un instant donné',+ deleteFullConfirmation:+ 'Si vous supprimez cette sauvegarde complète, toute sa chaîne disparaît avec elle (toutes les sauvegardes incrémentales qui en dépendent). Cette action est irréversible. Continuer ?',+ deleteIncrementalConfirmation:+ 'Si vous supprimez cette sauvegarde incrémentale, toutes les incrémentales suivantes qui en dépendent disparaissent avec elle. Cette action est irréversible. Continuer ?',+ },+ config: {+ fullBackupCadence: 'Fréquence des sauvegardes complètes',+ incrementalBackupCadence: 'Fréquence des sauvegardes incrémentales',+ incrementalMoreFrequent:+ 'Les sauvegardes incrémentales doivent être plus fréquentes que les sauvegardes complètes.',+ encryptionTooltip:+ 'Si les sauvegardes sont chiffrées, les fichiers dans votre stockage ne sont pas utilisables directement. Vous pouvez les restaurer via Databasus ou les télécharger déchiffrés.',+ retention: 'Rétention',+ fullBackupsOnlyRetention:+ "Cette base de données n'a que des sauvegardes complètes : la rétention s'applique donc à elles.",+ retentionOptions: {+ chains: 'Conserver les N dernières chaînes',+ chainsAndFullBackups: 'Conserver les N dernières chaînes et des sauvegardes complètes',+ },+ retentionHelp: {+ chain:+ "Une chaîne, c'est une sauvegarde complète plus les incrémentales (et les WAL reçus en streaming) qui en dépendent. Une restauration a besoin de la sauvegarde complète et de chaque incrémentale de sa chaîne.",+ chains:+ "Ne conserve que les N dernières chaînes. Quand une chaîne sort de la fenêtre, sa sauvegarde complète et toutes ses incrémentales sont supprimées : vous ne pouvez restaurer qu'à l'intérieur des chaînes conservées.",+ chainsAndFullBackups:+ "Conserve les N dernières chaînes pour restaurer à un instant récent, et garde en plus d'anciennes sauvegardes complètes autonomes selon la politique ci-dessous (GFS ou N dernières) : elles restent des points de restauration à long terme une fois leurs incrémentales supprimées.",+ },+ chainsCount: 'Chaînes',+ chainsCountTooltip:+ 'Nombre de chaînes de sauvegarde les plus récentes à conserver. Une chaîne est une sauvegarde complète plus ses incrémentales.',+ fullBackups: 'Sauvegardes complètes',+ fullBackupsCount: 'Sauvegardes complètes les plus récentes',+ gfsFields: {+ hourly: 'Horaires',+ daily: 'Quotidiennes',+ weekly: 'Hebdomadaires',+ monthly: 'Mensuelles',+ yearly: 'Annuelles',+ },+ chainsKept: 'Chaînes conservées',+ fullBackupsKept: 'Sauvegardes complètes conservées',+ fullBackupsCountValue: 'Les plus récentes : {{count}}',+ gfsTooltip:+ 'Rotation Grandfather-Father-Son : conserve les N dernières sauvegardes complètes horaires, quotidiennes, hebdomadaires, mensuelles et annuelles.',+ },+ restore: {+ errorHints: {+ downloadInProgress:+ "Un téléchargement pour restauration est déjà en cours pour cette base de données. Attendez qu'il se termine, puis réessayez.",+ targetTimeUnreachable:+ "Impossible d'atteindre l'instant demandé : il y a un trou dans les WAL ou l'instant est hors de la plage disponible. Choisissez un autre instant ou restaurez le dernier point disponible.",+ },+ backupIntro:+ "Commande de restauration de cette sauvegarde. Une sauvegarde complète n'a besoin que de son propre fichier ; une incrémentale a aussi besoin de sa sauvegarde complète et de toutes les incrémentales qui la précèdent.",+ pointInTimeIntro:+ "Restauration à un instant donné. Choisissez l'instant cible, ou laissez le champ vide pour restaurer le dernier point disponible.",+ targetTime: 'Instant cible',+ latestAvailable: 'Dernier point disponible',+ preparing: 'Préparation de la commande de restauration...',+ linkExpiry:+ 'Le lien de téléchargement est à usage unique et expire au bout de 15 minutes. Si une commande échoue avec une erreur 401, rouvrez cette fenêtre pour générer un nouveau lien.',+ copied: 'Copié',+ methods: {+ script: 'Par script',+ manual: 'Manuelle',+ },+ environments: {+ host: "PostgreSQL sur l'hôte",+ },+ fields: {+ restoreDirectory: 'Répertoire de restauration',+ pgBinPath: 'Chemin des binaires PostgreSQL',+ pgBinPathPlaceholder: '{{path}} (facultatif)',+ pgImage: 'Image PostgreSQL',+ },+ scriptTitles: {+ host: "À exécuter sur l'hôte de restauration",+ docker: 'À exécuter là où Docker est disponible',+ },+ manualSteps: {+ download: "Téléchargez l'archive",+ extract: 'Extrayez-la',+ verify: 'Vérifiez le transfert',+ reconstruct: 'Reconstruisez le répertoire de données',+ checkConfig: 'Vérifiez les fichiers de configuration du cluster',+ wireUpRecovery: 'Décompressez les WAL et configurez la récupération',+ recoveryParameters: "Si la récupération s'arrête à cause de paramètres",+ },+ beforeYouRun: {+ title: 'Avant de lancer',+ host: {+ clientTools:+ "Installez les outils clients PostgreSQL {{version}}. S'ils ne sont pas dans le PATH, indiquez le chemin des binaires ci-dessus.",+ zstd: 'zstd est nécessaire pour décompresser la sauvegarde.',+ zstdWithWal: 'zstd est nécessaire pour décompresser la sauvegarde et ses WAL.',+ emptyDirectory:+ "Le répertoire de restauration doit être vide et ne pas appartenir à un cluster en cours d'utilisation.",+ },+ docker: {+ image:+ 'Utilisez une image postgres:{{version}} : la version majeure doit correspondre à celle de la source.',+ hostTools:+ "L'hôte a besoin de zstd, tar et curl : le téléchargement et la décompression de la sauvegarde de base se font sur l'hôte, et seul pg_combinebackup tourne dans le conteneur. L'image postgres n'a donc besoin d'aucun outil supplémentaire.",+ hostToolsWithWal:+ "L'hôte a besoin de zstd, tar et curl : le téléchargement et la décompression de la sauvegarde de base et des WAL se font sur l'hôte, et seul pg_combinebackup tourne dans le conteneur. L'image postgres n'a donc besoin d'aucun outil supplémentaire.",+ },+ },+ afterItFinishes: {+ title: 'Une fois terminé',+ host: {+ clusterLocation: 'Le cluster se trouve dans <dataDir/>.',+ changeOwner: 'En tant que root, changez son propriétaire : <command/>.',+ start:+ 'Démarrez-le en tant que postgres : <command/>, ou faites pointer data_directory vers lui.',+ walReplay:+ 'PostgreSQL rejoue les WAL puis passe en mode primaire : surveillez le log pour voir la fin de la récupération.',+ },+ docker: {+ clusterLocation: "<dataDir/> sur l'hôte contient le cluster restauré.",+ volumeMount:+ "PostgreSQL {{version}} garde son répertoire de données dans <dataDir/>, sous le volume <volumeDir/>. Montez le répertoire de sortie comme racine de ce volume, comme l'attend un docker-compose avec <code>./pgdata:/var/lib/postgresql</code> :",+ dataDirectoryMount:+ "Montez le cluster (bind mount) sur le répertoire de données de l'image <dataDir/> :",+ ownership:+ "Le propriétaire doit correspondre à l'uid de postgres dans l'image (999 dans l'image officielle).",+ },+ missingConfigFiles:+ "Une sauvegarde de base ne copie que le répertoire de données. Si votre PostgreSQL source garde sa configuration en dehors (disposition Debian/Ubuntu, <configDir/>), alors <code>postgresql.conf</code>, <code>pg_hba.conf</code> et <code>pg_ident.conf</code> ne sont pas dans la sauvegarde et le serveur ne démarrera pas. Demandez leurs chemins réels à la source avec <code>psql -Atc \"SHOW config_file\"</code>, copiez les trois fichiers, puis commentez <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>, <code>external_pid_file</code> et les lignes <code>ssl</code> / <code>ssl_*</code>, créez <code>conf.d</code> et, pour un conteneur, définissez <code>listen_addresses = '*'</code>. Si ces fichiers sont présents et que vous obtenez toujours la même erreur, c'est le répertoire monté qui est en cause, pas la configuration.",+ },+ },+ },+ },+ storages: {+ types: {+ local: 'Stockage local',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: 'Par défaut (Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: 'Clé du compte',+ connectionString: 'Chaîne de connexion',+ },+ sftpAuthMethods: {+ password: 'Mot de passe',+ privateKey: 'Clé privée',+ },+ list: {+ addStorage: 'Ajouter un stockage',+ description:+ "Un stockage est l'endroit où les sauvegardes sont conservées (disque local, S3, etc.)",+ backToList: '← Retour aux stockages',+ },+ card: {+ type: {+ local: 'Type : stockage local',+ s3: 'Type : S3',+ googleDrive: 'Type : Google Drive',+ nas: 'Type : NAS',+ azureBlob: 'Type : Azure Blob Storage',+ ftp: 'Type : FTP',+ sftp: 'Type : SFTP',+ rclone: 'Type : Rclone',+ },+ hasSaveError: "Erreur d'enregistrement",+ },+ config: {+ namePlaceholder: 'Saisissez un nom...',+ settingsTitle: 'Paramètres du stockage',+ lastSaveError: {+ title: "Erreur d'enregistrement",+ errorLabel: 'Erreur :',+ clearHint: 'Pour effacer cette erreur (au choix) :',+ clearByTestingConnection:+ '- testez la connexion avec le bouton ci-dessous (même si vous avez déjà modifié les paramètres) ;',+ clearByNextSave: '- attendez que la prochaine sauvegarde soit enregistrée sans erreur ;',+ },+ removeConfirmation:+ 'Voulez-vous vraiment supprimer ce stockage ? Cette action est irréversible. Les sauvegardes qui se trouvent dans ce stockage seront aussi supprimées.',+ removeBlockedByDatabases:+ "Ce stockage est utilisé par des bases de données. Retirez-le d'abord de ces bases de données.",+ },+ actions: {+ testConnection: 'Tester la connexion',+ },+ connectionTestSucceeded: {+ title: 'Connexion réussie !',+ description: 'La connexion au stockage fonctionne',+ },+ transfer: {+ title: 'Transférer le stockage vers un autre espace de travail',+ blockedByDatabases:+ "Ce stockage est utilisé par des bases de données. Transférez ou supprimez d'abord ces bases de données.",+ description: "Choisissez l'espace de travail vers lequel transférer ce stockage.",+ targetWorkspace: 'Espace de travail cible',+ selectWorkspace: 'Choisissez un espace de travail',+ submit: 'Transférer',+ },+ fields: {+ path: 'Chemin',+ remotePath: 'Chemin distant',+ share: 'Partage',+ domain: 'Domaine',+ useSsl: 'Utiliser SSL',+ useSslTls: 'Utiliser SSL/TLS',+ skipTls: 'Sans vérification TLS',+ skipTlsVerify: 'Ignorer la vérification TLS',+ skipHostKey: "Sans vérification de la clé d'hôte",+ authMethod: "Méthode d'authentification",+ privateKey: 'Clé privée',+ credentials: 'Identifiants',+ s3Bucket: 'Bucket S3',+ region: 'Région',+ accessKey: "Clé d'accès",+ secretKey: 'Clé secrète',+ endpoint: 'Endpoint',+ folderPrefix: 'Préfixe de dossier',+ prefix: 'Préfixe',+ blobPrefix: 'Préfixe des blobs',+ virtualHost: 'Hôte virtuel',+ storageClass: 'Classe de stockage',+ connection: 'Chaîne de connexion',+ connectionString: 'Chaîne de connexion',+ accountName: 'Nom du compte',+ accountKey: 'Clé du compte',+ containerName: 'Nom du conteneur',+ clientId: 'ID client',+ clientSecret: 'Secret client',+ userToken: 'Jeton utilisateur',+ config: 'Configuration',+ },+ edit: {+ namePlaceholder: 'Mon stockage',+ advancedSettings: 'Paramètres avancés',+ optionalPlaceholder: '{{example}} (facultatif)',+ usernamePlaceholder: "nom d'utilisateur",+ passwordPlaceholder: 'mot de passe',+ remotePathTooltip: 'Chemin du répertoire distant où stocker les sauvegardes (facultatif)',+ local: {+ diskSpaceWarning:+ "Attention : avec un stockage local, vous risquez de manquer d'espace disque. Il est recommandé d'utiliser S3 ou un stockage sans limite de capacité",+ },+ s3: {+ cloudflareR2Guide: 'Comment utiliser Cloudflare R2 ?',+ endpointTooltip:+ "URL d'un endpoint compatible S3 personnalisé (facultatif, laissez vide pour AWS S3)",+ prefixTooltip:+ "Préfixe facultatif pour toutes les clés d'objet (par ex. 'backups/' ou 'my_team/'). Peut ne pas fonctionner avec certains stockages compatibles S3. Non modifiable après la création (sinon les sauvegardes seront perdues).",+ useVirtualHostedStyle: 'Utiliser le style virtual-hosted',+ virtualHostTooltip:+ "Utiliser des URL de type virtual-hosted (bucket.s3.region.amazonaws.com) au lieu du type path-style (s3.region.amazonaws.com/bucket). Peut être nécessaire en cas d'erreurs COS.",+ skipTls: 'Sans vérification TLS',+ skipTlsVerifyTooltip:+ 'Ne pas vérifier le certificat TLS. Activez cette option si votre stockage compatible S3 utilise un certificat auto-signé. Attention : cela réduit la sécurité.',+ storageClassTooltip:+ "Classe de stockage S3 des objets envoyés. Laissez la valeur par défaut pour Standard. Certains fournisseurs proposent des classes moins chères comme One Zone IA. N'utilisez pas Glacier/Deep Archive : les fichiers doivent être accessibles immédiatement pour les restaurations.",+ },+ googleDrive: {+ guideLink: 'Comment connecter Google Drive ?',+ authorize: 'Autoriser',+ },+ nas: {+ shareWithSlashWarning:+ 'Le partage doit être un nom de partage unique. Utilisez le champ « Chemin » pour les sous-répertoires (par ex. Partage : Databasus, Chemin : DB1)',+ useSslTooltip: 'Activer le chiffrement SSL/TLS pour sécuriser la connexion',+ domainTooltip:+ "Nom de domaine Windows (facultatif, laissez vide si vous n'utilisez pas l'authentification de domaine)",+ pathPlaceholder: '{{example}} (facultatif, sans barre oblique au début)',+ pathTooltip: 'Chemin du sous-répertoire dans le partage (facultatif)',+ },+ azureBlob: {+ connectionStringTooltip:+ 'Chaîne de connexion Azure Storage, disponible dans le portail Azure',+ endpointTooltip:+ "URL d'endpoint personnalisée (facultatif, laissez vide pour Azure standard)",+ prefixTooltip:+ "Préfixe facultatif pour tous les noms de blobs (par ex. 'backups/' ou 'my_team/')",+ },+ ftp: {+ enableFtps: 'Activer FTPS',+ useSslTooltip:+ 'Utiliser le chiffrement TLS explicite (FTPS) pour sécuriser le transfert de fichiers',+ skipCertificateVerification: 'Ignorer la vérification du certificat',+ skipTlsVerifyTooltip:+ 'Ne pas vérifier le certificat TLS. Activez cette option si votre serveur FTP utilise un certificat auto-signé. Attention : cela réduit la sécurité.',+ },+ sftp: {+ privateKeyTooltip:+ 'Collez votre clé privée SSH (format PEM). Les clés RSA, DSA, ECDSA et Ed25519 sont prises en charge.',+ skipHostKeyVerification: "Ignorer la vérification de la clé d'hôte",+ skipHostKeyTooltip:+ "Ne pas vérifier la clé d'hôte SSH. Activez cette option si vous faites confiance au serveur. Attention : cela réduit la sécurité.",+ },+ rclone: {+ configTooltip:+ "Collez ici le contenu de votre rclone.conf. Pour l'obtenir, exécutez 'rclone config file' et copiez le contenu du fichier. Cette configuration prend en charge plus de 70 fournisseurs de stockage cloud.",+ configHiddenNote:+ '*le contenu est masqué pour ne pas exposer de données sensibles. Pour mettre à jour la configuration existante, collez-en une nouvelle ici',+ docsLink: 'Documentation de Rclone',+ remotePathTooltip:+ "Préfixe de chemin facultatif sur le stockage distant, où les sauvegardes seront conservées (par ex. '/backups' ou 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/locales/pt.ts b/frontend/src/shared/i18n/locales/pt.tsnew file mode 100644index 00000000..5dca31db--- /dev/null+++ b/frontend/src/shared/i18n/locales/pt.ts@@ -0,0 +1,1818 @@+import type { en } from './en';++export const pt: typeof en = {+ language: {+ nativeName: 'Português',+ },+ common: {+ actions: {+ add: 'Adicionar',+ back: 'Voltar',+ cancel: 'Cancelar',+ close: 'Fechar',+ confirm: 'Confirmar',+ continue: 'Continuar',+ copy: 'Copiar',+ create: 'Criar',+ delete: 'Excluir',+ download: 'Baixar',+ edit: 'Editar',+ ok: 'OK',+ refresh: 'Atualizar',+ remove: 'Remover',+ retry: 'Tentar novamente',+ save: 'Salvar',+ },+ answers: {+ no: 'Não',+ yes: 'Sim',+ },+ fields: {+ host: 'Host',+ name: 'Nome',+ password: 'Senha',+ port: 'Porta',+ status: 'Status',+ type: 'Tipo',+ username: 'Nome de usuário',+ },+ states: {+ disabled: 'Desativado',+ enabled: 'Ativado',+ loading: 'Carregando...',+ },+ messages: {+ copiedToClipboard: 'Copiado para a área de transferência',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: ', ',+ confirmation: {+ title: 'Confirmação',+ },+ },+ app: {+ documentTitle: 'Databasus - backup de bancos de dados (PostgreSQL, MySQL, MongoDB)',+ languageControl: {+ title: 'Idioma: {{language}}',+ },+ theme: {+ title: 'Tema: {{theme}}',+ light: 'Claro',+ dark: 'Escuro',+ system: 'Sistema',+ },+ navigation: {+ databases: 'Bancos de dados',+ storages: 'Armazenamentos',+ notifiers: 'Canais de notificação',+ workspaceSettings: 'Configurações',+ profile: 'Perfil',+ databasusSettings: 'Configurações do Databasus',+ users: 'Usuários',+ docs: 'Documentação',+ documentation: 'Documentação',+ community: 'Comunidade',+ newVersionAvailable: 'Nova versão disponível',+ },+ diskUsage: {+ title: 'Uso do disco',+ hint: 'Para fazer backups localmente e restaurá-los, o disco precisa ter espaço suficiente. Para restaurar, é preciso ter livre o mesmo espaço que o backup ocupa.',+ compactSummary: '{{used}} de {{total}} GB<lineBreak/>em uso ({{percent}}%)',+ summary: '{{used}} de {{total}} GB em uso ({{percent}}%)',+ },+ workspaceSelection: {+ createShort: 'Criar',+ create: 'Criar espaço de trabalho',+ selected: 'Espaço de trabalho',+ placeholder: 'Selecione um espaço de trabalho',+ search: 'Buscar espaços de trabalho...',+ notFound: 'Nenhum espaço de trabalho encontrado',+ createNew: '+ Novo espaço de trabalho',+ },+ sponsorship: {+ link: 'Apoiar',+ hint: 'O Databasus salvou seus dados? Apoie o projeto para que ele continue gratuito, mantido e independente',+ },+ starButton: {+ label: 'Dar estrela no GitHub',+ ariaLabel: 'Dar estrela a databasus/databasus no GitHub',+ },+ clipboardPaste: {+ title: 'Colar da área de transferência',+ submit: 'Confirmar',+ description:+ 'Não foi possível acessar a área de transferência automaticamente. Cole o conteúdo no campo abaixo.',+ placeholder: 'Cole aqui a string de conexão...',+ },+ auth: {+ adminPasswordCheckFailed:+ 'Não foi possível verificar se a senha do administrador está definida: {{error}}',+ },+ oauthCallback: {+ failedTitle: 'Falha na autenticação',+ codeNotFound: 'Código de autorização não encontrado',+ stateMissing: 'Parâmetro state do OAuth ausente',+ invalidProvider: 'Provedor OAuth inválido',+ returnToSignIn: 'Voltar para o login',+ completing: 'Concluindo a autenticação...',+ },+ oauthStorage: {+ configNotFound: 'Configuração do armazenamento Google Drive não encontrada',+ exchangeFailed: 'Não foi possível trocar o código OAuth',+ unsupportedType: 'Este tipo de armazenamento não aceita OAuth',+ invalidState: 'O parâmetro state do OAuth é inválido',+ paramNotFound:+ 'Parâmetro OAuth não encontrado. Verifique se a URL de redirecionamento está configurada corretamente.',+ addStorageTitle: 'Adicionar armazenamento',+ storageDescription:+ 'Armazenamento é o lugar onde os backups ficam guardados (disco local, S3, etc.)',+ },+ },+ errors: {+ unknown: 'Algo deu errado. Tente novamente.',+ networkUnreachable:+ 'Não foi possível acessar o servidor do Databasus. Verifique sua conexão e tente novamente.',+ requestFailed:+ 'O servidor não conseguiu concluir a solicitação (HTTP {{status}}). Tente novamente mais tarde.',+ },+ status: {+ logicalBackup: {+ inProgress: 'Em andamento',+ completed: 'Bem-sucedido',+ failed: 'Falhou',+ deleted: 'Excluído',+ canceled: 'Cancelado',+ },+ physicalBackup: {+ inProgress: 'Em andamento',+ completed: 'Bem-sucedido',+ error: 'Erro',+ chainBroken: 'Cadeia quebrada',+ canceled: 'Cancelado',+ },+ restoreVerification: {+ verifiedSuccessful: 'Verificado',+ verificationFailed: 'Falha na verificação',+ },+ restore: {+ inProgress: 'Em andamento',+ completed: 'Bem-sucedida',+ failed: 'Falhou',+ canceled: 'Cancelada',+ },+ verification: {+ pending: 'Pendente',+ running: 'Em execução',+ completed: 'Bem-sucedida',+ failed: 'Falhou',+ canceled: 'Cancelada',+ },+ health: {+ available: 'Disponível',+ unavailable: 'Indisponível',+ },+ agent: {+ neverSeen: 'Nunca conectado',+ online: 'Online',+ stale: 'Sem sinal recente',+ offline: 'Offline',+ },+ },+ intervals: {+ types: {+ hourly: 'A cada hora',+ daily: 'Diário',+ weekly: 'Semanal',+ monthly: 'Mensal',+ cron: 'Cron',+ },+ weekdays: {+ mon: 'Seg',+ tue: 'Ter',+ wed: 'Qua',+ thu: 'Qui',+ fri: 'Sex',+ sat: 'Sáb',+ sun: 'Dom',+ },+ periods: {+ day: '1 dia',+ week: '1 semana',+ month: '1 mês',+ threeMonths: '3 meses',+ sixMonths: '6 meses',+ year: '1 ano',+ twoYears: '2 anos',+ threeYears: '3 anos',+ fourYears: '4 anos',+ fiveYears: '5 anos',+ forever: 'Para sempre',+ },+ },+ auditLogs: {+ title: 'Logs de auditoria',+ columns: {+ user: 'Usuário',+ message: 'Mensagem',+ workspace: 'Espaço de trabalho',+ created: 'Data',+ },+ systemUser: 'Sistema',+ loadedOfTotal: 'Carregados: {{loaded}} de {{total}}',+ empty: 'Nenhum log de auditoria encontrado.',+ loadingMore: 'Carregando mais logs...',+ allLoaded: 'Todos os logs foram carregados (total: {{count}})',+ },+ settings: {+ title: 'Configurações do Databasus',+ externalRegistrations: {+ title: 'Permitir registros externos',+ description:+ 'Quando ativado, novos usuários podem criar uma conta no Databasus por conta própria. Quando desativado, só é possível se registrar por convite',+ },+ memberInvitations: {+ title: 'Permitir convites de membros',+ description:+ 'Quando ativado, os membros podem convidar novos usuários para o Databasus. Quando desativado, só os administradores podem convidar.',+ },+ memberWorkspaceCreation: {+ title: 'Membros podem criar espaços de trabalho',+ description:+ 'Quando ativado, os membros (usuários que não são administradores) podem criar novos espaços de trabalho. Quando desativado, só os administradores podem criá-los.',+ },+ saving: 'Salvando...',+ saveChanges: 'Salvar alterações',+ reset: 'Redefinir',+ updated: 'Configurações salvas',+ readMore: 'Saiba mais sobre as configurações <docsLink>na documentação</docsLink>',+ healthcheck: {+ title: 'Verificação de disponibilidade',+ openInNewTab: 'Abrir em uma nova aba',+ copied: 'Endpoint de verificação de disponibilidade copiado',+ description: 'Use este endpoint para monitorar a disponibilidade do seu Databasus',+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: 'Desativado',+ require: 'Obrigatório',+ verifyCa: 'Verificação da CA',+ verifyFull: 'Verificação completa',+ },+ physicalBackupTypes: {+ full: 'Somente backups completos',+ fullIncremental: 'Completo + incremental',+ fullIncrementalWalStream: 'Completo + incremental + streaming de WAL',+ },+ list: {+ addDatabase: 'Adicionar banco de dados',+ searchPlaceholder: 'Buscar banco de dados',+ noSearchResults: 'Nenhum banco de dados encontrado para "{{query}}"',+ description: 'Banco de dados é a origem dos backups',+ backToList: '← Voltar para os bancos de dados',+ },+ card: {+ storage: 'Armazenamento: <storageName/>',+ lastBackup: 'Último backup {{relativeTime}}',+ hasBackupError: 'Com erro de backup',+ },+ tabs: {+ config: 'Configuração',+ backups: 'Backups',+ verifications: 'Verificações',+ },+ create: {+ title: 'Adicionar banco de dados para backup',+ namePlaceholder: 'Meu banco favorito',+ creating: 'Criando o banco de dados...',+ complete: 'Concluir',+ backupType: {+ title: 'Escolha o tipo de backup',+ logical: {+ title: 'Lógico',+ description:+ 'Recomendado para bancos de dados com menos de 50 GB. Mais simples de configurar.',+ },+ physical: {+ title: 'Físico',+ description:+ 'Para bancos de dados com mais de 50 GB. Permite a recuperação point-in-time e melhora o RPO/RTO, mas exige configuração adicional.',+ },+ },+ },+ config: {+ namePlaceholder: 'Digite o nome...',+ removing: 'Removendo o banco de dados...',+ lastBackupError: {+ title: 'Erro no último backup',+ errorLabel: 'Erro:',+ clearHint: 'Para limpar este erro, faça uma das opções:',+ clearByTestingConnection:+ '- teste a conexão pelo botão abaixo (mesmo que você já tenha alterado as configurações);',+ clearByNextBackup: '- aguarde o próximo backup terminar sem erros;',+ },+ sections: {+ database: 'Configurações do banco de dados',+ backupConfig: 'Configuração de backup',+ healthcheck: 'Verificação de disponibilidade',+ restoreVerification: 'Verificação de restauração',+ notifiers: 'Canais de notificação',+ },+ copyConfirmation:+ 'Copiar este banco de dados? Será criado um novo banco de dados com as mesmas configurações.',+ removeConfirmation: 'Remover este banco de dados? Esta ação não pode ser desfeita.',+ copied: {+ title: 'Banco de dados copiado!',+ description: 'O banco de dados "{{name}}" foi criado',+ },+ connectionTestSucceeded: {+ title: 'Conexão bem-sucedida!',+ description: 'A conexão com o banco de dados foi testada com sucesso',+ },+ },+ actions: {+ testConnection: 'Testar conexão',+ replace: 'Substituir',+ },+ fields: {+ databaseType: 'Tipo de banco de dados',+ version: 'Versão do {{engine}}',+ databaseName: 'Nome do BD',+ sslMode: 'Modo SSL',+ useHttps: 'Usar HTTPS',+ cpuCount: 'Número de CPUs',+ backupType: 'Tipo de backup',+ clientCertificate: 'Certificado do cliente',+ clientKey: 'Chave do cliente',+ serverCaCertificate: 'Certificado CA do servidor',+ includeSchemas: 'Incluir schemas',+ excludeTables: 'Ignorar tabelas',+ skipUserMappings: 'Pular mapeamentos de usuário',+ excludeExtensions: 'Ignorar extensões',+ restoreOwnership: 'Restaurar proprietários',+ restorePrivileges: 'Restaurar privilégios',+ excludeEvents: 'Ignorar eventos',+ galeraReplication: 'Replicação Galera',+ useSrvConnection: 'Usar conexão SRV',+ directConnection: 'Conexão direta',+ authDatabase: 'Banco de autenticação',+ excludeCollections: 'Ignorar coleções',+ },+ edit: {+ parseFromClipboard: 'Preencher da área de transferência',+ clipboardEmpty: 'A área de transferência está vazia',+ clipboardReadFailed:+ 'Não foi possível ler a área de transferência. Verifique as permissões do navegador.',+ connectionStringParsed: 'Campos preenchidos a partir da string de conexão',+ connectionStringParsedWithoutPassword:+ 'Campos preenchidos a partir da string de conexão. Digite a senha manualmente.',+ connectionTestPassed: {+ title: 'Conexão testada',+ description: 'Você já pode seguir para a próxima etapa',+ },+ ipWhitelistHint:+ 'Se o seu banco de dados aceita conexões só de IPs liberados, adicione à lista o IP do servidor do Databasus.',+ localhostHint:+ '<docsLink>Leia este guia</docsLink> para saber como fazer backup de um banco de dados local',+ advancedSettings: 'Configurações avançadas',+ placeholders: {+ host: 'Digite o host do {{engine}}',+ port: 'Digite a porta do {{engine}}',+ username: 'Digite o usuário do {{engine}}',+ password: 'Digite a senha do {{engine}}',+ databaseName: 'Digite o nome do banco de dados {{engine}}',+ },+ cpuCountTooltip:+ 'Quantos núcleos de CPU usar no backup e na restauração. Valores maiores podem acelerar essas operações, mas consomem mais recursos.',+ excludeTablesPlaceholder: 'Nenhuma tabela ignorada',+ excludeTablesTooltip:+ 'Nomes das tabelas que ficam fora do backup. Você pode colar uma lista separada por vírgulas ou quebras de linha.',+ serverCaCertificateTooltip:+ 'Opcional. Se informado, o certificado do servidor é verificado com esta CA (verify-ca / verify-full).',+ copyFailed: 'Não foi possível copiar',+ postgresql: {+ supabaseHint:+ '<docsLink>Leia este guia</docsLink> para saber como fazer backup de um banco de dados Supabase',+ includeSchemasPlaceholder: 'Todos os schemas (padrão)',+ excludeTablesTooltip:+ "Tabelas que ficam fora do backup. Use 'tablename' ou 'schema.tablename'. Padrões glob são aceitos (por exemplo, 'logs_*'). Você pode colar uma lista separada por vírgulas ou quebras de linha.",+ skipUserMappingsTooltip:+ 'Não restaura os mapeamentos de usuário (user mappings, instruções CREATE USER MAPPING). Ative se o papel usado no backup não consegue ler as credenciais dos mapeamentos: sem isso, eles vão para o dump sem opções e quebram a restauração de FDWs como o oracle_fdw.',+ excludeExtensionsTooltip:+ 'Não restaura as definições de extensões (instruções CREATE EXTENSION). Ative se você está restaurando em um serviço PostgreSQL gerenciado, onde as extensões são administradas pelo provedor.',+ restoreOwnershipTooltip:+ 'Aplica as instruções ALTER OWNER do dump para que os objetos restaurados mantenham o proprietário original. O usuário da conexão precisa poder atribuir esses papéis, o que normalmente exige um superusuário.',+ restorePrivilegesTooltip:+ 'Aplica as instruções GRANT e REVOKE do dump para que os objetos restaurados mantenham as ACLs originais. O usuário da conexão precisa poder conceder permissões aos papéis citados, o que normalmente exige um superusuário.',+ backupTypeTooltips: {+ full: 'Backups completos periódicos. Cada backup é independente dos outros.',+ fullIncremental:+ 'Backups completos e incrementais, que guardam só as alterações desde o backup anterior. Ocupam menos espaço e são mais rápidos.',+ fullIncrementalWalStream:+ 'Acrescenta streaming contínuo de WAL aos backups completos e incrementais. Só esta opção permite a recuperação point-in-time (PITR), mas ocupa mais espaço e a restauração é mais lenta.',+ },+ },+ mariadb: {+ skipEvents: 'Pular eventos',+ skipEventsTooltip:+ 'Não inclui os eventos do banco de dados no backup. Ative se o agendador de eventos estiver desativado no seu servidor MariaDB.',+ skipGaleraDisable: 'Não desativar na restauração',+ skipGaleraDisableTooltip:+ 'Por padrão, o Databasus executa SET SESSION wsrep_on=OFF durante a restauração para evitar erros de tamanho de writeset do Galera. Isso exige o privilégio SUPER. Ative esta opção para pular esse passo se o seu provedor gerenciado não concede SUPER. Nesse caso, restaurações grandes podem esbarrar nos limites de writeset do Galera.',+ },+ mongodb: {+ srvTooltip:+ 'Ative para conexões SRV do MongoDB Atlas (mongodb+srv://). Conexões SRV não precisam de porta.',+ srvOverTunnelTooltip:+ 'Indisponível com túnel SSH: o SRV resolve a própria lista de hosts e ignora a porta encaminhada.',+ directConnectionTooltip:+ 'Conecta diretamente a um único servidor, sem descobrir o replica set. Útil quando o servidor está atrás de um balanceador de carga, proxy ou túnel.',+ directConnectionOverTunnelTooltip:+ 'Sempre ativada enquanto o túnel SSH estiver ligado: o túnel expõe um único endereço, então não é possível descobrir o replica set.',+ excludeCollectionsPlaceholder: 'Nenhuma coleção ignorada',+ excludeCollectionsTooltip:+ 'Nomes das coleções que ficam fora do backup. Você pode colar uma lista separada por vírgulas ou quebras de linha.',+ },+ },+ show: {+ galeraDisableSkipped: 'Não desativar na restauração',+ },+ sshTunnel: {+ authTypes: {+ password: 'Senha',+ privateKey: 'Chave privada',+ },+ title: 'Túnel SSH',+ tooltip:+ 'Para um banco de dados em uma rede fechada. O Databasus se conecta ao host SSH abaixo, e esse host acessa o banco de dados pelo host e pela porta informados acima.',+ host: 'Host SSH',+ hostTooltip:+ 'Quem resolve o host do banco de dados informado acima é o host SSH, não o Databasus. Use 127.0.0.1 quando o banco de dados roda no próprio host SSH.',+ port: 'Porta SSH',+ username: 'Usuário SSH',+ usernamePlaceholder: 'Digite o usuário SSH',+ authType: 'Autenticação SSH',+ credentials: 'Credenciais SSH',+ password: 'Senha SSH',+ passwordPlaceholder: 'Digite a senha SSH',+ privateKey: 'Chave privada SSH',+ keyPassphrase: 'Senha da chave',+ keyPassphrasePlaceholder: 'Só para chave criptografada',+ },+ notifiers: {+ title: 'Canais de notificação',+ description:+ 'Canal de notificação é o lugar para onde as notificações são enviadas (e-mail, Slack, Telegram, etc.)',+ multipleHint: 'Você pode selecionar vários canais: as notificações vão para todos eles.',+ selectPlaceholder: 'Selecione os canais de notificação',+ createNew: 'Criar canal de notificação',+ addTitle: 'Adicionar canal de notificação',+ notifyTo: 'Notificar em',+ empty: 'Nenhum canal de notificação configurado',+ },+ readOnlyUser: {+ dialogTitle: 'Criar usuário somente leitura',+ readOnly: {+ checking: 'Verificando o usuário somente leitura...',+ title: 'Criar um usuário somente leitura para o Databasus?',+ description:+ 'Um usuário somente leitura é um usuário do {{databaseType}} com permissões limitadas: ele só consegue ler os dados do banco, não alterá-los. Isso é recomendado para backups porque:',+ noWriteCredentials:+ '<bold>Com um usuário somente leitura, nenhuma credencial com permissão de escrita fica guardada</bold>. Mesmo no pior cenário, uma invasão, ninguém conseguirá corromper seus dados.',+ create: 'Sim, criar usuário somente leitura',+ skipTitle: 'Pular a criação do usuário somente leitura?',+ skipQuestion: 'Tem certeza de que deseja pular a criação de um usuário somente leitura?',+ },+ replicationOnly: {+ checking: 'Verificando o usuário somente para replicação...',+ title: 'Criar um usuário somente para replicação para o Databasus?',+ description:+ 'Um usuário somente para replicação é um usuário do {{databaseType}} com permissões limitadas: ele só consegue ler os dados do banco, não alterá-los. Isso é recomendado para backups porque:',+ noWriteCredentials:+ '<bold>Com um usuário somente para replicação, nenhuma credencial com permissão de escrita fica guardada</bold>. Mesmo no pior cenário, uma invasão, ninguém conseguirá corromper seus dados.',+ create: 'Sim, criar usuário somente para replicação',+ skipTitle: 'Pular a criação do usuário somente para replicação?',+ skipQuestion:+ 'Tem certeza de que deseja pular a criação de um usuário somente para replicação?',+ },+ reasons: {+ preventsModifications: 'evita alterações acidentais nos dados durante o backup',+ leastPrivilege: 'segue o princípio do menor privilégio',+ bestPractice: 'é uma boa prática de segurança',+ },+ securityNote:+ 'O Databasus segue padrões de segurança de nível corporativo (<docsLink>veja os detalhes aqui</docsLink>). Mesmo assim, não é possível se proteger de todos os riscos.',+ noWritePrivileges: 'O usuário atual <bold>não tem privilégios de escrita</bold>.',+ noWriteRoles: 'O usuário atual <bold>não tem papéis com permissão de escrita</bold>.',+ writePrivileges: 'O usuário atual tem os seguintes privilégios de escrita:',+ writeRoles: 'O usuário atual tem os seguintes papéis com permissão de escrita:',+ expand: '(expandir)',+ collapse: '(recolher)',+ skip: 'Pular',+ skipRisk:+ 'Usar um usuário com permissões totais para backups não é recomendado e pode trazer riscos de segurança. O Databasus recomenda fortemente não pular esta etapa.',+ skipAdvice:+ 'Proteção de 100% não existe. É melhor se precaver mesmo contra um risco de 0,01% de invasão total. Por isso, o caminho mais seguro é usar um usuário somente leitura.',+ acceptRisks: 'Sim, aceito os riscos',+ continueSecurely: 'Continuar pelo caminho seguro',+ forcedWalRotationUnavailable:+ 'Esta origem não permite conceder ao novo usuário EXECUTE em pg_switch_wal(), e o streaming contínuo de WAL precisa disso para manter o ponto de recuperação próximo do momento atual. Backups completos e incrementais funcionam normalmente com estas credenciais.',+ },+ transfer: {+ title: 'Transferir banco de dados para outro espaço de trabalho',+ targetWorkspace: 'Espaço de trabalho de destino',+ selectWorkspace: 'Selecione o espaço de trabalho',+ storage: {+ title: 'Armazenamento',+ transferExisting: 'Transferir com o armazenamento atual',+ selectFromTarget: 'Selecionar um armazenamento do espaço de trabalho de destino',+ blocked:+ 'Bancos de dados que usam este armazenamento: {{count}}. A transferência está bloqueada porque outros bancos de dados dependem dele.',+ canTransfer: 'O armazenamento pode ser transferido',+ selectPlaceholder: 'Selecione o armazenamento',+ createNew: 'Criar armazenamento',+ addTitle: 'Adicionar armazenamento',+ description:+ 'Armazenamento é o lugar onde os backups ficam guardados (disco local, S3, Google Drive, etc.)',+ },+ notifiers: {+ title: 'Canais de notificação (opcional)',+ transferWithDatabase: 'Transferir os canais de notificação com o banco de dados',+ selectFromTarget: 'Selecionar canais de notificação do espaço de trabalho de destino',+ willTransfer: 'Serão transferidos:',+ willNotTransfer: 'NÃO serão transferidos (usados por outros bancos de dados):',+ usedByDatabases: '{{name}} (usado por bancos de dados: {{count}})',+ noneTransferred:+ 'Nenhum canal de notificação será transferido. Depois da transferência, você pode selecionar canais do espaço de trabalho de destino.',+ selectPlaceholder: 'Selecione os canais de notificação (opcional)',+ },+ submit: 'Transferir',+ transferred: {+ title: 'Banco de dados transferido!',+ description: 'O banco de dados "{{name}}" foi transferido para o novo espaço de trabalho',+ },+ },+ connectionString: {+ errors: {+ empty: 'A string de conexão está vazia',+ unrecognizedFormat: 'Formato de string de conexão não reconhecido',+ hostMissing: 'Falta o host na string de conexão',+ usernameMissing: 'Falta o nome de usuário na string de conexão',+ passwordMissing: 'Falta a senha na string de conexão',+ databaseMissing: 'Falta o nome do banco de dados na string de conexão',+ parseFailed: 'Não foi possível interpretar a string de conexão',+ jdbc: {+ invalidFormat: 'Formato de string de conexão JDBC inválido. Esperado: {{expectedFormat}}',+ queryParametersMissing:+ 'Faltam os parâmetros de consulta (user e password) na string de conexão JDBC',+ usernameMissing: 'Falta o nome de usuário (parâmetro user) na string de conexão JDBC',+ passwordMissing: 'Falta o parâmetro password na string de conexão JDBC',+ parseFailed: 'Não foi possível interpretar a string de conexão JDBC',+ },+ keyValue: {+ hostMissing: 'Falta o host na string de conexão. Use host=hostname',+ usernameMissing: 'Falta o nome de usuário na string de conexão. Use user=username',+ passwordMissing: 'Falta a senha na string de conexão. Use password=yourpassword',+ databaseMissing:+ 'Falta o nome do banco de dados na string de conexão. Use database=database',+ parseFailed: 'Não foi possível interpretar a string de conexão no formato chave=valor',+ },+ libpq: {+ databaseMissing:+ 'Falta o nome do banco de dados na string de conexão. Use dbname=database',+ parseFailed: 'Não foi possível interpretar a string de conexão libpq',+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote:+ 'Conceda o privilégio com o comando abaixo (execute como superusuário).',+ applyAndRestartNote: 'Aplique a alteração abaixo e reinicie o PostgreSQL.',+ pgHbaNoEntry: {+ title: 'A replicação não é permitida a partir deste host',+ summary:+ 'O pg_hba.conf do PostgreSQL não tem uma entrada que permita ao Databasus uma conexão de replicação. Os backups físicos são transmitidos por replicação, que exige uma regra "host replication": uma regra comum "host all" não cobre esse caso.',+ addLineNote:+ 'Adicione a linha abaixo ao pg_hba.conf. O primeiro "all" aceita qualquer usuário, e o segundo, qualquer host. Para restringir o acesso, troque o usuário pelo papel de replicação específico e/ou o host por uma faixa CIDR.',+ reloadNote:+ 'Depois de alterar o pg_hba.conf, <bold>recarregue a configuração do PG</bold>.',+ managedNote:+ 'No PostgreSQL gerenciado (RDS / Azure / GCP) não é possível editar o pg_hba.conf: ative o acesso externo ou de replicação no console do provedor.',+ },+ badCredentials: {+ title: 'Usuário ou senha incorretos',+ summary:+ 'O PostgreSQL recusou as credenciais. Confira o usuário e a senha deste banco de dados.',+ },+ noReplicationPrivilege: {+ title: 'O usuário não pode fazer replicação',+ summary:+ 'O usuário se conectou, mas não tem o privilégio REPLICATION, que os backups físicos exigem.',+ managedNote:+ 'No AWS RDS, use GRANT rds_replication TO {{username}}; no Azure / GCP, ative a replicação para o papel no console do provedor.',+ },+ noWalSwitchPrivilege: {+ title: 'O usuário não pode forçar a troca de segmento WAL',+ summary:+ 'O streaming contínuo de WAL só envia um segmento depois que a origem o fecha. Por isso, em um banco de dados com poucas gravações, o WAL mais recente fica na origem até o segmento de 16 MB encher. Forçar a troca periodicamente é o que mantém o ponto de recuperação entre backups próximo do momento atual, e isso exige EXECUTE em pg_switch_wal(). Backups completos e incrementais não precisam disso: eles restauram até o ponto em que cada backup terminou e não reproduzem WAL arquivado.',+ switchBackupTypeNote:+ 'Ou mude o tipo de backup para <bold>Completo + incremental</bold>, que não reproduz WAL arquivado.',+ managedNote:+ 'No PostgreSQL gerenciado (RDS / Azure / GCP), a função pertence ao superusuário da plataforma e não é possível conceder EXECUTE nela a um papel do cliente. Por isso, o streaming contínuo de WAL não está disponível nesses serviços: use backups completos + incrementais.',+ },+ walLevelInvalid: {+ title: 'O wal_level está baixo demais',+ summary:+ 'Para backups físicos, o wal_level precisa ser "replica" ou "logical". No momento, o valor é inferior.',+ applyNote:+ 'Aplique a alteração abaixo e reinicie o PostgreSQL (o wal_level só entra em vigor depois de reiniciar).',+ managedNote:+ 'No PostgreSQL gerenciado, defina wal_level no grupo de parâmetros do provedor.',+ },+ noWalSenders: {+ title: 'Nenhum WAL sender disponível',+ summary:+ 'O max_wal_senders é 0, então o PostgreSQL não consegue transmitir WAL para os backups.',+ managedNote:+ 'No PostgreSQL gerenciado, defina max_wal_senders no grupo de parâmetros do provedor.',+ },+ noReplicationSlots: {+ title: 'Nenhum slot de replicação disponível',+ summary:+ 'O max_replication_slots é 0, então o PostgreSQL não consegue alocar um slot para os backups.',+ managedNote:+ 'No PostgreSQL gerenciado, defina max_replication_slots no grupo de parâmetros do provedor.',+ },+ walSummaryDisabled: {+ title: 'O summarize_wal está desativado',+ summary:+ 'O summarize_wal precisa estar ativado para backups incrementais. No momento, está desativado neste servidor.',+ applyNote: 'Aplique a alteração abaixo (não é preciso reiniciar).',+ thenNote: 'e depois',+ managedNote:+ 'No PostgreSQL gerenciado, defina summarize_wal no grupo de parâmetros do provedor.',+ },+ customTablespaces: {+ title: 'Tablespaces personalizados não são suportados',+ summary:+ 'Este cluster tem tablespaces fora de pg_default / pg_global, e os backups físicos não conseguem transmiti-los. Remova os tablespaces personalizados ou mude este banco de dados para backups lógicos.',+ },+ systemIdentifierMismatch: {+ title: 'Este é outro cluster',+ summary:+ 'O cluster neste endereço tem um identificador de sistema diferente daquele para o qual este backup foi configurado. Aponte o Databasus para o cluster original ou adicione um novo banco de dados.',+ },+ connectionFailed: {+ title: 'Não foi possível conectar',+ summary:+ 'O Databasus não conseguiu abrir uma conexão de replicação. Verifique o host, a porta e o modo SSL, e confirme que nenhum firewall está bloqueando a conexão.',+ },+ },+ },+ restores: {+ list: {+ empty: 'Nenhuma restauração ainda',+ },+ targetDatabase: {+ select: 'Selecione o banco de dados de destino da restauração',+ description:+ 'Informe os dados do banco de dados em que o backup será restaurado. <underline>O banco de dados vazio para a restauração precisa ser criado antes</underline>. Durante a restauração, todos os dados atuais dele serão apagados',+ notInUseHint:+ 'Confira se ninguém está usando o banco de dados agora (provavelmente você não quer restaurar os dados no mesmo BD de onde o backup foi feito)',+ submit: 'Restaurar neste BD',+ },+ card: {+ startedAt: 'Início',+ duration: 'Duração',+ errorDetailsTooltip: 'Clique para ver os detalhes do erro',+ cancelTooltip: 'Cancelar restauração',+ expectedDurationHint:+ 'A restauração costuma levar de 3 a 5 vezes mais tempo que o backup (às vezes menos, às vezes mais, dependendo do tipo de dados)',+ expectedDurationLimit: 'Ou seja, pode levar até {{duration}} (geralmente bem menos)',+ },+ errorDetails: {+ title: 'Detalhes do erro de restauração',+ copied: 'Mensagem de erro copiada para a área de transferência',+ excludeExtensionsTip:+ '<bold>💡 Dica:</bold> este erro costuma aparecer ao restaurar em serviços PostgreSQL gerenciados (como Yandex Cloud, AWS RDS e similares). Antes de restaurar, tente ativar <bold>"Ignorar extensões"</bold> nas Configurações avançadas.',+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ Atenção:</bold> se você cancelar esta restauração, o banco de dados provavelmente ficará corrompido ou incompleto. Será preciso recriá-lo antes de tentar outra restauração.',+ question: 'Tem certeza de que deseja cancelar?',+ confirm: 'Sim, cancelar restauração',+ },+ },+ healthcheck: {+ attempts: {+ title: 'Verificações de disponibilidade',+ period: 'Período',+ periods: {+ today: 'Hoje',+ sevenDays: '7 dias',+ thirtyDays: '30 dias',+ allTime: 'Todo o período',+ },+ empty: 'Ainda não há dados',+ },+ config: {+ enable: 'Verificar disponibilidade',+ isEnabled: 'Verificação ativada',+ notifyWhenUnavailable: 'Notificar quando indisponível',+ checkIntervalMinutes: 'Intervalo de verificação (minutos)',+ attemptsBeforeDown: 'Falhas até marcar indisponível',+ storeAttemptsDays: 'Guardar histórico (dias)',+ tooltips: {+ enable: 'Ativa ou desativa a verificação de disponibilidade deste banco de dados',+ notifyWhenUnavailable: 'Envia notificações quando o banco de dados fica indisponível',+ checkIntervalMinutes:+ 'Com que frequência verificar a disponibilidade do banco de dados (em minutos)',+ attemptsBeforeDown:+ 'Quantas tentativas com falha são necessárias para o banco de dados ser considerado indisponível',+ storeAttemptsDays:+ 'Por quantos dias guardar o histórico de verificações de disponibilidade',+ },+ },+ },+ workspaces: {+ roles: {+ owner: 'Proprietário',+ admin: 'Administrador',+ member: 'Membro',+ viewer: 'Visualizador',+ },+ fields: {+ name: 'Nome do espaço de trabalho',+ namePlaceholder: 'Digite o nome do espaço de trabalho',+ },+ create: {+ title: 'Criar espaço de trabalho',+ submit: 'Criar espaço de trabalho',+ defaultName: 'Meu espaço de trabalho',+ description:+ 'O espaço de trabalho é onde você agrupa:<lineBreak/>- seus bancos de dados;<lineBreak/>- armazenamentos (disco local, S3, Google Drive, etc.);<lineBreak/>- canais de notificação (e-mail, Slack, Telegram, etc.);<lineBreak/>- controle de acesso (se você trabalha em equipe).',+ nameRequired: 'Digite o nome do espaço de trabalho',+ created: 'Espaço de trabalho criado',+ permissionDenied: {+ title: 'Permissão negada',+ description:+ 'Você não tem permissão para criar espaços de trabalho. Peça ao administrador para criar um para você.',+ },+ },+ settings: {+ title: 'Configurações do espaço de trabalho',+ readOnly: 'Você não tem permissão para alterar estas configurações',+ nameRequired: 'O nome do espaço de trabalho é obrigatório',+ saving: 'Salvando...',+ saveChanges: 'Salvar alterações',+ reset: 'Redefinir',+ updated: 'Informações básicas salvas',+ },+ delete: {+ dangerZone: 'Zona de perigo',+ title: 'Excluir este espaço de trabalho',+ description:+ 'Não há como desfazer a exclusão de um espaço de trabalho. Todos os dados e recursos ligados a ele serão removidos permanentemente.',+ submit: 'Excluir espaço de trabalho',+ deleting: 'Excluindo...',+ notFound: 'Espaço de trabalho não encontrado',+ noPermission: 'Você não tem permissão para excluir este espaço de trabalho',+ hasDatabases:+ 'Não é possível excluir o espaço de trabalho enquanto houver bancos de dados nele. Remova-os primeiro. Bancos de dados encontrados: {{count}}.',+ deleted: 'Espaço de trabalho excluído',+ confirmation: {+ title: 'Excluir espaço de trabalho',+ question: 'Tem certeza de que deseja excluir o espaço de trabalho <workspaceName/>?',+ warning:+ '<bold>Esta ação não pode ser desfeita.</bold> Todos os dados e recursos associados serão removidos permanentemente.',+ submit: 'Excluir espaço de trabalho',+ },+ },+ members: {+ title: 'Usuários',+ count: 'Membros: {{count}}',+ empty: 'Nenhum membro encontrado',+ emptyHint: 'Clique em "Adicionar membro" para começar',+ fields: {+ member: 'Membro',+ role: 'Papel',+ joined: 'Entrou em',+ actions: 'Ações',+ email: 'Endereço de e-mail',+ emailPlaceholder: 'Digite o endereço de e-mail',+ },+ add: {+ button: 'Adicionar membro',+ title: 'Adicionar membro',+ submit: 'Adicionar membro',+ emailRequired: 'O e-mail é obrigatório',+ hint: 'Se o usuário já tiver conta, ele será adicionado diretamente. Caso contrário, receberá um convite.',+ added: 'Membro adicionado',+ },+ invited: {+ title: 'Usuário convidado',+ sentTo: 'Convite enviado para {{email}}',+ description:+ 'O usuário ainda não está no sistema, mas já foi convidado para o espaço de trabalho. Quando ele se registrar com esse e-mail, vai se tornar membro do espaço de trabalho automaticamente.',+ },+ roleChanged: 'Papel do membro atualizado',+ remove: {+ tooltip: 'Remover membro',+ title: 'Remover membro',+ question: 'Tem certeza de que deseja remover "{{email}}" deste espaço de trabalho?',+ removed: 'Membro "{{email}}" removido',+ },+ },+ transferOwnership: {+ button: 'Transferir propriedade',+ title: 'Transferir a propriedade do espaço de trabalho',+ submit: 'Transferir propriedade',+ warning:+ '<bold>Atenção:</bold> esta ação não pode ser desfeita. Você deixará de ser o proprietário deste espaço de trabalho, e o novo proprietário terá controle total sobre ele.',+ noEligibleMembers:+ 'Não há membros para quem transferir a propriedade. O espaço de trabalho precisa ter pelo menos mais um membro.',+ newOwner: 'Selecione o novo proprietário',+ newOwnerPlaceholder: 'Selecione um membro',+ newOwnerHint: 'O membro selecionado se tornará o proprietário do espaço de trabalho',+ memberRequired: 'Selecione o membro que receberá a propriedade',+ memberNotFound: 'Membro selecionado não encontrado',+ transferred: 'Propriedade transferida',+ },+ auditLogs: {+ empty: 'Nenhum log de auditoria encontrado para este espaço de trabalho.',+ },+ },+ users: {+ roles: {+ admin: 'Administrador',+ member: 'Membro',+ },+ fields: {+ name: 'Nome',+ email: 'E-mail',+ yourName: 'Seu nome',+ yourEmail: 'Seu e-mail',+ confirmPassword: 'Confirme a senha',+ newPassword: 'Nova senha',+ },+ validation: {+ nameRequired: 'O nome é obrigatório',+ emailRequired: 'O e-mail é obrigatório',+ passwordTooShort: 'A senha precisa ter pelo menos {{minLength}} caracteres',+ passwordsDoNotMatch: 'As senhas não coincidem',+ },+ oauth: {+ divider: 'ou use o e-mail',+ continueWithGithub: 'Continuar com GitHub',+ continueWithGoogle: 'Continuar com Google',+ invalidConfiguration: 'Configuração OAuth inválida',+ },+ signIn: {+ title: 'Entrar',+ submit: 'Entrar',+ noAccount: 'Não tem uma conta? <signUpLink>Crie uma</signUpLink>',+ forgotPassword: 'Esqueceu a senha?',+ },+ signUp: {+ title: 'Criar conta',+ namePlaceholder: 'João Silva',+ submit: 'Criar conta',+ hasAccount: 'Já tem uma conta? <signInLink>Entre</signInLink>',+ },+ adminPassword: {+ title: 'Cadastro do administrador',+ description: 'Depois disso, você poderá entrar com o login "admin" e a senha que definir',+ submit: 'Definir senha',+ },+ requestPasswordReset: {+ title: 'Redefinir senha',+ description: 'Digite seu endereço de e-mail e enviaremos um código de redefinição.',+ submit: 'Enviar código',+ codeSent: 'Se esse e-mail estiver cadastrado, enviamos um código de redefinição',+ rememberPassword: 'Lembrou a senha? <signInLink>Entre</signInLink>',+ },+ resetPassword: {+ title: 'Redefinir senha',+ description: 'Digite o código enviado para o seu e-mail e a nova senha.',+ code: 'Código de redefinição',+ confirmPassword: 'Confirme a senha',+ submit: 'Redefinir senha',+ invalidCode: 'O código deve ter 6 dígitos',+ succeeded: 'Senha redefinida! Redirecionando para o login...',+ noCode: 'Não recebeu o código? <requestCodeLink>Solicite um novo</requestCodeLink>',+ backToSignIn: 'Voltar para o login',+ },+ profile: {+ title: 'Perfil',+ information: 'Informações do perfil',+ userId: 'ID do usuário',+ namePlaceholder: 'Digite seu nome',+ emailPlaceholder: 'Digite seu e-mail',+ adminEmailReadOnly: 'O e-mail do administrador não pode ser alterado',+ role: 'Papel',+ saveChanges: 'Salvar alterações',+ noChanges: 'Não há alterações para salvar',+ updated: 'Perfil atualizado',+ logout: 'Sair',+ changePassword: {+ title: 'Alterar senha',+ newPasswordPlaceholder: 'Digite a nova senha',+ confirmPassword: 'Confirme a nova senha',+ confirmPasswordPlaceholder: 'Digite a nova senha novamente',+ passwordsDoNotMatch: 'As novas senhas não coincidem',+ changing: 'Alterando a senha...',+ submit: 'Alterar senha',+ signedInWithNewPassword: 'Você entrou com a nova senha',+ },+ },+ list: {+ title: 'Usuários do Databasus',+ loadedOfTotal: 'Usuários: {{loaded}} de {{total}}',+ searchPlaceholder: 'Buscar por e-mail ou nome...',+ empty: 'Nenhum usuário encontrado.',+ allLoaded: 'Todos os usuários foram carregados (total: {{count}})',+ columns: {+ user: 'Usuário',+ systemRole: 'Papel no sistema',+ isActive: 'Ativo?',+ created: 'Criado em',+ },+ roleLabel: 'Papel:',+ activeLabel: 'Ativo:',+ viewAuditLogs: 'Ver logs de auditoria',+ activated: 'Usuário ativado',+ deactivated: 'Usuário desativado',+ roleChanged: 'Papel do usuário alterado',+ },+ auditLogs: {+ title: 'Logs de auditoria do usuário',+ empty: 'Nenhum log de auditoria encontrado para este usuário.',+ },+ },+ verification: {+ triggers: {+ manual: 'Manual',+ scheduled: 'Agendada',+ },+ notificationTypes: {+ verificationSuccess: 'Verificação bem-sucedida',+ verificationFailed: 'Falha na verificação',+ },+ config: {+ scheduledVerification: 'Verificação agendada',+ scheduledVerificationTooltip:+ 'Restaura periodicamente o backup mais recente em um container Postgres temporário para confirmar que ele pode ser restaurado. <docsLink>Veja como funciona</docsLink>',+ interval: 'Intervalo de verificação',+ afterBackup: 'Após o backup',+ afterBackupHint:+ 'Roda automaticamente após cada backup bem-sucedido. Se houver verificações pendentes na fila, elas são canceladas para que a fila não cresça sem parar quando os backups forem mais rápidos que as verificações.',+ weekday: 'Dia da semana da verificação',+ dayOfMonth: 'Dia do mês da verificação',+ timeOfDay: 'Horário da verificação',+ cron: {+ expression: 'Expressão cron (UTC)',+ format: 'Formato cron: minuto hora dia mês dia-da-semana (UTC)',+ examples: 'Exemplos:',+ exampleEverySunday: '- {{expression}} — todo domingo às 04:00 UTC',+ exampleEverySixHours: '- {{expression}} — a cada 6 horas',+ nextRun: 'Próxima execução: {{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: 'Expressão cron inválida',+ },+ notifications: 'Notificações',+ noNotifications: 'Nenhuma',+ },+ runs: {+ title: 'Verificações de restauração',+ description:+ 'Cada linha é uma tentativa de restaurar um backup deste banco de dados em uma cópia temporária',+ noAgentsWarning:+ 'Nenhum agente de verificação registrado. Adicione um nas configurações do Databasus, na seção "Agentes de verificação". <docsLink>Saiba mais</docsLink>',+ empty: 'Nenhuma verificação de restauração ainda',+ allLoaded: 'Todas as verificações de restauração foram carregadas (total: {{total}})',+ attempt: 'tentativa {{attempt}}',+ restoreDuration: 'restauração: {{duration}}',+ durationTooltip: 'Tempo de restauração + verificação informado pelo agente.',+ fields: {+ createdAt: 'Criada em',+ trigger: 'Execução',+ duration: 'Duração',+ actions: 'Ações',+ },+ actions: {+ cancel: 'Cancelar verificação',+ viewDetails: 'Ver detalhes',+ },+ details: {+ title: 'Detalhes da verificação de restauração',+ loadFailed: 'Não foi possível carregar os detalhes da verificação de restauração.',+ cancellationReason: 'Motivo do cancelamento',+ failure: 'Falha',+ sections: {+ status: 'Status',+ timeline: 'Linha do tempo',+ results: 'Resultados e diagnóstico',+ },+ fields: {+ attempt: 'Tentativa',+ startedAt: 'Início',+ finishedAt: 'Fim',+ restoreDuration: 'Duração da restauração',+ verifyDuration: 'Duração da verificação',+ restoredDbSize: 'Tamanho do BD restaurado',+ schemas: 'Schemas',+ tables: 'Tabelas',+ pgRestoreExitCode: 'Código de saída do pg_restore',+ },+ tableStats: {+ title: 'Linhas por tabela',+ empty: 'Nenhuma estatística por tabela foi informada.',+ schema: 'Schema',+ table: 'Tabela',+ rows: 'Linhas',+ },+ },+ },+ agents: {+ title: 'Agentes de verificação',+ description:+ 'Agentes que executam as verificações de restauração para confirmar que um backup pode ser restaurado (<docsLink>saiba mais</docsLink>)',+ empty: 'Nenhum agente registrado ainda.',+ columns: {+ capacity: 'Capacidade',+ created: 'Criado em',+ },+ capacity: {+ cpu: '{{count}} CPU',+ ram: '{{count}} GB de RAM',+ disk: '{{count}} GB de disco',+ jobs: 'trabalhos: {{count}}',+ notReported: 'ainda não informada',+ },+ actions: {+ viewInstallCommands: 'Ver comandos de instalação',+ rotateToken: 'Trocar token',+ },+ deleteConfirmation: 'Excluir este agente?',+ deleted: 'Agente "{{name}}" excluído',+ copyFailed: 'Não foi possível copiar',+ agentId: 'ID do agente:',+ create: {+ title: 'Criar agente de verificação',+ tokenNotice: 'Um token será gerado e mostrado uma única vez na próxima tela.',+ namePlaceholder: 'Nome do agente',+ nameRequired: 'O nome é obrigatório',+ },+ rotate: {+ title: 'Trocar token',+ description:+ 'Trocar o token de <agentName/> invalida o token atual na hora. Um agente que ainda use o token antigo será recusado no próximo heartbeat.',+ },+ token: {+ title: 'Token do agente',+ tokenFor: 'Token de <agentName/>:',+ shownOnce:+ 'Ele aparece só uma vez. Guarde-o em um lugar seguro: não será possível vê-lo de novo.',+ confirmSaved: 'Já salvei o token',+ },+ install: {+ title: 'Comandos de instalação',+ description:+ 'Comandos de instalação para <agentName/>. Substitua <tokenPlaceholder/> pelo token que você salvou ao criar este agente ou na última troca de token.',+ architecture: 'Arquitetura',+ stepInstall: 'Etapa 1 — Instalação',+ stepLaunch: 'Etapa 2 — Inicialização',+ capacityDefaults:+ 'Os valores de capacidade abaixo são apenas um ponto de partida: ajuste <code>--max-cpu</code>, <code>--max-ram-mb</code>, <code>--max-disk-gb</code> e <code>--max-concurrent-jobs</code> à máquina que executa o agente.',+ afterInstallation: 'Depois da instalação',+ runsInBackground: 'Após o <code>start</code>, o agente roda em segundo plano',+ checkStatus: 'Ver o status: <code>./verification-agent status</code>',+ viewLogs: 'Ver os logs: <code>databasus-verification.log</code> no diretório de trabalho',+ stop: 'Parar o agente: <code>./verification-agent stop</code>',+ },+ },+ },+ notifiers: {+ types: {+ email: 'E-mail',+ telegram: 'Telegram',+ webhook: 'Webhook',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: 'Todos',+ backupSuccess: 'Backup bem-sucedido',+ backupFailed: 'Falha no backup',+ healthcheckSuccess: 'Verificação de disponibilidade bem-sucedida',+ healthcheckFailed: 'Falha na verificação de disponibilidade',+ verificationSuccess: 'Verificação de restauração bem-sucedida',+ verificationFailed: 'Falha na verificação de restauração',+ },+ mattermostDeliveryModes: {+ webhook: 'Webhook de entrada',+ bot: 'Conta de bot',+ },+ list: {+ addNotifier: 'Adicionar canal de notificação',+ searchPlaceholder: 'Buscar canal de notificação',+ noSearchResults: 'Nenhum canal de notificação encontrado para "{{query}}"',+ description:+ 'Canal de notificação é o lugar para onde as notificações são enviadas (e-mail, Slack, Telegram, etc.)',+ backToList: '← Voltar para os canais de notificação',+ },+ card: {+ notifyTo: {+ email: 'Notificações por e-mail',+ telegram: 'Notificações no Telegram',+ webhook: 'Notificações via webhook',+ slack: 'Notificações no Slack',+ discord: 'Notificações no Discord',+ teams: 'Notificações no Teams',+ mattermost: 'Notificações no Mattermost',+ },+ hasSendError: 'Com erro de envio',+ },+ create: {+ title: 'Adicionar canal de notificação',+ namePlaceholder: 'Meu chat',+ },+ config: {+ namePlaceholder: 'Digite o nome...',+ settingsTitle: 'Configurações do canal de notificação',+ sendError: {+ title: 'Erro de envio',+ errorLabel: 'Erro:',+ clearHint: 'Para limpar este erro, faça uma das opções:',+ clearBySendingTest:+ '- envie uma notificação de teste pelo botão abaixo (mesmo que você já tenha alterado as configurações);',+ clearByNextNotification: '- aguarde a próxima notificação ser enviada sem erros;',+ },+ removeConfirmation: 'Remover este canal de notificação? Esta ação não pode ser desfeita.',+ removeBlockedByDatabases:+ 'Este canal de notificação está em uso em alguns bancos de dados. Remova-o desses bancos de dados primeiro.',+ },+ testNotification: {+ send: 'Enviar notificação de teste',+ sent: {+ title: 'Notificação de teste enviada!',+ description: 'A notificação de teste foi enviada com sucesso',+ },+ },+ transfer: {+ title: 'Transferir canal de notificação para outro espaço de trabalho',+ blockedByDatabases:+ 'Este canal de notificação está em uso em alguns bancos de dados. Transfira ou remova esses bancos de dados primeiro.',+ description: 'Selecione o espaço de trabalho para onde transferir este canal de notificação.',+ targetWorkspace: 'Espaço de trabalho de destino',+ selectWorkspace: 'Selecione o espaço de trabalho',+ submit: 'Transferir',+ },+ fields: {+ botToken: 'Token do bot',+ targetChatId: 'ID do chat de destino',+ webhookUrl: 'URL do webhook',+ channelId: 'ID do canal',+ skipTlsVerify: 'Não verificar TLS',+ skipTls: 'Não verificar TLS',+ },+ email: {+ targetEmail: 'E-mail de destino',+ targetEmailTooltip: 'O e-mail em que você quer receber as mensagens',+ smtpHost: 'Host SMTP',+ smtpPort: 'Porta SMTP',+ smtpUser: 'Usuário SMTP',+ smtpPassword: 'Senha SMTP',+ smtpPasswordPlaceholder: 'senha',+ from: 'Remetente',+ fromTooltip:+ 'Opcional. Endereço de e-mail usado como remetente. Se ficar vazio, será usado o usuário SMTP ou um endereço gerado a partir do host',+ fromAuto: '(automático)',+ advancedSettings: 'Configurações avançadas',+ skipTlsTooltip:+ 'Não verifica o certificado TLS. Ative se o seu servidor SMTP usa um certificado autoassinado. Atenção: isso reduz a segurança.',+ },+ telegram: {+ botTokenHelpLink: 'Como obter o token da API do bot do Telegram?',+ targetChatIdTooltip:+ 'O chat em que você quer receber as mensagens (pode ser o seu chat privado ou um grupo)',+ chatIdHelp: {+ toggle: 'Como obter o ID do chat no Telegram?',+ privateChat:+ 'Para obter o ID do seu chat, envie uma mensagem para <botLink>@getmyid_bot</botLink> no Telegram. <underline>Confirme que você iniciou o chat com o bot</underline>',+ group:+ 'Para obter o ID do chat de um grupo, adicione ao grupo o seu bot e o <botLink>@getmyid_bot</botLink> e envie /start (o ID do chat vai aparecer)',+ },+ useProxy: 'Usar proxy',+ useProxyTooltip: 'Usa um proxy para as requisições à API do Telegram',+ proxy: 'Proxy',+ proxyUrl: 'URL do proxy',+ proxyUrlTooltip: 'Aceita http, https, socks5 e socks5h. Pode incluir usuário e senha',+ sendToGroupTopic: 'Enviar para um tópico do grupo',+ sendToGroupTopicTooltip:+ 'Ative para enviar as mensagens a um tópico específico de um chat em grupo',+ threadId: 'ID do tópico',+ threadIdTooltip: 'O ID do tópico para onde as mensagens devem ser enviadas',+ topicId: 'ID do tópico',+ threadIdHelp: {+ steps:+ 'Para obter o ID do tópico, abra o tópico no seu grupo do Telegram, toque no nome dele no topo e abra as informações do tópico. Copie o link do tópico e pegue o último número da URL.',+ example:+ '<bold>Exemplo:</bold> se o link do tópico for <code>https://t.me/c/2831948048/3</code>, o ID do tópico é <code>3</code>',+ note: '<bold>Observação:</bold> tópicos só funcionam em chats de grupo, não em chats privados.',+ },+ },+ webhook: {+ method: 'Método',+ sendOn: 'Quando enviar',+ sendOnPlaceholder: 'Selecione os tipos de notificação',+ customHeaders: 'Cabeçalhos personalizados',+ customHeadersTooltip:+ 'Adicione cabeçalhos HTTP personalizados à requisição do webhook (por exemplo, Authorization, X-API-Key)',+ savedHeadersHidden: '*Os cabeçalhos salvos ficam ocultos por segurança',+ headers: 'Cabeçalhos',+ headerNamePlaceholder: 'Nome do cabeçalho',+ headerValuePlaceholder: 'Valor do cabeçalho',+ addHeader: 'Adicionar cabeçalho',+ hiddenHeaderValue: '(oculto)',+ bodyTemplate: {+ title: 'Modelo do corpo',+ headingVariable: '<variable/> — título da notificação',+ messageVariable: '<variable/> — mensagem da notificação',+ invalidJsonFormat: 'Formato JSON inválido',+ invalidJson: 'JSON inválido',+ },+ exampleRequest: {+ title: 'Exemplo de requisição',+ headers: 'Cabeçalhos:',+ },+ },+ slack: {+ howToConnect: 'Como conectar o Slack (como obter o token do bot e o ID do chat)?',+ testFailedHint:+ 'Confira se o canal é público ou se o bot foi adicionado ao canal privado (via @invite) ou ao grupo. Para mensagens diretas, use o ID de usuário do perfil no Slack.',+ },+ discord: {+ channelWebhookUrl: 'URL do webhook do canal',+ howTo: {+ title: 'Como obter a URL do webhook do Discord:',+ createChannel: '1. Crie ou selecione um canal do Discord',+ openChannelSettings: '2. Abra as configurações do canal (ícone de engrenagem)',+ openIntegrations: '3. Vá em Integrações',+ createWebhook: '4. Crie um novo webhook',+ copyWebhookUrl: '5. Copie a URL do webhook',+ privacyNote: 'Observação: se necessário, torne o canal privado',+ },+ },+ teams: {+ howToConnect: 'Como conectar o Microsoft Teams?',+ powerAutomateUrl: 'URL do Power Automate',+ powerAutomateUrlLabel: 'URL do Power Automate:',+ powerAutomateUrlTooltip:+ 'Endpoint HTTP do seu fluxo do Power Automate (gatilho When an HTTP request is received)',+ showFullUrl: 'Mostrar',+ hideFullUrl: 'Ocultar',+ },+ mattermost: {+ howToConnect: 'Como conectar o Mattermost?',+ connectVia: 'Conectar via',+ incomingWebhookUrl: 'URL do webhook de entrada',+ serverUrl: 'URL do servidor',+ channelIdTooltip:+ 'ID do canal com 26 caracteres, não o nome dele. Abra o canal, clique no nome e escolha View Info.',+ channel: 'Canal',+ showOptionalSettings: 'Mostrar configurações opcionais',+ hideOptionalSettings: 'Ocultar configurações opcionais',+ channelOverride: 'Substituir canal',+ channelOverrideTooltip:+ 'Publica neste canal em vez daquele para o qual o webhook foi criado. O Mattermost ignora esta opção quando o webhook está preso a um canal.',+ postAsUsername: 'Publicar com o nome de usuário',+ postAsUsernameTooltip:+ 'Exige a opção Enable integrations to override usernames ativada no console do sistema do Mattermost. Caso contrário, é ignorado.',+ postAsIconUrl: 'Publicar com o ícone (URL)',+ postAsIconUrlTooltip:+ 'Exige a opção Enable integrations to override profile picture icons ativada no console do sistema do Mattermost. Caso contrário, é ignorado.',+ skipTlsTooltip:+ 'Não verifica o certificado TLS. Ative se o seu servidor Mattermost usa um certificado autoassinado. Atenção: isso reduz a segurança.',+ webhookHowTo: {+ title: 'Como obter a URL de um webhook de entrada:',+ openIncomingWebhooks: '1. Menu principal → Integrations → Incoming Webhooks',+ addWebhook: '2. Clique em Add Incoming Webhook e escolha o canal',+ copyUrl: '3. Copie a URL gerada',+ },+ botHowTo: {+ title: 'Como obter um token de bot:',+ addBotAccount: '1. Integrations → Bot Accounts → Add Bot Account',+ copyToken: '2. Copie o token, que aparece uma única vez, logo após a criação',+ addBotToChannel: '3. Adicione o bot à equipe e ao canal',+ },+ },+ },+ backups: {+ encryption: {+ none: 'Nenhuma',+ encrypted: 'Ativada',+ },+ encryptionOptions: {+ none: 'Sem criptografia',+ encrypted: 'Criptografar os arquivos de backup',+ },+ list: {+ title: 'Backups',+ scheduledBackupsDisabled:+ 'Os backups agendados estão desativados (você pode reativá-los na configuração de backup)',+ empty: 'Nenhum backup ainda',+ allLoaded: 'Todos os backups foram carregados (total: {{count}})',+ clickToSeeErrorDetails: 'Clique para ver os detalhes do erro',+ errorDetailsTitle: 'Detalhes do erro de backup',+ restoreTitle: 'Restaurar a partir do backup',+ columns: {+ createdAt: 'Criado em',+ created: 'Criado em',+ size: 'Tamanho',+ duration: 'Duração',+ actions: 'Ações',+ },+ actions: {+ cancelBackup: 'Cancelar backup',+ deleteBackup: 'Excluir backup',+ },+ },+ filters: {+ allTypes: 'Todos os tipos',+ allStatuses: 'Todos os status',+ before: 'Antes de',+ },+ config: {+ backupsEnabled: 'Backups ativados',+ storage: 'Armazenamento',+ selectStorage: 'Selecione o armazenamento',+ createNewStorage: 'Criar armazenamento',+ addStorageTitle: 'Adicionar armazenamento',+ storageDescription:+ 'Armazenamento é o lugar onde os backups ficam guardados (disco local, S3, Google Drive, etc.)',+ storageChangeWarning:+ 'Se você trocar o armazenamento, todos os backups guardados nele serão excluídos.',+ storageChangeAcknowledge: 'Entendi',+ encryption: 'Criptografia',+ notifications: 'Notificações',+ noNotifications: 'Nenhuma',+ schedule: {+ weekday: 'Dia da semana',+ dayOfMonth: 'Dia do mês',+ cronExpression: 'Expressão cron (UTC)',+ timeOfDay: 'Horário',+ nextRun: 'Próxima execução: {{time}}',+ invalidCron: 'Expressão cron inválida',+ cronHelp: {+ format: 'Formato cron: minuto hora dia mês dia-da-semana (UTC)',+ examples: 'Exemplos:',+ dailyAt2am: 'Todos os dias às 02:00 UTC',+ every6Hours: 'A cada 6 horas',+ mondaysAt3am: 'Toda segunda-feira às 03:00 UTC',+ twiceAMonth: 'Nos dias 1 e 15 às 04:30 UTC',+ },+ },+ gfs: {+ hourly: 'Por hora: {{count}}',+ daily: 'Diários: {{count}}',+ weekly: 'Semanais: {{count}}',+ monthly: 'Mensais: {{count}}',+ yearly: 'Anuais: {{count}}',+ notConfigured: 'Não configurado',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS (manter os últimos N backups por hora, diários, semanais, mensais e anuais)',+ timePeriod: 'Período (últimos N dias)',+ count: 'Quantidade (últimos N backups)',+ },+ notificationTypes: {+ backupSuccess: 'Backup bem-sucedido',+ backupFailed: 'Falha no backup',+ },+ list: {+ backupNow: 'Fazer backup',+ makeBackupNow: 'Fazer backup agora',+ encrypted: 'Criptografado',+ sizeTooltip:+ 'Em cima: o tamanho do arquivo de backup compactado que de fato fica no armazenamento (local, S3, Google Drive, etc.). Embaixo, em cinza: o tamanho original do banco de dados, sem compactação, no momento do backup. Os backups costumam ficar cerca de 5 vezes menores.',+ databaseSize: '{{size}} (tamanho do BD)',+ deleteConfirmation: 'Tem certeza de que deseja excluir este backup?',+ actions: {+ restore: 'Restaurar a partir do backup',+ verifyRestore:+ 'Verificar a restauração: coloca na fila um agente que restaura este backup em um banco de dados temporário e informa a contagem de linhas',+ download: {+ postgresql:+ 'Baixar o arquivo de backup. Ele pode ser restaurado manualmente com o pg_restore (formato custom)',+ mysql:+ 'Baixar o arquivo de backup. Ele pode ser restaurado manualmente com o cliente mysql (dump SQL)',+ mariadb:+ 'Baixar o arquivo de backup. Ele pode ser restaurado manualmente com o cliente mariadb (dump SQL)',+ mongodb:+ 'Baixar o arquivo de backup. Ele pode ser restaurado manualmente com o mongorestore (formato archive)',+ other: 'Baixar o arquivo de backup',+ },+ },+ verifyRestore: {+ title: 'Verificar a restauração?',+ description:+ 'Um agente vai restaurar este backup em um banco de dados temporário e informar a contagem de linhas. Isso pode levar algum tempo, dependendo do tamanho do backup. <docsLink>Como funciona?</docsLink>',+ queue: 'Colocar na fila',+ queued: 'Verificação de restauração na fila',+ },+ },+ config: {+ interval: 'Intervalo de backup',+ weekday: 'Dia da semana do backup',+ dayOfMonth: 'Dia do mês do backup',+ timeOfDay: 'Horário do backup',+ encryptionTooltip:+ 'Se o backup for criptografado, os arquivos de backup no seu armazenamento (S3, local, etc.) não podem ser usados diretamente. Você pode restaurar os backups pelo Databasus ou baixá-los descriptografados pelo botão "Baixar".',+ retentionPolicy: 'Política de retenção',+ retention: {+ timePeriodTooltip:+ 'Por quanto tempo manter os backups. Backups mais antigos que esse período são excluídos automaticamente.',+ count: 'Backups mais recentes',+ countTooltip:+ 'Mantém só a quantidade informada de backups mais recentes. Os backups mais antigos além dessa quantidade são excluídos automaticamente.',+ countValue: 'Backups mais recentes: {{count}}',+ showGfsHint: 'O que é GFS (Grandfather-Father-Son)?',+ hideGfsHint: 'Ocultar',+ gfsHint:+ 'Rotação GFS (Grandfather-Father-Son): mantém os últimos N backups por hora, diários, semanais, mensais e anuais. Assim é possível guardar backups por longos períodos sem ocupar espaço demais no armazenamento.',+ gfsTooltip:+ 'Rotação Grandfather-Father-Son: mantém os últimos N backups por hora, diários, semanais, mensais e anuais.',+ gfsFields: {+ hourly: 'Backups por hora',+ daily: 'Backups diários',+ weekly: 'Backups semanais',+ monthly: 'Backups mensais',+ yearly: 'Backups anuais',+ },+ },+ advancedSettings: 'Configurações avançadas',+ retryIfFailed: 'Repetir o backup em caso de falha',+ retryIfFailedShort: 'Repetir se falhar',+ retryIfFailedTooltip:+ 'Repete automaticamente os backups que falharem. Um backup pode falhar por problemas de rede, problemas no armazenamento ou indisponibilidade temporária do banco de dados.',+ maxFailedTries: 'Máximo de tentativas',+ maxFailedTriesTooltip:+ 'Número máximo de novas tentativas para backups com falha. Você receberá uma notificação quando todas as tentativas falharem.',+ },+ },+ physical: {+ types: {+ full: 'Completo',+ incremental: 'Incremental',+ wal: 'WAL',+ },+ retentions: {+ chains: 'Cadeias',+ fullBackups: 'Backups completos',+ chainsAndFullBackups: 'Cadeias e backups completos',+ },+ fullBackupsPolicies: {+ lastN: 'Quantidade',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: 'Backup bem-sucedido',+ backupFailed: 'Falha no backup',+ chainBroken: 'Cadeia quebrada',+ walGap: 'Lacuna no WAL',+ },+ list: {+ totalUsage: 'Uso total: {{size}}',+ backUpNow: 'Fazer backup agora',+ fullBackup: 'Backup completo',+ incrementalBackup: 'Backup incremental',+ restore: 'Restaurar',+ restoreFromThisBackup: 'Restaurar a partir deste backup',+ pointInTimeRestoreTitle: 'Restauração point-in-time',+ deleteFullConfirmation:+ 'Excluir este backup completo remove toda a cadeia dele (todos os incrementais que dependem dele). Esta ação não pode ser desfeita. Continuar?',+ deleteIncrementalConfirmation:+ 'Excluir este backup incremental remove todos os incrementais posteriores que dependem dele. Esta ação não pode ser desfeita. Continuar?',+ },+ config: {+ fullBackupCadence: 'Frequência dos backups completos',+ incrementalBackupCadence: 'Frequência dos backups incrementais',+ incrementalMoreFrequent:+ 'Os backups incrementais precisam rodar com mais frequência que os completos.',+ encryptionTooltip:+ 'Se os backups forem criptografados, os arquivos no seu armazenamento não podem ser usados diretamente. Você pode restaurá-los pelo Databasus ou baixá-los descriptografados.',+ retention: 'Retenção',+ fullBackupsOnlyRetention:+ 'Este banco de dados guarda só backups completos, então a retenção se aplica a eles.',+ retentionOptions: {+ chains: 'Manter as últimas N cadeias',+ chainsAndFullBackups: 'Manter as últimas N cadeias e backups completos',+ },+ retentionHelp: {+ chain:+ 'Uma cadeia é um backup completo mais os incrementais (e o WAL transmitido) que dependem dele. Para restaurar, é preciso o backup completo e todos os incrementais da cadeia.',+ chains:+ 'Mantém só as últimas N cadeias. Quando uma cadeia sai desse limite, o backup completo e todos os incrementais dela são excluídos: só é possível restaurar dentro das cadeias mantidas.',+ chainsAndFullBackups:+ 'Mantém as últimas N cadeias para a recuperação point-in-time recente e, além disso, guarda backups completos mais antigos conforme a política abaixo (GFS ou últimos N). Eles servem como pontos de restauração de longo prazo depois que os incrementais deles forem excluídos.',+ },+ chainsCount: 'Cadeias',+ chainsCountTooltip:+ 'Quantas cadeias de backup mais recentes manter. Uma cadeia é um backup completo mais os incrementais dele.',+ fullBackups: 'Backups completos',+ fullBackupsCount: 'Backups completos mais recentes',+ gfsFields: {+ hourly: 'Por hora',+ daily: 'Diários',+ weekly: 'Semanais',+ monthly: 'Mensais',+ yearly: 'Anuais',+ },+ chainsKept: 'Cadeias mantidas',+ fullBackupsKept: 'Backups completos mantidos',+ fullBackupsCountValue: 'Mais recentes: {{count}}',+ gfsTooltip:+ 'Rotação Grandfather-Father-Son: mantém os últimos N backups completos por hora, diários, semanais, mensais e anuais.',+ },+ restore: {+ errorHints: {+ downloadInProgress:+ 'Já há um download de restauração em andamento para este banco de dados. Aguarde a conclusão e tente novamente.',+ targetTimeUnreachable:+ 'Não é possível chegar ao momento solicitado: há uma lacuna no WAL ou o horário está fora do intervalo disponível. Escolha outro horário ou restaure o ponto mais recente disponível.',+ },+ backupIntro:+ 'Comando de restauração deste backup. Um backup completo precisa apenas do próprio arquivo; um incremental precisa também do backup completo dele e de todos os incrementais anteriores.',+ pointInTimeIntro:+ 'Restauração point-in-time. Escolha o momento de destino ou deixe em branco para restaurar o ponto mais recente disponível.',+ targetTime: 'Momento de destino',+ latestAvailable: 'Mais recente disponível',+ preparing: 'Preparando o comando de restauração...',+ linkExpiry:+ 'O link de download só pode ser usado uma vez e expira em 15 minutos. Se um comando falhar com erro 401, abra esta janela de novo para gerar um novo link.',+ copied: 'Copiado',+ methods: {+ script: 'Por script',+ manual: 'Manual',+ },+ environments: {+ host: 'PostgreSQL no host',+ },+ fields: {+ restoreDirectory: 'Diretório de restauração',+ pgBinPath: 'Caminho do bin do PostgreSQL',+ pgBinPathPlaceholder: '{{path}} (opcional)',+ pgImage: 'Imagem do PostgreSQL',+ },+ scriptTitles: {+ host: 'Execute no host de restauração',+ docker: 'Execute onde o Docker estiver disponível',+ },+ manualSteps: {+ download: 'Baixe o pacote',+ extract: 'Extraia o pacote',+ verify: 'Verifique a transferência',+ reconstruct: 'Reconstrua o diretório de dados',+ checkConfig: 'Verifique os arquivos de configuração do cluster',+ wireUpRecovery: 'Descompacte o WAL e configure a recuperação',+ recoveryParameters: 'Se a recuperação parar por causa de parâmetros',+ },+ beforeYouRun: {+ title: 'Antes de executar',+ host: {+ clientTools:+ 'Instale as ferramentas de cliente do PostgreSQL {{version}} e informe o caminho do bin acima se elas não estiverem no PATH.',+ zstd: 'O zstd é necessário para descompactar o backup.',+ zstdWithWal: 'O zstd é necessário para descompactar o backup e o WAL dele.',+ emptyDirectory:+ 'O diretório de restauração precisa estar vazio e não pode pertencer a um cluster em uso.',+ },+ docker: {+ image:+ 'Use uma imagem postgres:{{version}}: a versão principal precisa ser a mesma da origem.',+ hostTools:+ 'O host precisa de zstd, tar e curl: o download e toda a descompactação (do backup base) rodam no host, e só o pg_combinebackup roda no container, então a imagem do postgres não precisa de ferramentas extras.',+ hostToolsWithWal:+ 'O host precisa de zstd, tar e curl: o download e toda a descompactação (do backup base e do WAL) rodam no host, e só o pg_combinebackup roda no container, então a imagem do postgres não precisa de ferramentas extras.',+ },+ },+ afterItFinishes: {+ title: 'Depois que terminar',+ host: {+ clusterLocation: 'O cluster fica em <dataDir/>.',+ changeOwner: 'Como root, altere o dono: <command/>.',+ start:+ 'Inicie como postgres: <command/>, ou aponte o data_directory para esse diretório.',+ walReplay:+ 'O PostgreSQL reproduz o WAL e é promovido: acompanhe no log a conclusão da recuperação.',+ },+ docker: {+ clusterLocation: '<dataDir/> no host é o cluster restaurado.',+ volumeMount:+ 'O PostgreSQL {{version}} mantém o diretório de dados em <dataDir/>, dentro do volume <volumeDir/>. Monte o diretório de saída como a raiz desse volume, que é o que um docker-compose com <code>./pgdata:/var/lib/postgresql</code> espera:',+ dataDirectoryMount:+ 'Monte o cluster (bind mount) no diretório de dados da imagem, <dataDir/>:',+ ownership:+ 'O dono precisa ser o mesmo uid do postgres dentro da imagem (999 na imagem oficial).',+ },+ missingConfigFiles:+ 'Um backup base copia só o diretório de dados. Se o PostgreSQL de origem guarda a configuração fora dele (é o layout do Debian/Ubuntu, <configDir/>), então <code>postgresql.conf</code>, <code>pg_hba.conf</code> e <code>pg_ident.conf</code> não estão no backup e o servidor não vai iniciar. Consulte os caminhos reais na origem com <code>psql -Atc "SHOW config_file"</code>, copie os três arquivos e depois comente <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>, <code>external_pid_file</code> e as linhas <code>ssl</code> / <code>ssl_*</code>, crie <code>conf.d</code> e defina <code>listen_addresses = \'*\'</code> para um container. Se esses arquivos estão presentes e o mesmo erro continua, o problema é o diretório montado, não a configuração.',+ },+ },+ },+ },+ storages: {+ types: {+ local: 'Armazenamento local',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: 'Padrão (Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: 'Chave da conta',+ connectionString: 'String de conexão',+ },+ sftpAuthMethods: {+ password: 'Senha',+ privateKey: 'Chave privada',+ },+ list: {+ addStorage: 'Adicionar armazenamento',+ description:+ 'Armazenamento é o lugar onde os backups ficam guardados (disco local, S3, etc.)',+ backToList: '← Voltar para os armazenamentos',+ },+ card: {+ type: {+ local: 'Tipo: armazenamento local',+ s3: 'Tipo: S3',+ googleDrive: 'Tipo: Google Drive',+ nas: 'Tipo: NAS',+ azureBlob: 'Tipo: Azure Blob Storage',+ ftp: 'Tipo: FTP',+ sftp: 'Tipo: SFTP',+ rclone: 'Tipo: Rclone',+ },+ hasSaveError: 'Com erro ao salvar',+ },+ config: {+ namePlaceholder: 'Digite o nome...',+ settingsTitle: 'Configurações do armazenamento',+ lastSaveError: {+ title: 'Erro ao salvar',+ errorLabel: 'Erro:',+ clearHint: 'Para limpar este erro, faça uma das opções:',+ clearByTestingConnection:+ '- teste a conexão pelo botão abaixo (mesmo que você já tenha alterado as configurações);',+ clearByNextSave: '- aguarde o próximo backup ser salvo sem erros;',+ },+ removeConfirmation:+ 'Remover este armazenamento? Esta ação não pode ser desfeita. Os backups guardados neste armazenamento também serão removidos.',+ removeBlockedByDatabases:+ 'Este armazenamento está em uso em alguns bancos de dados. Remova-o desses bancos de dados primeiro.',+ },+ actions: {+ testConnection: 'Testar conexão',+ },+ connectionTestSucceeded: {+ title: 'Conexão bem-sucedida!',+ description: 'A conexão com o armazenamento foi testada com sucesso',+ },+ transfer: {+ title: 'Transferir armazenamento para outro espaço de trabalho',+ blockedByDatabases:+ 'Este armazenamento está em uso em alguns bancos de dados. Transfira ou remova esses bancos de dados primeiro.',+ description: 'Selecione o espaço de trabalho para onde transferir este armazenamento.',+ targetWorkspace: 'Espaço de trabalho de destino',+ selectWorkspace: 'Selecione o espaço de trabalho',+ submit: 'Transferir',+ },+ fields: {+ path: 'Caminho',+ remotePath: 'Caminho remoto',+ share: 'Compartilhamento',+ domain: 'Domínio',+ useSsl: 'Usar SSL',+ useSslTls: 'Usar SSL/TLS',+ skipTls: 'Não verificar TLS',+ skipTlsVerify: 'Não verificar TLS',+ skipHostKey: 'Não verificar a chave do host',+ authMethod: 'Método de autenticação',+ privateKey: 'Chave privada',+ credentials: 'Credenciais',+ s3Bucket: 'Bucket S3',+ region: 'Região',+ accessKey: 'Chave de acesso',+ secretKey: 'Chave secreta',+ endpoint: 'Endpoint',+ folderPrefix: 'Prefixo da pasta',+ prefix: 'Prefixo',+ blobPrefix: 'Prefixo dos blobs',+ virtualHost: 'Host virtual',+ storageClass: 'Classe de armazenamento',+ connection: 'String de conexão',+ connectionString: 'String de conexão',+ accountName: 'Nome da conta',+ accountKey: 'Chave da conta',+ containerName: 'Nome do container',+ clientId: 'ID do cliente',+ clientSecret: 'Chave secreta do cliente',+ userToken: 'Token do usuário',+ config: 'Configuração',+ },+ edit: {+ namePlaceholder: 'Meu armazenamento',+ advancedSettings: 'Configurações avançadas',+ optionalPlaceholder: '{{example}} (opcional)',+ usernamePlaceholder: 'usuário',+ passwordPlaceholder: 'senha',+ remotePathTooltip: 'Caminho do diretório remoto onde os backups serão guardados (opcional)',+ local: {+ diskSpaceWarning:+ 'Cuidado: com o armazenamento local, o espaço em disco pode acabar. Recomendamos usar o S3 ou armazenamentos sem limite de espaço',+ },+ s3: {+ cloudflareR2Guide: 'Como usar com o Cloudflare R2?',+ endpointTooltip:+ 'URL de um endpoint compatível com S3 (opcional; deixe em branco para o AWS S3)',+ prefixTooltip:+ "Prefixo opcional para todas as chaves de objeto (por exemplo, 'backups/' ou 'my_team/'). Pode não funcionar com alguns armazenamentos compatíveis com S3. Não pode ser alterado depois da criação (caso contrário, os backups serão perdidos).",+ useVirtualHostedStyle: 'Usar estilo virtual-hosted',+ virtualHostTooltip:+ 'Usa URLs no estilo virtual-hosted (bucket.s3.region.amazonaws.com) em vez do estilo path (s3.region.amazonaws.com/bucket). Pode ser necessário se aparecerem erros de COS.',+ skipTls: 'Não verificar TLS',+ skipTlsVerifyTooltip:+ 'Não verifica o certificado TLS. Ative se o seu armazenamento compatível com S3 usa um certificado autoassinado. Atenção: isso reduz a segurança.',+ storageClassTooltip:+ 'Classe de armazenamento S3 para os objetos enviados. Deixe o padrão para usar Standard. Alguns provedores oferecem classes mais baratas, como One Zone IA. Não use Glacier/Deep Archive: os arquivos precisam estar disponíveis na hora para as restaurações.',+ },+ googleDrive: {+ guideLink: 'Como conectar o Google Drive?',+ authorize: 'Autorizar',+ },+ nas: {+ shareWithSlashWarning:+ 'Informe só o nome de um compartilhamento. Use o campo Caminho para subdiretórios (por exemplo, Compartilhamento: Databasus, Caminho: DB1)',+ useSslTooltip: 'Ativa a criptografia SSL/TLS para proteger a conexão',+ domainTooltip:+ 'Nome do domínio Windows (opcional; deixe em branco se não usar autenticação de domínio)',+ pathPlaceholder: '{{example}} (opcional, sem barra no início)',+ pathTooltip: 'Caminho do subdiretório dentro do compartilhamento (opcional)',+ },+ azureBlob: {+ connectionStringTooltip: 'String de conexão do Azure Storage, disponível no Azure Portal',+ endpointTooltip:+ 'URL de um endpoint personalizado (opcional; deixe em branco para o Azure padrão)',+ prefixTooltip:+ "Prefixo opcional para todos os nomes de blob (por exemplo, 'backups/' ou 'my_team/')",+ },+ ftp: {+ enableFtps: 'Ativar FTPS',+ useSslTooltip:+ 'Usa criptografia TLS explícita (FTPS) para transferir os arquivos com segurança',+ skipCertificateVerification: 'Não verificar o certificado',+ skipTlsVerifyTooltip:+ 'Não verifica o certificado TLS. Ative se o seu servidor FTP usa um certificado autoassinado. Atenção: isso reduz a segurança.',+ },+ sftp: {+ privateKeyTooltip:+ 'Cole sua chave privada SSH (formato PEM). Aceita chaves RSA, DSA, ECDSA e Ed25519.',+ skipHostKeyVerification: 'Não verificar a chave do host',+ skipHostKeyTooltip:+ 'Não verifica a chave SSH do host. Ative se você confia no servidor. Atenção: isso reduz a segurança.',+ },+ rclone: {+ configTooltip:+ "Cole aqui o conteúdo do rclone.conf. Você pode obtê-lo executando 'rclone config file' e copiando o resultado. Essa configuração aceita mais de 70 provedores de armazenamento na nuvem.",+ configHiddenNote:+ '*o conteúdo fica oculto para não expor dados sensíveis. Se quiser atualizar a configuração existente, cole uma nova aqui',+ docsLink: 'Documentação do Rclone',+ remotePathTooltip:+ "Prefixo de caminho opcional no remote do rclone onde os backups serão guardados (por exemplo, '/backups' ou 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/locales/ru.ts b/frontend/src/shared/i18n/locales/ru.tsnew file mode 100644index 00000000..faf6af80--- /dev/null+++ b/frontend/src/shared/i18n/locales/ru.ts@@ -0,0 +1,1797 @@+import type { en } from './en';++export const ru: typeof en = {+ language: {+ nativeName: 'Русский',+ },+ common: {+ actions: {+ add: 'Добавить',+ back: 'Назад',+ cancel: 'Отмена',+ close: 'Закрыть',+ confirm: 'Подтвердить',+ continue: 'Продолжить',+ copy: 'Копировать',+ create: 'Создать',+ delete: 'Удалить',+ download: 'Скачать',+ edit: 'Изменить',+ ok: 'OK',+ refresh: 'Обновить',+ remove: 'Удалить',+ retry: 'Повторить',+ save: 'Сохранить',+ },+ answers: {+ no: 'Нет',+ yes: 'Да',+ },+ fields: {+ host: 'Хост',+ name: 'Название',+ password: 'Пароль',+ port: 'Порт',+ status: 'Статус',+ type: 'Тип',+ username: 'Имя пользователя',+ },+ states: {+ disabled: 'Выключено',+ enabled: 'Включено',+ loading: 'Загрузка...',+ },+ messages: {+ copiedToClipboard: 'Скопировано в буфер обмена',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: ', ',+ confirmation: {+ title: 'Подтверждение',+ },+ },+ app: {+ documentTitle: 'Databasus — резервное копирование баз данных (PostgreSQL, MySQL, MongoDB)',+ languageControl: {+ title: 'Язык: {{language}}',+ },+ theme: {+ title: 'Тема: {{theme}}',+ light: 'Светлая',+ dark: 'Темная',+ system: 'Системная',+ },+ navigation: {+ databases: 'Базы данных',+ storages: 'Хранилища',+ notifiers: 'Каналы уведомлений',+ workspaceSettings: 'Настройки',+ profile: 'Профиль',+ databasusSettings: 'Настройки Databasus',+ users: 'Пользователи',+ docs: 'Документация',+ documentation: 'Документация',+ community: 'Сообщество',+ newVersionAvailable: 'Доступна новая версия',+ },+ diskUsage: {+ title: 'Место на диске',+ hint: 'Чтобы делать бекапы локально и восстанавливаться из них, на диске должно хватать места. Для восстановления нужно столько же свободного места, сколько занимает бекап.',+ compactSummary: 'Занято {{used}} из {{total}} GB<lineBreak/>({{percent}}%)',+ summary: 'Занято {{used}} из {{total}} GB ({{percent}}%)',+ },+ workspaceSelection: {+ createShort: 'Создать',+ create: 'Создать рабочее пространство',+ selected: 'Рабочее пространство',+ placeholder: 'Выберите рабочее пространство',+ search: 'Поиск рабочих пространств...',+ notFound: 'Рабочие пространства не найдены',+ createNew: '+ Новое рабочее пространство',+ },+ sponsorship: {+ link: 'Поддержать',+ hint: 'Databasus спас ваши данные? Поддержите проект, чтобы он оставался бесплатным, развивался и не зависел ни от кого.',+ },+ starButton: {+ label: 'Поставить звезду',+ ariaLabel: 'Поставить звезду databasus/databasus на GitHub',+ },+ clipboardPaste: {+ title: 'Вставка из буфера обмена',+ submit: 'Готово',+ description:+ 'Автоматический доступ к буферу обмена недоступен. Вставьте содержимое в поле ниже.',+ placeholder: 'Вставьте строку подключения...',+ },+ auth: {+ adminPasswordCheckFailed: 'Не удалось проверить, задан ли пароль администратора: {{error}}',+ },+ oauthCallback: {+ failedTitle: 'Не удалось войти',+ codeNotFound: 'Не найден код авторизации',+ stateMissing: 'Нет параметра state OAuth',+ invalidProvider: 'Неизвестный OAuth-провайдер',+ returnToSignIn: 'Вернуться ко входу',+ completing: 'Завершаем вход...',+ },+ oauthStorage: {+ configNotFound: 'Не найдены настройки хранилища Google Drive',+ exchangeFailed: 'Не удалось обменять код OAuth на токен',+ unsupportedType: 'Этот тип хранилища не поддерживает OAuth',+ invalidState: 'Некорректный параметр state OAuth',+ paramNotFound:+ 'Не найдены параметры OAuth. Проверьте, правильно ли настроен адрес перенаправления.',+ addStorageTitle: 'Добавить хранилище',+ storageDescription: 'Хранилище — место, где хранятся бекапы (локальный диск, S3 и т. п.)',+ },+ },+ errors: {+ unknown: 'Что-то пошло не так. Попробуйте еще раз.',+ networkUnreachable: 'Сервер Databasus недоступен. Проверьте подключение и попробуйте еще раз.',+ requestFailed: 'Сервер не смог выполнить запрос (HTTP {{status}}). Попробуйте позже.',+ },+ status: {+ logicalBackup: {+ inProgress: 'Выполняется',+ completed: 'Успешно',+ failed: 'Ошибка',+ deleted: 'Удален',+ canceled: 'Отменен',+ },+ physicalBackup: {+ inProgress: 'Выполняется',+ completed: 'Успешно',+ error: 'Ошибка',+ chainBroken: 'Цепочка прервана',+ canceled: 'Отменен',+ },+ restoreVerification: {+ verifiedSuccessful: 'Проверен',+ verificationFailed: 'Проверка не пройдена',+ },+ restore: {+ inProgress: 'Выполняется',+ completed: 'Успешно',+ failed: 'Ошибка',+ canceled: 'Отменено',+ },+ verification: {+ pending: 'В очереди',+ running: 'Выполняется',+ completed: 'Успешно',+ failed: 'Ошибка',+ canceled: 'Отменена',+ },+ health: {+ available: 'Доступна',+ unavailable: 'Недоступна',+ },+ agent: {+ neverSeen: 'Еще не подключался',+ online: 'В сети',+ stale: 'Отвечает с задержкой',+ offline: 'Не в сети',+ },+ },+ intervals: {+ types: {+ hourly: 'Ежечасно',+ daily: 'Ежедневно',+ weekly: 'Еженедельно',+ monthly: 'Ежемесячно',+ cron: 'Cron',+ },+ weekdays: {+ mon: 'Пн',+ tue: 'Вт',+ wed: 'Ср',+ thu: 'Чт',+ fri: 'Пт',+ sat: 'Сб',+ sun: 'Вс',+ },+ periods: {+ day: '1 день',+ week: '1 неделя',+ month: '1 месяц',+ threeMonths: '3 месяца',+ sixMonths: '6 месяцев',+ year: '1 год',+ twoYears: '2 года',+ threeYears: '3 года',+ fourYears: '4 года',+ fiveYears: '5 лет',+ forever: 'Бессрочно',+ },+ },+ auditLogs: {+ title: 'Журнал аудита',+ columns: {+ user: 'Пользователь',+ message: 'Событие',+ workspace: 'Рабочее пространство',+ created: 'Время',+ },+ systemUser: 'Система',+ loadedOfTotal: 'Загружено: {{loaded}} из {{total}}',+ empty: 'Записей в журнале нет.',+ loadingMore: 'Загружаем еще записи...',+ allLoaded: 'Все записи загружены (всего {{count}})',+ },+ settings: {+ title: 'Настройки Databasus',+ externalRegistrations: {+ title: 'Разрешить свободную регистрацию',+ description:+ 'Если включено, новые пользователи могут сами зарегистрироваться в Databasus. Если выключено — только по приглашению.',+ },+ memberInvitations: {+ title: 'Разрешить участникам приглашать',+ description:+ 'Если включено, участники могут приглашать в Databasus новых пользователей. Если выключено — приглашают только администраторы.',+ },+ memberWorkspaceCreation: {+ title: 'Участники могут создавать рабочие пространства',+ description:+ 'Если включено, участники (не администраторы) могут создавать новые рабочие пространства. Если выключено — только администраторы.',+ },+ saving: 'Сохраняем...',+ saveChanges: 'Сохранить изменения',+ reset: 'Сбросить',+ updated: 'Настройки сохранены',+ readMore: 'Подробнее о настройках — <docsLink>в документации</docsLink>',+ healthcheck: {+ title: 'Проверка доступности',+ openInNewTab: 'Открыть в новой вкладке',+ copied: 'Адрес проверки доступности скопирован',+ description: 'По этому адресу можно отслеживать, доступна ли ваша система Databasus',+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: 'Выключен',+ require: 'Обязателен',+ verifyCa: 'Проверка CA',+ verifyFull: 'Полная проверка',+ },+ physicalBackupTypes: {+ full: 'Только полные бекапы',+ fullIncremental: 'Полный + инкрементальный',+ fullIncrementalWalStream: 'Полный + инкрементальный + стриминг WAL',+ },+ list: {+ addDatabase: 'Добавить базу данных',+ searchPlaceholder: 'Поиск базы данных',+ noSearchResults: 'Не найдено баз данных по запросу «{{query}}»',+ description: 'База данных — это база, для которой мы делаем бекап',+ backToList: '← Назад к базам данных',+ },+ card: {+ storage: 'Хранилище: <storageName/>',+ lastBackup: 'Последний бекап {{relativeTime}}',+ hasBackupError: 'Есть ошибка бекапа',+ },+ tabs: {+ config: 'Настройки',+ backups: 'Бекапы',+ verifications: 'Проверки',+ },+ create: {+ title: 'Добавить базу данных для бекапа',+ namePlaceholder: 'Моя любимая БД',+ creating: 'Создаем базу данных...',+ complete: 'Завершить',+ backupType: {+ title: 'Выберите тип бекапа',+ logical: {+ title: 'Логический',+ description: 'Рекомендуется для баз данных меньше 50 GB. Проще в настройке.',+ },+ physical: {+ title: 'Физический',+ description:+ 'Для баз данных больше 50 GB. Позволяет восстановиться на любой момент времени и улучшает RPO/RTO, но требует дополнительной настройки.',+ },+ },+ },+ config: {+ namePlaceholder: 'Введите название...',+ removing: 'Удаляем базу данных...',+ lastBackupError: {+ title: 'Ошибка последнего бекапа',+ errorLabel: 'Ошибка:',+ clearHint: 'Чтобы убрать эту ошибку, сделайте одно из двух:',+ clearByTestingConnection:+ '- проверьте подключение кнопкой ниже (даже если вы уже изменили настройки);',+ clearByNextBackup: '- дождитесь следующего бекапа без ошибок;',+ },+ sections: {+ database: 'Настройки базы данных',+ backupConfig: 'Настройки бекапов',+ healthcheck: 'Проверка доступности',+ restoreVerification: 'Проверка восстановления',+ notifiers: 'Каналы уведомлений',+ },+ copyConfirmation:+ 'Скопировать эту базу данных? Будет создана новая база данных с теми же настройками.',+ removeConfirmation: 'Удалить эту базу данных? Это действие нельзя отменить.',+ copied: {+ title: 'База данных скопирована',+ description: 'База данных «{{name}}» создана',+ },+ connectionTestSucceeded: {+ title: 'Подключение работает',+ description: 'Подключение к базе данных проверено',+ },+ },+ actions: {+ testConnection: 'Проверить подключение',+ replace: 'Заменить',+ },+ fields: {+ databaseType: 'Тип базы данных',+ version: 'Версия {{engine}}',+ databaseName: 'Имя БД',+ sslMode: 'Режим SSL',+ useHttps: 'Использовать HTTPS',+ cpuCount: 'Количество CPU',+ backupType: 'Тип бекапа',+ clientCertificate: 'Сертификат клиента',+ clientKey: 'Ключ клиента',+ serverCaCertificate: 'CA-сертификат сервера',+ includeSchemas: 'Включаемые схемы',+ excludeTables: 'Исключаемые таблицы',+ skipUserMappings: 'Пропускать user mappings',+ excludeExtensions: 'Исключать расширения',+ restoreOwnership: 'Восстанавливать владельцев',+ restorePrivileges: 'Восстанавливать привилегии',+ excludeEvents: 'Исключать события',+ galeraReplication: 'Репликация Galera',+ useSrvConnection: 'Подключение через SRV',+ directConnection: 'Прямое подключение',+ authDatabase: 'База аутентификации',+ excludeCollections: 'Исключаемые коллекции',+ },+ edit: {+ parseFromClipboard: 'Заполнить из буфера обмена',+ clipboardEmpty: 'Буфер обмена пуст',+ clipboardReadFailed: 'Не удалось прочитать буфер обмена. Проверьте разрешения браузера.',+ connectionStringParsed: 'Поля заполнены из строки подключения',+ connectionStringParsedWithoutPassword:+ 'Поля заполнены из строки подключения. Введите пароль вручную.',+ connectionTestPassed: {+ title: 'Подключение проверено',+ description: 'Можно переходить к следующему шагу',+ },+ ipWhitelistHint:+ 'Если база данных принимает подключения только с разрешенных IP-адресов, добавьте в этот список IP-адрес сервера Databasus.',+ localhostHint:+ '<docsLink>Прочитайте эту статью</docsLink>, чтобы узнать, как делать бекап локальной базы данных',+ advancedSettings: 'Дополнительные настройки',+ placeholders: {+ host: 'Введите хост {{engine}}',+ port: 'Введите порт {{engine}}',+ username: 'Введите имя пользователя {{engine}}',+ password: 'Введите пароль {{engine}}',+ databaseName: 'Введите имя базы данных {{engine}}',+ },+ cpuCountTooltip:+ 'Сколько ядер CPU использовать для бекапа и восстановления. Большее значение может ускорить работу, но потребует больше ресурсов.',+ excludeTablesPlaceholder: 'Таблицы не исключены',+ excludeTablesTooltip:+ 'Таблицы, которые не попадут в бекап. Можно вставить список через запятую или с новой строки.',+ serverCaCertificateTooltip:+ 'Необязательно. Если указан, сертификат сервера проверяется по этому CA (verify-ca / verify-full).',+ copyFailed: 'Не удалось скопировать',+ postgresql: {+ supabaseHint:+ '<docsLink>Прочитайте эту статью</docsLink>, чтобы узнать, как делать бекап базы данных Supabase',+ includeSchemasPlaceholder: 'Все схемы (по умолчанию)',+ excludeTablesTooltip:+ "Таблицы, которые не попадут в бекап. Укажите 'tablename' или 'schema.tablename'. Поддерживаются glob-шаблоны (например, 'logs_*'). Можно вставить список через запятую или с новой строки.",+ skipUserMappingsTooltip:+ 'Не восстанавливать user mappings (команды CREATE USER MAPPING). Включите, если роль для бекапа не может прочитать их учетные данные: иначе они попадут в дамп без параметров и сломают восстановление для FDW вроде oracle_fdw.',+ excludeExtensionsTooltip:+ 'Не восстанавливать определения расширений (команды CREATE EXTENSION). Включите, если восстанавливаете в управляемый PostgreSQL, где расширениями управляет провайдер.',+ restoreOwnershipTooltip:+ 'Применить команды ALTER OWNER из дампа, чтобы у восстановленных объектов остались исходные владельцы. Пользователь подключения должен уметь назначать эти роли — обычно это суперпользователь.',+ restorePrivilegesTooltip:+ 'Применить команды GRANT и REVOKE из дампа, чтобы у восстановленных объектов остались исходные ACL. Пользователь подключения должен уметь выдавать права упомянутым ролям — обычно это суперпользователь.',+ backupTypeTooltips: {+ full: 'Периодические полные бекапы. Каждый бекап самодостаточен.',+ fullIncremental:+ 'Полные бекапы и инкрементальные, в которых хранятся только изменения с предыдущего бекапа. Меньше по объему и быстрее.',+ fullIncrementalWalStream:+ 'Добавляет к полным и инкрементальным бекапам непрерывный стриминг WAL. Только этот вариант позволяет восстановиться на любой момент времени (PITR), но занимает больше места и восстанавливается медленнее.',+ },+ },+ mariadb: {+ skipEvents: 'Пропускать события',+ skipEventsTooltip:+ 'Не включать события базы данных в бекап. Включите, если на сервере MariaDB отключен планировщик событий.',+ skipGaleraDisable: 'Не отключать при восстановлении',+ skipGaleraDisableTooltip:+ 'По умолчанию при восстановлении Databasus выполняет SET SESSION wsrep_on=OFF, чтобы избежать ошибок размера writeset в Galera. Для этого нужна привилегия SUPER. Включите, если провайдер управляемой базы данных не выдает привилегию SUPER. Но тогда восстановление больших бекапов может упереться в лимиты writeset Galera.',+ },+ mongodb: {+ srvTooltip:+ 'Включите для SRV-подключений MongoDB Atlas (mongodb+srv://). Для SRV-подключения порт не нужен.',+ srvOverTunnelTooltip:+ 'Недоступно через SSH-туннель: SRV сам получает список хостов и обходит проброшенный порт.',+ directConnectionTooltip:+ 'Подключаться напрямую к одному серверу, без обнаружения replica set. Полезно, если сервер стоит за балансировщиком, прокси или туннелем.',+ directConnectionOverTunnelTooltip:+ 'Всегда включено, пока включен SSH-туннель: туннель дает только один адрес, поэтому обнаружение replica set недоступно.',+ excludeCollectionsPlaceholder: 'Коллекции не исключены',+ excludeCollectionsTooltip:+ 'Коллекции, которые не попадут в бекап. Можно вставить список через запятую или с новой строки.',+ },+ },+ show: {+ galeraDisableSkipped: 'Не отключается при восстановлении',+ },+ sshTunnel: {+ authTypes: {+ password: 'Пароль',+ privateKey: 'Закрытый ключ',+ },+ title: 'SSH-туннель',+ tooltip:+ 'Для базы данных в закрытой сети. Databasus подключается к SSH-хосту ниже, а тот обращается к базе данных по хосту и порту, указанным выше.',+ host: 'SSH-хост',+ hostTooltip:+ 'SSH-хост, а не Databasus, сам находит хост базы данных, указанный выше. Если база данных работает на самом SSH-хосте, укажите 127.0.0.1.',+ port: 'SSH-порт',+ username: 'Пользователь SSH',+ usernamePlaceholder: 'Введите имя пользователя SSH',+ authType: 'Аутентификация SSH',+ credentials: 'Учетные данные SSH',+ password: 'Пароль SSH',+ passwordPlaceholder: 'Введите пароль SSH',+ privateKey: 'Закрытый ключ SSH',+ keyPassphrase: 'Парольная фраза',+ keyPassphrasePlaceholder: 'Только для зашифрованного ключа',+ },+ notifiers: {+ title: 'Каналы уведомлений',+ description:+ 'Канал уведомлений — это место, куда отправляются уведомления (email, Slack, Telegram и т. д.)',+ multipleHint: 'Можно выбрать несколько каналов: уведомления придут во все.',+ selectPlaceholder: 'Выберите каналы уведомлений',+ createNew: 'Создать канал уведомлений',+ addTitle: 'Добавить канал уведомлений',+ notifyTo: 'Куда уведомлять',+ empty: 'Каналы уведомлений не настроены',+ },+ readOnlyUser: {+ dialogTitle: 'Создать пользователя только для чтения',+ readOnly: {+ checking: 'Проверяем пользователя только для чтения...',+ title: 'Создать для Databasus пользователя только для чтения?',+ description:+ 'Пользователь только для чтения — это пользователь {{databaseType}} с ограниченными правами: он может только читать данные из базы, но не изменять их. Для бекапов так лучше, потому что:',+ noWriteCredentials:+ '<bold>С пользователем только для чтения учетные данные с правом записи вообще не хранятся</bold>. Даже в худшем случае, при взломе, никто не сможет испортить ваши данные.',+ create: 'Да, создать пользователя только для чтения',+ skipTitle: 'Не создавать пользователя только для чтения?',+ skipQuestion: 'Точно пропустить создание пользователя только для чтения?',+ },+ replicationOnly: {+ checking: 'Проверяем пользователя только для репликации...',+ title: 'Создать для Databasus пользователя только для репликации?',+ description:+ 'Пользователь только для репликации — это пользователь {{databaseType}} с ограниченными правами: он может только читать данные из базы, но не изменять их. Для бекапов так лучше, потому что:',+ noWriteCredentials:+ '<bold>С пользователем только для репликации учетные данные с правом записи вообще не хранятся</bold>. Даже в худшем случае, при взломе, никто не сможет испортить ваши данные.',+ create: 'Да, создать пользователя только для репликации',+ skipTitle: 'Не создавать пользователя только для репликации?',+ skipQuestion: 'Точно пропустить создание пользователя только для репликации?',+ },+ reasons: {+ preventsModifications: 'он исключает случайное изменение данных во время бекапа',+ leastPrivilege: 'он соответствует принципу минимальных привилегий',+ bestPractice: 'это рекомендуемая практика безопасности',+ },+ securityNote:+ 'Databasus придерживается требований безопасности корпоративного уровня (<docsLink>подробнее здесь</docsLink>). Но закрыть все возможные риски нельзя.',+ noWritePrivileges: 'У текущего пользователя <bold>нет привилегий на запись</bold>.',+ noWriteRoles: 'У текущего пользователя <bold>нет ролей с правом записи</bold>.',+ writePrivileges: 'У текущего пользователя есть привилегии на запись:',+ writeRoles: 'У текущего пользователя есть роли с правом записи:',+ expand: '(развернуть)',+ collapse: '(свернуть)',+ skip: 'Пропустить',+ skipRisk:+ 'Использовать для бекапов пользователя с полными правами не рекомендуется: это создает риски для безопасности. Databasus настоятельно советует не пропускать этот шаг.',+ skipAdvice:+ 'Стопроцентной защиты не бывает. Лучше подстраховаться даже от риска взлома в 0,01%. Поэтому надежнее пойти безопасным путем и использовать пользователя только для чтения.',+ acceptRisks: 'Да, я принимаю риски',+ continueSecurely: 'Продолжить безопасным путем',+ forcedWalRotationUnavailable:+ 'Источник не выдал новому пользователю право EXECUTE на pg_switch_wal(), а оно нужно непрерывному стримингу WAL, чтобы точка восстановления оставалась близко к текущему моменту. Полные и инкрементальные бекапы с этими учетными данными работают как обычно.',+ },+ transfer: {+ title: 'Перенос базы данных в другое рабочее пространство',+ targetWorkspace: 'Целевое рабочее пространство',+ selectWorkspace: 'Выберите рабочее пространство',+ storage: {+ title: 'Хранилище',+ transferExisting: 'Перенести вместе с текущим хранилищем',+ selectFromTarget: 'Выбрать хранилище в целевом рабочем пространстве',+ blocked:+ 'Баз данных с этим хранилищем: {{count}}. Перенос заблокирован, потому что от хранилища зависят другие базы данных.',+ canTransfer: 'Хранилище можно перенести',+ selectPlaceholder: 'Выберите хранилище',+ createNew: 'Создать хранилище',+ addTitle: 'Добавить хранилище',+ description:+ 'Хранилище — это место, где хранятся бекапы (локальный диск, S3, Google Drive и т. д.)',+ },+ notifiers: {+ title: 'Каналы уведомлений (необязательно)',+ transferWithDatabase: 'Перенести каналы уведомлений вместе с базой данных',+ selectFromTarget: 'Выбрать каналы уведомлений в целевом рабочем пространстве',+ willTransfer: 'Будут перенесены:',+ willNotTransfer: 'НЕ будут перенесены (используются другими базами данных):',+ usedByDatabases: '{{name}} (используется в базах данных: {{count}})',+ noneTransferred:+ 'Ни один канал уведомлений не будет перенесен. После переноса можно выбрать каналы в целевом рабочем пространстве.',+ selectPlaceholder: 'Выберите каналы уведомлений (необязательно)',+ },+ submit: 'Перенести',+ transferred: {+ title: 'База данных перенесена',+ description: 'База данных «{{name}}» перенесена в новое рабочее пространство',+ },+ },+ connectionString: {+ errors: {+ empty: 'Строка подключения пуста',+ unrecognizedFormat: 'Не удалось распознать формат строки подключения',+ hostMissing: 'В строке подключения не указан хост',+ usernameMissing: 'В строке подключения не указан пользователь',+ passwordMissing: 'В строке подключения не указан пароль',+ databaseMissing: 'В строке подключения не указано имя базы данных',+ parseFailed: 'Не удалось разобрать строку подключения',+ jdbc: {+ invalidFormat: 'Неверный формат строки подключения JDBC. Ожидается: {{expectedFormat}}',+ queryParametersMissing: 'В строке подключения JDBC нет параметров user и password',+ usernameMissing: 'В строке подключения JDBC не указан пользователь (параметр user)',+ passwordMissing: 'В строке подключения JDBC не указан параметр password',+ parseFailed: 'Не удалось разобрать строку подключения JDBC',+ },+ keyValue: {+ hostMissing: 'В строке подключения не указан хост. Добавьте host=hostname',+ usernameMissing: 'В строке подключения не указан пользователь. Добавьте user=username',+ passwordMissing: 'В строке подключения не указан пароль. Добавьте password=yourpassword',+ databaseMissing:+ 'В строке подключения не указано имя базы данных. Добавьте database=database',+ parseFailed: 'Не удалось разобрать строку подключения в формате «ключ=значение»',+ },+ libpq: {+ databaseMissing:+ 'В строке подключения не указано имя базы данных. Добавьте dbname=database',+ parseFailed: 'Не удалось разобрать строку подключения libpq',+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote: 'Выдайте его командой ниже (от имени суперпользователя).',+ applyAndRestartNote: 'Примените изменение ниже и перезапустите PostgreSQL.',+ pgHbaNoEntry: {+ title: 'С этого хоста репликация запрещена',+ summary:+ 'В pg_hba.conf нет записи, разрешающей Databasus подключение для репликации. Физические бекапы передаются через репликацию, а для нее нужно правило «host replication» — обычное «host all» его не покрывает.',+ addLineNote:+ 'Добавьте в pg_hba.conf строку ниже. Первое «all» разрешает любого пользователя, второе — любой хост. Чтобы ограничить доступ, укажите вместо них конкретную роль для репликации и/или диапазон адресов CIDR.',+ reloadNote: 'После изменения pg_hba.conf <bold>перечитайте конфигурацию PG</bold>.',+ managedNote:+ 'В управляемом PostgreSQL (RDS / Azure / GCP) pg_hba.conf не редактируется — разрешите внешний доступ или репликацию в консоли провайдера.',+ },+ badCredentials: {+ title: 'Неверное имя пользователя или пароль',+ summary:+ 'PostgreSQL не принял учетные данные. Проверьте имя пользователя и пароль для этой базы данных.',+ },+ noReplicationPrivilege: {+ title: 'У пользователя нет права на репликацию',+ summary:+ 'Пользователь подключился, но у него нет привилегии REPLICATION, без которой физические бекапы не работают.',+ managedNote:+ 'В AWS RDS выполните GRANT rds_replication TO {{username}}; в Azure / GCP включите репликацию для роли в консоли провайдера.',+ },+ noWalSwitchPrivilege: {+ title: 'Пользователь не может переключить сегмент WAL',+ summary:+ 'Непрерывный стриминг WAL выгружает сегмент только после того, как источник его закроет. Поэтому у базы, в которую редко пишут, свежий WAL остается на источнике, пока сегмент в 16 MB не заполнится. Принудительное переключение по таймеру держит точку восстановления между бекапами близко к текущему моменту, и для него нужно право EXECUTE на pg_switch_wal(). Полным и инкрементальным бекапам оно не нужно: они восстанавливаются на момент окончания бекапа и архивный WAL не воспроизводят.',+ switchBackupTypeNote:+ 'Или переключите тип бекапа на <bold>полный + инкрементальный</bold>: он не воспроизводит архивный WAL.',+ managedNote:+ 'В управляемом PostgreSQL (RDS / Azure / GCP) эта функция принадлежит суперпользователю платформы, и выдать клиентской роли EXECUTE на нее нельзя. Непрерывный стриминг WAL там недоступен — используйте полные и инкрементальные бекапы.',+ },+ walLevelInvalid: {+ title: 'Слишком низкий wal_level',+ summary:+ 'Для физических бекапов wal_level должен быть «replica» или «logical». Сейчас он ниже.',+ applyNote:+ 'Примените изменение ниже и перезапустите PostgreSQL (wal_level вступает в силу только после перезапуска).',+ managedNote: 'В управляемом PostgreSQL задайте wal_level в группе параметров провайдера.',+ },+ noWalSenders: {+ title: 'Нет процессов для отправки WAL',+ summary: 'max_wal_senders равен 0, поэтому PostgreSQL не может передавать WAL для бекапов.',+ managedNote:+ 'В управляемом PostgreSQL задайте max_wal_senders в группе параметров провайдера.',+ },+ noReplicationSlots: {+ title: 'Нет свободных слотов репликации',+ summary:+ 'max_replication_slots равен 0, поэтому PostgreSQL не может выделить слот для бекапов.',+ managedNote:+ 'В управляемом PostgreSQL задайте max_replication_slots в группе параметров провайдера.',+ },+ walSummaryDisabled: {+ title: 'Параметр summarize_wal выключен',+ summary:+ 'Для инкрементальных бекапов summarize_wal должен быть включен. Сейчас на этом сервере он выключен.',+ applyNote: 'Примените изменение ниже (перезапуск не нужен).',+ thenNote: 'а затем',+ managedNote:+ 'В управляемом PostgreSQL задайте summarize_wal в группе параметров провайдера.',+ },+ customTablespaces: {+ title: 'Пользовательские табличные пространства не поддерживаются',+ summary:+ 'В этом кластере есть табличные пространства помимо pg_default / pg_global, а физические бекапы не умеют их передавать. Удалите пользовательские табличные пространства или переведите эту базу данных на логические бекапы.',+ },+ systemIdentifierMismatch: {+ title: 'Это другой кластер',+ summary:+ 'Системный идентификатор кластера по этому адресу не совпадает с тем, для которого настраивался бекап. Укажите Databasus исходный кластер или создайте новую запись базы данных.',+ },+ connectionFailed: {+ title: 'Не удалось подключиться',+ summary:+ 'Databasus не смог открыть подключение для репликации. Проверьте хост, порт, режим SSL и убедитесь, что файрвол не блокирует подключение.',+ },+ },+ },+ restores: {+ list: {+ empty: 'Восстановлений пока нет',+ },+ targetDatabase: {+ select: 'Выбрать базу данных для восстановления',+ description:+ 'Укажите параметры подключения к базе данных, в которую будет восстановлен бекап. <underline>Пустую базу данных для восстановления нужно создать заранее</underline>. При восстановлении все текущие данные в ней будут удалены',+ notInUseHint:+ 'Убедитесь, что базой данных сейчас никто не пользуется (скорее всего, вы не хотите восстанавливать данные в ту же БД, с которой сделан бекап)',+ submit: 'Восстановить в эту БД',+ },+ card: {+ startedAt: 'Запущено',+ duration: 'Прошло',+ errorDetailsTooltip: 'Нажмите, чтобы посмотреть подробности ошибки',+ cancelTooltip: 'Отменить восстановление',+ expectedDurationHint:+ 'Восстановление обычно идет в 3-5 раз дольше, чем создание бекапа (иногда быстрее, иногда медленнее — зависит от типа данных)',+ expectedDurationLimit: 'То есть оно может занять до {{duration}} (обычно заметно меньше)',+ },+ errorDetails: {+ title: 'Подробности ошибки восстановления',+ copied: 'Текст ошибки скопирован',+ excludeExtensionsTip:+ '<bold>💡 Совет:</bold> обычно эта ошибка возникает при восстановлении в управляемый PostgreSQL (Yandex Cloud, AWS RDS и похожие сервисы). Попробуйте перед восстановлением включить <bold>«Исключать расширения»</bold> в дополнительных настройках.',+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ Внимание:</bold> если отменить восстановление, база данных, скорее всего, останется поврежденной или неполной. Перед новой попыткой восстановления ее придется создать заново.',+ question: 'Точно отменить восстановление?',+ confirm: 'Да, отменить восстановление',+ },+ },+ healthcheck: {+ attempts: {+ title: 'Проверки доступности',+ period: 'Период',+ periods: {+ today: 'Сегодня',+ sevenDays: '7 дней',+ thirtyDays: '30 дней',+ allTime: 'Все время',+ },+ empty: 'Данных пока нет',+ },+ config: {+ enable: 'Проверять доступность',+ isEnabled: 'Проверка включена',+ notifyWhenUnavailable: 'Уведомлять о недоступности',+ checkIntervalMinutes: 'Интервал проверки (мин)',+ attemptsBeforeDown: 'Попыток до недоступности',+ storeAttemptsDays: 'Хранить историю (дней)',+ tooltips: {+ enable: 'Включает или выключает проверку доступности этой базы данных',+ notifyWhenUnavailable: 'Отправлять уведомления, когда база данных становится недоступной',+ checkIntervalMinutes: 'Как часто проверять доступность базы данных (в минутах)',+ attemptsBeforeDown:+ 'Сколько неудачных попыток нужно, чтобы база данных считалась недоступной',+ storeAttemptsDays: 'Сколько дней хранить историю проверок доступности',+ },+ },+ },+ workspaces: {+ roles: {+ owner: 'Владелец',+ admin: 'Администратор',+ member: 'Участник',+ viewer: 'Наблюдатель',+ },+ fields: {+ name: 'Название рабочего пространства',+ namePlaceholder: 'Введите название рабочего пространства',+ },+ create: {+ title: 'Новое рабочее пространство',+ submit: 'Создать рабочее пространство',+ defaultName: 'Мое рабочее пространство',+ description:+ 'Рабочее пространство объединяет:<lineBreak/>- ваши базы данных;<lineBreak/>- хранилища (локальный диск, S3, Google Drive и т. д.);<lineBreak/>- каналы уведомлений (email, Slack, Telegram и т. д.);<lineBreak/>- управление доступом (если вы работаете в команде).',+ nameRequired: 'Введите название рабочего пространства',+ created: 'Рабочее пространство создано',+ permissionDenied: {+ title: 'Недостаточно прав',+ description:+ 'У вас нет прав на создание рабочих пространств. Попросите администратора создать рабочее пространство.',+ },+ },+ settings: {+ title: 'Настройки рабочего пространства',+ readOnly: 'У вас нет прав на изменение этих настроек',+ nameRequired: 'Укажите название рабочего пространства',+ saving: 'Сохраняем...',+ saveChanges: 'Сохранить изменения',+ reset: 'Сбросить',+ updated: 'Основная информация сохранена',+ },+ delete: {+ dangerZone: 'Опасная зона',+ title: 'Удалить это рабочее пространство',+ description:+ 'Удаление необратимо: все данные и ресурсы этого рабочего пространства будут удалены навсегда.',+ submit: 'Удалить рабочее пространство',+ deleting: 'Удаляем...',+ notFound: 'Рабочее пространство не найдено',+ noPermission: 'У вас нет прав на удаление этого рабочего пространства',+ hasDatabases:+ 'Нельзя удалить рабочее пространство, пока в нем есть базы данных. Сначала удалите их. Найдено баз данных: {{count}}.',+ deleted: 'Рабочее пространство удалено',+ confirmation: {+ title: 'Удаление рабочего пространства',+ question: 'Удалить рабочее пространство <workspaceName/>?',+ warning:+ '<bold>Это действие нельзя отменить.</bold> Все данные и связанные ресурсы будут удалены навсегда.',+ submit: 'Удалить',+ },+ },+ members: {+ title: 'Пользователи',+ count: 'Участников: {{count}}',+ empty: 'Участников нет',+ emptyHint: 'Нажмите «Добавить участника», чтобы начать',+ fields: {+ member: 'Участник',+ role: 'Роль',+ joined: 'Дата добавления',+ actions: 'Действия',+ email: 'Email',+ emailPlaceholder: 'Введите email',+ },+ add: {+ button: 'Добавить участника',+ title: 'Новый участник',+ submit: 'Добавить',+ emailRequired: 'Укажите email',+ hint: 'Если пользователь уже зарегистрирован, он сразу станет участником. Если нет, ему придет приглашение.',+ added: 'Участник добавлен',+ },+ invited: {+ title: 'Пользователь приглашен',+ sentTo: 'Приглашение отправлено на {{email}}',+ description:+ 'Этого пользователя пока нет в системе, но он уже приглашен в рабочее пространство. После регистрации с этим адресом он автоматически станет участником.',+ },+ roleChanged: 'Роль участника изменена',+ remove: {+ tooltip: 'Удалить участника',+ title: 'Удаление участника',+ question: 'Удалить {{email}} из этого рабочего пространства?',+ removed: 'Участник {{email}} удален',+ },+ },+ transferOwnership: {+ button: 'Передать владение',+ title: 'Передача владения рабочим пространством',+ submit: 'Передать владение',+ warning:+ '<bold>Внимание:</bold> это действие нельзя отменить. Вы перестанете быть владельцем рабочего пространства, а новый владелец получит полный контроль над ним.',+ noEligibleMembers:+ 'Некому передать владение. Для этого в рабочем пространстве должен быть хотя бы еще один участник.',+ newOwner: 'Новый владелец',+ newOwnerPlaceholder: 'Выберите участника',+ newOwnerHint: 'Выбранный участник станет владельцем рабочего пространства',+ memberRequired: 'Выберите участника, которому передать владение',+ memberNotFound: 'Выбранный участник не найден',+ transferred: 'Владение передано',+ },+ auditLogs: {+ empty: 'В журнале этого рабочего пространства записей нет.',+ },+ },+ users: {+ roles: {+ admin: 'Администратор',+ member: 'Участник',+ },+ fields: {+ name: 'Имя',+ email: 'Email',+ yourName: 'Ваше имя',+ yourEmail: 'Ваш email',+ confirmPassword: 'Повторите пароль',+ newPassword: 'Новый пароль',+ },+ validation: {+ nameRequired: 'Укажите имя',+ emailRequired: 'Укажите email',+ passwordTooShort: 'Пароль слишком короткий. Минимальная длина: {{minLength}}',+ passwordsDoNotMatch: 'Пароли не совпадают',+ },+ oauth: {+ divider: 'или через email',+ continueWithGithub: 'Войти через GitHub',+ continueWithGoogle: 'Войти через Google',+ invalidConfiguration: 'OAuth настроен неправильно',+ },+ signIn: {+ title: 'Вход',+ submit: 'Войти',+ noAccount: 'Нет аккаунта? <signUpLink>Зарегистрируйтесь</signUpLink>',+ forgotPassword: 'Забыли пароль?',+ },+ signUp: {+ title: 'Регистрация',+ namePlaceholder: 'Иван Иванов',+ submit: 'Зарегистрироваться',+ hasAccount: 'Уже есть аккаунт? <signInLink>Войдите</signInLink>',+ },+ adminPassword: {+ title: 'Регистрация администратора',+ description: 'После этого вы сможете входить с логином «admin» и паролем, который зададите',+ submit: 'Задать пароль',+ },+ requestPasswordReset: {+ title: 'Сброс пароля',+ description: 'Укажите email, и мы отправим на него код для сброса пароля.',+ submit: 'Отправить код',+ codeSent: 'Если такой email зарегистрирован, мы отправили на него код для сброса',+ rememberPassword: 'Вспомнили пароль? <signInLink>Войдите</signInLink>',+ },+ resetPassword: {+ title: 'Сброс пароля',+ description: 'Введите код из письма и новый пароль.',+ code: 'Код из письма',+ confirmPassword: 'Повторите пароль',+ submit: 'Сбросить пароль',+ invalidCode: 'Код должен состоять из 6 цифр',+ succeeded: 'Пароль сброшен. Переходим ко входу...',+ noCode: 'Не пришел код? <requestCodeLink>Запросить новый</requestCodeLink>',+ backToSignIn: 'Вернуться ко входу',+ },+ profile: {+ title: 'Профиль',+ information: 'Данные профиля',+ userId: 'ID пользователя',+ namePlaceholder: 'Введите имя',+ emailPlaceholder: 'Введите email',+ adminEmailReadOnly: 'Email администратора изменить нельзя',+ role: 'Роль',+ saveChanges: 'Сохранить изменения',+ noChanges: 'Изменений нет',+ updated: 'Профиль обновлен',+ logout: 'Выйти',+ changePassword: {+ title: 'Смена пароля',+ newPasswordPlaceholder: 'Введите новый пароль',+ confirmPassword: 'Повторите новый пароль',+ confirmPasswordPlaceholder: 'Введите новый пароль еще раз',+ passwordsDoNotMatch: 'Новые пароли не совпадают',+ changing: 'Меняем пароль...',+ submit: 'Сменить пароль',+ signedInWithNewPassword: 'Вы вошли с новым паролем',+ },+ },+ list: {+ title: 'Пользователи Databasus',+ loadedOfTotal: 'Пользователей: {{loaded}} из {{total}}',+ searchPlaceholder: 'Поиск по email или имени...',+ empty: 'Пользователи не найдены.',+ allLoaded: 'Все пользователи загружены (всего {{count}})',+ columns: {+ user: 'Пользователь',+ systemRole: 'Системная роль',+ isActive: 'Активен',+ created: 'Создан',+ },+ roleLabel: 'Роль:',+ activeLabel: 'Активен:',+ viewAuditLogs: 'Открыть журнал аудита',+ activated: 'Пользователь активирован',+ deactivated: 'Пользователь деактивирован',+ roleChanged: 'Роль пользователя изменена',+ },+ auditLogs: {+ title: 'Журнал аудита пользователя',+ empty: 'У этого пользователя нет записей в журнале аудита.',+ },+ },+ verification: {+ triggers: {+ manual: 'Вручную',+ scheduled: 'По расписанию',+ },+ notificationTypes: {+ verificationSuccess: 'Проверка пройдена',+ verificationFailed: 'Проверка не пройдена',+ },+ config: {+ scheduledVerification: 'Проверка по расписанию',+ scheduledVerificationTooltip:+ 'Периодически разворачивает последний бекап во временном контейнере Postgres, чтобы убедиться, что он восстанавливается. <docsLink>Как это работает</docsLink>',+ interval: 'Интервал проверки',+ afterBackup: 'После бекапа',+ afterBackupHint:+ 'Запускается автоматически после каждого успешного бекапа. Если в очереди уже есть ожидающие проверки, они отменяются, чтобы очередь не росла бесконечно, когда бекапы делаются быстрее проверок.',+ weekday: 'День недели проверки',+ dayOfMonth: 'День месяца проверки',+ timeOfDay: 'Время проверки',+ cron: {+ expression: 'Cron-выражение (UTC)',+ format: 'Формат cron: минута, час, день, месяц, день недели (UTC)',+ examples: 'Примеры:',+ exampleEverySunday: '- {{expression}} — каждое воскресенье в 4:00 UTC',+ exampleEverySixHours: '- {{expression}} — каждые 6 часов',+ nextRun: 'Следующий запуск: {{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: 'Некорректное cron-выражение',+ },+ notifications: 'Уведомления',+ noNotifications: 'Нет',+ },+ runs: {+ title: 'Проверки восстановления',+ description:+ 'Каждая строка — одна попытка восстановить бекап этой базы данных во временную копию',+ noAgentsWarning:+ 'Нет ни одного агента проверки. Добавьте его в настройках Databasus, в разделе «Агенты проверки». <docsLink>Подробнее</docsLink>',+ empty: 'Проверок восстановления пока нет',+ allLoaded: 'Все проверки загружены (всего {{total}})',+ attempt: 'попытка {{attempt}}',+ restoreDuration: 'восстановление {{duration}}',+ durationTooltip: 'Время восстановления и проверки по данным агента.',+ fields: {+ createdAt: 'Время создания',+ trigger: 'Запуск',+ duration: 'Длительность',+ actions: 'Действия',+ },+ actions: {+ cancel: 'Отменить проверку',+ viewDetails: 'Посмотреть подробности',+ },+ details: {+ title: 'Подробности проверки восстановления',+ loadFailed: 'Не удалось загрузить подробности проверки.',+ cancellationReason: 'Причина отмены',+ failure: 'Ошибка',+ sections: {+ status: 'Статус',+ timeline: 'Хронология',+ results: 'Результаты и диагностика',+ },+ fields: {+ attempt: 'Попытка',+ startedAt: 'Время запуска',+ finishedAt: 'Время завершения',+ restoreDuration: 'Длительность восстановления',+ verifyDuration: 'Длительность проверки',+ restoredDbSize: 'Размер восстановленной БД',+ schemas: 'Схемы',+ tables: 'Таблицы',+ pgRestoreExitCode: 'Код завершения pg_restore',+ },+ tableStats: {+ title: 'Количество строк по таблицам',+ empty: 'Статистики по таблицам нет.',+ schema: 'Схема',+ table: 'Таблица',+ rows: 'Строк',+ },+ },+ },+ agents: {+ title: 'Агенты проверки',+ description:+ 'Агенты выполняют проверки восстановления и подтверждают, что бекап можно восстановить (<docsLink>подробнее</docsLink>)',+ empty: 'Агентов пока нет.',+ columns: {+ capacity: 'Ресурсы',+ created: 'Создан',+ },+ capacity: {+ cpu: '{{count}} CPU',+ ram: '{{count}} GB RAM',+ disk: 'диск {{count}} GB',+ jobs: 'задач: {{count}}',+ notReported: 'данных пока нет',+ },+ actions: {+ viewInstallCommands: 'Показать команды установки',+ rotateToken: 'Сменить токен',+ },+ deleteConfirmation: 'Удалить этого агента?',+ deleted: 'Агент «{{name}}» удален',+ copyFailed: 'Не удалось скопировать',+ agentId: 'ID агента:',+ create: {+ title: 'Новый агент проверки',+ tokenNotice: 'На следующем экране появится токен. Он показывается только один раз.',+ namePlaceholder: 'Название агента',+ nameRequired: 'Введите название',+ },+ rotate: {+ title: 'Смена токена',+ description:+ 'Смена токена для <agentName/> сразу делает текущий токен недействительным. Агент со старым токеном получит отказ при следующем обращении к Databasus.',+ },+ token: {+ title: 'Токен агента',+ tokenFor: 'Токен для <agentName/>:',+ shownOnce:+ 'Токен показывается один раз. Сохраните его в надежном месте — посмотреть его снова не получится.',+ confirmSaved: 'Токен сохранен',+ },+ install: {+ title: 'Команды установки',+ description:+ 'Команды установки для <agentName/>. Замените <tokenPlaceholder/> на токен, который вы сохранили при создании агента или при последней смене токена.',+ architecture: 'Архитектура',+ stepInstall: 'Шаг 1 — установка',+ stepLaunch: 'Шаг 2 — запуск',+ capacityDefaults:+ 'Значения ресурсов ниже — стартовые. Подберите <code>--max-cpu</code>, <code>--max-ram-mb</code>, <code>--max-disk-gb</code> и <code>--max-concurrent-jobs</code> под машину, на которой работает агент.',+ afterInstallation: 'После установки',+ runsInBackground: 'После <code>start</code> агент работает в фоне',+ checkStatus: 'Проверить статус: <code>./verification-agent status</code>',+ viewLogs: 'Логи: <code>databasus-verification.log</code> в рабочей директории',+ stop: 'Остановить агента: <code>./verification-agent stop</code>',+ },+ },+ },+ notifiers: {+ types: {+ email: 'Email',+ telegram: 'Telegram',+ webhook: 'Вебхук',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: 'Все',+ backupSuccess: 'Бекап выполнен',+ backupFailed: 'Ошибка бекапа',+ healthcheckSuccess: 'Проверка доступности пройдена',+ healthcheckFailed: 'Проверка доступности не пройдена',+ verificationSuccess: 'Проверка восстановления пройдена',+ verificationFailed: 'Проверка восстановления не пройдена',+ },+ mattermostDeliveryModes: {+ webhook: 'Входящий вебхук',+ bot: 'Бот-аккаунт',+ },+ list: {+ addNotifier: 'Добавить канал уведомлений',+ searchPlaceholder: 'Поиск канала уведомлений',+ noSearchResults: 'Не найдено каналов уведомлений по запросу «{{query}}»',+ description:+ 'Канал уведомлений — это место, куда отправляются уведомления (email, Slack, Telegram и т. д.)',+ backToList: '← Назад к каналам уведомлений',+ },+ card: {+ notifyTo: {+ email: 'Уведомления на email',+ telegram: 'Уведомления в Telegram',+ webhook: 'Уведомления через вебхук',+ slack: 'Уведомления в Slack',+ discord: 'Уведомления в Discord',+ teams: 'Уведомления в Teams',+ mattermost: 'Уведомления в Mattermost',+ },+ hasSendError: 'Есть ошибка отправки',+ },+ create: {+ title: 'Добавить канал уведомлений',+ namePlaceholder: 'Мой чат',+ },+ config: {+ namePlaceholder: 'Введите название...',+ settingsTitle: 'Настройки канала уведомлений',+ sendError: {+ title: 'Ошибка отправки',+ errorLabel: 'Ошибка:',+ clearHint: 'Чтобы убрать эту ошибку, сделайте одно из двух:',+ clearBySendingTest:+ '- отправьте тестовое уведомление кнопкой ниже (даже если вы уже изменили настройки);',+ clearByNextNotification: '- дождитесь следующего уведомления, отправленного без ошибок;',+ },+ removeConfirmation: 'Удалить этот канал уведомлений? Это действие нельзя отменить.',+ removeBlockedByDatabases:+ 'Канал уведомлений используется базами данных. Сначала уберите его из этих баз данных.',+ },+ testNotification: {+ send: 'Отправить тестовое уведомление',+ sent: {+ title: 'Тестовое уведомление отправлено',+ description: 'Уведомление успешно отправлено',+ },+ },+ transfer: {+ title: 'Перенос канала уведомлений в другое рабочее пространство',+ blockedByDatabases:+ 'Этот канал уведомлений используется базами данных. Сначала перенесите или удалите эти базы данных.',+ description: 'Выберите рабочее пространство, в которое нужно перенести канал уведомлений.',+ targetWorkspace: 'Целевое рабочее пространство',+ selectWorkspace: 'Выберите рабочее пространство',+ submit: 'Перенести',+ },+ fields: {+ botToken: 'Токен бота',+ targetChatId: 'ID чата',+ webhookUrl: 'URL вебхука',+ channelId: 'ID канала',+ skipTlsVerify: 'Без проверки TLS',+ skipTls: 'Не проверять TLS',+ },+ email: {+ targetEmail: 'Email получателя',+ targetEmailTooltip: 'Адрес, на который будут приходить уведомления',+ smtpHost: 'SMTP-хост',+ smtpPort: 'SMTP-порт',+ smtpUser: 'Пользователь SMTP',+ smtpPassword: 'Пароль SMTP',+ smtpPasswordPlaceholder: 'пароль',+ from: 'Отправитель',+ fromTooltip:+ 'Необязательно. Адрес, от имени которого уходят письма. Если поле пустое, используется пользователь SMTP или адрес, созданный по имени хоста',+ fromAuto: '(автоматически)',+ advancedSettings: 'Дополнительные настройки',+ skipTlsTooltip:+ 'Не проверять TLS-сертификат. Включите, если SMTP-сервер использует самоподписанный сертификат. Внимание: это снижает безопасность.',+ },+ telegram: {+ botTokenHelpLink: 'Как получить API-токен бота Telegram?',+ targetChatIdTooltip: 'Чат, в который будут приходить сообщения (ваш личный чат или группа)',+ chatIdHelp: {+ toggle: 'Как узнать ID чата в Telegram?',+ privateChat:+ 'Чтобы узнать ID своего чата, напишите <botLink>@getmyid_bot</botLink> в Telegram. <underline>Убедитесь, что вы начали чат с ботом</underline>',+ group:+ 'Чтобы узнать ID группы, добавьте в нее своего бота и <botLink>@getmyid_bot</botLink>, затем напишите /start — появится ID чата',+ },+ useProxy: 'Использовать прокси',+ useProxyTooltip: 'Отправлять запросы к Telegram API через прокси',+ proxy: 'Прокси',+ proxyUrl: 'URL прокси',+ proxyUrlTooltip:+ 'Поддерживаются http, https, socks5 и socks5h. В URL можно указать имя пользователя и пароль',+ sendToGroupTopic: 'Писать в тему',+ sendToGroupTopicTooltip:+ 'Включите, чтобы отправлять сообщения в определенную тему группового чата',+ threadId: 'ID темы',+ threadIdTooltip: 'ID темы, в которую нужно отправлять сообщения',+ topicId: 'ID темы',+ threadIdHelp: {+ steps:+ 'Чтобы узнать ID темы, откройте ее в группе Telegram, нажмите на название темы вверху и откройте информацию о ней. Скопируйте ссылку на тему и возьмите из URL последнее число.',+ example:+ '<bold>Пример:</bold> если ссылка на тему — <code>https://t.me/c/2831948048/3</code>, то ID темы — <code>3</code>',+ note: '<bold>Примечание:</bold> темы работают только в групповых чатах, в личных чатах их нет.',+ },+ },+ webhook: {+ method: 'Метод',+ sendOn: 'Когда отправлять',+ sendOnPlaceholder: 'Выберите типы уведомлений',+ customHeaders: 'Пользовательские заголовки',+ customHeadersTooltip:+ 'Дополнительные HTTP-заголовки для запроса к вебхуку (например, Authorization, X-API-Key)',+ savedHeadersHidden: '*Сохраненные заголовки скрыты из соображений безопасности',+ headers: 'Заголовки',+ headerNamePlaceholder: 'Имя заголовка',+ headerValuePlaceholder: 'Значение заголовка',+ addHeader: 'Добавить заголовок',+ hiddenHeaderValue: '(скрыто)',+ bodyTemplate: {+ title: 'Шаблон тела запроса',+ headingVariable: '<variable/> — заголовок уведомления',+ messageVariable: '<variable/> — текст уведомления',+ invalidJsonFormat: 'Неверный формат JSON',+ invalidJson: 'Некорректный JSON',+ },+ exampleRequest: {+ title: 'Пример запроса',+ headers: 'Заголовки:',+ },+ },+ slack: {+ howToConnect: 'Как подключить Slack (где взять токен бота и ID чата)?',+ testFailedHint:+ 'Убедитесь, что канал публичный или бот добавлен в приватный канал (через @invite) или в группу. Для личных сообщений укажите User ID из профиля Slack.',+ },+ discord: {+ channelWebhookUrl: 'URL вебхука канала',+ howTo: {+ title: 'Как получить URL вебхука в Discord:',+ createChannel: '1. Создайте или выберите канал в Discord',+ openChannelSettings: '2. Откройте настройки канала (значок шестеренки)',+ openIntegrations: '3. Перейдите в раздел интеграций',+ createWebhook: '4. Создайте новый вебхук',+ copyWebhookUrl: '5. Скопируйте URL вебхука',+ privacyNote: 'Примечание: при необходимости сделайте канал приватным',+ },+ },+ teams: {+ howToConnect: 'Как подключить Microsoft Teams?',+ powerAutomateUrl: 'URL Power Automate',+ powerAutomateUrlLabel: 'URL Power Automate:',+ powerAutomateUrlTooltip:+ 'HTTP-адрес из вашего потока Power Automate (триггер When an HTTP request is received)',+ showFullUrl: 'Показать',+ hideFullUrl: 'Скрыть',+ },+ mattermost: {+ howToConnect: 'Как подключить Mattermost?',+ connectVia: 'Подключение через',+ incomingWebhookUrl: 'URL входящего вебхука',+ serverUrl: 'URL сервера',+ channelIdTooltip:+ 'ID канала из 26 символов, а не его название. Откройте канал, нажмите на его название и выберите View Info.',+ channel: 'Канал',+ showOptionalSettings: 'Показать необязательные настройки',+ hideOptionalSettings: 'Скрыть необязательные настройки',+ channelOverride: 'Другой канал',+ channelOverrideTooltip:+ 'Публиковать в этот канал вместо того, для которого создан вебхук. Mattermost не учитывает это поле, если вебхук привязан к каналу.',+ postAsUsername: 'Имя отправителя',+ postAsUsernameTooltip:+ 'Работает, только если в системной консоли Mattermost включен параметр Enable integrations to override usernames. Иначе игнорируется.',+ postAsIconUrl: 'URL иконки отправителя',+ postAsIconUrlTooltip:+ 'Работает, только если в системной консоли Mattermost включен параметр Enable integrations to override profile picture icons. Иначе игнорируется.',+ skipTlsTooltip:+ 'Не проверять TLS-сертификат. Включите, если сервер Mattermost использует самоподписанный сертификат. Внимание: это снижает безопасность.',+ webhookHowTo: {+ title: 'Как получить URL входящего вебхука:',+ openIncomingWebhooks: '1. Главное меню → Integrations → Incoming Webhooks',+ addWebhook: '2. Нажмите Add Incoming Webhook и выберите канал',+ copyUrl: '3. Скопируйте созданный URL',+ },+ botHowTo: {+ title: 'Как получить токен бота:',+ addBotAccount: '1. Integrations → Bot Accounts → Add Bot Account',+ copyToken: '2. Скопируйте токен: его показывают только один раз, сразу после создания',+ addBotToChannel: '3. Добавьте бота в команду и в канал',+ },+ },+ },+ backups: {+ encryption: {+ none: 'Нет',+ encrypted: 'Включено',+ },+ encryptionOptions: {+ none: 'Без шифрования',+ encrypted: 'Шифровать файлы бекапов',+ },+ list: {+ title: 'Бекапы',+ scheduledBackupsDisabled:+ 'Бекапы по расписанию выключены (их можно снова включить в настройках бекапов)',+ empty: 'Бекапов пока нет',+ allLoaded: 'Загружены все бекапы (всего: {{count}})',+ clickToSeeErrorDetails: 'Нажмите, чтобы посмотреть подробности ошибки',+ errorDetailsTitle: 'Подробности ошибки бекапа',+ restoreTitle: 'Восстановление из бекапа',+ columns: {+ createdAt: 'Создан',+ created: 'Создан',+ size: 'Размер',+ duration: 'Длительность',+ actions: 'Действия',+ },+ actions: {+ cancelBackup: 'Отменить бекап',+ deleteBackup: 'Удалить бекап',+ },+ },+ filters: {+ allTypes: 'Все типы',+ allStatuses: 'Все статусы',+ before: 'До',+ },+ config: {+ backupsEnabled: 'Бекапы включены',+ storage: 'Хранилище',+ selectStorage: 'Выберите хранилище',+ createNewStorage: 'Создать хранилище',+ addStorageTitle: 'Добавить хранилище',+ storageDescription:+ 'Хранилище — это место, где хранятся бекапы (локальный диск, S3, Google Drive и т. д.)',+ storageChangeWarning: 'Если сменить хранилище, все бекапы в этом хранилище будут удалены.',+ storageChangeAcknowledge: 'Понятно',+ encryption: 'Шифрование',+ notifications: 'Уведомления',+ noNotifications: 'Нет',+ schedule: {+ weekday: 'День недели',+ dayOfMonth: 'День месяца',+ cronExpression: 'Cron-выражение (UTC)',+ timeOfDay: 'Время',+ nextRun: 'Следующий запуск: {{time}}',+ invalidCron: 'Некорректное cron-выражение',+ cronHelp: {+ format: 'Формат cron: минута, час, день, месяц, день недели (UTC)',+ examples: 'Примеры:',+ dailyAt2am: 'Ежедневно в 2:00 UTC',+ every6Hours: 'Каждые 6 часов',+ mondaysAt3am: 'Каждый понедельник в 3:00 UTC',+ twiceAMonth: '1-го и 15-го числа в 4:30 UTC',+ },+ },+ gfs: {+ hourly: 'Ежечасных: {{count}}',+ daily: 'Ежедневных: {{count}}',+ weekly: 'Еженедельных: {{count}}',+ monthly: 'Ежемесячных: {{count}}',+ yearly: 'Ежегодных: {{count}}',+ notConfigured: 'Не настроено',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS (хранить последние N ежечасных, ежедневных, еженедельных, ежемесячных и ежегодных бекапов)',+ timePeriod: 'За период (последние N дней)',+ count: 'По количеству (N последних бекапов)',+ },+ notificationTypes: {+ backupSuccess: 'Успешный бекап',+ backupFailed: 'Ошибка бекапа',+ },+ list: {+ backupNow: 'Сделать бекап',+ makeBackupNow: 'Сделать бекап сейчас',+ encrypted: 'Зашифрован',+ sizeTooltip:+ 'Сверху — размер сжатого файла бекапа, который лежит в хранилище (локальном, S3, Google Drive и т. д.). Снизу серым — исходный размер базы данных без сжатия на момент бекапа. Обычно бекапы сжимаются примерно в 5 раз.',+ databaseSize: '{{size}} (размер БД)',+ deleteConfirmation: 'Удалить этот бекап?',+ actions: {+ restore: 'Восстановить из бекапа',+ verifyRestore:+ 'Проверить восстановление: агент восстановит этот бекап во временную базу данных и сообщит количество строк',+ download: {+ postgresql:+ 'Скачать файл бекапа. Его можно восстановить вручную через pg_restore (формат custom)',+ mysql: 'Скачать файл бекапа. Его можно восстановить вручную клиентом mysql (SQL-дамп)',+ mariadb:+ 'Скачать файл бекапа. Его можно восстановить вручную клиентом mariadb (SQL-дамп)',+ mongodb:+ 'Скачать файл бекапа. Его можно восстановить вручную через mongorestore (архив)',+ other: 'Скачать файл бекапа',+ },+ },+ verifyRestore: {+ title: 'Проверить восстановление?',+ description:+ 'Агент восстановит этот бекап во временную базу данных и сообщит количество строк. В зависимости от размера бекапа это может занять время. <docsLink>Как это работает?</docsLink>',+ queue: 'Поставить в очередь',+ queued: 'Проверка восстановления поставлена в очередь',+ },+ },+ config: {+ interval: 'Интервал бекапов',+ weekday: 'День недели',+ dayOfMonth: 'День месяца',+ timeOfDay: 'Время бекапа',+ encryptionTooltip:+ 'Зашифрованные файлы бекапов в хранилище (S3, локальном и т. д.) нельзя использовать напрямую. Восстановить бекапы можно через Databasus, а скачать в расшифрованном виде — кнопкой «Скачать».',+ retentionPolicy: 'Политика хранения',+ retention: {+ timePeriodTooltip:+ 'Сколько хранить бекапы. Бекапы старше этого срока удаляются автоматически.',+ count: 'Последние бекапы',+ countTooltip:+ 'Хранится только указанное количество последних бекапов. Более старые бекапы удаляются автоматически.',+ countValue: 'Последних бекапов: {{count}}',+ showGfsHint: 'Что такое GFS (Grandfather-Father-Son)?',+ hideGfsHint: 'Скрыть',+ gfsHint:+ 'Ротация GFS (Grandfather-Father-Son): хранятся последние N ежечасных, ежедневных, еженедельных, ежемесячных и ежегодных бекапов. Так бекапы можно хранить долго и не занимать лишнее место в хранилище.',+ gfsTooltip:+ 'Ротация Grandfather-Father-Son: хранятся последние N ежечасных, ежедневных, еженедельных, ежемесячных и ежегодных бекапов.',+ gfsFields: {+ hourly: 'Ежечасные бекапы',+ daily: 'Ежедневные бекапы',+ weekly: 'Еженедельные бекапы',+ monthly: 'Ежемесячные бекапы',+ yearly: 'Ежегодные бекапы',+ },+ },+ advancedSettings: 'Дополнительные настройки',+ retryIfFailed: 'Повторять бекап при ошибке',+ retryIfFailedShort: 'Повтор при ошибке',+ retryIfFailedTooltip:+ 'Автоматически повторять бекап после ошибки. Бекап может не удаться из-за сбоя сети, проблем с хранилищем или временной недоступности базы данных.',+ maxFailedTries: 'Максимум попыток',+ maxFailedTriesTooltip:+ 'Сколько раз повторять бекап после ошибки. Когда все попытки закончатся ошибкой, придет уведомление.',+ },+ },+ physical: {+ types: {+ full: 'Полный',+ incremental: 'Инкрементальный',+ wal: 'WAL',+ },+ retentions: {+ chains: 'Цепочки',+ fullBackups: 'Полные бекапы',+ chainsAndFullBackups: 'Цепочки и полные бекапы',+ },+ fullBackupsPolicies: {+ lastN: 'Кол-во',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: 'Успешный бекап',+ backupFailed: 'Ошибка бекапа',+ chainBroken: 'Цепочка прервана',+ walGap: 'Разрыв в WAL',+ },+ list: {+ totalUsage: 'Занято всего: {{size}}',+ backUpNow: 'Сделать бекап',+ fullBackup: 'Полный бекап',+ incrementalBackup: 'Инкрементальный бекап',+ restore: 'Восстановить',+ restoreFromThisBackup: 'Восстановить из этого бекапа',+ pointInTimeRestoreTitle: 'Восстановление на момент времени',+ deleteFullConfirmation:+ 'Вместе с этим полным бекапом удалится вся его цепочка (все зависящие от него инкрементальные бекапы). Это действие нельзя отменить. Продолжить?',+ deleteIncrementalConfirmation:+ 'Вместе с этим инкрементальным бекапом удалятся все более поздние инкрементальные бекапы, которые от него зависят. Это действие нельзя отменить. Продолжить?',+ },+ config: {+ fullBackupCadence: 'Расписание полных бекапов',+ incrementalBackupCadence: 'Расписание инкрементальных бекапов',+ incrementalMoreFrequent: 'Инкрементальные бекапы должны выполняться чаще полных.',+ encryptionTooltip:+ 'Зашифрованные файлы бекапов в хранилище нельзя использовать напрямую. Их можно восстановить через Databasus или скачать в расшифрованном виде.',+ retention: 'Хранение',+ fullBackupsOnlyRetention:+ 'Для этой базы данных делаются только полные бекапы, поэтому правила хранения применяются к ним.',+ retentionOptions: {+ chains: 'Хранить последние N цепочек',+ chainsAndFullBackups: 'Хранить последние N цепочек и полные бекапы',+ },+ retentionHelp: {+ chain:+ 'Цепочка — это полный бекап и зависящие от него инкрементальные бекапы (и WAL из стриминга). Для восстановления нужны полный бекап и все инкрементальные бекапы его цепочки.',+ chains:+ 'Хранятся только последние N цепочек. Когда цепочка выходит за этот предел, ее полный бекап и все инкрементальные удаляются — восстановиться можно только в пределах оставшихся цепочек.',+ chainsAndFullBackups:+ 'Хранятся последние N цепочек для восстановления на недавний момент времени. Кроме того, по правилу ниже (GFS или последние N) сохраняются более старые полные бекапы: они остаются долгосрочными точками восстановления, когда их инкрементальные бекапы уже удалены.',+ },+ chainsCount: 'Цепочки',+ chainsCountTooltip:+ 'Сколько последних цепочек бекапов хранить. Цепочка — это полный бекап и его инкрементальные бекапы.',+ fullBackups: 'Полные бекапы',+ fullBackupsCount: 'Последние полные бекапы',+ gfsFields: {+ hourly: 'Ежечасные',+ daily: 'Ежедневные',+ weekly: 'Еженедельные',+ monthly: 'Ежемесячные',+ yearly: 'Ежегодные',+ },+ chainsKept: 'Хранится цепочек',+ fullBackupsKept: 'Хранится полных бекапов',+ fullBackupsCountValue: 'Последних: {{count}}',+ gfsTooltip:+ 'Ротация Grandfather-Father-Son: хранятся последние N ежечасных, ежедневных, еженедельных, ежемесячных и ежегодных полных бекапов.',+ },+ restore: {+ errorHints: {+ downloadInProgress:+ 'Для этой базы данных уже идет загрузка для восстановления. Дождитесь ее окончания и попробуйте еще раз.',+ targetTimeUnreachable:+ 'До выбранного момента времени восстановиться нельзя: в WAL есть разрыв или время выходит за доступный диапазон. Выберите другое время или восстановите последнюю доступную точку.',+ },+ backupIntro:+ 'Команда восстановления для этого бекапа. Полному бекапу нужен только его собственный файл, а инкрементальному — ещё его полный бекап и все предшествующие инкрементальные.',+ pointInTimeIntro:+ 'Восстановление на момент времени. Выберите время или оставьте поле пустым, чтобы восстановить последнюю доступную точку.',+ targetTime: 'Момент времени',+ latestAvailable: 'Последняя доступная точка',+ preparing: 'Готовим команду восстановления...',+ linkExpiry:+ 'Ссылка на скачивание одноразовая и действует 15 минут. Если команда завершилась ошибкой 401, откройте это окно заново, чтобы получить новую ссылку.',+ copied: 'Скопировано',+ methods: {+ script: 'Через скрипт',+ manual: 'Вручную',+ },+ environments: {+ host: 'PostgreSQL на хосте',+ },+ fields: {+ restoreDirectory: 'Каталог восстановления',+ pgBinPath: 'Путь к bin PostgreSQL',+ pgBinPathPlaceholder: '{{path}} (необязательно)',+ pgImage: 'Образ PostgreSQL',+ },+ scriptTitles: {+ host: 'Выполните на хосте, куда восстанавливаете',+ docker: 'Выполните там, где есть Docker',+ },+ manualSteps: {+ download: 'Скачайте архив',+ extract: 'Распакуйте его',+ verify: 'Проверьте целостность загрузки',+ reconstruct: 'Соберите каталог данных',+ checkConfig: 'Проверьте конфигурационные файлы кластера',+ wireUpRecovery: 'Распакуйте WAL и настройте восстановление',+ recoveryParameters: 'Если восстановление остановилось из-за параметров',+ },+ beforeYouRun: {+ title: 'Перед запуском',+ host: {+ clientTools:+ 'Установите клиентские утилиты PostgreSQL {{version}}. Если их нет в PATH, укажите путь к bin выше.',+ zstd: 'Для распаковки бекапа нужен zstd.',+ zstdWithWal: 'Для распаковки бекапа и его WAL нужен zstd.',+ emptyDirectory:+ 'Каталог восстановления должен быть пустым и не должен быть каталогом работающего кластера.',+ },+ docker: {+ image:+ 'Используйте образ postgres:{{version}} — мажорная версия должна совпадать с исходной.',+ hostTools:+ 'На хосте нужны zstd, tar и curl: скачивание и вся распаковка (базового бекапа) идут на хосте, а в контейнере запускается только pg_combinebackup, поэтому образу postgres дополнительные утилиты не нужны.',+ hostToolsWithWal:+ 'На хосте нужны zstd, tar и curl: скачивание и вся распаковка (базового бекапа и WAL) идут на хосте, а в контейнере запускается только pg_combinebackup, поэтому образу postgres дополнительные утилиты не нужны.',+ },+ },+ afterItFinishes: {+ title: 'После завершения',+ host: {+ clusterLocation: 'Кластер находится в <dataDir/>.',+ changeOwner: 'От имени root смените владельца: <command/>.',+ start:+ 'Запустите от имени postgres: <command/> или укажите этот каталог в data_directory.',+ walReplay:+ 'PostgreSQL применит WAL и переключится в основной режим. Завершение восстановления видно в логе.',+ },+ docker: {+ clusterLocation: '<dataDir/> на хосте — это восстановленный кластер.',+ volumeMount:+ 'PostgreSQL {{version}} хранит каталог данных в <dataDir/>, внутри тома <volumeDir/>. Смонтируйте выходной каталог как корень этого тома — именно так его ждет docker-compose с <code>./pgdata:/var/lib/postgresql</code>:',+ dataDirectoryMount: 'Смонтируйте кластер в каталог данных образа <dataDir/>:',+ ownership:+ 'Владелец должен совпадать с uid пользователя postgres внутри образа (в официальном образе это 999).',+ },+ missingConfigFiles:+ 'Базовый бекап копирует только каталог данных. Если исходный PostgreSQL хранит конфигурацию вне его (так устроены Debian и Ubuntu: <configDir/>), то <code>postgresql.conf</code>, <code>pg_hba.conf</code> и <code>pg_ident.conf</code> в бекап не попадают и сервер не запустится. Узнайте их настоящие пути на исходном сервере командой <code>psql -Atc "SHOW config_file"</code>, скопируйте все три файла, затем закомментируйте <code>data_directory</code>, <code>hba_file</code>, <code>ident_file</code>, <code>external_pid_file</code> и строки <code>ssl</code> / <code>ssl_*</code>, создайте <code>conf.d</code>, а для контейнера задайте <code>listen_addresses = \'*\'</code>. Если эти файлы на месте, а ошибка та же, значит, неверно смонтирован каталог, а не конфигурация.',+ },+ },+ },+ },+ storages: {+ types: {+ local: 'Локальное хранилище',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: 'По умолчанию (Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: 'Ключ учетной записи',+ connectionString: 'Строка подключения',+ },+ sftpAuthMethods: {+ password: 'Пароль',+ privateKey: 'Закрытый ключ',+ },+ list: {+ addStorage: 'Добавить хранилище',+ description: 'Хранилище — это место, где хранятся бекапы (локальный диск, S3 и т. д.)',+ backToList: '← Назад к хранилищам',+ },+ card: {+ type: {+ local: 'Тип: локальное хранилище',+ s3: 'Тип: S3',+ googleDrive: 'Тип: Google Drive',+ nas: 'Тип: NAS',+ azureBlob: 'Тип: Azure Blob Storage',+ ftp: 'Тип: FTP',+ sftp: 'Тип: SFTP',+ rclone: 'Тип: Rclone',+ },+ hasSaveError: 'Есть ошибка сохранения',+ },+ config: {+ namePlaceholder: 'Введите название...',+ settingsTitle: 'Настройки хранилища',+ lastSaveError: {+ title: 'Ошибка сохранения',+ errorLabel: 'Ошибка:',+ clearHint: 'Чтобы убрать эту ошибку, сделайте одно из двух:',+ clearByTestingConnection:+ '- проверьте подключение кнопкой ниже (даже если вы уже изменили настройки);',+ clearByNextSave: '- дождитесь, когда следующий бекап сохранится без ошибок;',+ },+ removeConfirmation:+ 'Удалить это хранилище? Это действие нельзя отменить. Бекапы, которые лежат в этом хранилище, тоже будут удалены.',+ removeBlockedByDatabases:+ 'Хранилище используется базами данных. Сначала уберите его из настроек этих баз данных.',+ },+ actions: {+ testConnection: 'Проверить подключение',+ },+ connectionTestSucceeded: {+ title: 'Подключение работает',+ description: 'Подключение к хранилищу проверено',+ },+ transfer: {+ title: 'Перенос хранилища в другое рабочее пространство',+ blockedByDatabases:+ 'Это хранилище используется базами данных. Сначала перенесите или удалите эти базы данных.',+ description: 'Выберите рабочее пространство, в которое нужно перенести хранилище.',+ targetWorkspace: 'Целевое рабочее пространство',+ selectWorkspace: 'Выберите рабочее пространство',+ submit: 'Перенести',+ },+ fields: {+ path: 'Путь',+ remotePath: 'Удаленный путь',+ share: 'Общая папка',+ domain: 'Домен',+ useSsl: 'Использовать SSL',+ useSslTls: 'Использовать SSL/TLS',+ skipTls: 'Без проверки TLS',+ skipTlsVerify: 'Без проверки TLS',+ skipHostKey: 'Без проверки ключа хоста',+ authMethod: 'Способ аутентификации',+ privateKey: 'Закрытый ключ',+ credentials: 'Учетные данные',+ s3Bucket: 'Бакет S3',+ region: 'Регион',+ accessKey: 'Ключ доступа',+ secretKey: 'Секретный ключ',+ endpoint: 'Эндпоинт',+ folderPrefix: 'Префикс папки',+ prefix: 'Префикс',+ blobPrefix: 'Префикс блобов',+ virtualHost: 'Виртуальный хост',+ storageClass: 'Класс хранения',+ connection: 'Строка подключения',+ connectionString: 'Строка подключения',+ accountName: 'Имя учетной записи',+ accountKey: 'Ключ учетной записи',+ containerName: 'Имя контейнера',+ clientId: 'ID клиента',+ clientSecret: 'Секрет клиента',+ userToken: 'Токен пользователя',+ config: 'Конфигурация',+ },+ edit: {+ namePlaceholder: 'Мое хранилище',+ advancedSettings: 'Дополнительные настройки',+ optionalPlaceholder: '{{example}} (необязательно)',+ usernamePlaceholder: 'имя пользователя',+ passwordPlaceholder: 'пароль',+ remotePathTooltip: 'Папка на сервере, в которую сохраняются бекапы (необязательно)',+ local: {+ diskSpaceWarning:+ 'Осторожно: с локальным хранилищем может закончиться место на диске. Лучше использовать S3 или хранилища без ограничений по объему',+ },+ s3: {+ cloudflareR2Guide: 'Как подключить Cloudflare R2?',+ endpointTooltip:+ 'URL своего S3-совместимого эндпоинта (необязательно, для AWS S3 оставьте пустым)',+ prefixTooltip:+ "Необязательный префикс для ключей всех объектов (например, 'backups/' или 'my_team/'). С некоторыми S3-совместимыми хранилищами может не работать. После создания его нельзя изменить, иначе бекапы потеряются.",+ useVirtualHostedStyle: 'Использовать virtual-hosted стиль',+ virtualHostTooltip:+ 'Использовать URL в стиле virtual-hosted (bucket.s3.region.amazonaws.com) вместо path-style (s3.region.amazonaws.com/bucket). Может понадобиться, если появляются ошибки COS.',+ skipTls: 'Не проверять TLS',+ skipTlsVerifyTooltip:+ 'Не проверять TLS-сертификат. Включите, если S3-совместимое хранилище использует самоподписанный сертификат. Внимание: это снижает безопасность.',+ storageClassTooltip:+ 'Класс хранения S3 для загружаемых объектов. Для Standard оставьте значение по умолчанию. Некоторые провайдеры предлагают классы дешевле, например One Zone IA. Не используйте Glacier/Deep Archive: для восстановления файлы должны быть доступны сразу.',+ },+ googleDrive: {+ guideLink: 'Как подключить Google Drive?',+ authorize: 'Авторизоваться',+ },+ nas: {+ shareWithSlashWarning:+ 'Укажите только имя общей папки. Подпапки задаются в поле «Путь» (например, общая папка: Databasus, путь: DB1)',+ useSslTooltip: 'Шифровать подключение с помощью SSL/TLS',+ domainTooltip:+ 'Имя домена Windows (необязательно, оставьте пустым, если не используете доменную аутентификацию)',+ pathPlaceholder: '{{example}} (необязательно, без слеша в начале)',+ pathTooltip: 'Путь к подпапке внутри общей папки (необязательно)',+ },+ azureBlob: {+ connectionStringTooltip: 'Строка подключения к Azure Storage из Azure Portal',+ endpointTooltip: 'URL своего эндпоинта (необязательно, для обычного Azure оставьте пустым)',+ prefixTooltip:+ "Необязательный префикс для имен всех блобов (например, 'backups/' или 'my_team/')",+ },+ ftp: {+ enableFtps: 'Включить FTPS',+ useSslTooltip: 'Шифровать передачу файлов явным TLS (FTPS)',+ skipCertificateVerification: 'Не проверять сертификат',+ skipTlsVerifyTooltip:+ 'Не проверять TLS-сертификат. Включите, если FTP-сервер использует самоподписанный сертификат. Внимание: это снижает безопасность.',+ },+ sftp: {+ privateKeyTooltip:+ 'Вставьте закрытый SSH-ключ в формате PEM. Поддерживаются ключи RSA, DSA, ECDSA и Ed25519.',+ skipHostKeyVerification: 'Не проверять ключ хоста',+ skipHostKeyTooltip:+ 'Не проверять SSH-ключ хоста. Включите, если доверяете серверу. Внимание: это снижает безопасность.',+ },+ rclone: {+ configTooltip:+ "Вставьте сюда содержимое rclone.conf. Его можно получить командой 'rclone config file' и скопировать. Такая конфигурация поддерживает более 70 облачных хранилищ.",+ configHiddenNote:+ '*содержимое скрыто, чтобы не раскрывать конфиденциальные данные. Чтобы обновить конфигурацию, вставьте сюда новую',+ docsLink: 'Документация Rclone',+ remotePathTooltip:+ "Необязательный префикс пути в удаленном хранилище, куда будут сохраняться бекапы (например, '/backups' или 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/locales/zh.ts b/frontend/src/shared/i18n/locales/zh.tsnew file mode 100644index 00000000..148ff8ed--- /dev/null+++ b/frontend/src/shared/i18n/locales/zh.ts@@ -0,0 +1,1723 @@+import type { en } from './en';++export const zh: typeof en = {+ language: {+ nativeName: '中文',+ },+ common: {+ actions: {+ add: '添加',+ back: '返回',+ cancel: '取消',+ close: '关闭',+ confirm: '确认',+ continue: '继续',+ copy: '复制',+ create: '创建',+ delete: '删除',+ download: '下载',+ edit: '编辑',+ ok: '确定',+ refresh: '刷新',+ remove: '移除',+ retry: '重试',+ save: '保存',+ },+ answers: {+ no: '否',+ yes: '是',+ },+ fields: {+ host: '主机',+ name: '名称',+ password: '密码',+ port: '端口',+ status: '状态',+ type: '类型',+ username: '用户名',+ },+ states: {+ disabled: '已禁用',+ enabled: '已启用',+ loading: '加载中…',+ },+ messages: {+ copiedToClipboard: '已复制到剪贴板',+ },+ // Joins translated words into one list (Chinese uses 、)+ listSeparator: '、',+ confirmation: {+ title: '确认',+ },+ },+ app: {+ documentTitle: 'Databasus - 数据库备份(PostgreSQL、MySQL、MongoDB)',+ languageControl: {+ title: '语言:{{language}}',+ },+ theme: {+ title: '主题:{{theme}}',+ light: '浅色',+ dark: '深色',+ system: '跟随系统',+ },+ navigation: {+ databases: '数据库',+ storages: '存储',+ notifiers: '通知渠道',+ workspaceSettings: '设置',+ profile: '个人资料',+ databasusSettings: 'Databasus 设置',+ users: '用户',+ docs: '文档',+ documentation: '文档',+ community: '社区',+ newVersionAvailable: '有新版本可用',+ },+ diskUsage: {+ title: '磁盘用量',+ hint: '在本地创建和恢复备份需要足够的磁盘空间。恢复时需要的可用空间与备份大小相同。',+ compactSummary: '磁盘已用 {{used}} / {{total}} GB<lineBreak/>({{percent}}%)',+ summary: '已用 {{used}} / {{total}} GB({{percent}}%)',+ },+ workspaceSelection: {+ createShort: '创建',+ create: '创建工作区',+ selected: '当前工作区',+ placeholder: '选择工作区',+ search: '搜索工作区',+ notFound: '未找到工作区',+ createNew: '+ 新建工作区',+ },+ sponsorship: {+ link: '赞助',+ hint: 'Databasus 帮你保住了数据?欢迎支持 Databasus,让它继续免费、持续维护、保持独立。',+ },+ starButton: {+ label: '在 GitHub 上加星标',+ ariaLabel: '在 GitHub 上为 databasus/databasus 加星标',+ },+ clipboardPaste: {+ title: '从剪贴板粘贴',+ submit: '提交',+ description: '无法自动读取剪贴板,请在下方粘贴内容。',+ placeholder: '在此粘贴连接字符串',+ },+ auth: {+ adminPasswordCheckFailed: '无法检查管理员密码状态:{{error}}',+ },+ oauthCallback: {+ failedTitle: '认证失败',+ codeNotFound: '未找到授权码',+ stateMissing: '缺少 OAuth state 参数',+ invalidProvider: '无效的 OAuth 提供方',+ returnToSignIn: '返回登录',+ completing: '正在完成认证…',+ },+ oauthStorage: {+ configNotFound: '未找到 Google Drive 存储配置',+ exchangeFailed: 'OAuth 授权码交换失败',+ unsupportedType: '该存储类型不支持 OAuth',+ invalidState: 'OAuth state 参数无效',+ paramNotFound: '未找到 OAuth 参数。请确认重定向 URL 配置正确。',+ addStorageTitle: '添加存储',+ storageDescription: '存储是存放备份的位置(本地磁盘、S3 等)',+ },+ },+ errors: {+ unknown: '出了点问题,请重试。',+ networkUnreachable: '无法连接 Databasus 服务器。请检查网络连接后重试。',+ requestFailed: '服务器未能完成请求(HTTP {{status}})。请稍后重试。',+ },+ status: {+ logicalBackup: {+ inProgress: '进行中',+ completed: '成功',+ failed: '失败',+ deleted: '已删除',+ canceled: '已取消',+ },+ physicalBackup: {+ inProgress: '进行中',+ completed: '成功',+ error: '错误',+ chainBroken: '备份链中断',+ canceled: '已取消',+ },+ restoreVerification: {+ verifiedSuccessful: '已验证',+ verificationFailed: '验证失败',+ },+ restore: {+ inProgress: '进行中',+ completed: '成功',+ failed: '失败',+ canceled: '已取消',+ },+ verification: {+ pending: '排队中',+ running: '运行中',+ completed: '成功',+ failed: '失败',+ canceled: '已取消',+ },+ health: {+ available: '可用',+ unavailable: '不可用',+ },+ agent: {+ neverSeen: '从未连接',+ online: '在线',+ stale: '响应延迟',+ offline: '离线',+ },+ },+ intervals: {+ types: {+ hourly: '每小时',+ daily: '每天',+ weekly: '每周',+ monthly: '每月',+ cron: 'Cron',+ },+ weekdays: {+ mon: '周一',+ tue: '周二',+ wed: '周三',+ thu: '周四',+ fri: '周五',+ sat: '周六',+ sun: '周日',+ },+ periods: {+ day: '1 天',+ week: '1 周',+ month: '1 个月',+ threeMonths: '3 个月',+ sixMonths: '6 个月',+ year: '1 年',+ twoYears: '2 年',+ threeYears: '3 年',+ fourYears: '4 年',+ fiveYears: '5 年',+ forever: '永久',+ },+ },+ auditLogs: {+ title: '审计日志',+ columns: {+ user: '用户',+ message: '事件',+ workspace: '工作区',+ created: '时间',+ },+ systemUser: '系统',+ loadedOfTotal: '已加载:{{loaded}} / {{total}}',+ empty: '没有审计日志。',+ loadingMore: '正在加载更多日志…',+ allLoaded: '已加载全部日志(共 {{count}} 条)',+ },+ settings: {+ title: 'Databasus 设置',+ externalRegistrations: {+ title: '允许外部注册',+ description: '开启后,新用户可以自行注册 Databasus 账号。关闭后,新用户只能通过邀请注册。',+ },+ memberInvitations: {+ title: '允许成员邀请',+ description: '开启后,现有成员可以邀请新用户加入 Databasus。关闭后,只有管理员能邀请用户。',+ },+ memberWorkspaceCreation: {+ title: '允许成员创建工作区',+ description:+ '开启后,成员(非管理员用户)可以创建新的工作区。关闭后,只有管理员能创建工作区。',+ },+ saving: '正在保存…',+ saveChanges: '保存更改',+ reset: '重置',+ updated: '设置已更新',+ readMore: '关于这些设置的详细说明,请<docsLink>查看文档</docsLink>',+ healthcheck: {+ title: '可用性检查',+ openInNewTab: '点击在新标签页中打开',+ copied: '可用性检查地址已复制到剪贴板',+ description: '通过这个地址监控 Databasus 系统是否可用',+ },+ },+ databases: {+ types: {+ postgresql: 'PostgreSQL',+ mysql: 'MySQL',+ mariadb: 'MariaDB',+ mongodb: 'MongoDB',+ },+ sslModes: {+ disable: '禁用',+ require: '必需',+ verifyCa: '验证 CA',+ verifyFull: '完全验证',+ },+ physicalBackupTypes: {+ full: '仅全量备份',+ fullIncremental: '全量 + 增量',+ fullIncrementalWalStream: '全量 + 增量 + WAL 流式传输',+ },+ list: {+ addDatabase: '添加数据库',+ searchPlaceholder: '搜索数据库',+ noSearchResults: '没有找到与“{{query}}”匹配的数据库',+ description: '数据库就是我们要备份的对象',+ backToList: '← 返回数据库列表',+ },+ card: {+ storage: '存储:<storageName/>',+ lastBackup: '上次备份:{{relativeTime}}',+ hasBackupError: '备份出错',+ },+ tabs: {+ config: '配置',+ backups: '备份',+ verifications: '恢复验证',+ },+ create: {+ title: '添加要备份的数据库',+ namePlaceholder: '我最爱的数据库',+ creating: '正在创建数据库…',+ complete: '完成',+ backupType: {+ title: '选择备份类型',+ logical: {+ title: '逻辑备份',+ description: '推荐用于 50 GB 以下的数据库,配置更简单。',+ },+ physical: {+ title: '物理备份',+ description: '适用于 50 GB 以上的数据库。支持时间点恢复,RPO/RTO 更好,但需要额外配置。',+ },+ },+ },+ config: {+ namePlaceholder: '输入名称',+ removing: '正在删除数据库…',+ lastBackupError: {+ title: '上次备份出错',+ errorLabel: '错误:',+ clearHint: '清除此错误(任选其一):',+ clearByTestingConnection: '- 用下方按钮测试连接(即使你已经修改了设置);',+ clearByNextBackup: '- 等待下一次备份成功完成;',+ },+ sections: {+ database: '数据库设置',+ backupConfig: '备份配置',+ healthcheck: '可用性检查设置',+ restoreVerification: '恢复验证',+ notifiers: '通知渠道设置',+ },+ copyConfirmation: '确定要复制这个数据库吗?系统会创建一个设置相同的新数据库。',+ removeConfirmation: '确定要删除这个数据库吗?此操作无法撤销。',+ copied: {+ title: '数据库已复制',+ description: '已创建“{{name}}”',+ },+ connectionTestSucceeded: {+ title: '连接测试成功',+ description: '数据库连接测试通过',+ },+ },+ actions: {+ testConnection: '测试连接',+ replace: '替换',+ },+ fields: {+ databaseType: '数据库类型',+ version: '{{engine}} 版本',+ databaseName: '数据库名',+ sslMode: 'SSL 模式',+ useHttps: '使用 HTTPS',+ cpuCount: 'CPU 数量',+ backupType: '备份类型',+ clientCertificate: '客户端证书',+ clientKey: '客户端私钥',+ serverCaCertificate: '服务器 CA 证书',+ includeSchemas: '包含的模式',+ excludeTables: '排除的表',+ skipUserMappings: '跳过用户映射',+ excludeExtensions: '排除扩展',+ restoreOwnership: '恢复所有者',+ restorePrivileges: '恢复权限',+ excludeEvents: '排除事件',+ galeraReplication: 'Galera 复制',+ useSrvConnection: '使用 SRV 连接',+ directConnection: '直接连接',+ authDatabase: '认证数据库',+ excludeCollections: '排除的集合',+ },+ edit: {+ parseFromClipboard: '从剪贴板解析',+ clipboardEmpty: '剪贴板为空',+ clipboardReadFailed: '无法读取剪贴板。请检查浏览器权限。',+ connectionStringParsed: '已解析连接字符串',+ connectionStringParsedWithoutPassword: '已解析连接字符串,请手动输入密码。',+ connectionTestPassed: {+ title: '连接测试通过',+ description: '可以继续下一步',+ },+ ipWhitelistHint:+ '如果数据库启用了 IP 白名单,请确保已将 Databasus 服务器的 IP 加入允许列表。',+ localhostHint: '请<docsLink>阅读这篇文档</docsLink>,了解如何备份本地数据库',+ advancedSettings: '高级设置',+ placeholders: {+ host: '输入 {{engine}} 主机',+ port: '输入 {{engine}} 端口',+ username: '输入 {{engine}} 用户名',+ password: '输入 {{engine}} 密码',+ databaseName: '输入 {{engine}} 数据库名',+ },+ cpuCountTooltip:+ '备份和恢复时使用的 CPU 核心数。数值越大,速度可能越快,但占用的资源也越多。',+ excludeTablesPlaceholder: '未排除任何表',+ excludeTablesTooltip: '不纳入备份的表名。可以粘贴以逗号或换行分隔的列表。',+ serverCaCertificateTooltip:+ '可选。填写后,会用这个 CA 验证服务器证书(verify-ca / verify-full)。',+ copyFailed: '复制失败',+ postgresql: {+ supabaseHint: '请<docsLink>阅读这篇文档</docsLink>,了解如何备份 Supabase 数据库',+ includeSchemasPlaceholder: '所有模式(默认)',+ excludeTablesTooltip:+ "不纳入备份的表。格式为 'tablename' 或 'schema.tablename',支持 glob 模式(例如 'logs_*')。可以粘贴以逗号或换行分隔的列表。",+ skipUserMappingsTooltip:+ '恢复时跳过用户映射(CREATE USER MAPPING 语句)。如果备份所用的角色无法读取映射中的凭据,请开启此项:否则转储出的映射会丢失选项(OPTIONS),导致 oracle_fdw 等 FDW 恢复失败。',+ excludeExtensionsTooltip:+ '恢复时跳过扩展(CREATE EXTENSION 语句)。如果要恢复到由服务商管理扩展的托管 PostgreSQL 服务,请开启此项。',+ restoreOwnershipTooltip:+ '执行转储中的 ALTER OWNER 语句,让恢复出的对象保留原来的所有者。连接用户必须能分配这些角色,通常需要超级用户。',+ restorePrivilegesTooltip:+ '执行转储中的 GRANT 和 REVOKE 语句,让恢复出的对象保留原来的 ACL。连接用户必须能向相关角色授权,通常需要超级用户。',+ backupTypeTooltips: {+ full: '定期创建独立的全量备份,每个备份都自成一体。',+ fullIncremental:+ '全量备份加上增量备份。增量备份只保存自上一次备份以来的变化,体积更小,速度更快。',+ fullIncrementalWalStream:+ '在全量和增量备份之上增加持续的 WAL 流式传输。只有这个选项支持时间点恢复(PITR),但占用空间更多,恢复也更慢。',+ },+ },+ mariadb: {+ skipEvents: '跳过事件',+ skipEventsTooltip:+ '备份时跳过数据库事件。如果 MariaDB 服务器上禁用了事件调度器,请开启此项。',+ skipGaleraDisable: '恢复时不禁用',+ skipGaleraDisableTooltip:+ '默认情况下,Databasus 在恢复时执行 SET SESSION wsrep_on=OFF,以避免 Galera writeset 大小错误。这需要 SUPER 权限。如果托管服务商不授予 SUPER 权限,请开启此项跳过这一步,但大型恢复可能会触及 Galera 的 writeset 限制。',+ },+ mongodb: {+ srvTooltip: '连接 MongoDB Atlas 的 SRV 地址(mongodb+srv://)时开启。SRV 连接不需要端口。',+ srvOverTunnelTooltip: '通过 SSH 隧道连接时不可用:SRV 会自行解析主机列表,绕过转发的端口。',+ directConnectionTooltip:+ '直接连接单个服务器,跳过副本集发现。适用于服务器位于负载均衡器、代理或隧道之后的情况。',+ directConnectionOverTunnelTooltip:+ '启用 SSH 隧道时强制开启:隧道只暴露一个地址,因此无法使用副本集发现。',+ excludeCollectionsPlaceholder: '未排除任何集合',+ excludeCollectionsTooltip: '不纳入备份的集合名。可以粘贴以逗号或换行分隔的列表。',+ },+ },+ show: {+ galeraDisableSkipped: '恢复时不禁用',+ },+ sshTunnel: {+ authTypes: {+ password: '密码',+ privateKey: '私钥',+ },+ title: 'SSH 隧道',+ tooltip:+ '用于封闭网络中的数据库。Databasus 连接到下方的 SSH 主机,再由该主机通过上方填写的主机和端口访问数据库。',+ host: 'SSH 主机',+ hostTooltip:+ '上方的数据库主机由 SSH 主机解析,而不是由 Databasus 解析。如果数据库就运行在 SSH 主机上,请填写 127.0.0.1。',+ port: 'SSH 端口',+ username: 'SSH 用户名',+ usernamePlaceholder: '输入 SSH 用户名',+ authType: 'SSH 认证方式',+ credentials: 'SSH 凭据',+ password: 'SSH 密码',+ passwordPlaceholder: '输入 SSH 密码',+ privateKey: 'SSH 私钥',+ keyPassphrase: '密钥口令',+ keyPassphrasePlaceholder: '仅用于加密的密钥',+ },+ notifiers: {+ title: '通知渠道',+ description: '通知渠道是接收通知的地方(邮件、Slack、Telegram 等)',+ multipleHint: '可以选择多个通知渠道,通知会发送到所有选中的渠道。',+ selectPlaceholder: '选择通知渠道',+ createNew: '新建通知渠道',+ addTitle: '添加通知渠道',+ notifyTo: '通知发送到',+ empty: '未配置通知渠道',+ },+ readOnlyUser: {+ dialogTitle: '创建只读用户',+ readOnly: {+ checking: '正在检查只读用户…',+ title: '为 Databasus 创建只读用户?',+ description:+ '只读用户是权限受限的 {{databaseType}} 用户,只能读取数据库中的数据,不能修改。备份推荐使用只读用户,因为:',+ noWriteCredentials:+ '<bold>使用只读用户,就完全不必保存带写权限的凭据</bold>。即使在被入侵的最坏情况下,也没有人能破坏你的数据。',+ create: '是,创建只读用户',+ skipTitle: '跳过创建只读用户?',+ skipQuestion: '确定要跳过创建只读用户吗?',+ },+ replicationOnly: {+ checking: '正在检查复制专用用户…',+ title: '为 Databasus 创建复制专用用户?',+ description:+ '复制专用用户是权限受限的 {{databaseType}} 用户,只能读取数据库中的数据,不能修改。备份推荐使用复制专用用户,因为:',+ noWriteCredentials:+ '<bold>使用复制专用用户,就完全不必保存带写权限的凭据</bold>。即使在被入侵的最坏情况下,也没有人能破坏你的数据。',+ create: '是,创建复制专用用户',+ skipTitle: '跳过创建复制专用用户?',+ skipQuestion: '确定要跳过创建复制专用用户吗?',+ },+ reasons: {+ preventsModifications: '它能防止备份期间意外修改数据',+ leastPrivilege: '它符合最小权限原则',+ bestPractice: '这是安全方面的最佳实践',+ },+ securityNote:+ 'Databasus 采用企业级安全措施(<docsLink>详见这里</docsLink>),但不可能防范所有风险。',+ noWritePrivileges: '当前用户<bold>没有写权限</bold>。',+ noWriteRoles: '当前用户<bold>没有带写权限的角色</bold>。',+ writePrivileges: '当前用户拥有以下写权限:',+ writeRoles: '当前用户拥有以下带写权限的角色:',+ expand: '(展开)',+ collapse: '(收起)',+ skip: '跳过',+ skipRisk:+ '不建议用拥有全部权限的用户做备份,这可能带来安全风险。Databasus 强烈建议你不要跳过这一步。',+ skipAdvice:+ '100% 的防护永远做不到。哪怕被完全入侵的风险只有 0.01%,也值得防范。所以更稳妥的做法是使用只读用户。',+ acceptRisks: '是,我接受风险',+ continueSecurely: '按安全方式继续',+ forcedWalRotationUnavailable:+ '源数据库不允许向新用户授予 pg_switch_wal() 的 EXECUTE 权限,而持续 WAL 流式传输需要它来让恢复点尽量接近当前时刻。使用这些凭据,全量和增量备份可以正常工作。',+ },+ transfer: {+ title: '将数据库转移到其他工作区',+ targetWorkspace: '目标工作区',+ selectWorkspace: '选择工作区',+ storage: {+ title: '存储',+ transferExisting: '连同现有存储一起转移',+ selectFromTarget: '从目标工作区选择存储',+ blocked: '使用此存储的数据库:{{count}}。其他数据库依赖该存储,因此无法转移。',+ canTransfer: '存储可以转移',+ selectPlaceholder: '选择存储',+ createNew: '新建存储',+ addTitle: '添加存储',+ description: '存储是存放备份的位置(本地磁盘、S3、Google Drive 等)',+ },+ notifiers: {+ title: '通知渠道(可选)',+ transferWithDatabase: '随数据库一起转移通知渠道',+ selectFromTarget: '从目标工作区选择通知渠道',+ willTransfer: '将被转移:',+ willNotTransfer: '不会被转移(其他数据库正在使用):',+ usedByDatabases: '{{name}}(使用它的数据库:{{count}})',+ noneTransferred: '不会转移任何通知渠道。转移完成后,可以从目标工作区选择通知渠道。',+ selectPlaceholder: '选择通知渠道(可选)',+ },+ submit: '转移',+ transferred: {+ title: '数据库已转移',+ description: '“{{name}}”已转移到新工作区',+ },+ },+ connectionString: {+ errors: {+ empty: '连接字符串为空',+ unrecognizedFormat: '无法识别连接字符串的格式',+ hostMissing: '连接字符串中缺少主机',+ usernameMissing: '连接字符串中缺少用户名',+ passwordMissing: '连接字符串中缺少密码',+ databaseMissing: '连接字符串中缺少数据库名',+ parseFailed: '无法解析连接字符串',+ jdbc: {+ invalidFormat: 'JDBC 连接字符串格式无效。应为:{{expectedFormat}}',+ queryParametersMissing: 'JDBC 连接字符串缺少查询参数(user 和 password)',+ usernameMissing: 'JDBC 连接字符串中缺少用户名(user 参数)',+ passwordMissing: 'JDBC 连接字符串中缺少 password 参数',+ parseFailed: '无法解析 JDBC 连接字符串',+ },+ keyValue: {+ hostMissing: '连接字符串中缺少主机。请使用 host=hostname',+ usernameMissing: '连接字符串中缺少用户名。请使用 user=username',+ passwordMissing: '连接字符串中缺少密码。请使用 password=yourpassword',+ databaseMissing: '连接字符串中缺少数据库名。请使用 database=database',+ parseFailed: '无法解析键值对格式的连接字符串',+ },+ libpq: {+ databaseMissing: '连接字符串中缺少数据库名。请使用 dbname=database',+ parseFailed: '无法解析 libpq 连接字符串',+ },+ },+ },+ physicalConnectionErrors: {+ grantAsSuperuserNote: '用下面的命令授予该权限(以超级用户身份运行)。',+ applyAndRestartNote: '应用下面的修改,然后重启 PostgreSQL。',+ pgHbaNoEntry: {+ title: '不允许从此主机进行复制',+ summary:+ 'pg_hba.conf 中没有允许 Databasus 建立复制连接的条目。物理备份通过复制连接传输,需要一条“host replication”规则,普通的“host all”规则并不涵盖它。',+ addLineNote:+ '把下面这行加入 pg_hba.conf。第一个“all”匹配任意用户,第二个匹配任意主机。如需限制访问,可以把用户缩小到特定的复制角色,和/或把主机缩小到某个 CIDR 地址段。',+ reloadNote: '更新 pg_hba.conf 后,<bold>重新加载 PG 配置</bold>。',+ managedNote:+ '在托管 PostgreSQL(RDS / Azure / GCP)上无法编辑 pg_hba.conf,请改为在服务商控制台中开启外部访问或复制访问。',+ },+ badCredentials: {+ title: '用户名或密码错误',+ summary: 'PostgreSQL 拒绝了这些凭据。请检查此数据库的用户名和密码。',+ },+ noReplicationPrivilege: {+ title: '用户无法进行复制',+ summary: '用户已连接,但缺少物理备份所需的 REPLICATION 权限。',+ managedNote:+ '在 AWS RDS 上执行 GRANT rds_replication TO {{username}};在 Azure / GCP 上,请在服务商控制台中为该角色开启复制。',+ },+ noWalSwitchPrivilege: {+ title: '用户无法强制切换 WAL 段',+ summary:+ '持续 WAL 流式传输只在源数据库关闭一个 WAL 段之后才上传它。因此对于很少写入的数据库,最新的 WAL 会一直留在源数据库上,直到 16 MB 的段写满。定时强制切换段,才能让两次备份之间的恢复点保持接近当前时刻,这需要 pg_switch_wal() 的 EXECUTE 权限。全量和增量备份不需要它:它们恢复到各自备份完成的时间点,不会重放归档的 WAL。',+ switchBackupTypeNote:+ '或者把备份类型切换为<bold>全量 + 增量</bold>,这种类型不会重放归档的 WAL。',+ managedNote:+ '在托管 PostgreSQL(RDS / Azure / GCP)上,该函数属于平台的超级用户,无法向客户角色授予它的 EXECUTE 权限,因此无法使用持续 WAL 流式传输,请改用全量 + 增量备份。',+ },+ walLevelInvalid: {+ title: 'wal_level 设置过低',+ summary: '物理备份要求 wal_level 为“replica”或“logical”,当前设置低于此要求。',+ applyNote: '应用下面的修改,然后重启 PostgreSQL(wal_level 只有在重启后才会生效)。',+ managedNote: '在托管 PostgreSQL 上,请在服务商的参数组中设置 wal_level。',+ },+ noWalSenders: {+ title: '没有可用的 WAL 发送进程',+ summary: 'max_wal_senders 为 0,因此 PostgreSQL 无法为备份传输 WAL。',+ managedNote: '在托管 PostgreSQL 上,请在服务商的参数组中设置 max_wal_senders。',+ },+ noReplicationSlots: {+ title: '没有可用的复制槽',+ summary: 'max_replication_slots 为 0,因此 PostgreSQL 无法为备份分配复制槽。',+ managedNote: '在托管 PostgreSQL 上,请在服务商的参数组中设置 max_replication_slots。',+ },+ walSummaryDisabled: {+ title: 'summarize_wal 已关闭',+ summary: '增量备份要求开启 summarize_wal,但这台服务器目前没有开启。',+ applyNote: '应用下面的修改(无需重启)。',+ thenNote: '然后',+ managedNote: '在托管 PostgreSQL 上,请在服务商的参数组中设置 summarize_wal。',+ },+ customTablespaces: {+ title: '不支持自定义表空间',+ summary:+ '该集群有 pg_default / pg_global 之外的表空间,物理备份无法传输它们。请删除自定义表空间,或把这个数据库改为逻辑备份。',+ },+ systemIdentifierMismatch: {+ title: '这是另一个集群',+ summary:+ '此地址上集群的系统标识符(system identifier)与最初配置备份时的集群不同。请把 Databasus 指向原来的集群,或新建一个数据库条目。',+ },+ connectionFailed: {+ title: '无法连接',+ summary:+ 'Databasus 无法建立复制连接。请检查主机、端口、SSL 模式,并确认没有防火墙阻止连接。',+ },+ },+ },+ restores: {+ list: {+ empty: '还没有恢复记录',+ },+ targetDatabase: {+ select: '选择要恢复到的数据库',+ description:+ '填写要把备份恢复到的数据库信息。<underline>恢复前需要先创建一个空数据库</underline>。恢复过程中,其中现有的数据都会被清除。',+ notInUseHint:+ '请确保该数据库当前没有被使用(你多半不会想把数据恢复到创建备份的同一个数据库)',+ submit: '恢复到此数据库',+ },+ card: {+ startedAt: '开始时间',+ duration: '耗时',+ errorDetailsTooltip: '点击查看错误详情',+ cancelTooltip: '取消恢复',+ expectedDurationHint: '恢复耗时通常是备份的 3 到 5 倍(取决于数据类型,有时更快,有时更慢)',+ expectedDurationLimit: '因此预计最多需要 {{duration}}(通常会快得多)',+ },+ errorDetails: {+ title: '恢复错误详情',+ copied: '错误信息已复制到剪贴板',+ excludeExtensionsTip:+ '<bold>💡 提示:</bold>恢复到托管 PostgreSQL 服务(如 Yandex Cloud、AWS RDS 等)时通常会出现这个错误。请在恢复前到高级设置中开启<bold>“排除扩展”</bold>再试。',+ },+ cancelConfirmation: {+ warning:+ '<bold>⚠️ 警告:</bold>取消恢复很可能会让数据库处于损坏或不完整的状态。再次尝试恢复前,需要重新创建该数据库。',+ question: '确定要取消吗?',+ confirm: '是,取消恢复',+ },+ },+ healthcheck: {+ attempts: {+ title: '可用性检查记录',+ period: '时间段',+ periods: {+ today: '今天',+ sevenDays: '7 天',+ thirtyDays: '30 天',+ allTime: '全部',+ },+ empty: '暂无数据',+ },+ config: {+ enable: '启用可用性检查',+ isEnabled: '是否启用可用性检查',+ notifyWhenUnavailable: '不可用时通知',+ checkIntervalMinutes: '检查间隔(分钟)',+ attemptsBeforeDown: '判定不可用前的尝试次数',+ storeAttemptsDays: '记录保留时长(天)',+ tooltips: {+ enable: '为此数据库启用或禁用可用性检查',+ notifyWhenUnavailable: '数据库变为不可用时发送通知',+ checkIntervalMinutes: '多久检查一次数据库的可用性(分钟)',+ attemptsBeforeDown: '失败多少次后将数据库标记为不可用',+ storeAttemptsDays: '可用性检查记录保留多少天',+ },+ },+ },+ workspaces: {+ roles: {+ owner: '所有者',+ admin: '管理员',+ member: '成员',+ viewer: '查看者',+ },+ fields: {+ name: '工作区名称',+ namePlaceholder: '输入工作区名称',+ },+ create: {+ title: '创建工作区',+ submit: '创建工作区',+ defaultName: '我的工作区',+ description:+ '工作区用来集中管理:<lineBreak/>- 你的数据库;<lineBreak/>- 存储(本地磁盘、S3、Google Drive 等);<lineBreak/>- 通知渠道(邮件、Slack、Telegram 等);<lineBreak/>- 访问控制(如果你有团队)。',+ nameRequired: '请输入工作区名称',+ created: '工作区已创建',+ permissionDenied: {+ title: '权限不足',+ description: '你没有创建工作区的权限。请联系管理员为你创建工作区。',+ },+ },+ settings: {+ title: '工作区设置',+ readOnly: '你没有修改这些设置的权限',+ nameRequired: '工作区名称不能为空',+ saving: '正在保存…',+ saveChanges: '保存更改',+ reset: '重置',+ updated: '基本信息已更新',+ },+ delete: {+ dangerZone: '危险区域',+ title: '删除此工作区',+ description: '工作区删除后无法撤销。与该工作区关联的所有数据和资源都将被永久删除。',+ submit: '删除工作区',+ deleting: '正在删除…',+ notFound: '未找到工作区',+ noPermission: '你没有删除此工作区的权限',+ hasDatabases: '无法删除工作区,请先删除其中所有数据库。当前数据库数量:{{count}}。',+ deleted: '工作区已删除',+ confirmation: {+ title: '删除工作区',+ question: '确定要删除工作区 <workspaceName/> 吗?',+ warning: '<bold>此操作无法撤销。</bold>所有数据和关联资源都将被永久删除。',+ submit: '删除工作区',+ },+ },+ members: {+ title: '用户',+ count: '成员:{{count}}',+ empty: '没有成员',+ emptyHint: '点击“添加成员”开始',+ fields: {+ member: '成员',+ role: '角色',+ joined: '加入时间',+ actions: '操作',+ email: '邮箱地址',+ emailPlaceholder: '输入邮箱地址',+ },+ add: {+ button: '添加成员',+ title: '添加成员',+ submit: '添加成员',+ emailRequired: '请输入邮箱',+ hint: '如果该用户已存在,会被直接添加;否则会向其发送邀请。',+ added: '成员已添加',+ },+ invited: {+ title: '已邀请用户',+ sentTo: '邀请已发送至 {{email}}',+ description:+ '该用户还没有注册,但已受邀加入工作区。用这个邮箱注册后,将自动成为工作区成员。',+ },+ roleChanged: '成员角色已更新',+ remove: {+ tooltip: '移除成员',+ title: '移除成员',+ question: '确定要将“{{email}}”从此工作区移除吗?',+ removed: '已移除成员“{{email}}”',+ },+ },+ transferOwnership: {+ button: '转让所有权',+ title: '转让工作区所有权',+ submit: '转让所有权',+ warning:+ '<bold>警告:</bold>此操作无法撤销。你将失去此工作区的所有权,新的所有者将获得完全控制权。',+ noEligibleMembers:+ '没有可以转让所有权的成员。工作区中至少还要有一位其他成员,才能转让所有权。',+ newOwner: '选择新所有者',+ newOwnerPlaceholder: '选择要转让所有权的成员',+ newOwnerHint: '所选成员将成为工作区所有者',+ memberRequired: '请选择要转让所有权的成员',+ memberNotFound: '未找到所选成员',+ transferred: '所有权已转让',+ },+ auditLogs: {+ empty: '此工作区没有审计日志。',+ },+ },+ users: {+ roles: {+ admin: '管理员',+ member: '成员',+ },+ fields: {+ name: '姓名',+ email: '邮箱',+ yourName: '你的姓名',+ yourEmail: '你的邮箱',+ confirmPassword: '确认密码',+ newPassword: '新密码',+ },+ validation: {+ nameRequired: '请输入姓名',+ emailRequired: '请输入邮箱',+ passwordTooShort: '密码长度至少为 {{minLength}} 个字符',+ passwordsDoNotMatch: '两次输入的密码不一致',+ },+ oauth: {+ divider: '或使用邮箱继续',+ continueWithGithub: '使用 GitHub 继续',+ continueWithGoogle: '使用 Google 继续',+ invalidConfiguration: 'OAuth 配置无效',+ },+ signIn: {+ title: '登录',+ submit: '登录',+ noAccount: '还没有账号?<signUpLink>注册</signUpLink>',+ forgotPassword: '忘记密码?',+ },+ signUp: {+ title: '注册',+ namePlaceholder: '张三',+ submit: '注册',+ hasAccount: '已有账号?<signInLink>登录</signInLink>',+ },+ adminPassword: {+ title: '注册管理员',+ description: '之后你就可以用登录名“admin”和你设置的密码登录',+ submit: '设置密码',+ },+ requestPasswordReset: {+ title: '重置密码',+ description: '输入你的邮箱地址,我们会给你发送重置码。',+ submit: '发送重置码',+ codeSent: '如果该邮箱已注册,重置码已发送',+ rememberPassword: '想起密码了?<signInLink>登录</signInLink>',+ },+ resetPassword: {+ title: '重置密码',+ description: '输入邮件中的重置码和新密码。',+ code: '重置码',+ confirmPassword: '确认密码',+ submit: '重置密码',+ invalidCode: '重置码必须是 6 位数字',+ succeeded: '密码已重置,正在跳转到登录页…',+ noCode: '没有收到重置码?<requestCodeLink>重新获取</requestCodeLink>',+ backToSignIn: '返回登录',+ },+ profile: {+ title: '个人资料',+ information: '个人信息',+ userId: '用户 ID',+ namePlaceholder: '输入你的姓名',+ emailPlaceholder: '输入你的邮箱',+ adminEmailReadOnly: '管理员邮箱不能修改',+ role: '角色',+ saveChanges: '保存更改',+ noChanges: '没有需要保存的更改',+ updated: '个人资料已更新',+ logout: '退出登录',+ changePassword: {+ title: '修改密码',+ newPasswordPlaceholder: '输入新密码',+ confirmPassword: '确认新密码',+ confirmPasswordPlaceholder: '再次输入新密码',+ passwordsDoNotMatch: '两次输入的新密码不一致',+ changing: '正在修改密码…',+ submit: '修改密码',+ signedInWithNewPassword: '已使用新密码登录',+ },+ },+ list: {+ title: 'Databasus 用户',+ loadedOfTotal: '用户:{{loaded}} / {{total}}',+ searchPlaceholder: '按邮箱或姓名搜索',+ empty: '没有找到用户。',+ allLoaded: '已加载全部用户(共 {{count}} 位)',+ columns: {+ user: '用户',+ systemRole: '系统角色',+ isActive: '激活状态',+ created: '创建时间',+ },+ roleLabel: '角色:',+ activeLabel: '激活:',+ viewAuditLogs: '查看审计日志',+ activated: '用户已激活',+ deactivated: '用户已停用',+ roleChanged: '用户角色已更改',+ },+ auditLogs: {+ title: '用户审计日志',+ empty: '该用户没有审计日志。',+ },+ },+ verification: {+ triggers: {+ manual: '手动',+ scheduled: '定时',+ },+ notificationTypes: {+ verificationSuccess: '验证成功',+ verificationFailed: '验证失败',+ },+ config: {+ scheduledVerification: '定时验证',+ scheduledVerificationTooltip:+ '定期把最新的备份恢复到一次性 Postgres 容器中,验证它能否恢复。<docsLink>了解工作原理</docsLink>',+ interval: '验证周期',+ afterBackup: '备份后',+ afterBackupHint:+ '每次备份成功后自动运行。如果队列中还有待处理的验证,会将其取消,以免备份快于验证时队列无限增长。',+ weekday: '每周验证日',+ dayOfMonth: '每月验证日',+ timeOfDay: '验证时间',+ cron: {+ expression: 'Cron 表达式(UTC)',+ format: 'Cron 格式:分钟 小时 日 月 星期(UTC)',+ examples: '示例:',+ exampleEverySunday: '- {{expression}}:每周日 4:00(UTC)',+ exampleEverySixHours: '- {{expression}}:每 6 小时一次',+ nextRun: '下次运行:{{dateTime}}<lineBreak/>({{relativeTime}})',+ invalid: '无效的 Cron 表达式',+ },+ notifications: '通知',+ noNotifications: '无',+ },+ runs: {+ title: '恢复验证',+ description: '每一行是一次尝试:把此数据库的一个备份恢复到临时副本中',+ noAgentsWarning:+ '还没有注册验证代理。请在 Databasus 设置标签页的“验证代理”部分添加。<docsLink>了解更多</docsLink>',+ empty: '还没有恢复验证记录',+ allLoaded: '已加载全部恢复验证(共 {{total}} 次)',+ attempt: '第 {{attempt}} 次尝试',+ restoreDuration: '恢复耗时 {{duration}}',+ durationTooltip: '代理报告的恢复与验证总时长。',+ fields: {+ createdAt: '创建时间',+ trigger: '触发方式',+ duration: '耗时',+ actions: '操作',+ },+ actions: {+ cancel: '取消验证',+ viewDetails: '查看详情',+ },+ details: {+ title: '恢复验证详情',+ loadFailed: '无法加载恢复验证详情。',+ cancellationReason: '取消原因',+ failure: '失败原因',+ sections: {+ status: '状态',+ timeline: '时间线',+ results: '结果与诊断',+ },+ fields: {+ attempt: '尝试次数',+ startedAt: '开始时间',+ finishedAt: '完成时间',+ restoreDuration: '恢复耗时',+ verifyDuration: '验证耗时',+ restoredDbSize: '恢复后的数据库大小',+ schemas: '模式',+ tables: '表',+ pgRestoreExitCode: 'pg_restore 退出码',+ },+ tableStats: {+ title: '各表行数',+ empty: '没有上报各表的统计数据。',+ schema: '模式',+ table: '表',+ rows: '行数',+ },+ },+ },+ agents: {+ title: '验证代理',+ description: '验证代理负责运行恢复验证,确认备份可以恢复(<docsLink>了解更多</docsLink>)',+ empty: '还没有注册代理。',+ columns: {+ capacity: '资源',+ created: '创建时间',+ },+ capacity: {+ cpu: '{{count}} 个 CPU',+ ram: '{{count}} GB 内存',+ disk: '{{count}} GB 磁盘',+ jobs: '任务数:{{count}}',+ notReported: '尚未上报',+ },+ actions: {+ viewInstallCommands: '查看安装命令',+ rotateToken: '轮换令牌',+ },+ deleteConfirmation: '确定要删除这个代理吗?',+ deleted: '代理“{{name}}”已删除',+ copyFailed: '复制失败',+ agentId: '代理 ID:',+ create: {+ title: '创建验证代理',+ tokenNotice: '下一个界面会显示生成的令牌,且只显示这一次。',+ namePlaceholder: '代理名称',+ nameRequired: '请输入名称',+ },+ rotate: {+ title: '轮换令牌',+ description:+ '轮换 <agentName/> 的令牌会立即让现有令牌失效。仍在使用旧令牌的代理会在下一次心跳时被拒绝。',+ },+ token: {+ title: '代理令牌',+ tokenFor: '<agentName/> 的令牌:',+ shownOnce: '令牌只显示一次。请妥善保存,之后无法再次查看。',+ confirmSaved: '我已保存令牌',+ },+ install: {+ title: '安装命令',+ description:+ '<agentName/> 的安装命令。请把 <tokenPlaceholder/> 替换为你创建该代理或上次轮换令牌时保存的令牌。',+ architecture: '架构',+ stepInstall: '第 1 步:安装',+ stepLaunch: '第 2 步:启动',+ capacityDefaults:+ '下面的资源值只是初始默认值,请根据运行代理的机器调整 <code>--max-cpu</code>、<code>--max-ram-mb</code>、<code>--max-disk-gb</code> 和 <code>--max-concurrent-jobs</code>。',+ afterInstallation: '安装之后',+ runsInBackground: '执行 <code>start</code> 后,代理在后台运行',+ checkStatus: '查看状态:<code>./verification-agent status</code>',+ viewLogs: '查看日志:工作目录下的 <code>databasus-verification.log</code>',+ stop: '停止代理:<code>./verification-agent stop</code>',+ },+ },+ },+ notifiers: {+ types: {+ email: '邮件',+ telegram: 'Telegram',+ webhook: 'Webhook',+ slack: 'Slack',+ discord: 'Discord',+ teams: 'Teams',+ mattermost: 'Mattermost',+ },+ notificationTypes: {+ all: '全部',+ backupSuccess: '备份成功',+ backupFailed: '备份失败',+ healthcheckSuccess: '可用性检查通过',+ healthcheckFailed: '可用性检查失败',+ verificationSuccess: '恢复验证成功',+ verificationFailed: '恢复验证失败',+ },+ mattermostDeliveryModes: {+ webhook: '传入 Webhook',+ bot: '机器人账号',+ },+ list: {+ addNotifier: '添加通知渠道',+ searchPlaceholder: '搜索通知渠道',+ noSearchResults: '没有找到与“{{query}}”匹配的通知渠道',+ description: '通知渠道是接收通知的地方(邮件、Slack、Telegram 等)',+ backToList: '← 返回通知渠道列表',+ },+ card: {+ notifyTo: {+ email: '通过邮件通知',+ telegram: '通过 Telegram 通知',+ webhook: '通过 Webhook 通知',+ slack: '通过 Slack 通知',+ discord: '通过 Discord 通知',+ teams: '通过 Teams 通知',+ mattermost: '通过 Mattermost 通知',+ },+ hasSendError: '发送出错',+ },+ create: {+ title: '添加通知渠道',+ namePlaceholder: '我的聊天',+ },+ config: {+ namePlaceholder: '输入名称',+ settingsTitle: '通知渠道设置',+ sendError: {+ title: '发送错误',+ errorLabel: '错误:',+ clearHint: '清除此错误(任选其一):',+ clearBySendingTest: '- 用下方按钮发送测试通知(即使你已经修改了设置);',+ clearByNextNotification: '- 等待下一条通知成功发送;',+ },+ removeConfirmation: '确定要删除这个通知渠道吗?此操作无法撤销。',+ removeBlockedByDatabases: '有数据库正在使用这个通知渠道。请先在这些数据库中移除它。',+ },+ testNotification: {+ send: '发送测试通知',+ sent: {+ title: '测试通知已发送',+ description: '测试通知发送成功',+ },+ },+ transfer: {+ title: '将通知渠道转移到其他工作区',+ blockedByDatabases: '有数据库正在使用这个通知渠道。请先转移或删除相关数据库。',+ description: '选择要将此通知渠道转移到哪个工作区。',+ targetWorkspace: '目标工作区',+ selectWorkspace: '选择工作区',+ submit: '转移',+ },+ fields: {+ botToken: '机器人令牌',+ targetChatId: '目标聊天 ID',+ webhookUrl: 'Webhook URL',+ channelId: '频道 ID',+ skipTlsVerify: '跳过 TLS 验证',+ skipTls: '跳过 TLS 验证',+ },+ email: {+ targetEmail: '收件邮箱',+ targetEmailTooltip: '接收通知的邮箱地址',+ smtpHost: 'SMTP 主机',+ smtpPort: 'SMTP 端口',+ smtpUser: 'SMTP 用户',+ smtpPassword: 'SMTP 密码',+ smtpPasswordPlaceholder: '密码',+ from: '发件人',+ fromTooltip: '可选。用作发件人的邮箱地址。留空时使用 SMTP 用户,或根据主机自动生成',+ fromAuto: '(自动)',+ advancedSettings: '高级设置',+ skipTlsTooltip:+ '跳过 TLS 证书验证。如果 SMTP 服务器使用自签名证书,请开启此项。警告:这会降低安全性。',+ },+ telegram: {+ botTokenHelpLink: '如何获取 Telegram 机器人 API 令牌?',+ targetChatIdTooltip: '接收消息的聊天(可以是你的私聊,也可以是群组)',+ chatIdHelp: {+ toggle: '如何获取 Telegram 聊天 ID?',+ privateChat:+ '要获取你的聊天 ID,请在 Telegram 中给 <botLink>@getmyid_bot</botLink> 发消息。<underline>请确认你已经和该机器人开始聊天</underline>',+ group:+ '要获取群组的聊天 ID,请把你的机器人和 <botLink>@getmyid_bot</botLink> 一起加入群组,然后发送 /start(你会看到聊天 ID)',+ },+ useProxy: '使用代理',+ useProxyTooltip: '通过代理发送 Telegram API 请求',+ proxy: '代理',+ proxyUrl: '代理 URL',+ proxyUrlTooltip: '支持 http、https、socks5、socks5h。可以包含用户名和密码',+ sendToGroupTopic: '发送到群组话题',+ sendToGroupTopicTooltip: '开启后,消息会发送到群聊中的指定话题',+ threadId: '话题 ID',+ threadIdTooltip: '接收消息的话题 ID',+ topicId: '话题 ID',+ threadIdHelp: {+ steps:+ '要获取话题 ID,请在 Telegram 群组中进入该话题,点击顶部的话题名称,打开话题信息。复制话题链接,取 URL 中的最后一个数字。',+ example:+ '<bold>示例:</bold>如果话题链接是 <code>https://t.me/c/2831948048/3</code>,话题 ID 就是 <code>3</code>',+ note: '<bold>注意:</bold>话题功能只能在群聊中使用,私聊中不可用。',+ },+ },+ webhook: {+ method: '请求方法',+ sendOn: '发送时机',+ sendOnPlaceholder: '选择通知类型',+ customHeaders: '自定义请求头',+ customHeadersTooltip:+ '为 Webhook 请求添加自定义 HTTP 请求头(例如 Authorization、X-API-Key)',+ savedHeadersHidden: '*出于安全考虑,已保存的请求头不予显示',+ headers: '请求头',+ headerNamePlaceholder: '请求头名称',+ headerValuePlaceholder: '请求头值',+ addHeader: '添加请求头',+ hiddenHeaderValue: '(已隐藏)',+ bodyTemplate: {+ title: '请求体模板',+ headingVariable: '<variable/>:通知标题',+ messageVariable: '<variable/>:通知内容',+ invalidJsonFormat: 'JSON 格式无效',+ invalidJson: '无效的 JSON',+ },+ exampleRequest: {+ title: '请求示例',+ headers: '请求头:',+ },+ },+ slack: {+ howToConnect: '如何连接 Slack(如何获取机器人令牌和聊天 ID)?',+ testFailedHint:+ '请确认频道是公开的,或者机器人已被加入私有频道(通过 @invite)或群组。私信请使用 Slack 个人资料中的用户 ID。',+ },+ discord: {+ channelWebhookUrl: '频道 Webhook URL',+ howTo: {+ title: '如何获取 Discord Webhook URL:',+ createChannel: '1. 创建或选择一个 Discord 频道',+ openChannelSettings: '2. 打开频道设置(齿轮图标)',+ openIntegrations: '3. 进入集成设置',+ createWebhook: '4. 新建一个 Webhook',+ copyWebhookUrl: '5. 复制 Webhook URL',+ privacyNote: '注意:如有需要,请把频道设为私密',+ },+ },+ teams: {+ howToConnect: '如何连接 Microsoft Teams?',+ powerAutomateUrl: 'Power Automate URL',+ powerAutomateUrlLabel: 'Power Automate URL:',+ powerAutomateUrlTooltip:+ '你的 Power Automate 流中的 HTTP 端点(When an HTTP request is received 触发器)',+ showFullUrl: '显示',+ hideFullUrl: '隐藏',+ },+ mattermost: {+ howToConnect: '如何连接 Mattermost?',+ connectVia: '连接方式',+ incomingWebhookUrl: '传入 Webhook URL',+ serverUrl: '服务器 URL',+ channelIdTooltip:+ '26 个字符的频道 ID,不是频道名称。打开频道,点击频道名称,然后选择 View Info。',+ channel: '频道',+ showOptionalSettings: '显示可选设置',+ hideOptionalSettings: '隐藏可选设置',+ channelOverride: '改用其他频道',+ channelOverrideTooltip:+ '发布到这个频道,而不是创建 Webhook 时指定的频道。如果 Webhook 已锁定到某个频道,Mattermost 会忽略此设置。',+ postAsUsername: '发布者用户名',+ postAsUsernameTooltip:+ '需要在 Mattermost 系统控制台中开启 Enable integrations to override usernames,否则此设置会被忽略。',+ postAsIconUrl: '发布者头像 URL',+ postAsIconUrlTooltip:+ '需要在 Mattermost 系统控制台中开启 Enable integrations to override profile picture icons,否则此设置会被忽略。',+ skipTlsTooltip:+ '跳过 TLS 证书验证。如果 Mattermost 服务器使用自签名证书,请开启此项。警告:这会降低安全性。',+ webhookHowTo: {+ title: '如何获取传入 Webhook URL:',+ openIncomingWebhooks: '1. 主菜单 → Integrations → Incoming Webhooks',+ addWebhook: '2. 点击 Add Incoming Webhook,选择频道',+ copyUrl: '3. 复制生成的 URL',+ },+ botHowTo: {+ title: '如何获取机器人令牌:',+ addBotAccount: '1. Integrations → Bot Accounts → Add Bot Account',+ copyToken: '2. 复制创建后显示的令牌(只显示一次)',+ addBotToChannel: '3. 把机器人加入团队和频道',+ },+ },+ },+ backups: {+ encryption: {+ none: '无',+ encrypted: '已启用',+ },+ encryptionOptions: {+ none: '不加密',+ encrypted: '加密备份文件',+ },+ list: {+ title: '备份',+ scheduledBackupsDisabled: '定时备份已禁用(可以在备份配置中重新启用)',+ empty: '还没有备份',+ allLoaded: '已加载全部备份(共 {{count}} 个)',+ clickToSeeErrorDetails: '点击查看错误详情',+ errorDetailsTitle: '备份错误详情',+ restoreTitle: '从备份恢复',+ columns: {+ createdAt: '创建时间',+ created: '创建时间',+ size: '大小',+ duration: '耗时',+ actions: '操作',+ },+ actions: {+ cancelBackup: '取消备份',+ deleteBackup: '删除备份',+ },+ },+ filters: {+ allTypes: '全部类型',+ allStatuses: '全部状态',+ before: '早于',+ },+ config: {+ backupsEnabled: '启用备份',+ storage: '存储',+ selectStorage: '选择存储',+ createNewStorage: '新建存储',+ addStorageTitle: '添加存储',+ storageDescription: '存储是存放备份的位置(本地磁盘、S3、Google Drive 等)',+ storageChangeWarning: '如果更换存储,该存储中的所有备份都会被删除。',+ storageChangeAcknowledge: '我已了解',+ encryption: '加密',+ notifications: '通知',+ noNotifications: '无',+ schedule: {+ weekday: '星期',+ dayOfMonth: '每月日期',+ cronExpression: 'Cron 表达式(UTC)',+ timeOfDay: '时间',+ nextRun: '下次运行:{{time}}',+ invalidCron: '无效的 Cron 表达式',+ cronHelp: {+ format: 'Cron 格式:分钟 小时 日 月 星期(UTC)',+ examples: '示例:',+ dailyAt2am: '每天 2:00(UTC)',+ every6Hours: '每 6 小时一次',+ mondaysAt3am: '每周一 3:00(UTC)',+ twiceAMonth: '每月 1 日和 15 日 4:30(UTC)',+ },+ },+ gfs: {+ hourly: '每小时:{{count}}',+ daily: '每天:{{count}}',+ weekly: '每周:{{count}}',+ monthly: '每月:{{count}}',+ yearly: '每年:{{count}}',+ notConfigured: '未配置',+ },+ },+ logical: {+ retentionPolicyTypes: {+ gfs: 'GFS(保留最近 N 个每小时、每天、每周、每月和每年的备份)',+ timePeriod: '按时间段(最近 N 天)',+ count: '按数量(最近 N 个备份)',+ },+ notificationTypes: {+ backupSuccess: '备份成功',+ backupFailed: '备份失败',+ },+ list: {+ backupNow: '立即备份',+ makeBackupNow: '立即创建备份',+ encrypted: '已加密',+ sizeTooltip:+ '上方:实际存放在存储(本地、S3、Google Drive 等)中的压缩后备份文件大小。下方(灰色):备份时数据库未压缩的原始大小。备份通常能压缩到原来的五分之一左右。',+ databaseSize: '{{size}}(数据库大小)',+ deleteConfirmation: '确定要删除这个备份吗?',+ actions: {+ restore: '从备份恢复',+ verifyRestore: '验证恢复:安排代理把这个备份恢复到临时数据库,并报告行数',+ download: {+ postgresql: '下载备份文件。可以用 pg_restore 手动恢复(custom 格式)',+ mysql: '下载备份文件。可以用 mysql 客户端手动恢复(SQL 转储)',+ mariadb: '下载备份文件。可以用 mariadb 客户端手动恢复(SQL 转储)',+ mongodb: '下载备份文件。可以用 mongorestore 手动恢复(归档格式)',+ other: '下载备份文件',+ },+ },+ verifyRestore: {+ title: '验证恢复?',+ description:+ '代理会把这个备份恢复到临时数据库并报告行数。视备份大小,这可能需要一些时间。<docsLink>了解工作原理</docsLink>',+ queue: '加入队列',+ queued: '恢复验证已加入队列',+ },+ },+ config: {+ interval: '备份周期',+ weekday: '每周备份日',+ dayOfMonth: '每月备份日',+ timeOfDay: '备份时间',+ encryptionTooltip:+ '备份加密后,存储(S3、本地等)中的备份文件无法直接使用。你可以通过 Databasus 恢复备份,或用“下载”按钮下载解密后的文件。',+ retentionPolicy: '保留策略',+ retention: {+ timePeriodTooltip: '备份保留多长时间。超过这个期限的备份会被自动删除。',+ count: '最近的备份',+ countTooltip: '只保留指定数量的最近备份,更早的备份会被自动删除。',+ countValue: '保留最近 {{count}} 个备份',+ showGfsHint: '什么是 GFS(祖父-父-子)?',+ hideGfsHint: '隐藏',+ gfsHint:+ 'GFS(祖父-父-子)轮换:保留最近 N 个每小时、每天、每周、每月和每年的备份。这样可以在合理的存储空间内长期保留备份。',+ gfsTooltip: 'GFS(祖父-父-子)轮换:保留最近 N 个每小时、每天、每周、每月和每年的备份。',+ gfsFields: {+ hourly: '每小时备份',+ daily: '每天备份',+ weekly: '每周备份',+ monthly: '每月备份',+ yearly: '每年备份',+ },+ },+ advancedSettings: '高级设置',+ retryIfFailed: '备份失败时重试',+ retryIfFailedShort: '失败时重试',+ retryIfFailedTooltip:+ '自动重试失败的备份。网络故障、存储问题或数据库暂时不可用都可能导致备份失败。',+ maxFailedTries: '最大重试次数',+ maxFailedTriesTooltip: '失败备份的最大重试次数。所有重试都失败后,你会收到通知。',+ },+ },+ physical: {+ types: {+ full: '全量',+ incremental: '增量',+ wal: 'WAL',+ },+ retentions: {+ chains: '备份链',+ fullBackups: '全量备份',+ chainsAndFullBackups: '备份链和全量备份',+ },+ fullBackupsPolicies: {+ lastN: '数量',+ gfs: 'GFS',+ },+ notificationTypes: {+ backupSuccess: '备份成功',+ backupFailed: '备份失败',+ chainBroken: '备份链中断',+ walGap: 'WAL 缺口',+ },+ list: {+ totalUsage: '总占用:{{size}}',+ backUpNow: '立即备份',+ fullBackup: '全量备份',+ incrementalBackup: '增量备份',+ restore: '恢复',+ restoreFromThisBackup: '从此备份恢复',+ pointInTimeRestoreTitle: '时间点恢复',+ deleteFullConfirmation:+ '删除这个全量备份会移除它的整条备份链(所有依赖它的增量备份)。此操作无法撤销。确定继续吗?',+ deleteIncrementalConfirmation:+ '删除这个增量备份会移除所有依赖它的后续增量备份。此操作无法撤销。确定继续吗?',+ },+ config: {+ fullBackupCadence: '全量备份频率',+ incrementalBackupCadence: '增量备份频率',+ incrementalMoreFrequent: '增量备份的频率必须高于全量备份。',+ encryptionTooltip:+ '备份加密后,存储中的文件无法直接使用。你可以通过 Databasus 恢复,或下载解密后的文件。',+ retention: '保留',+ fullBackupsOnlyRetention: '这个数据库只做全量备份,因此保留规则作用于全量备份。',+ retentionOptions: {+ chains: '保留最近 N 条备份链',+ chainsAndFullBackups: '保留最近 N 条备份链和全量备份',+ },+ retentionHelp: {+ chain:+ '一条备份链由一个全量备份和依赖它的增量备份(以及流式传输的 WAL)组成。恢复时需要全量备份和链中的每一个增量备份。',+ chains:+ '只保留最近 N 条备份链。一条链被淘汰时,它的全量备份和所有增量备份都会被删除,只能在保留下来的链范围内恢复。',+ chainsAndFullBackups:+ '保留最近 N 条备份链,用于恢复到近期的时间点。此外,还会按下面的策略(GFS 或最近 N 个)保留更早的独立全量备份:它们的增量备份删除后,这些全量备份仍可作为长期恢复点。',+ },+ chainsCount: '备份链数',+ chainsCountTooltip: '要保留的最近备份链数量。一条链由一个全量备份及其增量备份组成。',+ fullBackups: '全量备份',+ fullBackupsCount: '最近的全量备份',+ gfsFields: {+ hourly: '每小时',+ daily: '每天',+ weekly: '每周',+ monthly: '每月',+ yearly: '每年',+ },+ chainsKept: '保留的备份链',+ fullBackupsKept: '保留的全量备份',+ fullBackupsCountValue: '最近 {{count}} 个',+ gfsTooltip:+ 'GFS(祖父-父-子)轮换:保留最近 N 个每小时、每天、每周、每月和每年的全量备份。',+ },+ restore: {+ errorHints: {+ downloadInProgress: '这个数据库已有一个恢复下载正在进行。请等待它完成后重试。',+ targetTimeUnreachable:+ '无法恢复到所选的目标时间:WAL 存在缺口,或者时间超出了可用范围。请选择其他时间,或恢复到最新的可用时间点。',+ },+ backupIntro:+ '这个备份的恢复命令。全量备份只需要它自己的文件;增量备份还需要它的全量备份和之前的所有增量备份。',+ pointInTimeIntro: '时间点恢复。选择目标时间,或留空以恢复到最新的可用时间点。',+ targetTime: '目标时间',+ latestAvailable: '最新可用时间点',+ preparing: '正在准备恢复命令…',+ linkExpiry:+ '下载链接只能使用一次,15 分钟后失效。如果命令因 401 失败,重新打开此对话框即可生成新链接。',+ copied: '已复制',+ methods: {+ script: '使用脚本',+ manual: '手动',+ },+ environments: {+ host: '主机上的 PostgreSQL',+ },+ fields: {+ restoreDirectory: '恢复目录',+ pgBinPath: 'PostgreSQL bin 路径',+ pgBinPathPlaceholder: '{{path}}(可选)',+ pgImage: 'PostgreSQL 镜像',+ },+ scriptTitles: {+ host: '在恢复目标主机上运行',+ docker: '在可以使用 Docker 的机器上运行',+ },+ manualSteps: {+ download: '下载备份包',+ extract: '解压',+ verify: '校验传输完整性',+ reconstruct: '重建数据目录',+ checkConfig: '检查集群的配置文件',+ wireUpRecovery: '解压 WAL 并配置恢复',+ recoveryParameters: '如果恢复因参数设置而停止',+ },+ beforeYouRun: {+ title: '运行前',+ host: {+ clientTools:+ '安装 PostgreSQL {{version}} 客户端工具。如果它们不在 PATH 中,请在上方设置 bin 路径。',+ zstd: '解压备份需要 zstd。',+ zstdWithWal: '解压备份及其 WAL 需要 zstd。',+ emptyDirectory: '恢复目录必须为空,且不能是正在使用的集群目录。',+ },+ docker: {+ image: '使用 postgres:{{version}} 镜像,主版本必须与源数据库一致。',+ hostTools:+ '主机上需要 zstd、tar 和 curl:下载和所有解压(基础备份)都在主机上进行,容器中只运行 pg_combinebackup,因此 postgres 镜像不需要额外工具。',+ hostToolsWithWal:+ '主机上需要 zstd、tar 和 curl:下载和所有解压(基础备份和 WAL)都在主机上进行,容器中只运行 pg_combinebackup,因此 postgres 镜像不需要额外工具。',+ },+ },+ afterItFinishes: {+ title: '完成之后',+ host: {+ clusterLocation: '集群位于 <dataDir/>。',+ changeOwner: '以 root 身份更改所有者:<command/>。',+ start: '以 postgres 身份启动:<command/>,或者把 data_directory 指向它。',+ walReplay: 'PostgreSQL 会重放 WAL 并提升为主库,请在日志中查看恢复是否完成。',+ },+ docker: {+ clusterLocation: '主机上的 <dataDir/> 就是恢复出的集群。',+ volumeMount:+ 'PostgreSQL {{version}} 把数据目录放在卷 <volumeDir/> 下的 <dataDir/>。请把输出目录挂载为该卷的根目录,这正是 docker-compose 中 <code>./pgdata:/var/lib/postgresql</code> 所期望的:',+ dataDirectoryMount: '把集群绑定挂载到镜像的数据目录 <dataDir/>:',+ ownership: '所有者必须与镜像内 postgres 用户的 uid 一致(官方镜像中为 999)。',+ },+ missingConfigFiles:+ '基础备份只复制数据目录。如果源 PostgreSQL 把配置放在数据目录之外(Debian/Ubuntu 的布局,<configDir/>),那么 <code>postgresql.conf</code>、<code>pg_hba.conf</code> 和 <code>pg_ident.conf</code> 不在备份中,服务器将无法启动。在源服务器上用 <code>psql -Atc "SHOW config_file"</code> 查出它们的实际路径,把三个文件都复制过来,然后注释掉 <code>data_directory</code>、<code>hba_file</code>、<code>ident_file</code>、<code>external_pid_file</code> 以及 <code>ssl</code> / <code>ssl_*</code> 这些行,创建 <code>conf.d</code>;如果在容器中运行,还要设置 <code>listen_addresses = \'*\'</code>。如果这些文件都在,却仍然出现同样的错误,那么出错的是挂载的目录,而不是配置。',+ },+ },+ },+ },+ storages: {+ types: {+ local: '本地存储',+ s3: 'S3',+ googleDrive: 'Google Drive',+ nas: 'NAS',+ azureBlob: 'Azure Blob Storage',+ ftp: 'FTP',+ sftp: 'SFTP',+ rclone: 'Rclone',+ },+ s3StorageClasses: {+ default: '默认(Standard)',+ standard: 'Standard',+ standardIa: 'Standard - Infrequent Access',+ onezoneIa: 'One Zone - Infrequent Access',+ intelligentTiering: 'Intelligent Tiering',+ reducedRedundancy: 'Reduced Redundancy',+ glacierIr: 'Glacier Instant Retrieval',+ },+ azureBlobAuthMethods: {+ accountKey: '账户密钥',+ connectionString: '连接字符串',+ },+ sftpAuthMethods: {+ password: '密码',+ privateKey: '私钥',+ },+ list: {+ addStorage: '添加存储',+ description: '存储是存放备份的位置(本地磁盘、S3 等)',+ backToList: '← 返回存储列表',+ },+ card: {+ type: {+ local: '类型:本地存储',+ s3: '类型:S3',+ googleDrive: '类型:Google Drive',+ nas: '类型:NAS',+ azureBlob: '类型:Azure Blob Storage',+ ftp: '类型:FTP',+ sftp: '类型:SFTP',+ rclone: '类型:Rclone',+ },+ hasSaveError: '保存出错',+ },+ config: {+ namePlaceholder: '输入名称',+ settingsTitle: '存储设置',+ lastSaveError: {+ title: '保存错误',+ errorLabel: '错误:',+ clearHint: '清除此错误(任选其一):',+ clearByTestingConnection: '- 用下方按钮测试连接(即使你已经修改了设置);',+ clearByNextSave: '- 等待下一次保存成功完成;',+ },+ removeConfirmation: '确定要删除这个存储吗?此操作无法撤销。使用该存储的备份也会一并删除。',+ removeBlockedByDatabases: '有数据库正在使用这个存储。请先在这些数据库中移除它。',+ },+ actions: {+ testConnection: '测试连接',+ },+ connectionTestSucceeded: {+ title: '连接测试成功',+ description: '存储连接测试通过',+ },+ transfer: {+ title: '将存储转移到其他工作区',+ blockedByDatabases: '有数据库正在使用这个存储。请先转移或删除相关数据库。',+ description: '选择要将此存储转移到哪个工作区。',+ targetWorkspace: '目标工作区',+ selectWorkspace: '选择工作区',+ submit: '转移',+ },+ fields: {+ path: '路径',+ remotePath: '远程路径',+ share: '共享名',+ domain: '域',+ useSsl: '使用 SSL',+ useSslTls: '使用 SSL/TLS',+ skipTls: '跳过 TLS 验证',+ skipTlsVerify: '跳过 TLS 验证',+ skipHostKey: '跳过主机密钥验证',+ authMethod: '认证方式',+ privateKey: '私钥',+ credentials: '凭据',+ s3Bucket: 'S3 存储桶',+ region: '区域',+ accessKey: '访问密钥',+ secretKey: '秘密访问密钥',+ endpoint: '端点',+ folderPrefix: '文件夹前缀',+ prefix: '前缀',+ blobPrefix: 'Blob 前缀',+ virtualHost: '虚拟主机',+ storageClass: '存储类别',+ connection: '连接字符串',+ connectionString: '连接字符串',+ accountName: '账户名',+ accountKey: '账户密钥',+ containerName: '容器名称',+ clientId: '客户端 ID',+ clientSecret: '客户端密钥',+ userToken: '用户令牌',+ config: '配置',+ },+ edit: {+ namePlaceholder: '我的存储',+ advancedSettings: '高级设置',+ optionalPlaceholder: '{{example}}(可选)',+ usernamePlaceholder: '用户名',+ passwordPlaceholder: '密码',+ remotePathTooltip: '存放备份的远程目录路径(可选)',+ local: {+ diskSpaceWarning: '注意:使用本地存储可能会耗尽磁盘空间。建议使用 S3 或不限容量的存储',+ },+ s3: {+ cloudflareR2Guide: '如何配合 Cloudflare R2 使用?',+ endpointTooltip: '自定义 S3 兼容端点的 URL(可选,使用 AWS S3 时留空)',+ prefixTooltip:+ "所有对象键的可选前缀(例如 'backups/' 或 'my_team/')。部分 S3 兼容存储可能不支持。创建后无法修改(否则会丢失备份)。",+ useVirtualHostedStyle: '使用虚拟主机式域名',+ virtualHostTooltip:+ '使用虚拟主机式 URL(bucket.s3.region.amazonaws.com),而不是路径式 URL(s3.region.amazonaws.com/bucket)。如果遇到 COS 错误,可能需要开启此项。',+ skipTls: '跳过 TLS 验证',+ skipTlsVerifyTooltip:+ '跳过 TLS 证书验证。如果 S3 兼容存储使用自签名证书,请开启此项。警告:这会降低安全性。',+ storageClassTooltip:+ '上传对象使用的 S3 存储类别。保持默认即为 Standard。部分服务商提供更便宜的类别,例如 One Zone IA。不要使用 Glacier/Deep Archive:恢复时文件必须能立即访问。',+ },+ googleDrive: {+ guideLink: '如何连接 Google Drive?',+ authorize: '授权',+ },+ nas: {+ shareWithSlashWarning:+ '共享名只能填写单个共享的名称。子目录请填在“路径”字段中(例如共享名:Databasus,路径:DB1)',+ useSslTooltip: '启用 SSL/TLS 加密,确保连接安全',+ domainTooltip: 'Windows 域名(可选,不使用域认证时留空)',+ pathPlaceholder: '{{example}}(可选,开头不加斜杠)',+ pathTooltip: '共享内的子目录路径(可选)',+ },+ azureBlob: {+ connectionStringTooltip: '从 Azure Portal 获取的 Azure Storage 连接字符串',+ endpointTooltip: '自定义端点 URL(可选,使用标准 Azure 时留空)',+ prefixTooltip: "所有 Blob 名称的可选前缀(例如 'backups/' 或 'my_team/')",+ },+ ftp: {+ enableFtps: '启用 FTPS',+ useSslTooltip: '使用显式 TLS 加密(FTPS)安全传输文件',+ skipCertificateVerification: '跳过证书验证',+ skipTlsVerifyTooltip:+ '跳过 TLS 证书验证。如果 FTP 服务器使用自签名证书,请开启此项。警告:这会降低安全性。',+ },+ sftp: {+ privateKeyTooltip: '粘贴你的 SSH 私钥(PEM 格式)。支持 RSA、DSA、ECDSA 和 Ed25519 密钥。',+ skipHostKeyVerification: '跳过主机密钥验证',+ skipHostKeyTooltip:+ '跳过 SSH 主机密钥验证。如果你信任该服务器,可以开启此项。警告:这会降低安全性。',+ },+ rclone: {+ configTooltip:+ "在此粘贴 rclone.conf 的内容。运行 'rclone config file' 可以找到该文件,然后复制其中的内容。这份配置支持 70 多家云存储服务商。",+ configHiddenNote: '*内容已隐藏,以免泄露敏感数据。如需更新现有配置,请在此填入新的配置',+ docsLink: 'Rclone 文档',+ remotePathTooltip:+ "远程存储上存放备份的可选路径前缀(例如 '/backups' 或 'my-folder/backups')",+ },+ },+ },+};diff --git a/frontend/src/shared/i18n/resolveInitialLocale.test.ts b/frontend/src/shared/i18n/resolveInitialLocale.test.tsnew file mode 100644index 00000000..8392daf9--- /dev/null+++ b/frontend/src/shared/i18n/resolveInitialLocale.test.ts@@ -0,0 +1,71 @@+import { describe, expect, it } from 'vitest';++import { resolveInitialLocale } from './resolveInitialLocale';++const ALL_LOCALES = ['en', 'ru', 'es', 'pt', 'zh', 'fr'];++describe('resolveInitialLocale', () => {+ it('takes the highest-ranked supported browser language', () => {+ expect(+ resolveInitialLocale({+ storedLocale: null,+ browserLanguages: ['de', 'ru'],+ supportedLocales: ['en', 'ru'],+ }),+ ).toBe('ru');+ });++ it('falls back to English when no browser language is supported', () => {+ expect(+ resolveInitialLocale({+ storedLocale: null,+ browserLanguages: ['de-DE', 'it'],+ supportedLocales: ['en', 'ru'],+ }),+ ).toBe('en');+ });++ it('falls back to English for an empty browser list', () => {+ expect(+ resolveInitialLocale({ storedLocale: null, browserLanguages: [], supportedLocales: ['en'] }),+ ).toBe('en');+ });++ it.each([+ ['zh-TW', 'zh'],+ ['zh-HK', 'zh'],+ ['zh-CN', 'zh'],+ ['pt-PT', 'pt'],+ ['pt-BR', 'pt'],+ ['es-419', 'es'],+ ['FR-ca', 'fr'],+ ])('maps the regional variant %s to %s', (browserLanguage, resolvedLocale) => {+ expect(+ resolveInitialLocale({+ storedLocale: null,+ browserLanguages: [browserLanguage],+ supportedLocales: ALL_LOCALES,+ }),+ ).toBe(resolvedLocale);+ });++ it('lets a stored supported choice outrank the browser preference', () => {+ expect(+ resolveInitialLocale({+ storedLocale: 'en',+ browserLanguages: ['es'],+ supportedLocales: ALL_LOCALES,+ }),+ ).toBe('en');+ });++ it('ignores a stored value that is not supported', () => {+ expect(+ resolveInitialLocale({+ storedLocale: 'de',+ browserLanguages: ['ru'],+ supportedLocales: ['en', 'ru'],+ }),+ ).toBe('ru');+ });+});diff --git a/frontend/src/shared/i18n/resolveInitialLocale.ts b/frontend/src/shared/i18n/resolveInitialLocale.tsnew file mode 100644index 00000000..40339e6f--- /dev/null+++ b/frontend/src/shared/i18n/resolveInitialLocale.ts@@ -0,0 +1,34 @@+// eslint-disable-next-line i18next/no-literal-string -- locale code+const FALLBACK_LOCALE = 'en';++interface ResolveInitialLocaleInput<L extends string> {+ storedLocale: string | null;+ browserLanguages: readonly string[];+ supportedLocales: readonly L[];+}++// A stored choice wins when it is still supported. Otherwise the browser's preferences are walked+// in order and the first one whose primary subtag we ship is taken, so ["de", "ru"] gives Russian+// rather than English. Region subtags are dropped: zh-TW maps to the single Chinese dictionary and+// pt-PT to the single (Brazilian) Portuguese one.+export const resolveInitialLocale = <L extends string>({+ storedLocale,+ browserLanguages,+ supportedLocales,+}: ResolveInitialLocaleInput<L>): L | typeof FALLBACK_LOCALE => {+ const isSupported = (value: string): value is L => supportedLocales.includes(value as L);++ if (storedLocale && isSupported(storedLocale)) {+ return storedLocale;+ }++ for (const language of browserLanguages) {+ const primarySubtag = language.toLowerCase().split('-')[0];++ if (isSupported(primarySubtag)) {+ return primarySubtag;+ }+ }++ return FALLBACK_LOCALE;+};diff --git a/frontend/src/shared/i18n/translateApiError.test.ts b/frontend/src/shared/i18n/translateApiError.test.tsnew file mode 100644index 00000000..2b42cd92--- /dev/null+++ b/frontend/src/shared/i18n/translateApiError.test.ts@@ -0,0 +1,55 @@+import type { TFunction } from 'i18next';+import { beforeAll, describe, expect, it } from 'vitest';++import { API_ERROR_CODES, ApiError } from '../api';+import { createI18n } from './createI18n';+import { translateApiError } from './translateApiError';++let t: TFunction;++beforeAll(() => {+ t = createI18n('ru').t;+});++describe('translateApiError', () => {+ it('translates a known code', () => {+ const error = new ApiError({ code: API_ERROR_CODES.networkUnreachable });++ expect(translateApiError(error, t)).toBe(t('errors.networkUnreachable'));+ });++ it('includes the status for request_failed', () => {+ const error = new ApiError({ code: API_ERROR_CODES.requestFailed, status: 502 });++ expect(translateApiError(error, t)).toBe(t('errors.requestFailed', { status: 502 }));+ expect(translateApiError(error, t)).toContain('502');+ });++ it('shows the backend message for an unknown code', () => {+ const error = new ApiError({+ message: 'storage quota exceeded',+ code: 'quota_exceeded',+ status: 400,+ });++ expect(translateApiError(error, t)).toBe('Storage quota exceeded');+ });++ it('shows the general message for an unknown code without a message', () => {+ const error = new ApiError({ code: 'quota_exceeded', status: 400 });++ expect(translateApiError(error, t)).toBe(t('errors.unknown'));+ });++ it('shows the backend message when there is no code', () => {+ const error = new ApiError({ message: 'database not found', status: 404 });++ expect(translateApiError(error, t)).toBe('Database not found');+ });++ it('never shows the message of an error that is not an ApiError', () => {+ const error = new TypeError('Failed to fetch');++ expect(translateApiError(error, t)).toBe(t('errors.unknown'));+ });+});diff --git a/frontend/src/shared/i18n/translateApiError.ts b/frontend/src/shared/i18n/translateApiError.tsnew file mode 100644index 00000000..154a05ea--- /dev/null+++ b/frontend/src/shared/i18n/translateApiError.ts@@ -0,0 +1,28 @@+import type { TFunction } from 'i18next';++import { API_ERROR_CODES, ApiError } from '../api';+import { StringUtils } from '../lib/StringUtils';+import type { TranslationKey } from './TranslationKey';++// Error codes with a translated message. Backend codes are added here as the backend starts+// sending them; until then the backend's own message is shown.+const API_ERROR_CODE_KEYS: Record<string, TranslationKey> = {+ [API_ERROR_CODES.networkUnreachable]: 'errors.networkUnreachable',+ [API_ERROR_CODES.requestFailed]: 'errors.requestFailed',+};++// The one way an error reaches the screen. The message of anything that is not an ApiError comes+// from the browser or a library, never from the backend, so it is not shown.+export const translateApiError = (error: unknown, t: TFunction): string => {+ if (!(error instanceof ApiError)) {+ return t('errors.unknown');+ }++ const codeKey = error.code ? API_ERROR_CODE_KEYS[error.code] : undefined;+ if (codeKey) {+ return t(codeKey, { status: error.status ?? '' });+ }++ // Backend messages start in lower case ("user is already a member")+ return error.message ? StringUtils.capitalizeFirstLetter(error.message) : t('errors.unknown');+};diff --git a/frontend/src/shared/i18n/useLocale.ts b/frontend/src/shared/i18n/useLocale.tsnew file mode 100644index 00000000..2d5e36a6--- /dev/null+++ b/frontend/src/shared/i18n/useLocale.ts@@ -0,0 +1,11 @@+import { useContext } from 'react';++import { LocaleContext } from './localeContext';++export function useLocale() {+ const context = useContext(LocaleContext);+ if (context === undefined) {+ throw new Error('useLocale must be used within a LocaleProvider');+ }+ return context;+}diff --git a/frontend/src/shared/i18n/websitePages.test.ts b/frontend/src/shared/i18n/websitePages.test.tsnew file mode 100644index 00000000..c5187032--- /dev/null+++ b/frontend/src/shared/i18n/websitePages.test.ts@@ -0,0 +1,58 @@+import { describe, expect, it } from 'vitest';++import websiteI18nSource from '../../../../website/app/i18n.ts?raw';++import { WEBSITE_PAGES, getWebsitePageUrl } from './websitePages';++const readTranslatedPaths = (source: string): string[] => {+ const list = source.match(/TRANSLATED_PATHS\s*=\s*\[([\s\S]*?)\]\s*as const/);+ if (!list) {+ throw new Error('TRANSLATED_PATHS not found in website/app/i18n.ts');+ }++ return [...list[1].matchAll(/"([^"]*)"/g)].map((match) => match[1]);+};++describe('WEBSITE_PAGES', () => {+ const translatedPaths = readTranslatedPaths(websiteI18nSource);++ // A page the website stops translating would otherwise 404 in the application, and a page it+ // starts translating would keep opening in English.+ it.each(Object.entries(WEBSITE_PAGES))(+ 'marks %s as translated exactly when the website translates it',+ (_, page) => {+ expect(page.isTranslated).toBe(translatedPaths.includes(page.path));+ },+ );+});++describe('getWebsitePageUrl', () => {+ it('opens a translated page in the selected language', () => {+ expect(getWebsitePageUrl('installation', 'ru')).toBe('https://databasus.com/ru/installation/');+ });++ it('opens the English page for English', () => {+ expect(getWebsitePageUrl('installation', 'en')).toBe('https://databasus.com/installation/');+ });++ it('opens the English page when the website does not translate it', () => {+ expect(getWebsitePageUrl('notifiersMattermost', 'ru')).toBe(+ 'https://databasus.com/notifiers/mattermost/',+ );+ expect(getWebsitePageUrl('sponsorship', 'ru')).toBe('https://databasus.com/sponsorship/');+ });++ it('keeps the anchor of a section in every language', () => {+ expect(getWebsitePageUrl('accessManagementGlobalSettings', 'ru')).toBe(+ 'https://databasus.com/ru/access-management/#global-settings',+ );+ expect(getWebsitePageUrl('accessManagementGlobalSettings', 'en')).toBe(+ 'https://databasus.com/access-management/#global-settings',+ );+ });++ it('links the home page with and without a language', () => {+ expect(getWebsitePageUrl('home', 'en')).toBe('https://databasus.com/');+ expect(getWebsitePageUrl('home', 'ru')).toBe('https://databasus.com/ru/');+ });+});diff --git a/frontend/src/shared/i18n/websitePages.ts b/frontend/src/shared/i18n/websitePages.tsnew file mode 100644index 00000000..67fd491e--- /dev/null+++ b/frontend/src/shared/i18n/websitePages.ts@@ -0,0 +1,47 @@+import type { Locale } from './dictionaries';++const WEBSITE_URL = 'https://databasus.com';++interface WebsitePage {+ // Path without leading or trailing slash; "" is the home page+ path: string;+ // Whether the website publishes the page in every language (TRANSLATED_PATHS in+ // website/app/i18n.ts). A test keeps this flag in sync with that list.+ isTranslated: boolean;+ // Translated pages keep the English heading ids, so an anchor works in every language+ anchor?: string;+}++// Every website page the application links to.+export const WEBSITE_PAGES = {+ home: { path: '', isTranslated: true },+ installation: { path: 'installation', isTranslated: true },+ security: { path: 'security', isTranslated: true },+ accessManagementGlobalSettings: {+ path: 'access-management',+ anchor: 'global-settings',+ isTranslated: true,+ },+ restoreVerification: { path: 'restore-verification', isTranslated: true },+ faqLocalhost: { path: 'faq/localhost', isTranslated: true },+ faqSupabase: { path: 'faq/supabase', isTranslated: true },+ storagesGoogleDrive: { path: 'storages/google-drive', isTranslated: true },+ storagesCloudflareR2: { path: 'storages/cloudflare-r2', isTranslated: true },+ notifiersSlack: { path: 'notifiers/slack', isTranslated: true },+ notifiersTeams: { path: 'notifiers/teams', isTranslated: true },+ notifiersMattermost: { path: 'notifiers/mattermost', isTranslated: false },+ sponsorship: { path: 'sponsorship', isTranslated: false },+} satisfies Record<string, WebsitePage>;++export type WebsitePageId = keyof typeof WEBSITE_PAGES;++// Opens the page in the selected language when the website publishes it in that language, and the+// English page otherwise. URLs end with a slash, the website's canonical form.+export const getWebsitePageUrl = (pageId: WebsitePageId, locale: Locale): string => {+ const page: WebsitePage = WEBSITE_PAGES[pageId];+ const languagePrefix = page.isTranslated && locale !== 'en' ? `/${locale}` : '';+ const path = page.path ? `/${page.path}/` : '/';+ const anchor = page.anchor ? `#${page.anchor}` : '';++ return `${WEBSITE_URL}${languagePrefix}${path}${anchor}`;+};diff --git a/frontend/src/shared/lib/formatDuration.ts b/frontend/src/shared/lib/formatDuration.tsindex 685672ac..57021d7c 100644--- a/frontend/src/shared/lib/formatDuration.ts+++ b/frontend/src/shared/lib/formatDuration.ts@@ -1,3 +1,4 @@+/* eslint-disable i18next/no-literal-string -- unit letters stay English in every language */export const formatDuration = (durationMs: number): string => {const hours = Math.floor(durationMs / 3600000);const minutes = Math.floor((durationMs % 3600000) / 60000);diff --git a/frontend/src/shared/theme/ThemeModeLabelKeys.ts b/frontend/src/shared/theme/ThemeModeLabelKeys.tsnew file mode 100644index 00000000..b6646c34--- /dev/null+++ b/frontend/src/shared/theme/ThemeModeLabelKeys.ts@@ -0,0 +1,8 @@+import type { TranslationKey } from '../i18n';+import type { ThemeMode } from './themeContext';++export const THEME_MODE_LABEL_KEYS: Record<ThemeMode, TranslationKey> = {+ light: 'app.theme.light',+ dark: 'app.theme.dark',+ system: 'app.theme.system',+};diff --git a/frontend/src/shared/theme/ThemeProvider.tsx b/frontend/src/shared/theme/ThemeProvider.tsxindex 18297be5..966f4891 100644--- a/frontend/src/shared/theme/ThemeProvider.tsx+++ b/frontend/src/shared/theme/ThemeProvider.tsx@@ -4,6 +4,7 @@ import type { ReactNode } from 'react';import { ThemeContext } from './themeContext';import type { ResolvedTheme, ThemeMode } from './themeContext';+// eslint-disable-next-line i18next/no-literal-string -- localStorage keyconst THEME_STORAGE_KEY = 'databasus-theme';function getSystemTheme(): ResolvedTheme {diff --git a/frontend/src/shared/theme/index.ts b/frontend/src/shared/theme/index.tsindex ab143e05..9d2881be 100644--- a/frontend/src/shared/theme/index.ts+++ b/frontend/src/shared/theme/index.ts@@ -1,4 +1,5 @@export { ThemeContext } from './themeContext';export type { ThemeMode, ResolvedTheme, ThemeContextValue } from './themeContext';+export { THEME_MODE_LABEL_KEYS } from './ThemeModeLabelKeys';export { ThemeProvider } from './ThemeProvider';export { useTheme } from './useTheme';diff --git a/frontend/src/shared/time/getUserTimeFormat.ts b/frontend/src/shared/time/getUserTimeFormat.tsindex d3abef35..6218c293 100644--- a/frontend/src/shared/time/getUserTimeFormat.ts+++ b/frontend/src/shared/time/getUserTimeFormat.ts@@ -1,3 +1,4 @@+/* eslint-disable i18next/no-literal-string -- dayjs format tokens, not copy */// Detect date order (MDY, DMY, YMD) and separator from user's localeconst getLocaleDateFormat = () => {const locale = navigator.language || 'en-US';diff --git a/frontend/src/shared/ui/ClipboardPasteModalComponent.tsx b/frontend/src/shared/ui/ClipboardPasteModalComponent.tsxindex 97046a8d..52d4e285 100644--- a/frontend/src/shared/ui/ClipboardPasteModalComponent.tsx+++ b/frontend/src/shared/ui/ClipboardPasteModalComponent.tsx@@ -1,5 +1,6 @@import { Button, Input, Modal } from 'antd';import { useState } from 'react';+import { useTranslation } from 'react-i18next';interface Props {open: boolean;@@ -8,6 +9,7 @@ interface Props {}export function ClipboardPasteModalComponent({ open, onSubmit, onCancel }: Props) {+ const { t } = useTranslation();const [value, setValue] = useState('');const handleSubmit = () => {@@ -25,25 +27,25 @@ export function ClipboardPasteModalComponent({ open, onSubmit, onCancel }: Propsreturn (<Modal- title="Paste from clipboard"+ title={t('app.clipboardPaste.title')}open={open}onCancel={handleCancel}footer={<div className="flex justify-end gap-2">- <Button onClick={handleCancel}>Cancel</Button>+ <Button onClick={handleCancel}>{t('common.actions.cancel')}</Button><Button type="primary" disabled={!value.trim()} onClick={handleSubmit}>- Submit+ {t('app.clipboardPaste.submit')}</Button></div>}><p className="mb-2 text-sm text-gray-500 dark:text-gray-400">- Automatic clipboard access is not available. Please paste your content below.+ {t('app.clipboardPaste.description')}</p><Input.TextAreavalue={value}onChange={(e) => setValue(e.target.value)}- placeholder="Paste your connection string here..."+ placeholder={t('app.clipboardPaste.placeholder')}rows={4}autoFocus/>diff --git a/frontend/src/shared/ui/ConfirmationComponent.tsx b/frontend/src/shared/ui/ConfirmationComponent.tsxindex ebb6ceae..c85d75d8 100644--- a/frontend/src/shared/ui/ConfirmationComponent.tsx+++ b/frontend/src/shared/ui/ConfirmationComponent.tsx@@ -1,11 +1,13 @@import { Button, Modal } from 'antd';-import type { JSX } from 'react';+import type { JSX, ReactNode } from 'react';+import { useTranslation } from 'react-i18next';interface Props {onConfirm(): void;onDecline(): void;- description: string;+ // Rendered as React content, never as HTML: a sentence with inline markup is a Trans element.+ description: ReactNode;actionButtonColor: 'blue' | 'red';actionText: string;@@ -22,9 +24,16 @@ export function ConfirmationComponent({cancelText,hideCancelButton = false,}: Props): JSX.Element {+ const { t } = useTranslation();+return (- <Modal title="Confirmation" open onCancel={() => onDecline()} footer={<div />}>- <div dangerouslySetInnerHTML={{ __html: description }} />+ <Modal+ title={t('common.confirmation.title')}+ open+ onCancel={() => onDecline()}+ footer={<div />}+ >+ <div>{description}</div><div className="mt-5 flex">{!hideCancelButton && (@@ -34,7 +43,7 @@ export function ConfirmationComponent({danger={actionButtonColor !== 'red'}type="primary">- {cancelText || 'Cancel'}+ {cancelText || t('common.actions.cancel')}</Button>)}diff --git a/frontend/src/shared/ui/InlineCodeComponent.tsx b/frontend/src/shared/ui/InlineCodeComponent.tsxnew file mode 100644index 00000000..9cd92645--- /dev/null+++ b/frontend/src/shared/ui/InlineCodeComponent.tsx@@ -0,0 +1,13 @@+import type { ReactNode } from 'react';++interface Props {+ // Optional because Trans injects the children when the component is passed in `components`.+ children?: ReactNode;+}++// A monospace font alone barely sets code apart from prose, so inline code also gets a background.+export const InlineCodeComponent = ({ children }: Props) => (+ <code className="rounded bg-gray-100 box-decoration-clone px-1 py-0.5 text-[0.9em] dark:bg-gray-700">+ {children}+ </code>+);diff --git a/frontend/src/shared/ui/LanguageSelectorComponent.tsx b/frontend/src/shared/ui/LanguageSelectorComponent.tsxnew file mode 100644index 00000000..7d2477d8--- /dev/null+++ b/frontend/src/shared/ui/LanguageSelectorComponent.tsx@@ -0,0 +1,60 @@+import { Dropdown } from 'antd';+import type { MenuProps } from 'antd';+import { useTranslation } from 'react-i18next';++import { DICTIONARIES, SUPPORTED_LOCALES, useLocale } from '../i18n';++const GlobeIcon = () => (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ >+ <circle cx="12" cy="12" r="10" />+ <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />+ <path d="M2 12h20" />+ </svg>+);++interface Props {+ isSplitStart?: boolean;+}++// Opens on hover like the website's selector; click is kept for touch screens, which have no+// hover. Each language is listed by the name its own dictionary gives it.+export function LanguageSelectorComponent({ isSplitStart = false }: Props) {+ const { t } = useTranslation();+ const { locale, setLocale } = useLocale();++ const items: MenuProps['items'] = SUPPORTED_LOCALES.map((supportedLocale) => ({+ key: supportedLocale,+ label: <span lang={supportedLocale}>{DICTIONARIES[supportedLocale].language.nativeName}</span>,+ onClick: () => setLocale(supportedLocale),+ }));++ return (+ <Dropdown+ menu={{ items, selectedKeys: [locale] }}+ trigger={['hover', 'click']}+ placement="bottomRight"+ >+ <button+ className={`flex cursor-pointer items-center gap-1.5 border border-gray-200 bg-white px-2.5 py-1 text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 ${+ isSplitStart ? 'rounded-l-md' : 'rounded-md'+ }`}+ title={t('app.languageControl.title', {+ language: DICTIONARIES[locale].language.nativeName,+ })}+ >+ <GlobeIcon />+ <span>{locale.toUpperCase()}</span>+ </button>+ </Dropdown>+ );+}diff --git a/frontend/src/shared/ui/LanguageThemeControlComponent.tsx b/frontend/src/shared/ui/LanguageThemeControlComponent.tsxnew file mode 100644index 00000000..a5e54505--- /dev/null+++ b/frontend/src/shared/ui/LanguageThemeControlComponent.tsx@@ -0,0 +1,13 @@+import { LanguageSelectorComponent } from './LanguageSelectorComponent';+import { ThemeToggleComponent } from './ThemeToggleComponent';++// Language and theme are both per-browser display preferences, so they share one split button:+// language on the left, theme on the right.+export function LanguageThemeControlComponent() {+ return (+ <div className="flex items-stretch">+ <LanguageSelectorComponent isSplitStart />+ <ThemeToggleComponent isSplitEnd />+ </div>+ );+}diff --git a/frontend/src/shared/ui/SponsorshipLinkComponent.tsx b/frontend/src/shared/ui/SponsorshipLinkComponent.tsxindex e73c5b86..f9259b95 100644--- a/frontend/src/shared/ui/SponsorshipLinkComponent.tsx+++ b/frontend/src/shared/ui/SponsorshipLinkComponent.tsx@@ -1,19 +1,25 @@import { Tooltip } from 'antd';+import { useTranslation } from 'react-i18next';++import { getWebsitePageUrl, useLocale } from '../i18n';interface Props {className: string;}export const SponsorshipLinkComponent = ({ className }: Props) => {+ const { t } = useTranslation();+ const { locale } = useLocale();+return (- <Tooltip title="Databasus saved your data? You can support Databasus as well to keep it free, maintained and independent">+ <Tooltip title={t('app.sponsorship.hint')}><aclassName={`!underline !decoration-blue-600 !decoration-2 underline-offset-4 ${className}`}- href="https://databasus.com/sponsorship"+ href={getWebsitePageUrl('sponsorship', locale)}target="_blank"rel="noreferrer">- Sponsorship+ {t('app.sponsorship.link')}</a></Tooltip>);diff --git a/frontend/src/shared/ui/StarButtonComponent.tsx b/frontend/src/shared/ui/StarButtonComponent.tsxindex 4a7cfa7e..c90678b4 100644--- a/frontend/src/shared/ui/StarButtonComponent.tsx+++ b/frontend/src/shared/ui/StarButtonComponent.tsx@@ -1,4 +1,7 @@import { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';++import { useLocale } from '../i18n';const StarIcon = () => (<svg@@ -17,6 +20,8 @@ const StarIcon = () => ();export function StarButtonComponent() {+ const { t } = useTranslation();+ const { formatNumber } = useLocale();const [starCount, setStarCount] = useState<number | null>(null);const [isLoading, setIsLoading] = useState(true);@@ -44,17 +49,15 @@ export function StarButtonComponent() {target="_blank"rel="noopener noreferrer"className="flex cursor-pointer items-center rounded-md border !border-gray-200 !bg-white text-sm !text-gray-700 transition-colors hover:!bg-gray-50 dark:!border-gray-600 dark:!bg-gray-700 dark:!text-gray-200 dark:hover:!bg-gray-600"- aria-label="Star databasus/databasus on GitHub"+ aria-label={t('app.starButton.ariaLabel')}><div className="flex items-center gap-2 border-r border-gray-200 px-2.5 py-1 !text-black dark:border-gray-600 dark:!text-white"><StarIcon />- <span>Star on GitHub</span>+ <span>{t('app.starButton.label')}</span></div>{!isLoading && starCount !== null && (- <span className="px-2.5 py-1 !text-black dark:!text-white">- {starCount.toLocaleString()}- </span>+ <span className="px-2.5 py-1 !text-black dark:!text-white">{formatNumber(starCount)}</span>)}</a>);diff --git a/frontend/src/shared/ui/ThemeToggleComponent.tsx b/frontend/src/shared/ui/ThemeToggleComponent.tsxindex ab021fcd..7a486923 100644--- a/frontend/src/shared/ui/ThemeToggleComponent.tsx+++ b/frontend/src/shared/ui/ThemeToggleComponent.tsx@@ -1,7 +1,8 @@import { Dropdown } from 'antd';import type { MenuProps } from 'antd';+import { useTranslation } from 'react-i18next';-import { type ThemeMode, useTheme } from '../theme';+import { THEME_MODE_LABEL_KEYS, useTheme } from '../theme';const SunIcon = () => (<svg@@ -61,7 +62,12 @@ const SystemIcon = () => (</svg>);-export function ThemeToggleComponent() {+interface Props {+ isSplitEnd?: boolean;+}++export function ThemeToggleComponent({ isSplitEnd = false }: Props) {+ const { t } = useTranslation();const { theme, setTheme, resolvedTheme } = useTheme();const items: MenuProps['items'] = [@@ -70,7 +76,7 @@ export function ThemeToggleComponent() {label: (<div className="flex items-center gap-2"><SunIcon />- <span>Light</span>+ <span>{t(THEME_MODE_LABEL_KEYS.light)}</span></div>),onClick: () => setTheme('light'),@@ -80,7 +86,7 @@ export function ThemeToggleComponent() {label: (<div className="flex items-center gap-2"><MoonIcon />- <span>Dark</span>+ <span>{t(THEME_MODE_LABEL_KEYS.dark)}</span></div>),onClick: () => setTheme('dark'),@@ -90,7 +96,7 @@ export function ThemeToggleComponent() {label: (<div className="flex items-center gap-2"><SystemIcon />- <span>System</span>+ <span>{t(THEME_MODE_LABEL_KEYS.system)}</span></div>),onClick: () => setTheme('system'),@@ -104,25 +110,16 @@ export function ThemeToggleComponent() {return resolvedTheme === 'dark' ? <MoonIcon /> : <SunIcon />;};- const getLabel = (mode: ThemeMode) => {- switch (mode) {- case 'light':- return 'Light';- case 'dark':- return 'Dark';- case 'system':- return 'System';- }- };-return (<Dropdown menu={{ items, selectedKeys: [theme] }} trigger={['click']} placement="bottomRight"><button- className="flex cursor-pointer items-center gap-1.5 rounded-md border border-gray-200 bg-white px-2.5 py-1 text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600"- title={`Theme: ${getLabel(theme)}`}+ className={`flex cursor-pointer items-center gap-1.5 border border-gray-200 bg-white px-2.5 py-1 text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 ${+ isSplitEnd ? 'rounded-r-md border-l-0' : 'rounded-md'+ }`}+ title={t('app.theme.title', { theme: t(THEME_MODE_LABEL_KEYS[theme]) })}>{getCurrentIcon()}- <span className="hidden sm:inline">{getLabel(theme)}</span>+ <span className="hidden sm:inline">{t(THEME_MODE_LABEL_KEYS[theme])}</span></button></Dropdown>);diff --git a/frontend/src/shared/ui/index.ts b/frontend/src/shared/ui/index.tsindex 3df6f55d..1f1286c3 100644--- a/frontend/src/shared/ui/index.ts+++ b/frontend/src/shared/ui/index.ts@@ -1,6 +1,9 @@export { ClipboardPasteModalComponent } from './ClipboardPasteModalComponent';export { CloudflareTurnstileWidget } from './CloudflareTurnstileWidget';export { ConfirmationComponent } from './ConfirmationComponent';+export { InlineCodeComponent } from './InlineCodeComponent';+export { LanguageSelectorComponent } from './LanguageSelectorComponent';+export { LanguageThemeControlComponent } from './LanguageThemeControlComponent';export { SponsorshipLinkComponent } from './SponsorshipLinkComponent';export { StarButtonComponent } from './StarButtonComponent';export { ThemeToggleComponent } from './ThemeToggleComponent';diff --git a/frontend/src/widgets/main/MainScreenComponent.tsx b/frontend/src/widgets/main/MainScreenComponent.tsxindex a14b5332..3e4f163a 100644--- a/frontend/src/widgets/main/MainScreenComponent.tsx+++ b/frontend/src/widgets/main/MainScreenComponent.tsx@@ -1,6 +1,7 @@import { LoadingOutlined, MenuOutlined } from '@ant-design/icons';import { App, Button, Spin, Tooltip } from 'antd';import { useEffect, useState } from 'react';+import { Trans, useTranslation } from 'react-i18next';import { APP_VERSION, CONTAINER_ARCH } from '../../constants';import { type DiskUsage, diskApi } from '../../entity/disk';@@ -23,22 +24,23 @@ import {WorkspaceSettingsComponent,} from '../../features/workspaces';import { useIsMobile, useIsNewGitHubVersionAvailable, useScreenHeight } from '../../shared/hooks';-import { SponsorshipLinkComponent } from '../../shared/ui';+import { getWebsitePageUrl, translateApiError, useLocale } from '../../shared/i18n';+import { LanguageThemeControlComponent, SponsorshipLinkComponent } from '../../shared/ui';import { StarButtonComponent } from '../../shared/ui/StarButtonComponent';-import { ThemeToggleComponent } from '../../shared/ui/ThemeToggleComponent';-import { SidebarComponent } from './SidebarComponent';+import { type MainTab, SidebarComponent, type SidebarTab } from './SidebarComponent';import { WorkspaceSelectionComponent } from './WorkspaceSelectionComponent';+import { getDiskUsageValues } from './getDiskUsageValues';export const MainScreenComponent = () => {+ const { t } = useTranslation();+ const { locale, formatNumber } = useLocale();const { message } = App.useApp();const screenHeight = useScreenHeight();const isMobile = useIsMobile();const isNewGitHubVersionAvailable = useIsNewGitHubVersionAvailable();const contentHeight = screenHeight - (isMobile ? 70 : 95);- const [selectedTab, setSelectedTab] = useState<- 'notifiers' | 'storages' | 'databases' | 'profile' | 'databasus-settings' | 'users' | 'settings'- >('databases');+ const [selectedTab, setSelectedTab] = useState<MainTab>('databases');const [diskUsage, setDiskUsage] = useState<DiskUsage | undefined>(undefined);const [user, setUser] = useState<UserProfile | undefined>(undefined);const [globalSettings, setGlobalSettings] = useState<UsersSettings | undefined>(undefined);@@ -68,7 +70,7 @@ export const MainScreenComponent = () => {setWorkspaces(workspaces.workspaces);setGlobalSettings(settings);} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}setIsLoading(false);@@ -108,7 +110,7 @@ export const MainScreenComponent = () => {setSelectedWorkspace(newWorkspace);setSelectedTab('databases');} catch (e) {- message.error((e as Error).message);+ message.error(translateApiError(e, t));}};@@ -120,9 +122,9 @@ export const MainScreenComponent = () => {const isCanManageDBs = selectedWorkspace?.userRole !== WorkspaceRole.VIEWER;- const tabs = [+ const tabs: SidebarTab[] = [{- text: 'Databases',+ text: t('app.navigation.databases'),name: 'databases',icon: '/icons/menu/database-gray.svg',selectedIcon: '/icons/menu/database-white.svg',@@ -132,7 +134,7 @@ export const MainScreenComponent = () => {isVisible: true,},{- text: 'Storages',+ text: t('app.navigation.storages'),name: 'storages',icon: '/icons/menu/storage-gray.svg',selectedIcon: '/icons/menu/storage-white.svg',@@ -142,7 +144,7 @@ export const MainScreenComponent = () => {isVisible: !!selectedWorkspace,},{- text: 'Notifiers',+ text: t('app.navigation.notifiers'),name: 'notifiers',icon: '/icons/menu/notifier-gray.svg',selectedIcon: '/icons/menu/notifier-white.svg',@@ -152,7 +154,7 @@ export const MainScreenComponent = () => {isVisible: !!selectedWorkspace,},{- text: 'Settings',+ text: t('app.navigation.workspaceSettings'),name: 'settings',icon: '/icons/menu/workspace-settings-gray.svg',selectedIcon: '/icons/menu/workspace-settings-white.svg',@@ -162,7 +164,7 @@ export const MainScreenComponent = () => {isVisible: !!selectedWorkspace,},{- text: 'Profile',+ text: t('app.navigation.profile'),name: 'profile',icon: '/icons/menu/profile-gray.svg',selectedIcon: '/icons/menu/profile-white.svg',@@ -172,7 +174,7 @@ export const MainScreenComponent = () => {isVisible: true,},{- text: 'Databasus settings',+ text: t('app.navigation.databasusSettings'),name: 'databasus-settings',icon: '/icons/menu/global-settings-gray.svg',selectedIcon: '/icons/menu/global-settings-white.svg',@@ -182,7 +184,7 @@ export const MainScreenComponent = () => {isVisible: true,},{- text: 'Users',+ text: t('app.navigation.users'),name: 'users',icon: '/icons/menu/user-card-gray.svg',selectedIcon: '/icons/menu/user-card-white.svg',@@ -197,7 +199,7 @@ export const MainScreenComponent = () => {<div style={{ height: screenHeight }} className="bg-[#f5f5f5] p-2 md:p-3 dark:bg-gray-900"><div className="mb-2 flex h-[50px] items-center rounded bg-white px-2 py-2 shadow md:mb-3 md:h-[60px] md:p-3 dark:bg-gray-800"><div className="flex items-center gap-2 hover:opacity-80 md:gap-3">- <a href="https://databasus.com" target="_blank" rel="noreferrer">+ <a href={getWebsitePageUrl('home', locale)} target="_blank" rel="noreferrer"><img className="h-[30px] w-[30px] p-1 md:h-[40px] md:w-[40px]" src="/logo.svg" /></a></div>@@ -216,11 +218,11 @@ export const MainScreenComponent = () => {<div className="ml-auto hidden items-center gap-5 md:flex"><aclassName="!text-black hover:opacity-80 dark:!text-gray-200"- href="https://databasus.com/installation"+ href={getWebsitePageUrl('installation', locale)}target="_blank"rel="noreferrer">- Docs+ {t('app.navigation.docs')}</a><a@@ -229,21 +231,21 @@ export const MainScreenComponent = () => {target="_blank"rel="noreferrer">- Community+ {t('app.navigation.community')}</a><SponsorshipLinkComponent className="!text-black hover:opacity-80 dark:!text-gray-200" />{isUsedMoreThan85Percent && (- <Tooltip title="To make backups locally and restore them, you need to have enough space on your disk. For restore, you need to have same amount of space that the backup size.">+ <Tooltip title={t('app.diskUsage.hint')}><divclassName={`cursor-pointer text-center text-xs ${isUsedMoreThan95Percent ? 'text-red-500' : 'text-gray-500 dark:text-gray-400'}`}>- {(diskUsage.usedSpaceBytes / 1024 ** 3).toFixed(1)} of{' '}- {(diskUsage.totalSpaceBytes / 1024 ** 3).toFixed(1)} GB- <br />- ROM used (- {((diskUsage.usedSpaceBytes / diskUsage.totalSpaceBytes) * 100).toFixed(1)}%)+ <Trans+ i18nKey="app.diskUsage.compactSummary"+ values={getDiskUsageValues(diskUsage, formatNumber)}+ components={{ lineBreak: <br /> }}+ /></div></Tooltip>)}@@ -251,7 +253,7 @@ export const MainScreenComponent = () => {<div className="flex items-center gap-2"><StarButtonComponent />- <ThemeToggleComponent />+ <LanguageThemeControlComponent /></div></div>@@ -316,7 +318,7 @@ export const MainScreenComponent = () => {onClick={handleCreateWorkspace}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- Create workspace+ {t('app.workspaceSelection.create')}</Button></div></div>@@ -365,12 +367,13 @@ export const MainScreenComponent = () => {)}<div className="absolute bottom-1 left-2 mb-[0px] hidden text-sm text-gray-400 md:block">- v{APP_VERSION}+ {/* eslint-disable-next-line i18next/no-literal-string -- version prefix */}+ {`v${APP_VERSION}`}<br /><span className="inline-flex items-center gap-1.5">{CONTAINER_ARCH}{isNewGitHubVersionAvailable && (- <Tooltip title="New version available">+ <Tooltip title={t('app.navigation.newVersionAvailable')}><ahref="https://github.com/databasus/databasus/releases/latest"target="_blank"diff --git a/frontend/src/widgets/main/SidebarComponent.tsx b/frontend/src/widgets/main/SidebarComponent.tsxindex 224bdbc8..44f68177 100644--- a/frontend/src/widgets/main/SidebarComponent.tsx+++ b/frontend/src/widgets/main/SidebarComponent.tsx@@ -1,18 +1,29 @@import { CloseOutlined } from '@ant-design/icons';import { Drawer, Tooltip } from 'antd';import { useEffect } from 'react';+import { useTranslation } from 'react-i18next';import { type DiskUsage } from '../../entity/disk';import { type UserProfile, UserRole } from '../../entity/users';import { useIsMobile } from '../../shared/hooks';+import { getWebsitePageUrl, useLocale } from '../../shared/i18n';import { useTheme } from '../../shared/theme';-import { SponsorshipLinkComponent } from '../../shared/ui';+import { LanguageThemeControlComponent, SponsorshipLinkComponent } from '../../shared/ui';import { StarButtonComponent } from '../../shared/ui/StarButtonComponent';-import { ThemeToggleComponent } from '../../shared/ui/ThemeToggleComponent';--interface TabItem {+import { getDiskUsageValues } from './getDiskUsageValues';++export type MainTab =+ | 'notifiers'+ | 'storages'+ | 'databases'+ | 'profile'+ | 'databasus-settings'+ | 'users'+ | 'settings';++export interface SidebarTab {text: string;- name: string;+ name: MainTab;icon: string;selectedIcon: string;onClick: () => void;@@ -24,8 +35,8 @@ interface TabItem {interface Props {isOpen: boolean;onClose: () => void;- selectedTab: string;- tabs: TabItem[];+ selectedTab: MainTab;+ tabs: SidebarTab[];user?: UserProfile;diskUsage?: DiskUsage;contentHeight: number;@@ -40,6 +51,8 @@ export const SidebarComponent = ({diskUsage,contentHeight,}: Props) => {+ const { t } = useTranslation();+ const { locale, formatNumber } = useLocale();const isMobile = useIsMobile();const { resolvedTheme } = useTheme();@@ -67,7 +80,7 @@ export const SidebarComponent = ({.filter((tab) => !tab.isAdminOnly || user?.role === UserRole.ADMIN).filter((tab) => tab.isVisible);- const handleTabClick = (tab: TabItem) => {+ const handleTabClick = (tab: SidebarTab) => {tab.onClick();if (isMobile) {onClose();@@ -129,7 +142,7 @@ export const SidebarComponent = ({<div className="flex h-full flex-col">{/* Custom Close Button */}<div className="flex items-center justify-between border-b border-gray-200 px-3 py-3 dark:border-gray-700">- <ThemeToggleComponent />+ <LanguageThemeControlComponent /><buttononClick={onClose}className="flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 dark:hover:bg-gray-700"@@ -170,15 +183,13 @@ export const SidebarComponent = ({<div className="border-t border-gray-200 bg-gray-50 px-3 py-4 dark:border-gray-700 dark:bg-gray-800">{diskUsage && (<div className="mb-4">- <Tooltip title="To make backups locally and restore them, you need to have enough space on your disk. For restore, you need to have same amount of space that the backup size.">+ <Tooltip title={t('app.diskUsage.hint')}><divclassName={`cursor-pointer text-xs ${isUsedMoreThan95Percent ? 'text-red-500' : 'text-gray-600 dark:text-gray-400'}`}>- <div className="font-medium">Disk Usage</div>+ <div className="font-medium">{t('app.diskUsage.title')}</div><div className="mt-1">- {(diskUsage.usedSpaceBytes / 1024 ** 3).toFixed(1)} of{' '}- {(diskUsage.totalSpaceBytes / 1024 ** 3).toFixed(1)} GB used (- {((diskUsage.usedSpaceBytes / diskUsage.totalSpaceBytes) * 100).toFixed(1)}%)+ {t('app.diskUsage.summary', getDiskUsageValues(diskUsage, formatNumber))}</div></div></Tooltip>@@ -188,11 +199,11 @@ export const SidebarComponent = ({<div className="space-y-2"><aclassName="block rounded text-sm font-medium !text-gray-700 hover:bg-gray-100 hover:!text-blue-600 dark:!text-gray-300 dark:hover:bg-gray-700"- href="https://databasus.com/installation"+ href={getWebsitePageUrl('installation', locale)}target="_blank"rel="noreferrer">- Documentation+ {t('app.navigation.documentation')}</a><a@@ -201,7 +212,7 @@ export const SidebarComponent = ({target="_blank"rel="noreferrer">- Community+ {t('app.navigation.community')}</a><SponsorshipLinkComponent className="block rounded text-sm font-medium !text-gray-700 hover:bg-gray-100 hover:!text-blue-600 dark:!text-gray-300 dark:hover:bg-gray-700" />diff --git a/frontend/src/widgets/main/WorkspaceSelectionComponent.tsx b/frontend/src/widgets/main/WorkspaceSelectionComponent.tsxindex 417f229b..4a7504b9 100644--- a/frontend/src/widgets/main/WorkspaceSelectionComponent.tsx+++ b/frontend/src/widgets/main/WorkspaceSelectionComponent.tsx@@ -1,5 +1,6 @@import { Button, Input } from 'antd';import { useEffect, useMemo, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';import { type WorkspaceResponse } from '../../entity/workspaces';import { useIsMobile } from '../../shared/hooks';@@ -17,6 +18,7 @@ export const WorkspaceSelectionComponent = ({onCreateWorkspace,onWorkspaceSelect,}: Props) => {+ const { t } = useTranslation();const isMobile = useIsMobile();const [isDropdownOpen, setIsDropdownOpen] = useState(false);const [searchValue, setSearchValue] = useState('');@@ -55,7 +57,7 @@ export const WorkspaceSelectionComponent = ({size={isMobile ? 'small' : 'middle'}className="border-blue-600 bg-blue-600 hover:border-blue-700 hover:bg-blue-700">- {isMobile ? 'Create' : 'Create workspace'}+ {isMobile ? t('app.workspaceSelection.createShort') : t('app.workspaceSelection.create')}</Button>);}@@ -66,7 +68,7 @@ export const WorkspaceSelectionComponent = ({ref={dropdownRef}><div className="mb-1 hidden text-xs text-gray-400 md:block" style={{ lineHeight: 0.7 }}>- Selected workspace+ {t('app.workspaceSelection.selected')}</div><div className="relative">@@ -76,11 +78,11 @@ export const WorkspaceSelectionComponent = ({><div className="flex items-center justify-between text-sm dark:text-gray-200"><div className="flex-1 truncate pr-1">- {selectedWorkspace?.name || 'Select a workspace'}+ {selectedWorkspace?.name || t('app.workspaceSelection.placeholder')}</div><imgsrc="/icons/menu/arrow-down-gray.svg"- alt="arrow-down"+ alt=""className={`ml-1 flex-shrink-0 transition-transform duration-200 ${isDropdownOpen ? 'rotate-180' : ''}`}width={isMobile ? 14 : 15}height={isMobile ? 14 : 15}@@ -92,7 +94,7 @@ export const WorkspaceSelectionComponent = ({<div className="absolute top-full right-0 left-0 z-50 mt-1 min-w-[250px] rounded-md border border-gray-200 bg-white shadow-lg md:right-auto md:left-0 md:min-w-full dark:border-gray-600 dark:bg-gray-800"><div className="border-b border-gray-100 p-2 dark:border-gray-700"><Input- placeholder="Search workspaces..."+ placeholder={t('app.workspaceSelection.search')}value={searchValue}onChange={(e) => setSearchValue(e.target.value)}className="border-0 shadow-none"@@ -114,7 +116,7 @@ export const WorkspaceSelectionComponent = ({{filteredWorkspaces.length === 0 && searchValue && (<div className="px-3 py-2 text-sm text-gray-500 dark:text-gray-400">- No workspaces found+ {t('app.workspaceSelection.notFound')}</div>)}</div>@@ -128,7 +130,7 @@ export const WorkspaceSelectionComponent = ({setSearchValue('');}}>- + Create new workspace+ {t('app.workspaceSelection.createNew')}</div></div></div>diff --git a/frontend/src/widgets/main/getDiskUsageValues.ts b/frontend/src/widgets/main/getDiskUsageValues.tsnew file mode 100644index 00000000..31318393--- /dev/null+++ b/frontend/src/widgets/main/getDiskUsageValues.ts@@ -0,0 +1,17 @@+import type { DiskUsage } from '../../entity/disk';++const BYTES_IN_GB = 1024 ** 3;+const ONE_DECIMAL: Intl.NumberFormatOptions = {+ minimumFractionDigits: 1,+ maximumFractionDigits: 1,+};++// Interpolation values for the disk usage messages, with digits grouped by the selected language+export const getDiskUsageValues = (+ diskUsage: DiskUsage,+ formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string,+) => ({+ used: formatNumber(diskUsage.usedSpaceBytes / BYTES_IN_GB, ONE_DECIMAL),+ total: formatNumber(diskUsage.totalSpaceBytes / BYTES_IN_GB, ONE_DECIMAL),+ percent: formatNumber((diskUsage.usedSpaceBytes / diskUsage.totalSpaceBytes) * 100, ONE_DECIMAL),+});diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.tsindex 7eeb3f85..f36105bb 100644--- a/frontend/vitest.config.ts+++ b/frontend/vitest.config.ts@@ -1,8 +1,15 @@import { defineConfig } from 'vitest/config';export default defineConfig({+ server: {+ fs: {+ // websitePages.test.ts reads ../website/app/i18n.ts to check the application's links to+ // website pages against the pages the website translates.+ allow: ['..'],+ },+ },test: {environment: 'node',- include: ['src/**/*.test.ts'],+ include: ['src/**/*.test.{ts,tsx}'],},});diff --git a/website/AGENTS.md b/website/AGENTS.mdindex 9bad0e79..baf206f9 100644--- a/website/AGENTS.md+++ b/website/AGENTS.md@@ -32,7 +32,7 @@ Each `content/<locale>.tsx` exports **both** `metadata` (fully translated, `cano2. Internal links carry the `/{lang}/` prefix — except links to untranslated pages (`/sponsorship`, `/privacy`, `/terms-of-use`, `/contribute/*`), which stay unprefixed.3. Heading `id` anchors are identical to English in every locale (cross-links like `/faq#oss-programs` depend on them).4. Technical strings (install commands, configs, file names, code blocks) are byte-identical to English.-5. Adding a page to the translated core or adding a locale starts in `app/i18n.ts` (`TRANSLATED_PATHS` / `LOCALES`); sitemap and hreflang follow from it automatically.+5. Adding a page to the translated core or adding a locale starts in `app/i18n.ts` (`TRANSLATED_PATHS` / `LOCALES`); sitemap and hreflang follow from it automatically. The application's links to website pages depend on it too: `frontend/src/shared/i18n/websitePages.ts` marks which linked pages are translated, and a frontend test (`websitePages.test.ts`) reads `TRANSLATED_PATHS` and fails when the two disagree. Adding or removing a translated path that the application links to means updating that table in the same change.## Translation rules@@ -44,6 +44,8 @@ Each `content/<locale>.tsx` exports **both** `metadata` (fully translated, `cano## Translation quality+These rules also govern the application's interface dictionaries (`frontend/src/shared/i18n/locales/<locale>.ts`). There the English plain-hyphen rule from `frontend/AGENTS.md` does not apply to the other languages; each follows its own typography below.+Translations are edited copy in the target language, not word-for-word renderings. The Russian pages were proofread by the owner — treat their current text as the tone reference before writing or editing any locale.- **No calques.** If a sentence keeps English word order or literally renders an English construction, rewrite it («Результат отправляется обратно — включая X» → «Результат приходит вам: X»; "user experience with X" → just describe working with X). Read the sentence aloud in the target language; if it sounds translated, it is.@@ -51,7 +53,8 @@ Translations are edited copy in the target language, not word-for-word rendering- **No repeats.** Don't restate a list or repeat the same verb in adjacent sentences ("supports X, Y, Z… X, Y, Z are also supported").- **Everyday tech anglicisms are fine in body text** when they are what practitioners actually say (ru: бекап, дамп, стриминг, продакшен, комплаенс, «из коробки», «соло-разработчик») — don't swap them for stiff formal equivalents. The formal canonical query form still owns `title`/`h1`/`h2` (see above). Exception by owner's choice: «рабочие пространства», not «воркспейсы».- **Follow locale conventions.** Russian: «е», never «ё»; numerals like «2-х минут», «3-х попыток», «17-й версии»; «—» stays where Russian grammar wants it. Spanish: usted; canonical «copia de seguridad» in headings, «respaldo» as a body synonym; no bare English «backup» in prose. French: vous; a space before % («99 %»); a plain ASCII space (not ` `) before `: ; ! ?`. Chinese: 你, never 您 (titles included); full-width punctuation in prose(,。:); a space at every CJK↔Latin boundary. Number formatting per locale: en `1,800,000`, fr `1 800 000`, es/pt `1.800.000`, zh `180 万` (万-format for millions in prose).-- **Product stats stay in sync.** Docker pulls, GitHub stars and similar figures must match across all 6 languages *and* every duplicated block on a page (visible FAQ + its JSON-LD copy). Changing a number means changing it everywhere; competitors' figures are separate and only change when their reality does.+- **Interface terms.** The application's dictionaries use one word per concept, so the interface stays consistent and the docs can quote it. Russian: backup «бекап», storage «хранилище», notifier «канал уведомлений», workspace «рабочее пространство», restore «восстановление», health check «проверка доступности», restore verification «проверка восстановления», verification agent «агент проверки». Spanish: «copia de seguridad», «almacenamiento», «canal de notificación», «espacio de trabajo», «restauración», «comprobación de disponibilidad», «verificación de restauración», «agente de verificación». Portuguese: «backup», «armazenamento», «canal de notificação», «espaço de trabalho», «restauração», «verificação de disponibilidade», «verificação de restauração», «agente de verificação». French: «sauvegarde», «stockage», «canal de notification», «espace de travail», «restauration», «vérification de disponibilité», «vérification de restauration», «agent de vérification». Chinese: 备份, 存储, 通知渠道, 工作区, 恢复, 可用性检查, 恢复验证, 验证代理. The interface shows counts and sizes as full numerals in every language (zh `1,800,000`); the 万 form is for prose only.+- **Product stats stay in sync.** Docker pulls, GitHub stars and similar figures must match across all 6 languages _and_ every duplicated block on a page (visible FAQ + its JSON-LD copy). Changing a number means changing it everywhere; competitors' figures are separate and only change when their reality does.- **Some labels stay English everywhere** by design: the hero badges ("GitHub stars" / "Docker pulls"), brand-name nav items (Slack, Google Drive, "Databasus vs X"), and product UI option names quoted in docs ("After backup", "Scheduled verification", "Hourly") — the interface is English, so the docs quote it verbatim.## Language exception