From f86105a1bea78e209817c148b6c3792a2a9ee902 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 24 Apr 2026 16:18:51 +0200 Subject: [PATCH] feat(i18n): add BATCH_TOO_LARGE error code + 16 bulk-upload Paraglide keys Co-Authored-By: Claude Sonnet 4.6 --- frontend/messages/de.json | 19 ++++++++++++++++++- frontend/messages/en.json | 19 ++++++++++++++++++- frontend/messages/es.json | 19 ++++++++++++++++++- frontend/src/lib/errors.ts | 3 +++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 1b90d913..8bd62c50 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -811,6 +811,7 @@ "pagination_next": "Weiter", "pagination_page_of": "Seite {page} von {total}", "pagination_nav_label": "Seitennavigation", +<<<<<<< HEAD "common_opens_new_tab": "(öffnet in neuem Tab)", @@ -850,5 +851,21 @@ "richtlinien_klaer_umbrueche": "Originale Zeilenumbrüche", "richtlinien_klaer_caps": "Alte Groß-/Kleinschreibung", "richtlinien_closing_title": "Fehlt eine Regel?", - "richtlinien_closing_body": "Stolpern Sie beim Transkribieren über eine Situation, die hier nicht steht — schreiben Sie einen Kommentar beim betreffenden Block. Wir sammeln sie und besprechen sie beim nächsten Familientreffen." + "richtlinien_closing_body": "Stolpern Sie beim Transkribieren über eine Situation, die hier nicht steht — schreiben Sie einen Kommentar beim betreffenden Block. Wir sammeln sie und besprechen sie beim nächsten Familientreffen.", + "error_batch_too_large": "Zu viele Dateien auf einmal — bitte in Blöcken hochladen.", + "bulk_drop_hint": "Eine oder mehrere Dateien ablegen", + "bulk_drop_sub": "PDF, JPEG, PNG oder TIFF · bis zu 50 MB pro Datei", + "bulk_count_pill": "{count} werden erstellt", + "bulk_save_cta": "{count, plural, one {Speichern →} other {{count} speichern →}}", + "bulk_discard_all": "Alle verwerfen", + "bulk_add_more": "Weitere hinzufügen", + "bulk_scope_per_file_label": "Nur diese Datei", + "bulk_scope_shared_label": "Gilt für alle {count}", + "bulk_title_suggested_hint": "Vorschlag aus Dateiname — zum Bearbeiten anklicken", + "bulk_switcher_prev": "Vorherige Datei", + "bulk_switcher_next": "Nächste Datei", + "bulk_file_error_chip_label": "Fehler beim Hochladen", + "bulk_upload_progress": "{done} von {total} hochgeladen", + "bulk_partial_success": "{created} erstellt, {failed} fehlgeschlagen", + "bulk_all_failed": "Alle Uploads fehlgeschlagen" } diff --git a/frontend/messages/en.json b/frontend/messages/en.json index f5862f0f..afc3ed73 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -811,6 +811,7 @@ "pagination_next": "Next", "pagination_page_of": "Page {page} of {total}", "pagination_nav_label": "Pagination", +<<<<<<< HEAD "common_opens_new_tab": "(opens in new tab)", @@ -850,5 +851,21 @@ "richtlinien_klaer_umbrueche": "Original line breaks", "richtlinien_klaer_caps": "Old capitalisation", "richtlinien_closing_title": "Missing a rule?", - "richtlinien_closing_body": "If you hit a situation while transcribing that isn't listed here — leave a comment on the relevant block. We collect them and discuss them at the next family gathering." + "richtlinien_closing_body": "If you hit a situation while transcribing that isn't listed here — leave a comment on the relevant block. We collect them and discuss them at the next family gathering.", + "error_batch_too_large": "Too many files at once — please upload in smaller batches.", + "bulk_drop_hint": "Drop one or more files here", + "bulk_drop_sub": "PDF, JPEG, PNG or TIFF · up to 50 MB per file", + "bulk_count_pill": "{count} will be created", + "bulk_save_cta": "{count, plural, one {Save →} other {Save {count} →}}", + "bulk_discard_all": "Discard all", + "bulk_add_more": "Add more", + "bulk_scope_per_file_label": "This file only", + "bulk_scope_shared_label": "Applies to all {count}", + "bulk_title_suggested_hint": "Suggested from filename — click to edit", + "bulk_switcher_prev": "Previous file", + "bulk_switcher_next": "Next file", + "bulk_file_error_chip_label": "Upload failed", + "bulk_upload_progress": "{done} of {total} uploaded", + "bulk_partial_success": "{created} created, {failed} failed", + "bulk_all_failed": "All uploads failed" } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index c949ce2c..cf1f27e4 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -811,6 +811,7 @@ "pagination_next": "Siguiente", "pagination_page_of": "Página {page} de {total}", "pagination_nav_label": "Paginación", +<<<<<<< HEAD "common_opens_new_tab": "(abre en pestaña nueva)", @@ -850,5 +851,21 @@ "richtlinien_klaer_umbrueche": "Saltos de línea originales", "richtlinien_klaer_caps": "Mayúsculas antiguas", "richtlinien_closing_title": "¿Falta una regla?", - "richtlinien_closing_body": "Si al transcribir encuentras una situación que no está aquí — deja un comentario en el bloque. Las recogemos y las discutimos en la próxima reunión familiar." + "richtlinien_closing_body": "Si al transcribir encuentras una situación que no está aquí — deja un comentario en el bloque. Las recogemos y las discutimos en la próxima reunión familiar.", + "error_batch_too_large": "Demasiados archivos a la vez — sube en lotes más pequeños.", + "bulk_drop_hint": "Suelta uno o varios archivos aquí", + "bulk_drop_sub": "PDF, JPEG, PNG o TIFF · hasta 50 MB por archivo", + "bulk_count_pill": "Se crearán {count}", + "bulk_save_cta": "{count, plural, one {Guardar →} other {Guardar {count} →}}", + "bulk_discard_all": "Descartar todo", + "bulk_add_more": "Añadir más", + "bulk_scope_per_file_label": "Solo este archivo", + "bulk_scope_shared_label": "Para todos los {count}", + "bulk_title_suggested_hint": "Sugerencia del nombre de archivo — haz clic para editar", + "bulk_switcher_prev": "Archivo anterior", + "bulk_switcher_next": "Archivo siguiente", + "bulk_file_error_chip_label": "Error al subir", + "bulk_upload_progress": "{done} de {total} subidos", + "bulk_partial_success": "{created} creados, {failed} fallidos", + "bulk_all_failed": "Todos los uploads fallaron" } diff --git a/frontend/src/lib/errors.ts b/frontend/src/lib/errors.ts index d9ec385d..1a1d1551 100644 --- a/frontend/src/lib/errors.ts +++ b/frontend/src/lib/errors.ts @@ -41,6 +41,7 @@ export type ErrorCode = | 'UNAUTHORIZED' | 'FORBIDDEN' | 'VALIDATION_ERROR' + | 'BATCH_TOO_LARGE' | 'INTERNAL_ERROR'; export interface BackendError { @@ -139,6 +140,8 @@ export function getErrorMessage(code: ErrorCode | string | undefined): string { return m.error_forbidden(); case 'VALIDATION_ERROR': return m.error_validation_error(); + case 'BATCH_TOO_LARGE': + return m.error_batch_too_large(); default: return m.error_internal_error(); }