From eae87bacfaf8ca758cb9d6c472afe33546465686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C2=B7=20VanTan?= <77483789+VanTan666@users.noreply.github.com> Date: Tue, 13 Oct 2026 18:02:38 +0200 Subject: [PATCH] i18n(ru): translate dynamic selection, theme and measurement labels (#4838) --- crates/ui-egui/src/i18n/mod.rs | 19 +++++++++++++++++++ crates/ui-egui/src/i18n/ru.tsv | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/crates/ui-egui/src/i18n/mod.rs b/crates/ui-egui/src/i18n/mod.rs index 2fdffdfc6..b976e395f 100644 --- a/crates/ui-egui/src/i18n/mod.rs +++ b/crates/ui-egui/src/i18n/mod.rs @@ -1201,6 +1201,25 @@ mod tests { assert_eq!(tr(Lang::EN, "Seafoam"), "Seafoam"); } + /// These labels are passed to `tl!` dynamically, so the literal coverage scan misses them. + #[test] + fn russian_dynamic_selection_theme_and_measurement_labels_are_translated() { + let ru = Lang::from_code("ru").expect("ru registered"); + let (inverse_label, _) = + crate::canvas_tool_menu::SELECTION_MENU.iter().flatten().find(|(_, id)| *id == "select.inverse").expect("selection menu has Select Inverse"); + assert_eq!(tr(ru, inverse_label), "Инвертировать выделение"); + for kind in [crate::theme::ThemeKind::ProLight, crate::theme::ThemeKind::ProLightGray] { + assert!(has(ru, kind.label()), "Russian theme label missing {}", kind.label()); + } + for (_, label) in photocraft_engine::analysis_cmds::COLUMNS { + assert!(has(ru, label), "Russian measurement header missing {label}"); + } + assert_eq!(tr(ru, "Pro (Light)"), "Pro (светлая)"); + assert_eq!(tr(ru, "Pro (Light Gray)"), "Pro (светло-серая)"); + assert_eq!(tr(ru, "Date and Time"), "Дата и время"); + assert_eq!(tr(ru, "Integrated Density"), "Интегральная плотность"); + } + /// Font style labels are built from dynamic words (weights, "Italic"), so the literal /// scanner cannot cover them; "Light" there is a weight, distinct from the Camera Raw /// "Light" section (`type_tool::style_label`). diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index ca950c2e0..cc008ef42 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3071,3 +3071,23 @@ curves Smooth Сгладить @plural {n} action|{n} actions {n} операция|{n} операции|{n} операций Auto Add/Delete Автодобавление/удаление ICO is limited to 256 × 256 pixels ICO ограничен размером 256 × 256 пикселей + +# Dynamic selection context menu and appearance favorites + Select Inverse Инвертировать выделение + Pro (Light) Pro (светлая) + Pro (Light Gray) Pro (светло-серая) + +# Measurement Log column headers (analysis_cmds::COLUMNS) + Label Метка + Date and Time Дата и время + Scale Units Единицы масштаба + Scale Factor Коэффициент масштаба + Area Площадь + Perimeter Периметр + Circularity Круглость + Gray Value (Minimum) Уровень серого (минимум) + Gray Value (Maximum) Уровень серого (максимум) + Gray Value (Mean) Уровень серого (среднее) + Gray Value (Median) Уровень серого (медиана) + Integrated Density Интегральная плотность + Length Длина