From 1627aa6c573b313102af14db67bb7391b43a7c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 30 Sep 2026 22:02:02 +0200 Subject: [PATCH] fix(labs): translate the review validation messages and narrow a test lookup --- messages/es.json | 6 ++++++ messages/fr.json | 6 ++++++ messages/it.json | 6 ++++++ messages/ko.json | 6 ++++++ messages/pl.json | 6 ++++++ src/components/labs/__tests__/ocr-row-editor.test.tsx | 2 +- 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/messages/es.json b/messages/es.json index 856524ed4..21269dd95 100644 --- a/messages/es.json +++ b/messages/es.json @@ -9002,6 +9002,12 @@ "savedEmptyToast": "No hay nada que guardar", "noRows": "No se encontraron valores en este informe.", "nothingToSave": "Selecciona al menos un valor para guardar.", + "validationSummary": "Lecturas que requieren atención: {count}. Completa los campos marcados o anula la selección de esas lecturas.", + "errorDate": "Añade la fecha de la muestra.", + "errorAnalyte": "Añade el nombre del biomarcador.", + "errorValue": "Añade un valor.", + "errorResult": "Añade un resultado.", + "errorUnit": "Añade una unidad.", "saveFailed": "No se pudieron guardar los valores. Inténtalo de nuevo.", "providerUnsupported": "Tu proveedor de IA no puede leer imágenes. Configura un modelo con visión.", "consentRequired": "Se requiere consentimiento de procesamiento de IA para escanear un informe.", diff --git a/messages/fr.json b/messages/fr.json index d6209604a..40702c5b6 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -9002,6 +9002,12 @@ "savedEmptyToast": "Rien à enregistrer", "noRows": "Aucune valeur n'a pu être trouvée dans ce compte rendu.", "nothingToSave": "Sélectionnez au moins une valeur à enregistrer.", + "validationSummary": "Valeurs à compléter : {count}. Complétez les champs signalés ou désélectionnez ces valeurs.", + "errorDate": "Indiquez la date du prélèvement.", + "errorAnalyte": "Indiquez le nom du biomarqueur.", + "errorValue": "Indiquez une valeur.", + "errorResult": "Indiquez un résultat.", + "errorUnit": "Indiquez une unité.", "saveFailed": "Impossible d'enregistrer les valeurs. Veuillez réessayer.", "providerUnsupported": "Votre fournisseur d'IA ne peut pas lire les images. Configurez un modèle capable de vision.", "consentRequired": "Le consentement au traitement par IA est requis pour scanner un compte rendu.", diff --git a/messages/it.json b/messages/it.json index 151e22053..b47e86906 100644 --- a/messages/it.json +++ b/messages/it.json @@ -9002,6 +9002,12 @@ "savedEmptyToast": "Nulla da salvare", "noRows": "Nessun valore trovato in questo referto.", "nothingToSave": "Seleziona almeno un valore da salvare.", + "validationSummary": "Valori da completare: {count}. Completa i campi evidenziati o deseleziona quei valori.", + "errorDate": "Inserisci la data del prelievo.", + "errorAnalyte": "Inserisci il nome del biomarcatore.", + "errorValue": "Inserisci un valore.", + "errorResult": "Inserisci un risultato.", + "errorUnit": "Inserisci un'unità.", "saveFailed": "Impossibile salvare i valori. Riprova.", "providerUnsupported": "Il tuo provider IA non può leggere le immagini. Configura un modello con visione.", "consentRequired": "Per scansionare un referto è richiesto il consenso al trattamento tramite IA.", diff --git a/messages/ko.json b/messages/ko.json index dd81bcdb4..8d83c54dc 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -9002,6 +9002,12 @@ "savedEmptyToast": "저장할 항목이 없어요", "noRows": "이 결과지에서 측정값을 찾지 못했어요.", "nothingToSave": "저장할 측정값을 하나 이상 선택해 주세요.", + "validationSummary": "확인이 필요한 수치: {count}개. 표시된 항목을 채우거나 해당 수치의 선택을 해제하세요.", + "errorDate": "채취 날짜를 입력하세요.", + "errorAnalyte": "바이오마커 이름을 입력하세요.", + "errorValue": "값을 입력하세요.", + "errorResult": "결과를 입력하세요.", + "errorUnit": "단위를 입력하세요.", "saveFailed": "측정값을 저장하지 못했어요. 다시 시도해 주세요.", "providerUnsupported": "AI 제공자가 이미지를 읽지 못해요. 이미지를 읽는 모델로 설정해 주세요.", "consentRequired": "결과지를 스캔하려면 AI 처리 동의가 필요해요.", diff --git a/messages/pl.json b/messages/pl.json index 33cec9808..2a7d361ea 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -9002,6 +9002,12 @@ "savedEmptyToast": "Nie ma nic do zapisania", "noRows": "W tym wyniku nie znaleziono żadnych wartości.", "nothingToSave": "Wybierz co najmniej jeden wynik do zapisania.", + "validationSummary": "Wyniki wymagające uwagi: {count}. Uzupełnij oznaczone pola lub odznacz te wyniki.", + "errorDate": "Podaj datę pobrania próbki.", + "errorAnalyte": "Podaj nazwę biomarkera.", + "errorValue": "Podaj wartość.", + "errorResult": "Podaj wynik.", + "errorUnit": "Podaj jednostkę.", "saveFailed": "Nie udało się zapisać wyników. Spróbuj ponownie.", "providerUnsupported": "Twój dostawca AI nie może odczytywać obrazów. Skonfiguruj model z obsługą obrazu.", "consentRequired": "Do zeskanowania wyniku wymagana jest zgoda na przetwarzanie przez AI.", diff --git a/src/components/labs/__tests__/ocr-row-editor.test.tsx b/src/components/labs/__tests__/ocr-row-editor.test.tsx index 844d66d0b..ca85eda5d 100644 --- a/src/components/labs/__tests__/ocr-row-editor.test.tsx +++ b/src/components/labs/__tests__/ocr-row-editor.test.tsx @@ -45,7 +45,7 @@ describe(" required-field marking", () => { const html = render({ date: true }); const invalid = html.match(/]*aria-invalid="true"[^>]*>/g) ?? []; expect(invalid).toHaveLength(1); - const describedBy = invalid[0].match(/aria-describedby="([^"]+)"/)?.[1]; + const describedBy = invalid[0]?.match(/aria-describedby="([^"]+)"/)?.[1]; expect(describedBy).toBeTruthy(); expect(html).toContain(`id="${describedBy}"`); expect(html).toContain("Add the sample date.");