LR-BEHAV-LOCALIZE: Ukrainian coverage gaps are reported, not failed; Compare keeps Lightroom's "Select" label

A label added by another PR (Decrease Rating, Display Profile, …) no longer fails the
Ukrainian test; it shows in English until translated, as for the other languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-09 20:44:04 -04:00
co-authored by Claude Opus 5.5
parent b08f80700f
commit 93e48f8be7
2 changed files with 12 additions and 5 deletions
+11 -4
View File
@@ -629,11 +629,16 @@ mod tests {
}
}
/// Ukrainian's coverage of every catalog message and display label. Gaps are reported, not failed
/// (like `catalogs_agree_on_placeholders_and_report_gaps`): a feature PR that adds a label doesn't
/// have to ship its Ukrainian text, which shows in English until the translation catches up.
#[test]
fn ukrainian_covers_catalogs_commands_controls_and_rules() {
fn ukrainian_coverage_of_catalogs_commands_controls_and_rules_is_reported() {
let catalog = Locale::Uk.catalog();
for key in Locale::ALL.iter().flat_map(|language| language.catalog().keys()) {
assert!(catalog.contains_key(key), "Ukrainian lacks catalog key {key:?}");
let keys: std::collections::BTreeSet<&String> = Locale::ALL.iter().flat_map(|language| language.catalog().keys()).collect();
let lacking: Vec<_> = keys.into_iter().filter(|key| !catalog.contains_key(key.as_str())).collect();
if !lacking.is_empty() {
eprintln!("uk lacks {} catalog message(s) (shown in English): {lacking:?}", lacking.len());
}
let mut labels: Vec<&str> = lightcraft_engine::command_specs().iter().map(|spec| spec.label).collect();
labels.extend(crate::menus::ui_commands().map(|command| command.1).filter(|label| !Locale::ALL.iter().any(|locale| locale.name() == *label)));
@@ -646,7 +651,9 @@ mod tests {
labels.extend(lightcraft_engine::rename::TOKENS.iter().map(|token| token.meaning));
labels.extend(lightcraft_engine::rename::TEMPLATE_NOTES);
let missing: Vec<_> = labels.into_iter().filter(|label| !catalog.contains_key(*label)).collect();
assert!(missing.is_empty(), "Ukrainian lacks display labels: {missing:?}");
if !missing.is_empty() {
eprintln!("uk lacks {} display label(s) (shown in English): {missing:?}", missing.len());
}
}
#[test]
+1 -1
View File
@@ -250,7 +250,7 @@ pub fn show_compare(app: &mut LightcraftApp, ui: &mut egui::Ui) {
let area = canvas.shrink(18.0);
let half = (area.width() - 16.0) / 2.0;
let panes = [
(sel, Rect::from_min_size(area.min, vec2(half, area.height())), "Selected", 0u8),
(sel, Rect::from_min_size(area.min, vec2(half, area.height())), "Select", 0u8),
(cand, Rect::from_min_size(pos2(area.right() - half, area.top()), vec2(half, area.height())), "Candidate", 1u8),
];
let zoom = app.ui.zoom;