From 7199575a1120e649cf3b5fea0330c823bb8c4f55 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 4 Jun 2026 17:11:29 +0200 Subject: [PATCH] fix(transcribe): localise Delete key cap + annotation label, clarify Esc row (#327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review follow-up (Leonie, Requirements Engineer): the Delete key cap was a hardcoded German "Entf" shown to EN/ES users — now driven by key_cap_delete (Entf/Del/Supr). The annotation read-only aria-label was a hardcoded German "Block anzeigen" in all locales — now annotation_view_label. Renamed the Esc row label from "Bereich schließen" to "Panel schließen" so it no longer collides with "Bereich" (= region) used elsewhere in the cheatsheet. Co-Authored-By: Claude Sonnet 4.6 --- frontend/messages/de.json | 4 +++- frontend/messages/en.json | 2 ++ frontend/messages/es.json | 2 ++ frontend/src/lib/document/annotation/AnnotationShape.svelte | 4 +++- .../src/lib/document/transcription/ShortcutCheatsheet.svelte | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index efab5e90..53b79850 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -935,12 +935,14 @@ "shortcut_new_region": "Neuen Bereich zeichnen", "shortcut_toggle_training": "Für Training markieren", "shortcut_delete_region": "Aktuellen Bereich löschen", - "shortcut_close_panel": "Bereich schließen", + "shortcut_close_panel": "Panel schließen", "shortcut_help": "Tastaturkürzel anzeigen", "shortcut_draw_hint": "Ziehen Sie mit der Maus einen Bereich auf.", + "key_cap_delete": "Entf", "cheatsheet_title": "Tastaturkürzel", "cheatsheet_close": "Kürzelübersicht schließen", "cheatsheet_autosave_hint": "Änderungen werden automatisch gespeichert.", + "annotation_view_label": "Block anzeigen", "annotation_label_with_delete": "Block anzeigen, Entf zum Löschen.", "transcription_mode_help_label": "Lese- und Bearbeitungsmodus", "transcription_mode_help_body": "Lesen zeigt die Transkription als fließenden Text. Bearbeiten öffnet die Textfelder für jede Passage.", diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 0639283e..808452e1 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -938,9 +938,11 @@ "shortcut_close_panel": "Close panel", "shortcut_help": "Show keyboard shortcuts", "shortcut_draw_hint": "Drag a region with your mouse.", + "key_cap_delete": "Del", "cheatsheet_title": "Keyboard shortcuts", "cheatsheet_close": "Close shortcut overview", "cheatsheet_autosave_hint": "Changes are saved automatically.", + "annotation_view_label": "View block", "annotation_label_with_delete": "Show block, press Delete to remove.", "transcription_mode_help_label": "Read and edit mode", "transcription_mode_help_body": "Read shows the transcription as flowing text. Edit opens the text fields for each passage.", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 8b7170cc..c0c376d4 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -938,9 +938,11 @@ "shortcut_close_panel": "Cerrar panel", "shortcut_help": "Mostrar atajos de teclado", "shortcut_draw_hint": "Arrastre una región con el ratón.", + "key_cap_delete": "Supr", "cheatsheet_title": "Atajos de teclado", "cheatsheet_close": "Cerrar el resumen de atajos", "cheatsheet_autosave_hint": "Los cambios se guardan automáticamente.", + "annotation_view_label": "Ver bloque", "annotation_label_with_delete": "Mostrar bloque, pulse Supr para eliminar.", "transcription_mode_help_label": "Modo lectura y edición", "transcription_mode_help_body": "Lectura muestra la transcripción como texto continuo. Edición abre los campos de texto para cada pasaje.", diff --git a/frontend/src/lib/document/annotation/AnnotationShape.svelte b/frontend/src/lib/document/annotation/AnnotationShape.svelte index 7b301d76..2a67761c 100644 --- a/frontend/src/lib/document/annotation/AnnotationShape.svelte +++ b/frontend/src/lib/document/annotation/AnnotationShape.svelte @@ -36,7 +36,9 @@ let { // When deletion is available (transcribe mode), announce the otherwise-hidden // Delete affordance to assistive tech (issue #327). The transcribeShortcuts // action is the single owner of the key itself. -const ariaLabel = $derived(showDelete ? m.annotation_label_with_delete() : 'Block anzeigen'); +const ariaLabel = $derived( + showDelete ? m.annotation_label_with_delete() : m.annotation_view_label() +); function hexToRgba(hex: string, alpha: number): string { const r = parseInt(hex.slice(1, 3), 16); diff --git a/frontend/src/lib/document/transcription/ShortcutCheatsheet.svelte b/frontend/src/lib/document/transcription/ShortcutCheatsheet.svelte index 199f85e5..3d1a7445 100644 --- a/frontend/src/lib/document/transcription/ShortcutCheatsheet.svelte +++ b/frontend/src/lib/document/transcription/ShortcutCheatsheet.svelte @@ -16,7 +16,7 @@ const groups = [ { cap: 'e', label: m.shortcut_toggle_mode() }, { cap: 'n', label: m.shortcut_new_region() }, { cap: 't', label: m.shortcut_toggle_training() }, - { cap: 'Entf', label: m.shortcut_delete_region() } + { cap: m.key_cap_delete(), label: m.shortcut_delete_region() } ], [ { cap: 'Esc', label: m.shortcut_close_panel() },