Address CodeRabbit review: Turkic I text, type-ahead language change, RTL coverage

- zoom field: a menu's I key drops İ/ı text whatever the UI language (the keyboard layout is
  not the interface language).
- dropdown type-ahead: one entry per list tagged with its language, cleared on any frame in
  another language, so a prefix never carries over a quick switch and back.
- Hebrew and Urdu: live shell test selects each catalog, checks mirroring and glyphs.
- Azerbaijani restart test resets the drawing language before the restarted shell loads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-11-06 19:27:11 +01:00
1 parent da7690e937
commit d7e66606ad
2 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -130,7 +130,7 @@ fn hebrew_and_urdu_mirror_the_shell_and_draw_their_letters() {
assert!(dock_x(&h) < 600.0, "{code}: the dock moves to the left");
for label in ["File", "Help", "Layers"] {
let text = i18n::tr(lang, label);
assert!(text.chars().any(|c| !c.is_ascii()), "{code}: {label} is translated");
assert!(!text.is_ascii(), "{code}: {label} is translated");
assert!(h.ctx.fonts_mut(|f| f.has_glyphs(&egui::FontId::proportional(12.0), text)), "{code}: {text} has glyphs");
}
h.state_mut().run("prefs.set", json!({"path": "interface.language", "value": "en"})).expect("back to English");
+5 -3
View File
@@ -206,10 +206,11 @@ mod tests {
use egui_kittest::{Harness, kittest::Queryable};
let en = crate::i18n::Lang::EN;
let de = crate::i18n::Lang::from_code("de").unwrap();
let mut h = Harness::builder().with_size(egui::vec2(300.0, 400.0)).build_ui_state(
// Short frames: the letters arrive well within the pause, so only the language change resets.
let mut h = Harness::builder().with_size(egui::vec2(300.0, 400.0)).with_step_dt(1.0 / 60.0).build_ui_state(
|ui, (selected, lang): &mut (usize, crate::i18n::Lang)| {
crate::i18n::with_language(*lang, || {
let options = [(0, "Normal"), (1, "Dissolve"), (2, "Darken")];
let options = [(0, "Normal"), (1, "Dissolve"), (2, "Darken"), (3, "Add")];
crate::widgets::dropdown(ui, "lang-switch", "Mode", selected, &options, 120.0);
});
},
@@ -224,9 +225,10 @@ mod tests {
h.step();
h.state_mut().1 = en;
h.step();
assert!(super::list_open(&h.ctx), "the list stays open across the language change");
type_key(&h, egui::Key::A, "a");
h.run();
assert_eq!(h.state().0, 1, "a alone picks nothing; the d typed before the change is gone (da would be Darken)");
assert_eq!(h.state().0, 3, "a starts a new prefix (Add); the d typed before the change would make it da (Darken)");
}
#[test]