Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Pattern dialogs: Quantity is the count in every language, the motion plot keeps its own entry (#6538) (#6733)

Thosch06af6e110756
diff --git a/assets/locales/cs.json b/assets/locales/cs.json
index 9fc909d55b..13bd21c326 100644
--- a/assets/locales/cs.json
+++ b/assets/locales/cs.json
@@ -270,7 +270,7 @@
"Preview Row": "Náhled řádku",
"Preview leaves the current design unchanged.": "Náhled aktuální návrh nemění.",
"Profiles/Curves": "Profily/křivky",
- "Quantity": "Množství",
+ "Quantity": "Počet",
"RECENT": "NEDÁVNÉ",
"REFERENCE": "REFERENCE",
"RULED SURFACE": "PŘÍMKOVÁ PLOCHA",
diff --git a/assets/locales/de.json b/assets/locales/de.json
index 54e52d6067..f9fc36073e 100644
--- a/assets/locales/de.json
+++ b/assets/locales/de.json
@@ -338,7 +338,7 @@
"Profile / Edges": "Profil / Kanten",
"Profiles or curves": "Profile oder Kurven",
"Profiles/Curves": "Profile/Kurven",
- "Quantity": "Größe",
+ "Quantity": "Anzahl",
"RECENT": "ZULETZT",
"REFERENCE": "REFERENZ",
"RULED SURFACE": "REGELFLÄCHE",
diff --git a/assets/locales/fr.json b/assets/locales/fr.json
index caa5c017b9..c584238523 100644
--- a/assets/locales/fr.json
+++ b/assets/locales/fr.json
@@ -270,7 +270,7 @@
"Preview Row": "Aperçu de la ligne",
"Preview leaves the current design unchanged.": "L'aperçu ne modifie pas la conception actuelle.",
"Profiles/Curves": "Profils/Courbes",
- "Quantity": "Grandeur",
+ "Quantity": "Quantité",
"RECENT": "RÉCENTS",
"REFERENCE": "RÉFÉRENCE",
"RULED SURFACE": "SURFACE RÉGLÉE",
diff --git a/assets/locales/ja.json b/assets/locales/ja.json
index 6f7db5c5c7..dcb8a97017 100644
--- a/assets/locales/ja.json
+++ b/assets/locales/ja.json
@@ -398,7 +398,7 @@
"Profile / Edges": "プロファイル / エッジ",
"Profiles or curves": "プロファイルまたは曲線",
"Profiles/Curves": "プロファイル/曲線",
- "Quantity": "量",
+ "Quantity": "数量",
"RECENT": "最近使用した項目",
"REFERENCE": "参照",
"RULED SURFACE": "ルールドサーフェス",
diff --git a/assets/locales/ko.json b/assets/locales/ko.json
index 30d7f3d3bc..bcffb8bd9f 100644
--- a/assets/locales/ko.json
+++ b/assets/locales/ko.json
@@ -348,7 +348,7 @@
"Profile / Edges": "프로파일 / 모서리",
"Profiles or curves": "프로파일 또는 곡선",
"Profiles/Curves": "프로파일/곡선",
- "Quantity": "양",
+ "Quantity": "수량",
"RECENT": "최근",
"REFERENCE": "참조",
"RULED SURFACE": "룰드 서피스",
diff --git a/assets/locales/pending/motion-plot-quantity.json b/assets/locales/pending/motion-plot-quantity.json
new file mode 100644
index 0000000000..987d7042fb
--- /dev/null
+++ b/assets/locales/pending/motion-plot-quantity.json
@@ -0,0 +1,26 @@
+{
+ "en": { "motion.plot_quantity": "Quantity" },
+ "cs": { "motion.plot_quantity": "Množství" },
+ "da": { "motion.plot_quantity": "Antal" },
+ "de": { "motion.plot_quantity": "Größe" },
+ "es": { "motion.plot_quantity": "Cantidad" },
+ "fr": { "motion.plot_quantity": "Grandeur" },
+ "gl": { "motion.plot_quantity": "Cantidade" },
+ "hu": { "motion.plot_quantity": "Mennyiség" },
+ "id": { "motion.plot_quantity": "Jumlah" },
+ "it": { "motion.plot_quantity": "Quantità" },
+ "ja": { "motion.plot_quantity": "量" },
+ "ko": { "motion.plot_quantity": "양" },
+ "ms": { "motion.plot_quantity": "Kuantiti" },
+ "nl": { "motion.plot_quantity": "Aantal" },
+ "pl": { "motion.plot_quantity": "Liczba" },
+ "pt-BR": { "motion.plot_quantity": "Quantidade" },
+ "ro": { "motion.plot_quantity": "Cantitate" },
+ "ru": { "motion.plot_quantity": "Величина" },
+ "sv": { "motion.plot_quantity": "Antal" },
+ "tr": { "motion.plot_quantity": "Büyüklük" },
+ "uk": { "motion.plot_quantity": "Величина" },
+ "vi": { "motion.plot_quantity": "Số lượng" },
+ "zh": { "motion.plot_quantity": "物理量" },
+ "zh-TW": { "motion.plot_quantity": "數量" }
+}
diff --git a/assets/locales/ru.json b/assets/locales/ru.json
index 3455bffddd..c33fc6ecf5 100644
--- a/assets/locales/ru.json
+++ b/assets/locales/ru.json
@@ -269,7 +269,7 @@
"Preview Row": "Строка предпросмотра",
"Preview leaves the current design unchanged.": "Предпросмотр не меняет текущий дизайн.",
"Profiles/Curves": "Профили/кривые",
- "Quantity": "Величина",
+ "Quantity": "Количество",
"RECENT": "НЕДАВНИЕ",
"REFERENCE": "ССЫЛОЧНАЯ ГЕОМЕТРИЯ",
"RULED SURFACE": "ЛИНЕЙЧАТАЯ ПОВЕРХНОСТЬ",
diff --git a/assets/locales/tr.json b/assets/locales/tr.json
index fb6b8b4f42..4edb91535c 100644
--- a/assets/locales/tr.json
+++ b/assets/locales/tr.json
@@ -269,7 +269,7 @@
"Preview Row": "Satırı önizle",
"Preview leaves the current design unchanged.": "Önizleme geçerli tasarımı değiştirmez.",
"Profiles/Curves": "Profiller/Eğriler",
- "Quantity": "Büyüklük",
+ "Quantity": "Adet",
"RECENT": "SON KULLANILANLAR",
"REFERENCE": "REFERANS",
"RULED SURFACE": "REGLE YÜZEY",
diff --git a/assets/locales/uk.json b/assets/locales/uk.json
index 53c56364d2..6436a4d561 100644
--- a/assets/locales/uk.json
+++ b/assets/locales/uk.json
@@ -349,7 +349,7 @@
"Profile / Edges": "Профіль / ребра",
"Profiles or curves": "Профілі або криві",
"Profiles/Curves": "Профілі/криві",
- "Quantity": "Величина",
+ "Quantity": "Кількість",
"RECENT": "НЕДАВНІ",
"REFERENCE": "ДОПОМІЖНА ГЕОМЕТРІЯ",
"RULED SURFACE": "ЛІНІЙЧАСТА ПОВЕРХНЯ",
diff --git a/assets/locales/zh.json b/assets/locales/zh.json
index 160a56251a..448bd01ed8 100644
--- a/assets/locales/zh.json
+++ b/assets/locales/zh.json
@@ -398,7 +398,7 @@
"Profile / Edges": "轮廓 / 边",
"Profiles or curves": "轮廓或曲线",
"Profiles/Curves": "轮廓/曲线",
- "Quantity": "物理量",
+ "Quantity": "数量",
"RECENT": "最近使用",
"REFERENCE": "参考",
"RULED SURFACE": "直纹曲面",
diff --git a/crates/ui-egui/src/dialogs_motion_plot.rs b/crates/ui-egui/src/dialogs_motion_plot.rs
index df978ca673..35f5a1411e 100644
--- a/crates/ui-egui/src/dialogs_motion_plot.rs
+++ b/crates/ui-egui/src/dialogs_motion_plot.rs
@@ -356,7 +356,7 @@ fn plot_rows(
let what = list.get(a.what).map_or(Plotted::Nothing, |(_, w)| *w);
let bands = a.collisions.as_ref().and_then(|(_, r)| r.as_ref().ok()).map(collision_bands).unwrap_or_default();
if what != Plotted::Nothing {
- choice_row(ui, "Quantity", "ms_quantity", &mut a.quantity, &QUANTITIES);
+ choice_row(ui, "motion.plot_quantity", "ms_quantity", &mut a.quantity, &QUANTITIES);
form_row(ui, "Duration", |ui| {
let r = crate::ui_kit::cell_editor(ui, ui.id().with("duration"), &mut a.duration, "motion.duration_hint", false);
crate::scenario::publish_handle("dialog:Duration", r.rect.center());
diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs
index 8c17da6d76..27bbd5a544 100644
--- a/crates/ui-egui/src/i18n.rs
+++ b/crates/ui-egui/src/i18n.rs
@@ -566,6 +566,21 @@ mod tests {
}
}
+ /// "Quantity" is the number of instances in the pattern dialogs and the plotted value in the
+ /// motion study (#6538): each meaning has its own entry, and the label is the count.
+ #[test]
+ fn pattern_quantity_is_the_count_and_the_motion_plot_keeps_its_own() {
+ for catalog in LOCALES {
+ let locale = Locale(catalog);
+ assert_eq!(locale.label("Quantity"), locale.text("ui.quantity"), "{}", catalog.id);
+ assert_eq!(locale.label("Quantity 2"), locale.text("ui.quantity_2"), "{}", catalog.id);
+ }
+ let de = Locale::for_language("de");
+ assert_eq!(de.label("Quantity"), "Anzahl");
+ assert_eq!(de.label("motion.plot_quantity"), "Größe");
+ assert_eq!(Locale::for_language("en").label("motion.plot_quantity"), "Quantity");
+ }
+
#[test]
fn every_ui_label_literal_reaches_an_english_catalog_entry() {
let english: Messages = serde_json::from_str(ENGLISH.source).unwrap();
diff --git a/docs/book/src/reference/glossary.md b/docs/book/src/reference/glossary.md
index f3c66893f4..340a4b2e7f 100644
--- a/docs/book/src/reference/glossary.md
+++ b/docs/book/src/reference/glossary.md
@@ -348,6 +348,8 @@ share a catalogue entry. Each meaning below gets its own term and, in time, its
| Normal | a sketch entity that isn't a construction entity | normal (line type) | the sketch palette's line type |
| | the direction perpendicular to a surface | normal (direction) | the ruled surface's Normal mode |
| | the middle display quality | normal (quality) | `ui.display_quality_normal` |
+| Quantity | the number of pattern instances | count | the pattern dialogs' Quantity rows, `ui.quantity` |
+| | what the motion plot shows: value, velocity or acceleration | plotted quantity | the motion study's Quantity row, `motion.plot_quantity` |
Some translations show the clash today: Japanese and Chinese show a hole's flat bottom with the
word for "unfold" or "plane", Chinese shows "Round" as "fillet", and Chinese and Russian show the