mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-27 11:37:13 -06:00
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:
co-authored by
Claude Opus 5.5
parent
b08f80700f
commit
93e48f8be7
@@ -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]
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user