🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!
Translate validation errors: machine-readable API codes + i18n toast mapping (19 locales)
Omega (QA)ff8440b1bc68
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 77dbba0..b541eb0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,8 @@## 1.0.3 - 2026-05-18### Fixed+- **Validation errors are now machine-readable and translated:** the three new HTTP 400 validations (product name > 255 chars, expiration before purchase, invalid claim status) now return a stable `code` (`product_name_too_long`, `expiration_before_purchase`, `invalid_claim_status`; claim-status errors also include `valid_statuses`) alongside the English fallback message. The frontend maps those codes to i18n keys via a new `apiErrorMessage()` helper in `ui.js` (used by the add-warranty form, edit modal, and claims toasts), so error toasts render in the user's language instead of always-English. Two new English keys were added (`messages.product_name_too_long`, `messages.invalid_claim_status`) and machine-translated into all 19 non-English locales with `{{statuses}}` placeholder integrity verified; 100% key coverage vs English and zero placeholder mismatches confirmed. Also removed the now-unused `safeErrorMessage()` helper from `apiService.js`.+ - _Files: `backend/warranties_routes.py`, `frontend/js/components/ui.js`, `frontend/js/services/apiService.js`, `frontend/js/components/addWarrantyForm.js`, `frontend/js/components/editModal.js`, `frontend/js/components/claims.js`, `locales/*/translation.json`_- **Expiry-day inconsistency fixed:** a warranty expiring *today* got three different answers — statistics counted it as `expired` (`expiration_date <= today`), the UI showed "expiring" (0 days left), and the notification query excluded it (`expiration_date > today`). All three now agree it is still valid: statistics uses `expiration_date < today` for expired and `>= today` for the active / expiring-soon / timeline buckets, and the expiry notification query includes it (`>= today`).- _Files: `backend/statistics_routes.py`, `backend/notifications.py`_- **Product name length validated:** a 500-character product name (column is `VARCHAR(255)`) caused an unhandled DB error → HTTP 500. Both the create and update endpoints now return HTTP 400 when the name exceeds 255 characters.diff --git a/backend/warranties_routes.py b/backend/warranties_routes.pyindex 2d0fbec..e1d9819 100644--- a/backend/warranties_routes.py+++ b/backend/warranties_routes.py@@ -194,7 +194,8 @@ def add_warranty():return jsonify({"error": "Product name is required"}), 400if len(request.form.get('product_name')) > 255:- return jsonify({"error": "Product name must be 255 characters or less"}), 400+ return jsonify({"error": "Product name must be 255 characters or less",+ "code": "product_name_too_long"}), 400if not request.form.get('purchase_date'):return jsonify({"error": "Purchase date is required"}), 400@@ -331,7 +332,8 @@ def add_warranty():# Expiration date cannot precede the purchase dateif expiration_date is not None and expiration_date < purchase_date:- return jsonify({"error": "Expiration date cannot be before purchase date"}), 400+ return jsonify({"error": "Expiration date cannot be before purchase date",+ "code": "expiration_before_purchase"}), 400# Handle Paperless-ngx document IDs if provided (check before file uploads)paperless_invoice_id = request.form.get('paperless_invoice_id')@@ -643,7 +645,8 @@ def update_warranty(warranty_id):if not request.form.get('product_name'):return jsonify({"error": "Product name is required"}), 400if len(request.form.get('product_name')) > 255:- return jsonify({"error": "Product name must be 255 characters or less"}), 400+ return jsonify({"error": "Product name must be 255 characters or less",+ "code": "product_name_too_long"}), 400if not request.form.get('purchase_date'):return jsonify({"error": "Purchase date is required"}), 400logger.info(f"Received update request for warranty {warranty_id}")@@ -716,7 +719,8 @@ def update_warranty(warranty_id):# Expiration date cannot precede the purchase dateif expiration_date is not None and expiration_date < purchase_date:- return jsonify({"error": "Expiration date cannot be before purchase date"}), 400+ return jsonify({"error": "Expiration date cannot be before purchase date",+ "code": "expiration_before_purchase"}), 400logger.info(f"Calculated values: Y={warranty_duration_years}, M={warranty_duration_months}, D={warranty_duration_days}, expiration_date={expiration_date}")product_name = request.form['product_name']@@ -2179,7 +2183,9 @@ def create_claim(warranty_id):# Validate statusvalid_statuses = ['Submitted', 'In Progress', 'Approved', 'Denied', 'Resolved', 'Cancelled']if status not in valid_statuses:- return jsonify({'error': f"Invalid claim status. Must be one of: {', '.join(valid_statuses)}"}), 400+ return jsonify({'error': f"Invalid claim status. Must be one of: {', '.join(valid_statuses)}",+ 'code': 'invalid_claim_status',+ 'valid_statuses': valid_statuses}), 400# Insert new claimcur.execute("""@@ -2375,7 +2381,9 @@ def update_claim(warranty_id, claim_id):# Validate statusvalid_statuses = ['Submitted', 'In Progress', 'Approved', 'Denied', 'Resolved', 'Cancelled']if status not in valid_statuses:- return jsonify({'error': f"Invalid claim status. Must be one of: {', '.join(valid_statuses)}"}), 400+ return jsonify({'error': f"Invalid claim status. Must be one of: {', '.join(valid_statuses)}",+ 'code': 'invalid_claim_status',+ 'valid_statuses': valid_statuses}), 400# Handle empty strings as Noneclaim_number = claim_number.strip() if claim_number else Nonediff --git a/frontend/js/components/addWarrantyForm.js b/frontend/js/components/addWarrantyForm.jsindex 1bf494a..d64e87d 100644--- a/frontend/js/components/addWarrantyForm.js+++ b/frontend/js/components/addWarrantyForm.js@@ -1,4 +1,4 @@-import { showToast, showLoadingSpinner, hideLoadingSpinner } from './ui.js';+import { showToast, showLoadingSpinner, hideLoadingSpinner, apiErrorMessage } from './ui.js';import { createWarranty } from '../services/apiService.js';import { loadWarranties, applyFilters } from '../controllers/warrantyListController.js';import {@@ -533,7 +533,7 @@ export async function handleFormSubmit(event) {} catch (error) {hideLoadingSpinner();console.error('[addWarrantyForm] Failed to save warranty', error);- showToast(error?.message || (window.i18next ? window.i18next.t('messages.failed_to_add_warranty') : 'Failed to add warranty'), 'error');+ showToast(apiErrorMessage(error, window.i18next ? window.i18next.t('messages.failed_to_add_warranty') : 'Failed to add warranty'), 'error');} finally {isSubmitting = false;console.log('[addWarrantyForm] Submission complete, flag reset');diff --git a/frontend/js/components/claims.js b/frontend/js/components/claims.jsindex 6dd119e..e8f410f 100644--- a/frontend/js/components/claims.js+++ b/frontend/js/components/claims.js@@ -1,6 +1,6 @@import authService from '../services/authService.js';import { getWarranties, getIsGlobalView } from '../store.js';-import { showToast } from './ui.js';+import { showToast, apiErrorMessage } from './ui.js';import { formatDate } from '../lib/dates.js';const state = {@@ -294,7 +294,10 @@ async function handleClaimFormSubmit(event) {});if (!response.ok) {const error = await response.json().catch(() => ({}));- throw new Error(error.error || t('claims.failed_to_save', 'Failed to save claim'));+ const err = new Error(error.error || t('claims.failed_to_save', 'Failed to save claim'));+ if (error.code) err.code = error.code;+ if (error.valid_statuses) err.validStatuses = error.valid_statuses;+ throw err;}showToast(isEdit ? t('claims.claim_updated_successfully', 'Claim updated successfully') : t('claims.claim_created_successfully', 'Claim created successfully'),@@ -304,7 +307,7 @@ async function handleClaimFormSubmit(event) {await loadClaims(state.currentWarrantyId);} catch (error) {console.error('[claims] save failed', error);- showToast(error.message || t('claims.failed_to_save', 'Failed to save claim'), 'error');+ showToast(apiErrorMessage(error, t('claims.failed_to_save', 'Failed to save claim')), 'error');}}diff --git a/frontend/js/components/editModal.js b/frontend/js/components/editModal.jsindex 1c9e768..a9f94b1 100644--- a/frontend/js/components/editModal.js+++ b/frontend/js/components/editModal.js@@ -1,6 +1,6 @@// Edit modal helper components (DOM-based, no innerHTML templates)import { updateWarranty } from '../services/apiService.js';-import { showToast, showLoadingSpinner, hideLoadingSpinner } from './ui.js';+import { showToast, showLoadingSpinner, hideLoadingSpinner, apiErrorMessage } from './ui.js';import { autoLinkRecentDocuments, processEditPaperlessUploads, loadSecureImages, clearPaperlessSelection } from './paperless.js';import { loadWarranties, applyFilters } from '../controllers/warrantyListController.js';import { getCurrentWarrantyId, setCurrentWarrantyId, getEditSelectedTags, setEditSelectedTags } from '../store.js';@@ -751,7 +751,7 @@ export async function saveWarranty() {} catch (error) {hideLoadingSpinner();console.error('Error updating warranty:', error);- showToast(error?.message || (window.i18next ? window.i18next.t('messages.failed_to_update_warranty') : 'Failed to update warranty'), 'error');+ showToast(apiErrorMessage(error, window.i18next ? window.i18next.t('messages.failed_to_update_warranty') : 'Failed to update warranty'), 'error');}}diff --git a/frontend/js/components/ui.js b/frontend/js/components/ui.jsindex ab2fd20..6fecd8b 100644--- a/frontend/js/components/ui.js+++ b/frontend/js/components/ui.js@@ -44,8 +44,30 @@ export function hideLoadingSpinner() {}}-export function showToast(message, type = 'info', duration = 5000) {- const toastContainer = getToastContainer();+// Maps backend API error codes to i18n message keys so server-side+// validation errors can be shown translated. Add new codes here as the+// backend gains them; unknown codes fall back to the English message.+const API_ERROR_KEYS = {+ product_name_too_long: 'messages.product_name_too_long',+ // Reuses the existing client-side key (same meaning, already translated)+ expiration_before_purchase: 'messages.expiration_date_after_purchase_date',+ invalid_claim_status: 'messages.invalid_claim_status',+};++export function apiErrorMessage(error, fallbackMessage) {+ const fallback = error?.message || fallbackMessage || 'An error occurred';+ const i18n = window.i18next;+ const key = error?.code && API_ERROR_KEYS[error.code];+ if (key && i18n && typeof i18n.t === 'function') {+ return i18n.t(key, {+ statuses: error.validStatuses ? error.validStatuses.join(', ') : '',+ defaultValue: fallback,+ });+ }+ return fallback;+}++export function showToast(message, type = 'info', duration = 5000) { const toastContainer = getToastContainer();if (!toastContainer) return null;const existingToasts = toastContainer.querySelectorAll(`.toast.toast-${type}`);@@ -120,6 +142,7 @@ if (typeof window !== 'undefined') {showLoadingSpinner,hideLoadingSpinner,showToast,+ apiErrorMessage,};window.showLoading = showLoading;window.hideLoading = hideLoading;diff --git a/frontend/js/services/apiService.js b/frontend/js/services/apiService.jsindex a142a9b..8eae066 100644--- a/frontend/js/services/apiService.js+++ b/frontend/js/services/apiService.js@@ -9,22 +9,33 @@ async function baseRequest(path, options = {}) {const opts = { ...options, headers };const response = await fetch(path, opts);if (!response.ok) {- const message = await safeErrorMessage(response);- throw new Error(message || `Request failed: ${response.status}`);+ const data = await safeErrorData(response);+ let message;+ if (data) {+ message = data.message || data.error || `Request failed: ${response.status}`;+ } else {+ try {+ message = (await response.clone().text()) || `Request failed: ${response.status}`;+ } catch {+ message = `Request failed: ${response.status}`;+ }+ }+ const err = new Error(message);+ // Carry machine-readable error codes so the UI can show translated messages+ if (data) {+ if (data.code) err.code = data.code;+ if (data.valid_statuses) err.validStatuses = data.valid_statuses;+ }+ throw err;}return response;}-async function safeErrorMessage(response) {+async function safeErrorData(response) {try {- const data = await response.clone().json();- return data?.message || data?.error || null;+ return await response.clone().json();} catch {- try {- return await response.clone().text();- } catch {- return null;- }+ return null;}}diff --git a/locales/ar/translation.json b/locales/ar/translation.jsonindex 4703505..6940c4c 100644--- a/locales/ar/translation.json+++ b/locales/ar/translation.json@@ -645,7 +645,9 @@"unarchived_success": "الضمان غير مؤرشف","warranty_duration_required": "مدة الضمان مطلوبة","warranty_not_found_refresh": "لم يتم العثور على الضمان. يرجى التحديث والمحاولة مرة أخرى.",- "import_success": "{{success}} ضمانات مستوردة. {{failure}} فشل."+ "import_success": "{{success}} ضمانات مستوردة. {{failure}} فشل.",+ "invalid_claim_status": "حالة المطالبة غير صالحة. يجب أن يكون واحدًا من: {{statuses}}",+ "product_name_too_long": "يجب أن يكون اسم المنتج 255 حرفًا أو أقل"},"languages": {"en": "English",diff --git a/locales/cs/translation.json b/locales/cs/translation.jsonindex 2e2bb79..4b63c87 100644--- a/locales/cs/translation.json+++ b/locales/cs/translation.json@@ -642,7 +642,9 @@"purchase_date_required": "Datum nákupu je povinné","unarchived_success": "Záruka nebyla archivována","warranty_duration_required": "Je vyžadována záruční doba",- "warranty_not_found_refresh": "Záruka nenalezena. Obnovte stránku a zkuste to znovu."+ "warranty_not_found_refresh": "Záruka nenalezena. Obnovte stránku a zkuste to znovu.",+ "invalid_claim_status": "Neplatný stav nároku. Musí být jeden z: {{statuses}}",+ "product_name_too_long": "Název produktu musí mít 255 znaků nebo méně"},"languages": {"en": "Angličtina",diff --git a/locales/de/translation.json b/locales/de/translation.jsonindex 74e2e7a..066c2e0 100644--- a/locales/de/translation.json+++ b/locales/de/translation.json@@ -635,7 +635,9 @@"purchase_date_required": "Kaufdatum ist erforderlich","unarchived_success": "Garantie nicht archiviert","warranty_duration_required": "Die Garantiedauer ist erforderlich",- "warranty_not_found_refresh": "Garantie nicht gefunden. Bitte aktualisieren Sie und versuchen Sie es erneut."+ "warranty_not_found_refresh": "Garantie nicht gefunden. Bitte aktualisieren Sie und versuchen Sie es erneut.",+ "invalid_claim_status": "Ungültiger Anspruchsstatus. Muss einer der folgenden sein: {{statuses}}",+ "product_name_too_long": "Der Produktname darf maximal 255 Zeichen lang sein"},"languages": {"en": "Englisch",diff --git a/locales/en/translation.json b/locales/en/translation.jsonindex a50d85b..b9aac34 100644--- a/locales/en/translation.json+++ b/locales/en/translation.json@@ -540,6 +540,7 @@"paperless_upload_autolink_failed_errors": "Document uploaded but auto-linking failed due to errors. You can manually link it later.","document_linked_successfully": "Document linked successfully: {{documentType}}","failed_to_open_claims_modal": "Failed to open claims modal",+ "invalid_claim_status": "Invalid claim status. Must be one of: {{statuses}}","failed_to_save_claim": "Failed to save claim","failed_to_delete_claim": "Failed to delete claim","authentication_required": "Authentication required",@@ -631,6 +632,7 @@"notes_updated_successfully": "Notes updated successfully","popup_blocked": "Please allow popups to view documents","product_name_required": "Product name is required",+ "product_name_too_long": "Product name must be 255 characters or less","purchase_date_required": "Purchase date is required","unarchived_success": "Warranty unarchived","warranty_duration_required": "Warranty duration is required",diff --git a/locales/es/translation.json b/locales/es/translation.jsonindex f85d39d..a5adec7 100644--- a/locales/es/translation.json+++ b/locales/es/translation.json@@ -635,7 +635,9 @@"unarchived_success": "Garantía desarchivada","warranty_duration_required": "Se requiere duración de la garantía","warranty_not_found_refresh": "Garantía no encontrada. Actualice e inténtelo de nuevo.",- "import_success": "{{success}} garantías importadas. {{failure}} falló."+ "import_success": "{{success}} garantías importadas. {{failure}} falló.",+ "invalid_claim_status": "Estado de reclamo no válido. Debe ser uno de: {{statuses}}",+ "product_name_too_long": "El nombre del producto debe tener 255 caracteres o menos."},"languages": {"en": "English",diff --git a/locales/fa/translation.json b/locales/fa/translation.jsonindex d11d24d..ab0e3b7 100644--- a/locales/fa/translation.json+++ b/locales/fa/translation.json@@ -635,7 +635,9 @@"unarchived_success": "گارانتی بایگانی نشده است","warranty_duration_required": "مدت زمان گارانتی مورد نیاز است","warranty_not_found_refresh": "گارانتی پیدا نشد لطفاً بازخوانی کنید و دوباره امتحان کنید.",- "import_success": "ضمانتهای {{success}} وارد شد. {{failure}} ناموفق بود."+ "import_success": "ضمانتهای {{success}} وارد شد. {{failure}} ناموفق بود.",+ "invalid_claim_status": "وضعیت ادعا نامعتبر است. باید یکی از این موارد باشد: {{statuses}}",+ "product_name_too_long": "نام محصول باید 255 کاراکتر یا کمتر باشد"},"languages": {"en": "انگلیسی",diff --git a/locales/fr/translation.json b/locales/fr/translation.jsonindex 0db9016..2d32bd3 100644--- a/locales/fr/translation.json+++ b/locales/fr/translation.json@@ -635,7 +635,9 @@"unarchived_success": "Garantie non archivée","warranty_duration_required": "La durée de la garantie est requise","warranty_not_found_refresh": "Garantie introuvable. Veuillez actualiser et réessayer.",- "import_success": "{{success}} garanties importées. {{failure}} a échoué."+ "import_success": "{{success}} garanties importées. {{failure}} a échoué.",+ "invalid_claim_status": "Statut de réclamation invalide. Doit être l'un des : {{statuses}}",+ "product_name_too_long": "Le nom du produit doit comporter 255 caractères maximum"},"languages": {"en": "English",diff --git a/locales/he/translation.json b/locales/he/translation.jsonindex 7d08b1f..066da08 100644--- a/locales/he/translation.json+++ b/locales/he/translation.json@@ -645,7 +645,9 @@"unarchived_success": "האחריות בוטלה בארכיון","warranty_duration_required": "נדרש משך אחריות","warranty_not_found_refresh": "אחריות לא נמצאה. אנא רענן ונסה שוב.",- "import_success": "{{success}} אחריות יובאו. {{failure}} נכשל."+ "import_success": "{{success}} אחריות יובאו. {{failure}} נכשל.",+ "invalid_claim_status": "סטטוס תביעה לא חוקי. חייב להיות אחד מ: {{statuses}}",+ "product_name_too_long": "שם המוצר חייב להכיל 255 תווים או פחות"},"languages": {"en": "אנגלית",diff --git a/locales/hi/translation.json b/locales/hi/translation.jsonindex 8cfb8c2..686bfb9 100644--- a/locales/hi/translation.json+++ b/locales/hi/translation.json@@ -635,7 +635,9 @@"warranty_duration_required": "वारंटी अवधि आवश्यक है","warranty_not_found_refresh": "वारंटी नहीं मिली. कृपया ताज़ा करें और पुनः प्रयास करें।","import_success": "{{success}} वारंटी आयातित। {{failure}} विफल।",- "exported_warranties_successfully": "निर्यात की गई {{count}} वारंटी"+ "exported_warranties_successfully": "निर्यात की गई {{count}} वारंटी",+ "invalid_claim_status": "अमान्य दावा स्थिति. इनमें से एक होना चाहिए: {{statuses}}",+ "product_name_too_long": "उत्पाद का नाम 255 अक्षर या उससे कम होना चाहिए"},"languages": {"en": "अंग्रेज़ी",diff --git a/locales/it/translation.json b/locales/it/translation.jsonindex dff5b71..c4b0e37 100644--- a/locales/it/translation.json+++ b/locales/it/translation.json@@ -725,7 +725,9 @@"unarchived_success": "Garanzia non archiviata","warranty_duration_required": "È richiesta la durata della garanzia","warranty_not_found_refresh": "Garanzia non trovata. Aggiorna e riprova.",- "import_success": "{{success}} garanzie importate. {{failure}} non riuscito."+ "import_success": "{{success}} garanzie importate. {{failure}} non riuscito.",+ "invalid_claim_status": "Stato del reclamo non valido. Deve essere uno tra: {{statuses}}",+ "product_name_too_long": "Il nome del prodotto deve contenere massimo 255 caratteri"},"claims": {"claims": "Reclami",diff --git a/locales/ja/translation.json b/locales/ja/translation.jsonindex 18628f1..5e156a0 100644--- a/locales/ja/translation.json+++ b/locales/ja/translation.json@@ -635,7 +635,9 @@"unarchived_success": "保証はアーカイブされていません","warranty_duration_required": "保証期間は必須です","warranty_not_found_refresh": "保証書が見つかりません。更新してもう一度お試しください。",- "import_success": "{{success}} 個の保証がインポートされました。 {{failure}} が失敗しました。"+ "import_success": "{{success}} 個の保証がインポートされました。 {{failure}} が失敗しました。",+ "invalid_claim_status": "無効な請求ステータスです。次のいずれかである必要があります: {{statuses}}",+ "product_name_too_long": "製品名は255文字以内である必要があります"},"languages": {"en": "English",diff --git a/locales/ko/translation.json b/locales/ko/translation.jsonindex e9a10a2..61a7bc4 100644--- a/locales/ko/translation.json+++ b/locales/ko/translation.json@@ -635,7 +635,9 @@"unarchived_success": "보관 취소된 보증","warranty_duration_required": "보증 기간은 필수 항목입니다.","warranty_not_found_refresh": "보증을 찾을 수 없습니다. 새로고침한 후 다시 시도해 주세요.",- "import_success": "{{success}} 보증을 가져왔습니다. {{failure}} 실패했습니다."+ "import_success": "{{success}} 보증을 가져왔습니다. {{failure}} 실패했습니다.",+ "invalid_claim_status": "청구 상태가 잘못되었습니다. 다음 중 하나여야 합니다. {{statuses}}",+ "product_name_too_long": "제품 이름은 255자 이하여야 합니다."},"languages": {"en": "English",diff --git a/locales/nl/translation.json b/locales/nl/translation.jsonindex b88b89b..2ca7eb4 100644--- a/locales/nl/translation.json+++ b/locales/nl/translation.json@@ -635,7 +635,9 @@"unarchived_success": "Garantie niet gearchiveerd","warranty_duration_required": "Garantieduur is vereist","warranty_not_found_refresh": "Garantie niet gevonden. Vernieuw de pagina en probeer het opnieuw.",- "import_success": "{{success}} garanties geïmporteerd. {{failure}} is mislukt."+ "import_success": "{{success}} garanties geïmporteerd. {{failure}} is mislukt.",+ "invalid_claim_status": "Ongeldige claimstatus. Moet een van zijn: {{statuses}}",+ "product_name_too_long": "De productnaam moet 255 tekens of minder bevatten"},"languages": {"en": "Engels",diff --git a/locales/pl/translation.json b/locales/pl/translation.jsonindex 0918e05..d9aeca1 100644--- a/locales/pl/translation.json+++ b/locales/pl/translation.json@@ -635,7 +635,9 @@"unarchived_success": "Gwarancja niezarchiwizowana","warranty_duration_required": "Wymagany jest okres gwarancji","warranty_not_found_refresh": "Nie znaleziono gwarancji. Odśwież i spróbuj ponownie.",- "import_success": "Zaimportowano gwarancje {{success}}. {{failure}} nie powiodło się."+ "import_success": "Zaimportowano gwarancje {{success}}. {{failure}} nie powiodło się.",+ "invalid_claim_status": "Nieprawidłowy status roszczenia. Musi być jednym z: {{statuses}}",+ "product_name_too_long": "Nazwa produktu może mieć maksymalnie 255 znaków"},"languages": {"en": "English",diff --git a/locales/pt/translation.json b/locales/pt/translation.jsonindex ad690b2..6a6cdb5 100644--- a/locales/pt/translation.json+++ b/locales/pt/translation.json@@ -679,7 +679,9 @@"unarchived_success": "Garantia desarquivada","warranty_duration_required": "A duração da garantia é obrigatória","warranty_not_found_refresh": "Garantia não encontrada. Atualize e tente novamente.",- "import_success": "{{success}} garantias importadas. {{failure}} falhou."+ "import_success": "{{success}} garantias importadas. {{failure}} falhou.",+ "invalid_claim_status": "Status de reivindicação inválido. Deve ser um dos seguintes: {{statuses}}",+ "product_name_too_long": "O nome do produto deve ter 255 caracteres ou menos"},"languages": {"en": "English",diff --git a/locales/ru/translation.json b/locales/ru/translation.jsonindex 8894cd5..587a4fe 100644--- a/locales/ru/translation.json+++ b/locales/ru/translation.json@@ -685,7 +685,9 @@"warranty_duration_required": "Требуется гарантийный срок","warranty_not_found_refresh": "Гарантия не найдена. Пожалуйста, обновите и повторите попытку.","warranty_updated_successfully": "Гарантия успешно обновлена",- "error_colon": "Ошибка: {{error}}"+ "error_colon": "Ошибка: {{error}}",+ "invalid_claim_status": "Неверный статус заявки. Должен быть одним из: {{statuses}}",+ "product_name_too_long": "Название продукта должно содержать не более 255 символов."},"languages": {"en": "English",diff --git a/locales/tr/translation.json b/locales/tr/translation.jsonindex f251e88..6396fa5 100644--- a/locales/tr/translation.json+++ b/locales/tr/translation.json@@ -202,7 +202,9 @@"unarchived_success": "Garanti arşivden çıkarıldı","warranty_duration_required": "Garanti süresi gereklidir","error_updating_archive_status": "Arşiv durumu güncellenemedi",- "warranty_not_found_refresh": "Garanti bulunamadı. Lütfen yenileyin ve tekrar deneyin."+ "warranty_not_found_refresh": "Garanti bulunamadı. Lütfen yenileyin ve tekrar deneyin.",+ "invalid_claim_status": "Geçersiz hak talebi durumu. Şunlardan biri olmalı: {{statuses}}",+ "product_name_too_long": "Ürün adı 255 karakter veya daha az olmalıdır"},"settings": {"title": "Ayarlar",diff --git a/locales/uk/translation.json b/locales/uk/translation.jsonindex 6a6b3b5..fa5313e 100644--- a/locales/uk/translation.json+++ b/locales/uk/translation.json@@ -641,7 +641,9 @@"warranty_not_found_refresh": "Гарантія не знайдена. Оновіть і повторіть спробу.","deleted_successfully": "Гарантія видалена","error_loading_global_warranties": "Не вдалося завантажити гарантії. Спробуйте ще раз.",- "import_success": "Імпортовано {{success}} гарантій. {{failure}} помилка."+ "import_success": "Імпортовано {{success}} гарантій. {{failure}} помилка.",+ "invalid_claim_status": "Недійсний статус претензії. Має бути один із: {{statuses}}",+ "product_name_too_long": "Назва продукту має містити не більше 255 символів"},"languages": {"en": "English",diff --git a/locales/zh_CN/translation.json b/locales/zh_CN/translation.jsonindex 26da918..7e4bf26 100644--- a/locales/zh_CN/translation.json+++ b/locales/zh_CN/translation.json@@ -635,7 +635,9 @@"invalid_warranty_duration_before_notes": "在保修期有效之前无法保存注释。","login_to_view_warranties": "请登录查看保修。","error_loading_personal_warranties": "无法加载您的保修。请再试一次。",- "expiration_date_after_purchase_date": "有效期必须晚于购买日期"+ "expiration_date_after_purchase_date": "有效期必须晚于购买日期",+ "product_name_too_long": "产品名称不得超过 255 个字符",+ "invalid_claim_status": "无效的索赔状态。必须是以下之一:{{statuses}}"},"languages": {"en": "English",diff --git a/locales/zh_HK/translation.json b/locales/zh_HK/translation.jsonindex 33a5092..476889e 100644--- a/locales/zh_HK/translation.json+++ b/locales/zh_HK/translation.json@@ -635,7 +635,9 @@"purchase_date_required": "購買日期為必填項","unarchived_success": "保固未存檔","warranty_duration_required": "需要保固期限",- "warranty_not_found_refresh": "未找到保固。請刷新並重試。"+ "warranty_not_found_refresh": "未找到保固。請刷新並重試。",+ "invalid_claim_status": "無效的索賠狀態。必須是以下之一:{{statuses}}",+ "product_name_too_long": "產品名稱不得超過 255 個字符"},"languages": {"en": "English",