i18n(ru): translate dynamic selection, theme and measurement labels (#4838)

This commit is contained in:
Ivan · VanTan authored and GitHub committed 2026-10-13 12:02:38 -04:00
1 parent 2ec1c8c0aa
commit eae87bacfa
2 files changed
+39

No files matched your search

+19
View File
@@ -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`).
+20
View File
@@ -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 Длина
Can't render this file because it contains an unexpected character in line 6 and column 47.