From a1e99fad9e93f715807b2cbc15fe6bd8f42874f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 23:13:39 +0000 Subject: [PATCH] Follow-up to #402: the menu scroll arrows' accessibility labels are translated Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8 --- crates/ui-egui/locales/de.json | 2 ++ crates/ui-egui/locales/es.json | 2 ++ crates/ui-egui/locales/ja.json | 2 ++ crates/ui-egui/locales/pt-br.json | 2 ++ crates/ui-egui/locales/ru.json | 2 ++ crates/ui-egui/locales/zh-hans.json | 2 ++ crates/ui-egui/locales/zh-hant.json | 2 ++ crates/ui-egui/src/menu_level.rs | 4 +++- 8 files changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/locales/de.json b/crates/ui-egui/locales/de.json index 66f31e99..ad625ccb 100644 --- a/crates/ui-egui/locales/de.json +++ b/crates/ui-egui/locales/de.json @@ -1287,6 +1287,8 @@ "Scanning": "Wird durchsucht", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "Die Werte bleiben an den Fotos gespeichert: Filtere danach oder erstelle Smart-Alben mit Schärfe und „Beste ähnlicher Aufnahmen“.", "Screen": "Bildschirm", + "Scroll menu down": "Menü nach unten scrollen", + "Scroll menu up": "Menü nach oben scrollen", "Search": "Suche", "Search Photos": "Fotos suchen", "Search commands or keys": "Befehle oder Tasten suchen", diff --git a/crates/ui-egui/locales/es.json b/crates/ui-egui/locales/es.json index 833ffba3..052eeb96 100644 --- a/crates/ui-egui/locales/es.json +++ b/crates/ui-egui/locales/es.json @@ -1235,6 +1235,8 @@ "Scanning": "Explorando", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "Las puntuaciones se quedan en las fotos: se pueden filtrar o crear álbumes inteligentes con Enfoque y La mejor de las tomas similares.", "Screen": "Pantalla", + "Scroll menu down": "Desplazar el menú hacia abajo", + "Scroll menu up": "Desplazar el menú hacia arriba", "Search": "Buscar", "Search Photos": "Buscar fotos", "Search commands or keys": "Buscar comandos o teclas", diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.json index 3e9c7556..80c40085 100644 --- a/crates/ui-egui/locales/ja.json +++ b/crates/ui-egui/locales/ja.json @@ -1172,6 +1172,8 @@ "Scanning": "検索中", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "評価結果は写真に保存されます。ピント評価や類似写真内のベストショットで絞り込み・スマートアルバム作成ができます", "Screen": "画面用", + "Scroll menu down": "メニューを下にスクロール", + "Scroll menu up": "メニューを上にスクロール", "Search": "検索", "Search Photos": "写真を検索", "Search commands or keys": "コマンドまたはキーを検索", diff --git a/crates/ui-egui/locales/pt-br.json b/crates/ui-egui/locales/pt-br.json index f5b88f4f..529dd4bb 100644 --- a/crates/ui-egui/locales/pt-br.json +++ b/crates/ui-egui/locales/pt-br.json @@ -1245,6 +1245,8 @@ "Scanning": "Examinando", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "As pontuações ficam nas fotos: filtre ou crie álbuns inteligentes com Foco e Melhor de fotos semelhantes.", "Screen": "Tela", + "Scroll menu down": "Rolar o menu para baixo", + "Scroll menu up": "Rolar o menu para cima", "Search": "Pesquisar", "Search Photos": "Pesquisar fotos", "Search commands or keys": "Pesquisar comandos ou teclas", diff --git a/crates/ui-egui/locales/ru.json b/crates/ui-egui/locales/ru.json index b80dd73c..95fcfc81 100644 --- a/crates/ui-egui/locales/ru.json +++ b/crates/ui-egui/locales/ru.json @@ -1027,6 +1027,8 @@ "Scanning": "Сканирование", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "Оценки остаются на фото: фильтруйте или создавайте смарт-альбомы по Focus и Best of Similar Shots.", "Screen": "Экран", + "Scroll menu down": "Прокрутить меню вниз", + "Scroll menu up": "Прокрутить меню вверх", "Search Photos": "Поиск фото", "Search commands or keys": "Поиск команд или клавиш", "Search…": "Поиск…", diff --git a/crates/ui-egui/locales/zh-hans.json b/crates/ui-egui/locales/zh-hans.json index 8e7b1312..3ec174f0 100644 --- a/crates/ui-egui/locales/zh-hans.json +++ b/crates/ui-egui/locales/zh-hans.json @@ -1233,6 +1233,8 @@ "Scanning": "正在扫描", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "评分会保留在照片上:可使用“对焦”和“相似照片中的最佳”进行筛选或创建智能相册。", "Screen": "屏幕", + "Scroll menu down": "向下滚动菜单", + "Scroll menu up": "向上滚动菜单", "Search": "搜索", "Search Photos": "搜索照片", "Search commands or keys": "搜索命令或按键", diff --git a/crates/ui-egui/locales/zh-hant.json b/crates/ui-egui/locales/zh-hant.json index 71a2bb5f..7a60b4dd 100644 --- a/crates/ui-egui/locales/zh-hant.json +++ b/crates/ui-egui/locales/zh-hant.json @@ -1233,6 +1233,8 @@ "Scanning": "正在掃描", "Scores stay on the photos: filter or make smart albums with Focus and Best of Similar Shots.": "分數會保留在照片上:可依焦點與相似照片中的最佳照片篩選,或建立智慧型相簿。", "Screen": "螢幕", + "Scroll menu down": "向下捲動選單", + "Scroll menu up": "向上捲動選單", "Search": "搜尋", "Search Photos": "搜尋照片", "Search commands or keys": "搜尋命令或按鍵", diff --git a/crates/ui-egui/src/menu_level.rs b/crates/ui-egui/src/menu_level.rs index 3d972fd0..df9bdf09 100644 --- a/crates/ui-egui/src/menu_level.rs +++ b/crates/ui-egui/src/menu_level.rs @@ -114,7 +114,9 @@ pub fn level(ui: &mut Ui, depth: usize, bar_bottom: Option, rows: impl FnOn ui.painter().add(egui::Shape::convex_polygon(tri, if live { t.text } else { t.text_disabled }, egui::Stroke::NONE)); let id = key.with(dir < 0.0); let r = ui.interact(strip, id, Sense::hover()); - r.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, live, if dir < 0.0 { "Scroll menu up" } else { "Scroll menu down" })); + r.widget_info(|| { + egui::WidgetInfo::labeled(egui::WidgetType::Button, live, crate::i18n::tr(if dir < 0.0 { "Scroll menu up" } else { "Scroll menu down" })) + }); if live && pointer_on(ui, strip) { target = (offset + dir * SPEED * dt.max(1.0 / 120.0)).clamp(0.0, max); ctx.request_repaint();