From b080e2556b8a7c0aa2329ca55ec11838c398703f Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 24 Oct 2026 09:51:26 +0700 Subject: [PATCH] Catalogs: Italian and Vietnamese drop two strings the close dialog no longer uses; the intensity-width test skips labels egui's own font can't draw --- crates/ui-egui/locales/it.toml | 2 -- crates/ui-egui/locales/vi.toml | 2 -- crates/ui-egui/src/field_tests.rs | 5 +++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/locales/it.toml b/crates/ui-egui/locales/it.toml index 68d042f6..3e34ae0a 100644 --- a/crates/ui-egui/locales/it.toml +++ b/crates/ui-egui/locales/it.toml @@ -249,7 +249,6 @@ status = "draft — needs native review" "Close tab" = "Chiudi scheda" "Close version history" = "Chiudi cronologia versioni" "Close when clicking outside" = "Chiudi cliccando all'esterno" -"Close without saving" = "Chiudi senza salvare" "Code" = "Codice" "Code syntax" = "Sintassi del codice" "Collapse" = "Comprimi" @@ -1443,7 +1442,6 @@ status = "draft — needs native review" "Unread" = "Non letto" "Unresolve" = "Riapri" "Unsaved changes" = "Modifiche non salvate" -"Unsaved changes in {names}. Close the window and lose them?" = "Modifiche non salvate in {names}. Chiudere la finestra e perderle?" "Unsaved changes: save first ({save}), or close the tab with {alt}-click to discard" = "Modifiche non salvate: salva prima ({save}), oppure chiudi la scheda con {alt}+clic per scartarle" "Unsaved changes: save first, or close again with {key} to discard" = "Modifiche non salvate: salva prima, oppure chiudi di nuovo con {key} per scartarle" "Up" = "Su" diff --git a/crates/ui-egui/locales/vi.toml b/crates/ui-egui/locales/vi.toml index 6493508b..6288d5bd 100644 --- a/crates/ui-egui/locales/vi.toml +++ b/crates/ui-egui/locales/vi.toml @@ -245,7 +245,6 @@ status = "draft — needs native review" "Close tab" = "Đóng thẻ" "Close version history" = "Đóng lịch sử phiên bản" "Close when clicking outside" = "Đóng khi nhấp ra ngoài" -"Close without saving" = "Đóng không lưu" "Code" = "Mã" "Code or invite link" = "Mã hoặc liên kết mời" "Code syntax" = "Cú pháp mã" @@ -1444,7 +1443,6 @@ status = "draft — needs native review" "Unread" = "Chưa đọc" "Unresolve" = "Mở lại bình luận" "Unsaved changes" = "Thay đổi chưa lưu" -"Unsaved changes in {names}. Close the window and lose them?" = "Có thay đổi chưa lưu trong {names}. Đóng cửa sổ và hủy bỏ các thay đổi này?" "Unsaved changes: save first ({save}), or close the tab with {alt}-click to discard" = "Có thay đổi chưa lưu: hãy lưu trước ({save}), hoặc giữ {alt} khi nhấp đóng thẻ để hủy bỏ" "Unsaved changes: save first, or close again with {key} to discard" = "Có thay đổi chưa lưu: hãy lưu trước, hoặc đóng lại lần nữa bằng {key} để hủy bỏ" "Up" = "Lên" diff --git a/crates/ui-egui/src/field_tests.rs b/crates/ui-egui/src/field_tests.rs index dd63988a..0f3d7a91 100644 --- a/crates/ui-egui/src/field_tests.rs +++ b/crates/ui-egui/src/field_tests.rs @@ -577,6 +577,11 @@ fn the_intensity_label_fits_whole_in_every_language() { let label = lang.ui.iter().find(|(k, _)| *k == "Intensity").map_or("Intensity", |(_, t)| match t { Text::Plain(s) | Text::Plural { other: s, .. } => s, }); + // The test's context has only egui's own font: a label it can't draw (Vietnamese + // diacritics, CJK) can't be measured here, and the app draws it with a system font. + if !ui.ctx().fonts_mut(|f| f.has_glyphs(&crate::theme::regular(11.0), label)) { + continue; + } let lead = crate::widgets::text_lead_width(ui, label, GLASS_FIELD_W); assert!(lead >= 12.0 + width(label), "{}: {label:?} would end in \"…\"", lang.code); }