Thread dialog: its labels in the catalogs; Arabic and Hebrew pending messages compare in display order

Seven labels of the thread dialog had no English catalog entry, so they stayed English in every
language (every_ui_label_literal_reaches_an_english_catalog_entry): Extent, Ends, Chamfer Angle,
Chamfer Depth, the two ISO 4753 hints and the designation hint. They are in
assets/locales/pending/thread-dialog-labels.json with Arabic, Hebrew, Japanese and Chinese, the
catalogs that must be complete. The ISO 4753 hints are looked up by id, and the designation hint
takes its example as {example}, so a right-to-left language places it where it reads.

pending_messages_are_in_the_catalogs compared a pending message with the catalog's text, which
for Arabic and Hebrew is in display order since #3768; it compares with that order now, as the
catalog stores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-27 03:05:23 -04:00
committed by Irakli Kourtis
parent 6517d1ee6b
commit fddb57c0d3
3 changed files with 47 additions and 4 deletions
@@ -0,0 +1,42 @@
{
"en": {
"thread.fits_the_face": "fits the face, e.g. {example}",
"ui.chamfer_angle": "Chamfer Angle",
"ui.chamfer_depth": "Chamfer Depth",
"ui.ends": "Ends",
"ui.extent": "Extent",
"ui.iso_4753": "ISO 4753"
},
"ar": {
"thread.fits_the_face": "يناسب الوجه، مثلاً {example}",
"ui.chamfer_angle": "زاوية الشطف",
"ui.chamfer_depth": "عمق الشطف",
"ui.ends": "الطرفان",
"ui.extent": "الامتداد",
"ui.iso_4753": "ISO 4753"
},
"he": {
"thread.fits_the_face": "מתאים לפאה, למשל {example}",
"ui.chamfer_angle": "זווית פאזה",
"ui.chamfer_depth": "עומק פאזה",
"ui.ends": "קצוות",
"ui.extent": "גבול",
"ui.iso_4753": "ISO 4753"
},
"ja": {
"thread.fits_the_face": "面に合うサイズ。例: {example}",
"ui.chamfer_angle": "面取り角度",
"ui.chamfer_depth": "面取り深さ",
"ui.ends": "端部",
"ui.extent": "範囲",
"ui.iso_4753": "ISO 4753"
},
"zh": {
"thread.fits_the_face": "适合该面,例如 {example}",
"ui.chamfer_angle": "倒角角度",
"ui.chamfer_depth": "倒角深度",
"ui.ends": "端部",
"ui.extent": "范围",
"ui.iso_4753": "ISO 4753"
}
}
+3 -3
View File
@@ -374,7 +374,7 @@ pub(crate) fn rows(
if !f.sizes().is_empty() {
size_rows(ui, f, designation, suggested);
}
let hint = format!("{}{}", tr("fits the face, e.g. "), example(f));
let hint = crate::i18n::format("thread.fits_the_face", &[("example", &example(f))]);
let (submitted, changed) = text_row(ui, "Designation", designation, &hint);
enter |= submitted;
if let Some(at) = crate::scenario::handle_at("dialog:Designation") {
@@ -405,8 +405,8 @@ pub(crate) fn rows(
enter |= ease_rows(ui, "Ease Out", "thread_ease_out", &mut o.ease_out);
pick(ui, "Tip", "thread_tip", &mut o.tip, TIPS);
if o.tip == ThreadTip::Chamfer {
enter |= hint_row(ui, "Chamfer Angle", &mut o.chamfer_angle, tr("ISO 4753"));
enter |= hint_row(ui, "Chamfer Depth", &mut o.chamfer_depth, tr("ISO 4753"));
enter |= hint_row(ui, "Chamfer Angle", &mut o.chamfer_angle, tr("ui.iso_4753"));
enter |= hint_row(ui, "Chamfer Depth", &mut o.chamfer_depth, tr("ui.iso_4753"));
}
});
(enter, reset)
+2 -1
View File
@@ -326,7 +326,8 @@ mod tests {
let pending: BTreeMap<String, Messages> = serde_json::from_str(&std::fs::read_to_string(entry.path()).unwrap()).unwrap();
for (locale, messages) in pending {
for (id, text) in messages {
assert_eq!(Locale::for_language(&locale).text(&id), text, "{locale}: {id}");
// Right-to-left catalogs keep their messages in display order.
assert_eq!(Locale::for_language(&locale).text(&id), crate::bidi::visual_template(&text), "{locale}: {id}");
}
}
}