From be2168f70deacfcd6f59d73006254ebc966b1849 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Wed, 28 Oct 2026 20:12:42 +0000 Subject: [PATCH] Snap Fit: the Base Height hint in the user's language (#8451) The hint "at the face" had no catalog message, so it stayed English in every language. Add it in English and the 26 other catalogs, and check that every plastic dialog hint has a message. Co-authored-by: Claude Opus 5.5 --- .../pending/snap-fit-base-height-hint.json | 83 +++++++++++++++++++ crates/ui-egui/src/dialogs_plastic_tests.rs | 10 +++ 2 files changed, 93 insertions(+) create mode 100644 assets/locales/pending/snap-fit-base-height-hint.json diff --git a/assets/locales/pending/snap-fit-base-height-hint.json b/assets/locales/pending/snap-fit-base-height-hint.json new file mode 100644 index 000000000..a5842bc8d --- /dev/null +++ b/assets/locales/pending/snap-fit-base-height-hint.json @@ -0,0 +1,83 @@ +{ + "en": { + "at the face": "at the face" + }, + "ar": { + "at the face": "عند الوجه" + }, + "cs": { + "at the face": "u plochy" + }, + "da": { + "at the face": "ved fladen" + }, + "de": { + "at the face": "an der Fläche" + }, + "es": { + "at the face": "en la cara" + }, + "fr": { + "at the face": "sur la face" + }, + "gl": { + "at the face": "na cara" + }, + "he": { + "at the face": "על הפאה" + }, + "hu": { + "at the face": "a lapnál" + }, + "id": { + "at the face": "di muka" + }, + "it": { + "at the face": "sulla faccia" + }, + "ja": { + "at the face": "面の位置" + }, + "ko": { + "at the face": "면에서" + }, + "ms": { + "at the face": "pada muka" + }, + "nb": { + "at the face": "ved flaten" + }, + "nl": { + "at the face": "op het vlak" + }, + "pl": { + "at the face": "przy ścianie" + }, + "pt-BR": { + "at the face": "na face" + }, + "ro": { + "at the face": "la față" + }, + "ru": { + "at the face": "у грани" + }, + "sv": { + "at the face": "vid ytan" + }, + "tr": { + "at the face": "yüzde" + }, + "uk": { + "at the face": "біля грані" + }, + "vi": { + "at the face": "tại bề mặt" + }, + "zh-TW": { + "at the face": "在面上" + }, + "zh": { + "at the face": "在面上" + } +} diff --git a/crates/ui-egui/src/dialogs_plastic_tests.rs b/crates/ui-egui/src/dialogs_plastic_tests.rs index e23eff0e7..59eeca178 100644 --- a/crates/ui-egui/src/dialogs_plastic_tests.rs +++ b/crates/ui-egui/src/dialogs_plastic_tests.rs @@ -193,3 +193,13 @@ fn inch_plastic_rule_edit_preserves_material_angles_and_stored_lengths() { assert_eq!(changed["draft"], unchanged["draft"]); assert_eq!(changed["material"], unchanged["material"]); } + +/// The hints the plastic dialogs show in an empty optional field ("from the rule", "at the +/// face", …) are in the user's language: each has a message. +#[test] +fn optional_field_hints_have_messages() { + let ja = crate::i18n::Locale::for_language("ja"); + for hint in ["no hole", "to the face", "from the rule", "none", "at the face", "solid"] { + assert_ne!(ja.label(hint), hint, "`{hint}` has a Japanese message"); + } +}