fix(editor): category creation dialog title key

This commit is contained in:
bchanot committed 2026-11-13 23:45:59 +01:00
1 parent baae13ce3a
commit 021685f6b3
4 files changed
+26

No files matched your search

+2
View File
@@ -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',
+1
View File
@@ -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',
@@ -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.')
})
})
+10
View File
@@ -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 |