feat(app): history reads Défaire / Refaire (R1, D5)

FR names Défaire / Refaire; title = name + shortcut (Ctrl+Z ou ⌘Z /
Ctrl+Maj+Z ou ⇧⌘Z), aria-label = name, aria-keyshortcuts adds Meta forms.
New keys editor.history.{undo,redo}_shortcut (fr, en). FR prose use_parent_body
and repair.body_one/_other say Défaire. Dialog Annuler unchanged.

Assertion map (R-24):
- editor-history-buttons.test.tsx UNDO/REDO constants 'Annuler la dernière
  modification' / 'Rétablir la dernière modification annulée' → 'Défaire la
  dernière modification' / 'Refaire la dernière modification défaite'
- :80-81 title === UNDO/REDO → title `${UNDO} (Ctrl+Z ou ⌘Z)` / `${REDO}
  (Ctrl+Maj+Z ou ⇧⌘Z)`
- :82-83 aria-keyshortcuts 'Control+Z' / 'Control+Shift+Z' → 'Control+Z
  Meta+Z' / 'Control+Shift+Z Meta+Shift+Z'
- visible labels ['Annuler','Rétablir'] → ['Défaire','Refaire']
- tool column absence /Annuler|Rétablir/ → /Défaire|Refaire/ (also
  editor-annotations-tab.test.tsx:514)
- Rétablir button lookup by literal name → REDO constant
- added: EN names unchanged with title '(Ctrl+Z or ⌘Z)'; FR prose contains
  Défaire while use_parent_cancel stays 'Annuler'
- e2e titles/comments only: Annuler/Rétablir → Défaire/Refaire
This commit is contained in:
bchanot committed 2026-11-12 12:39:01 +01:00
1 parent 5803854860
commit 7dda61d2ae
10 files changed
+70 -34

No files matched your search

@@ -149,7 +149,7 @@ test.describe('editor shell journeys (H)', () => {
await selectTab(page, dict, 'general')
const original = await nameField(page).inputValue()
await nameField(page).fill('Saisi, jamais validé')
// « Annuler » is aria-disabled until the typed text is committed: press at its box.
// « Défaire » is aria-disabled until the typed text is committed: press at its box.
await pressAtBox(page, historyButton(page, dict, 'undo'))
await expect(nameField(page)).toHaveValue(original)
await expect(saveLine(page)).not.toHaveText(UNSAVED_LINE)
@@ -157,7 +157,7 @@ test.describe('editor shell journeys (H)', () => {
await expect(nameField(page)).toHaveValue('Saisi, jamais validé')
})
test('a field left empty keeps its error: Tab to « Annuler », Enter, nothing undone, focus back', async ({
test('a field left empty keeps its error: Tab to « Défaire », Enter, nothing undone, focus back', async ({
page,
}) => {
await open(page)
@@ -268,7 +268,7 @@ test.describe('editor shell keyboard order (H)', () => {
await dropLateReplays(context)
})
test('header, tab list, Annuler, Rétablir, then the tools, the canvas and the side column', async ({
test('header, tab list, Défaire, Refaire, then the tools, the canvas and the side column', async ({
page,
}) => {
await open(page)
@@ -290,7 +290,7 @@ test.describe('editor shell keyboard order (H)', () => {
])
})
test('with the panel open: header, tab list, Annuler, Rétablir, the panel, then the page content', async ({
test('with the panel open: header, tab list, Défaire, Refaire, the panel, then the page content', async ({
page,
}) => {
await open(page)
+1 -1
View File
@@ -146,7 +146,7 @@ test.describe('editor shell, kept places (B2a)', () => {
for (const scrolled of [false, true]) {
await page.evaluate((y) => window.scrollTo(0, y), scrolled ? 400 : 0)
for (const target of targets) await target.click({ trial: true })
// « Annuler » / « Rétablir » may be aria-disabled (a trial click would wait).
// « Défaire » / « Refaire » may be aria-disabled (a trial click would wait).
for (const kind of ['undo', 'redo'] as const) {
const button = historyButton(page, dict, kind)
await button.scrollIntoViewIfNeeded()