From 021685f6b34a6c8169412f1da1d0045f064abcd3 Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 23:45:59 +0100 Subject: [PATCH] fix(editor): category creation dialog title key --- apps/app/src/i18n/en.ts | 2 ++ apps/app/src/i18n/fr.ts | 1 + apps/app/tests/unit/editor-finding-dialog.test.tsx | 13 +++++++++++++ docs/development/V1-2-6_R2_LABELS.md | 10 ++++++++++ 4 files changed, 26 insertions(+) diff --git a/apps/app/src/i18n/en.ts b/apps/app/src/i18n/en.ts index 0bebe485..8f28a9f0 100644 --- a/apps/app/src/i18n/en.ts +++ b/apps/app/src/i18n/en.ts @@ -1538,6 +1538,8 @@ export const en: Dict = { 'editor.findings.add_category': 'Add a category', 'editor.findings.add_node': 'Add a finding', 'editor.findings.new.zone': 'New findings zone', + // Provisional EN, pending the owner's wording. + 'editor.findings.new.category': 'New category', 'editor.findings.new.category_in_zone': 'New category in the zone « {zone} »', 'editor.findings.new.node': 'New finding', 'editor.findings.kind': 'Category type', diff --git a/apps/app/src/i18n/fr.ts b/apps/app/src/i18n/fr.ts index 51563604..e513df74 100644 --- a/apps/app/src/i18n/fr.ts +++ b/apps/app/src/i18n/fr.ts @@ -1569,6 +1569,7 @@ export const fr: Dict = { 'editor.findings.add_category': 'Ajouter une catégorie', 'editor.findings.add_node': 'Ajouter un constat', 'editor.findings.new.zone': 'Nouvelle zone de constats', + 'editor.findings.new.category': 'Nouvelle catégorie', 'editor.findings.new.category_in_zone': 'Nouvelle catégorie dans la zone « {zone} »', 'editor.findings.new.node': 'Nouveau constat', 'editor.findings.kind': 'Type de catégorie', diff --git a/apps/app/tests/unit/editor-finding-dialog.test.tsx b/apps/app/tests/unit/editor-finding-dialog.test.tsx index 503f6748..0f40add4 100644 --- a/apps/app/tests/unit/editor-finding-dialog.test.tsx +++ b/apps/app/tests/unit/editor-finding-dialog.test.tsx @@ -543,3 +543,16 @@ describe('final review: leaving the editor with a dirty dialog (criterion 17)', expect(sessionStorage.getItem(flagKey)).toBeNull() }) }) + +describe('final review: the category creation title', () => { + it('reads « Nouvelle catégorie », never a raw key', async () => { + const user = await mount() + await user.click( + screen.getByRole('button', { name: 'Ajouter une catégorie' }), + ) + await waitFor(() => expect(findingDialog()).not.toBeNull()) + const title = within(findingDialog()!).getByRole('heading', { level: 2 }) + expect(title).toHaveTextContent(/^Nouvelle catégorie$/) + expect(title.textContent).not.toContain('editor.') + }) +}) diff --git a/docs/development/V1-2-6_R2_LABELS.md b/docs/development/V1-2-6_R2_LABELS.md index bcdef62e..ce1502d7 100644 --- a/docs/development/V1-2-6_R2_LABELS.md +++ b/docs/development/V1-2-6_R2_LABELS.md @@ -185,3 +185,13 @@ Bilan de la finition sur `fr.ts` et `en.ts` (mêmes clés dans les deux) : - Les §3 et §4 ci-dessus parlent de « Terminer », « Annuler l'ajout » et « Saisie non appliquée » : ces trois libellés n'existent plus. Dans le §3, seuls les passages sur ces libellés sont périmés (ambiguïtés 3, 5 et 9) ; la première puce du §4 l'est entièrement. + +## 8. Revue finale du 2026-11-13 + +Deux clés nouvelles dans `fr.ts` et `en.ts`, aucune retirée ni modifiée (solde de la finition : +14 clés). Les +libellés EN sont provisoires. + +| Clé | FR | EN (provisoire) | Où | +|---|---|---|---| +| `editor.findings.new.category` | Nouvelle catégorie | New category | Dialogue des constats, titre d'une création de catégorie (le titre affichait la clé brute) | +| `editor.leave.draft_dropped` | Une saisie non enregistrée a été abandonnée en quittant l'éditeur | An unsaved entry was discarded when you left the editor | Éditeur, avis affiché une fois au retour sur la fiche quand un dialogue modifié a été quitté par un Retour de plusieurs entrées |