diff --git a/plugins/sync/frontend/src/SyncSettings.svelte b/plugins/sync/frontend/src/SyncSettings.svelte index ae305db..43df7ed 100644 --- a/plugins/sync/frontend/src/SyncSettings.svelte +++ b/plugins/sync/frontend/src/SyncSettings.svelte @@ -31,6 +31,9 @@ function reportError(key, fallback, error) { console.warn('[verstak.sync] operation failed:', error) + const code = String(error?.message || error || '').match(/sync-server:([a-z_]+)/)?.[1] + const localized = code ? tr(`ui.serverError.${code}`, null, '') : '' + if (localized && localized !== `ui.serverError.${code}`) return localized return tr(key, null, fallback) } diff --git a/plugins/sync/locales/en.json b/plugins/sync/locales/en.json index d63133d..874e766 100644 --- a/plugins/sync/locales/en.json +++ b/plugins/sync/locales/en.json @@ -48,4 +48,14 @@ "ui.status.disabled": "Not configured", "ui.status.error": "Error", "ui.status.revoked": "Revoked" + ,"ui.serverError.rate_limited": "Too many attempts. Wait a little and try again." + ,"ui.serverError.request_too_large": "The synchronization request is too large." + ,"ui.serverError.payload_too_large": "A file operation is too large to send inline." + ,"ui.serverError.too_many_operations": "Too many pending changes were sent at once. Try synchronization again." + ,"ui.serverError.blob_too_large": "This file exceeds the server blob size limit." + ,"ui.serverError.quota_exceeded": "The server storage quota for this vault has been reached." + ,"ui.serverError.blob_not_owned": "The file data must be uploaded before it can be synchronized." + ,"ui.serverError.blob_not_found": "The required file data is unavailable on the server." + ,"ui.serverError.unauthorized": "This device is no longer authorized. Connect it again." + ,"ui.serverError.forbidden": "The server denied this synchronization request." } diff --git a/plugins/sync/locales/ru.json b/plugins/sync/locales/ru.json index 87d895a..76d9c14 100644 --- a/plugins/sync/locales/ru.json +++ b/plugins/sync/locales/ru.json @@ -48,4 +48,14 @@ "ui.status.disabled": "Не настроено", "ui.status.error": "Ошибка", "ui.status.revoked": "Доступ отозван" + ,"ui.serverError.rate_limited": "Слишком много попыток. Подождите и повторите попытку." + ,"ui.serverError.request_too_large": "Запрос синхронизации слишком велик." + ,"ui.serverError.payload_too_large": "Операция с файлом слишком велика для отправки в этом виде." + ,"ui.serverError.too_many_operations": "Одновременно отправлено слишком много изменений. Повторите синхронизацию." + ,"ui.serverError.blob_too_large": "Размер файла превышает разрешённый сервером лимит." + ,"ui.serverError.quota_exceeded": "Достигнута квота серверного хранилища для этого vault." + ,"ui.serverError.blob_not_owned": "Данные файла должны быть загружены до синхронизации операции." + ,"ui.serverError.blob_not_found": "Необходимые данные файла недоступны на сервере." + ,"ui.serverError.unauthorized": "Устройство больше не авторизовано. Подключите его заново." + ,"ui.serverError.forbidden": "Сервер отклонил этот запрос синхронизации." }