Ribbon tooltips: help for the Solid > Modify tools, and new toolbar commands must have it (#2758) (#7134)

* Ribbon tooltips: help for the Solid > Modify tools; new toolbar commands need it (#2758)

Writes the two-sentence help for the 16 Modify tools that had none (en, fr,
ja, zh), and adds a test that fails when a toolbar command has no help; the
190 older ones are on a backlog that only shrinks. AGENTS.md, CONTRIBUTING.md
and the Adding a command guide say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ribbon tooltips: the help test reads the ribbon as the toolbar lays it out (#2758)

Review: commands placed by a workspace section without .at(...) were not
checked; 79 of them join the backlog. Physical Material's help no longer
promises the centre of mass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ribbon tooltips: French help uses the glossary terms (#2758)

Matériau, Apparence and Scinder, as rlartot asked in review; Delete Face
says the hole stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ribbon tooltips: the help rule fits the commands skill's size limit (#2758)

AGENTS.md became a router to skills on main, so the rule lives in
skills/solidcraft-commands/SKILL.md, kept under its 3600-character limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Ribbon tooltips: Arabic, Hebrew and Vietnamese help; the backlog follows main (#2758)

Arabic, Hebrew and Vietnamese are complete catalogs now, so the 16 texts
come in those too. Twelve toolbar commands that landed before the rule
join the backlog; the Render commands, which left the ribbon, leave it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yhamil04
2026-10-27 22:30:15 +00:00
committed by GitHub
parent 03d0342469
commit c0a0da225a
5 changed files with 444 additions and 7 deletions
+4
View File
@@ -136,6 +136,7 @@ The [architecture page](docs/architecture.md) has the layer table. The short ver
[Adding a command](docs/book/src/dev/commands.md#adding-a-command); a test warns about a
command without them, and will fail it once required), engine tests that measure the result (volume, area,
face/edge/vertex counts against a value you can derive), and for UI work a scenario (below).
A command on the toolbar also ships with its help tooltip (step 6 of Adding a command).
6. **One set of camera controls.** Every page or canvas that shows a view (the modelling
viewport, the Render preview, and any new page such as a flat pattern or drawing) calls
`navigation::handle` (`crates/ui-egui/src/navigation.rs`) for its camera input, with
@@ -283,6 +284,9 @@ and a fresh CI run:
- **Commands without schemas** (`crates/engine/src/schema/unconverted.txt`): sorted, one id per
line, and it only shrinks. Converting a command removes its line; a new command is never added
to it.
- **Toolbar commands without help** (`BACKLOG` in `crates/ui-egui/src/command_help.rs`): sorted,
one id per line, and it only shrinks. Writing a command's help removes its line; a new command
is never added to it.
- **Languages** (`crates/ui-egui/src/i18n.rs`): one per line, English first, then by id (a test
checks it).
- **Generated files**: `THIRD-PARTY-LICENSES.txt` and `docs/features.md` are rewritten on `main`
@@ -0,0 +1,128 @@
{
"en": {
"help.appearance.assign": "Gives the selected bodies, faces or components a colour or a material look, without changing their weight. Use it to tell parts apart or to preview a finish.",
"help.face.delete": "Removes the selected faces and lets the neighbouring faces close the gap, or leaves the gap open as a surface. Use it to take off a rounded edge, a hole or a boss that is in the way.",
"help.material.assign": "Sets what the selected bodies are made of, such as steel, aluminium or ABS. Use it so that the mass and weight match the real part.",
"help.parameters.change": "Opens the table of named values and expressions that drive the dimensions of the design. Use it to change a size in one place and let every feature that uses it follow.",
"help.solid.align": "Moves the selected bodies so that a point, face or plane on them meets a point, face or plane elsewhere. Use it to place a part against another one without measuring the offset.",
"help.solid.draft": "Tilts the selected faces by the angle you set, measured from a neutral plane. Use it on moulded or cast parts so that they slide out of the mould.",
"help.solid.move": "Moves or rotates the selected bodies, or a copy of them, by the distance and angle you set. Use it to reposition a body or to make a second one in another place.",
"help.solid.offset_face": "Pushes the selected faces in or out by the distance you set, and the faces around them follow. Use it to make a wall thicker, a pocket deeper or a boss taller without editing the sketch.",
"help.solid.press_pull": "Adds or removes material as you drag a face, or rounds edges as you drag them. Use it for quick changes straight on the model.",
"help.solid.remove": "Takes the selected bodies out of the design from this point in the timeline on; earlier steps keep them. Use it to drop a helper body, such as a cutting tool you no longer need.",
"help.solid.replace_face": "Moves the selected flat faces onto a plane or onto a parallel face, and the body grows or shrinks to meet it. Use it to bring a face flush with another part or a construction plane.",
"help.solid.scale": "Makes the selected bodies larger or smaller by a factor, the same in every direction or one per axis. Use it to resize an imported shape or to allow for shrinkage.",
"help.solid.split_body": "Cuts a body into separate bodies with a plane, the face of another body or a sketch line. Use it to make parts that are printed, machined or coloured on their own.",
"help.solid.split_face": "Divides the selected faces along a plane, the face of another body or sketch curves, without cutting the body. Use it to give part of a face its own draft, colour or offset.",
"help.timeline.compute_all": "Rebuilds every feature in the timeline from the start. Use it to refresh the model and to see which features fail.",
"help.timeline.delete": "Deletes the selected features from the timeline; deleting a sketch also deletes the features built from it. Use it to remove a step that is no longer wanted."
},
"fr": {
"help.appearance.assign": "Donne aux corps, faces ou composants sélectionnés une couleur ou l'apparence d'un matériau, sans changer leur poids. À utiliser pour distinguer des pièces ou prévisualiser une finition.",
"help.face.delete": "Supprime les faces sélectionnées et laisse les faces voisines refermer le vide, ou laisse le trou ouvert. À utiliser pour retirer un arrondi, un trou ou un bossage qui gêne.",
"help.material.assign": "Applique le matériau choisi aux corps sélectionnés, par exemple acier, aluminium ou ABS. À utiliser pour que la masse et le poids correspondent à la pièce réelle.",
"help.parameters.change": "Ouvre le tableau des valeurs nommées et des expressions qui pilotent les cotes de la conception. À utiliser pour changer une dimension à un seul endroit et faire suivre toutes les fonctions qui l'utilisent.",
"help.solid.align": "Déplace les corps sélectionnés pour qu'un de leurs points, faces ou plans rejoigne un point, une face ou un plan ailleurs. À utiliser pour poser une pièce contre une autre sans mesurer le décalage.",
"help.solid.draft": "Incline les faces sélectionnées de l'angle indiqué, mesuré depuis un plan neutre. À utiliser sur les pièces moulées ou coulées pour qu'elles sortent du moule.",
"help.solid.move": "Déplace ou fait tourner les corps sélectionnés, ou une copie, selon la distance et l'angle indiqués. À utiliser pour repositionner un corps ou en créer un second ailleurs.",
"help.solid.offset_face": "Pousse les faces sélectionnées vers l'intérieur ou l'extérieur de la distance indiquée, et les faces voisines suivent. À utiliser pour épaissir une paroi, creuser une poche ou rehausser un bossage sans modifier l'esquisse.",
"help.solid.press_pull": "Ajoute ou retire de la matière quand on fait glisser une face, ou arrondit des arêtes quand on les fait glisser. À utiliser pour des modifications rapides directement sur le modèle.",
"help.solid.remove": "Retire les corps sélectionnés de la conception à partir de ce point de la chronologie ; les étapes précédentes les gardent. À utiliser pour écarter un corps d'aide, comme un outil de découpe devenu inutile.",
"help.solid.replace_face": "Amène les faces planes sélectionnées sur un plan ou une face parallèle, et le corps s'allonge ou se raccourcit pour la rejoindre. À utiliser pour mettre une face au ras d'une autre pièce ou d'un plan de construction.",
"help.solid.scale": "Agrandit ou réduit les corps sélectionnés d'un facteur, identique dans toutes les directions ou propre à chaque axe. À utiliser pour redimensionner une forme importée ou compenser un retrait.",
"help.solid.split_body": "Scinde un corps en corps séparés avec un plan, la face d'un autre corps ou une ligne d'esquisse. À utiliser pour obtenir des pièces imprimées, usinées ou colorées séparément.",
"help.solid.split_face": "Scinde les faces sélectionnées le long d'un plan, de la face d'un autre corps ou de courbes d'esquisse, sans scinder le corps. À utiliser pour donner à une partie de face sa propre dépouille, couleur ou décalage.",
"help.timeline.compute_all": "Recalcule toutes les fonctions de la chronologie depuis le début. À utiliser pour rafraîchir le modèle et voir quelles fonctions échouent.",
"help.timeline.delete": "Supprime les fonctions sélectionnées de la chronologie ; supprimer une esquisse supprime aussi les fonctions construites à partir d'elle. À utiliser pour retirer une étape devenue inutile."
},
"ja": {
"help.appearance.assign": "選択した立体、面、コンポーネントに、重さを変えずに色や材質の見た目を付けます。部品を見分けるときや仕上げを確認するときに使います。",
"help.face.delete": "選択した面を削除し、隣の面でその穴をふさぎます。穴を開いたまま面として残すこともできます。じゃまな丸み、穴、突起を取り除くときに使います。",
"help.material.assign": "選択した立体の材料を、鋼、アルミニウム、ABS などに設定します。質量と重さを実際の部品に合わせるときに使います。",
"help.parameters.change": "デザインの寸法を決める名前付きの値と式の表を開きます。1か所で寸法を変え、それを使うすべてのフィーチャに反映させるときに使います。",
"help.solid.align": "選択した立体を動かし、その点、面、平面を別の場所の点、面、平面に合わせます。距離を測らずに部品を別の部品に当てて配置するときに使います。",
"help.solid.draft": "選択した面を、中立面から測った指定の角度だけ傾けます。成形品や鋳物の部品を型から抜けるようにするときに使います。",
"help.solid.move": "選択した立体、またはそのコピーを、指定した距離と角度で移動・回転します。立体の位置を変えるときや、別の場所にもう1つ作るときに使います。",
"help.solid.offset_face": "選択した面を指定した距離だけ内側または外側へ動かし、周りの面もそれに合わせます。スケッチを編集せずに、壁を厚く、ポケットを深く、突起を高くするときに使います。",
"help.solid.press_pull": "面をドラッグして材料を足したり削ったりし、辺をドラッグして丸めます。モデル上で直接すばやく変更するときに使います。",
"help.solid.remove": "タイムラインのこの位置から先で、選択した立体をデザインから取り除きます。それより前のステップには残ります。不要になった切り取り用の立体など、補助の立体を外すときに使います。",
"help.solid.replace_face": "選択した平らな面を平面または平行な面の位置へ動かし、立体はそこまで伸び縮みします。面を別の部品や作業平面と面一にするときに使います。",
"help.solid.scale": "選択した立体を、全方向に同じ倍率、または軸ごとの倍率で拡大・縮小します。読み込んだ形状の大きさを変えるときや、収縮分を見込むときに使います。",
"help.solid.split_body": "平面、別の立体の面、またはスケッチの線で、立体を別々の立体に分割します。別々に印刷、加工、着色する部品を作るときに使います。",
"help.solid.split_face": "選択した面を、平面、別の立体の面、またはスケッチの曲線に沿って分割します。立体そのものは切りません。面の一部にだけ抜き勾配、色、オフセットを付けるときに使います。",
"help.timeline.compute_all": "タイムラインのすべてのフィーチャを最初から作り直します。モデルを更新し、どのフィーチャが失敗するかを確認するときに使います。",
"help.timeline.delete": "選択したフィーチャをタイムラインから削除します。スケッチを削除すると、そこから作ったフィーチャも削除されます。不要になったステップを取り除くときに使います。"
},
"zh": {
"help.appearance.assign": "为所选的实体、面或组件设置颜色或材质外观,不改变其重量。用于区分零件或预览表面效果。",
"help.face.delete": "删除所选的面,并由相邻的面封闭留下的缺口,也可以让缺口保持开放、成为曲面。用于去掉碍事的圆角、孔或凸台。",
"help.material.assign": "设置所选实体的材料,例如钢、铝或 ABS。用于让质量和重量与实际零件一致。",
"help.parameters.change": "打开驱动设计尺寸的命名数值和表达式表。用于在一处修改尺寸,让所有引用它的特征随之更新。",
"help.solid.align": "移动所选实体,使其上的点、面或平面与别处的点、面或平面对齐。用于把一个零件贴靠到另一个零件上,而无需测量距离。",
"help.solid.draft": "将所选的面按指定角度倾斜,角度从中性面量起。用于注塑件或铸件,使零件能够脱模。",
"help.solid.move": "按指定的距离和角度移动或旋转所选实体,或其副本。用于调整实体位置,或在别处再生成一个。",
"help.solid.offset_face": "将所选的面按指定距离向内或向外推移,周围的面随之调整。用于在不编辑草图的情况下加厚壁、加深凹槽或加高凸台。",
"help.solid.press_pull": "拖动面来增加或去除材料,或拖动边将其倒圆。用于直接在模型上快速修改。",
"help.solid.remove": "从时间线的这一位置起,将所选实体从设计中移除;之前的步骤仍保留它们。用于去掉辅助实体,例如不再需要的切割工具。",
"help.solid.replace_face": "将所选的平面移到一个平面或平行的面上,实体随之伸长或缩短。用于让一个面与另一个零件或构造平面齐平。",
"help.solid.scale": "按比例放大或缩小所选实体,可在各方向相同,也可按轴分别设置。用于调整导入形体的大小,或预留收缩量。",
"help.solid.split_body": "用平面、另一实体的面或草图直线,将实体切分为多个独立的实体。用于制作分别打印、加工或上色的零件。",
"help.solid.split_face": "沿平面、另一实体的面或草图曲线分割所选的面,而不切开实体。用于给面的一部分单独设置拔模、颜色或偏移。",
"help.timeline.compute_all": "从头重新计算时间线中的所有特征。用于刷新模型,并查看哪些特征失败。",
"help.timeline.delete": "从时间线中删除所选特征;删除草图时,由它生成的特征也会一起删除。用于去掉不再需要的步骤。"
},
"ar": {
"help.appearance.assign": "يمنح الأجسام أو الأوجه أو المكونات المحددة لونًا أو مظهر مادة، من دون تغيير وزنها. استخدمه للتمييز بين القطع أو لمعاينة التشطيب.",
"help.face.delete": "يحذف الأوجه المحددة ويترك الأوجه المجاورة تسد الفجوة، أو يترك الفتحة مفتوحة كسطح. استخدمه لإزالة حافة مقوّسة أو ثقب أو نتوء يعترض الطريق.",
"help.material.assign": "يحدد المادة التي صُنعت منها الأجسام المحددة، مثل الفولاذ أو الألومنيوم أو ABS. استخدمه لتطابق الكتلة والوزن القطعة الحقيقية.",
"help.parameters.change": "يفتح جدول القيم المسماة والتعبيرات التي تتحكم في أبعاد التصميم. استخدمه لتغيير مقاس في مكان واحد فتتبعه كل الميزات التي تستخدمه.",
"help.solid.align": "يحرّك الأجسام المحددة بحيث تلتقي نقطة أو وجه أو مستوى منها بنقطة أو وجه أو مستوى في مكان آخر. استخدمه لوضع قطعة ملاصقة لأخرى دون قياس المسافة.",
"help.solid.draft": "يميل الأوجه المحددة بالزاوية التي تحددها، مقيسةً من مستوى محايد. استخدمه في القطع المقولبة أو المصبوبة كي تخرج من القالب بسهولة.",
"help.solid.move": "يحرّك الأجسام المحددة أو يدوّرها، أو نسخة منها، بالمسافة والزاوية اللتين تحددهما. استخدمه لتغيير موضع جسم أو لإنشاء جسم ثانٍ في مكان آخر.",
"help.solid.offset_face": "يدفع الأوجه المحددة إلى الداخل أو الخارج بالمسافة التي تحددها، وتتبعها الأوجه المحيطة. استخدمه لزيادة سماكة جدار أو عمق جيب أو ارتفاع نتوء دون تعديل الرسم.",
"help.solid.press_pull": "يضيف المادة أو يزيلها حين تسحب وجهًا، أو يقوّس الحواف حين تسحبها. استخدمه لإجراء تعديلات سريعة على النموذج مباشرة.",
"help.solid.remove": "يُخرج الأجسام المحددة من التصميم بدءًا من هذه النقطة في السجل، وتحتفظ بها الخطوات السابقة. استخدمه للتخلص من جسم مساعد، مثل أداة قطع لم تعد تحتاجها.",
"help.solid.replace_face": "ينقل الأوجه المستوية المحددة إلى مستوى أو إلى وجه موازٍ، فيطول الجسم أو يقصر ليبلغه. استخدمه لجعل وجه مستويًا مع قطعة أخرى أو مع مستوى إنشائي.",
"help.solid.scale": "يكبّر الأجسام المحددة أو يصغّرها بمعامل، متساوٍ في كل الاتجاهات أو مختلف لكل محور. استخدمه لتغيير حجم شكل مستورد أو لحساب الانكماش.",
"help.solid.split_body": "يقسم جسمًا إلى أجسام منفصلة بمستوى أو بوجه جسم آخر أو بخط من رسم. استخدمه لصنع قطع تُطبع أو تُشغَّل أو تُلوَّن كلٌّ على حدة.",
"help.solid.split_face": "يقسم الأوجه المحددة على طول مستوى أو وجه جسم آخر أو منحنيات رسم، دون قطع الجسم. استخدمه لإعطاء جزء من وجه ميلًا أو لونًا أو إزاحة خاصة به.",
"help.timeline.compute_all": "يعيد بناء كل ميزة في السجل من البداية. استخدمه لتحديث النموذج ولمعرفة الميزات التي تفشل.",
"help.timeline.delete": "يحذف الميزات المحددة من السجل، وحذف رسمٍ يحذف معه الميزات المبنية عليه. استخدمه لإزالة خطوة لم تعد مطلوبة."
},
"he": {
"help.appearance.assign": "מתן צבע או מראה של חומר לגופים, לפאות או לרכיבים שנבחרו, בלי לשנות את משקלם. מתאים להבחנה בין חלקים או לתצוגה מקדימה של גימור.",
"help.face.delete": "מחיקת הפאות שנבחרו, כשהפאות השכנות סוגרות את הפער, או השארת הפתח פתוח כמשטח. מתאים להסרת עיגול, חור או בליטה שמפריעים.",
"help.material.assign": "קביעת החומר שממנו עשויים הגופים שנבחרו, למשל פלדה, אלומיניום או ABS. כך המסה והמשקל תואמים את החלק האמיתי.",
"help.parameters.change": "פתיחת הטבלה של ערכים בעלי שם וביטויים שקובעים את מידות התכנון. כך משנים מידה במקום אחד וכל הפיצ'רים שמשתמשים בה מתעדכנים.",
"help.solid.align": "הזזת הגופים שנבחרו כך שנקודה, פאה או מישור שלהם יפגשו נקודה, פאה או מישור במקום אחר. מתאים להצמדת חלק לחלק אחר בלי למדוד את המרחק.",
"help.solid.draft": "הטיית הפאות שנבחרו בזווית שנקבעה, הנמדדת ממישור ניטרלי. מתאים לחלקים יצוקים או מוזרקים, כדי שישתחררו מהתבנית.",
"help.solid.move": "הזזה או סיבוב של הגופים שנבחרו, או של עותק שלהם, במרחק ובזווית שנקבעו. מתאים לשינוי מיקום של גוף או ליצירת גוף נוסף במקום אחר.",
"help.solid.offset_face": "דחיפת הפאות שנבחרו פנימה או החוצה במרחק שנקבע, והפאות שסביבן מתאימות את עצמן. כך מעבים דופן, מעמיקים כיס או מגביהים בליטה בלי לערוך את הסקיצה.",
"help.solid.press_pull": "הוספה או הסרה של חומר בגרירת פאה, או עיגול מקצועות בגרירתם. מתאים לשינויים מהירים ישירות על המודל.",
"help.solid.remove": "הוצאת הגופים שנבחרו מהתכנון מנקודה זו בציר הזמן והלאה; השלבים הקודמים שומרים אותם. מתאים להסרת גוף עזר, כמו כלי חיתוך שכבר אין בו צורך.",
"help.solid.replace_face": "העברת הפאות השטוחות שנבחרו אל מישור או אל פאה מקבילה, והגוף מתארך או מתקצר כדי להגיע אליהם. מתאים ליישור פאה בקו אחד עם חלק אחר או עם מישור עזר.",
"help.solid.scale": "הגדלה או הקטנה של הגופים שנבחרו לפי מקדם, זהה בכל הכיוונים או שונה לכל ציר. מתאים לשינוי גודל של צורה מיובאת או להתחשבות בהתכווצות.",
"help.solid.split_body": "פיצול גוף לגופים נפרדים בעזרת מישור, פאה של גוף אחר או קו בסקיצה. מתאים ליצירת חלקים שמודפסים, מעובדים או נצבעים כל אחד בנפרד.",
"help.solid.split_face": "פיצול הפאות שנבחרו לאורך מישור, פאה של גוף אחר או עקומות של סקיצה, בלי לחתוך את הגוף. כך נותנים לחלק מפאה שיפוע, צבע או היסט משלו.",
"help.timeline.compute_all": "בנייה מחדש של כל הפיצ'רים בציר הזמן מההתחלה. מתאים לרענון המודל ולבדיקה אילו פיצ'רים נכשלים.",
"help.timeline.delete": "מחיקת הפיצ'רים שנבחרו מציר הזמן; מחיקת סקיצה מוחקת גם את הפיצ'רים שנבנו ממנה. מתאים להסרת שלב שכבר אין בו צורך."
},
"vi": {
"help.appearance.assign": "Gán màu hoặc vẻ ngoài vật liệu cho các khối, mặt hoặc thành phần đã chọn mà không thay đổi khối lượng. Dùng để phân biệt các chi tiết hoặc xem trước lớp hoàn thiện.",
"help.face.delete": "Xóa các mặt đã chọn và để các mặt lân cận khép kín chỗ trống, hoặc giữ lỗ hở dưới dạng bề mặt. Dùng để bỏ một cạnh bo tròn, một lỗ hoặc một phần lồi đang vướng.",
"help.material.assign": "Đặt vật liệu cho các khối đã chọn, chẳng hạn thép, nhôm hoặc ABS. Dùng để khối lượng và trọng lượng khớp với chi tiết thật.",
"help.parameters.change": "Mở bảng các giá trị có tên và biểu thức điều khiển kích thước của thiết kế. Dùng để sửa một kích thước ở một chỗ và mọi tính năng dùng nó sẽ cập nhật theo.",
"help.solid.align": "Di chuyển các khối đã chọn để một điểm, mặt hoặc mặt phẳng trên chúng gặp một điểm, mặt hoặc mặt phẳng ở nơi khác. Dùng để đặt chi tiết áp vào chi tiết khác mà không cần đo khoảng cách.",
"help.solid.draft": "Làm nghiêng các mặt đã chọn theo góc thiết lập, đo từ một mặt phẳng trung hòa. Dùng cho chi tiết đúc hoặc ép phun để chúng tháo ra khỏi khuôn được.",
"help.solid.move": "Di chuyển hoặc xoay các khối đã chọn, hoặc một bản sao của chúng, theo khoảng cách và góc thiết lập. Dùng để đổi vị trí một khối hoặc tạo thêm một khối ở chỗ khác.",
"help.solid.offset_face": "Đẩy các mặt đã chọn vào trong hoặc ra ngoài theo khoảng cách thiết lập, các mặt xung quanh tự điều chỉnh theo. Dùng để làm thành dày hơn, hốc sâu hơn hoặc phần lồi cao hơn mà không sửa bản phác thảo.",
"help.solid.press_pull": "Thêm hoặc bớt vật liệu khi kéo một mặt, hoặc bo tròn các cạnh khi kéo chúng. Dùng để sửa nhanh trực tiếp trên mô hình.",
"help.solid.remove": "Loại các khối đã chọn khỏi thiết kế từ điểm này trong lịch sử trở đi; các bước trước vẫn giữ chúng. Dùng để bỏ một khối phụ trợ, như một công cụ cắt không còn cần.",
"help.solid.replace_face": "Đưa các mặt phẳng đã chọn tới một mặt phẳng hoặc một mặt song song, khối sẽ dài ra hoặc ngắn lại để chạm tới đó. Dùng để làm một mặt phẳng hàng với chi tiết khác hoặc với mặt phẳng dựng hình.",
"help.solid.scale": "Phóng to hoặc thu nhỏ các khối đã chọn theo một hệ số, như nhau theo mọi hướng hoặc riêng cho từng trục. Dùng để đổi kích thước hình nhập vào hoặc bù độ co ngót.",
"help.solid.split_body": "Tách một khối thành các khối riêng bằng một mặt phẳng, mặt của khối khác hoặc một đường thẳng trong bản phác thảo. Dùng để tạo các chi tiết được in, gia công hoặc tô màu riêng.",
"help.solid.split_face": "Chia các mặt đã chọn theo một mặt phẳng, mặt của khối khác hoặc các đường cong phác thảo, mà không tách khối. Dùng để cho một phần của mặt có độ nghiêng, màu hoặc độ dịch riêng.",
"help.timeline.compute_all": "Dựng lại mọi tính năng trong lịch sử từ đầu. Dùng để làm mới mô hình và xem tính năng nào bị lỗi.",
"help.timeline.delete": "Xóa các tính năng đã chọn khỏi lịch sử; xóa một bản phác thảo cũng xóa các tính năng dựng từ nó. Dùng để bỏ một bước không còn cần."
}
}
+300 -4
View File
@@ -1,24 +1,41 @@
//! Written help for the ribbon tooltips (#2758): two short sentences per command, shown under the
//! tool name when the pointer rests on its button. The names stay as they are; the help is a
//! separate message `help.<command id>` in the catalogs, so a tool without help keeps its plain
//! tooltip. Text only for now; pictures and animations are a later step.
//! tooltip. Text only for now; pictures and animations are a later step. A new toolbar command
//! ships with its help: `every_toolbar_command_has_help_or_is_on_the_backlog` fails otherwise.
use crate::i18n;
/// The commands that have help text. Each one needs a `help.<id>` message in the catalogs.
pub const DOCUMENTED: &[&str] = &[
"appearance.assign",
"face.delete",
"material.assign",
"parameters.change",
"solid.align",
"solid.chamfer",
"solid.combine",
"solid.draft",
"solid.extrude",
"solid.fillet",
"solid.hole",
"solid.loft",
"solid.mirror",
"solid.move",
"solid.offset_face",
"solid.pattern.circular",
"solid.pattern.rectangular",
"solid.press_pull",
"solid.remove",
"solid.replace_face",
"solid.revolve",
"solid.scale",
"solid.shell",
"solid.split_body",
"solid.split_face",
"solid.sweep",
"timeline.compute_all",
"timeline.delete",
];
/// The help for `command` in the current language, when it has any.
@@ -71,6 +88,285 @@ mod tests {
.collect()
}
/// Toolbar commands written before every tool needed help (#2758). The list only shrinks: write
/// the help for one of these and take it off; a new toolbar command never goes on it.
const BACKLOG: &[&str] = &[
"assembly.bom",
"canvas.decal",
"canvas.edit",
"canvas.insert",
"component.break_link",
"component.capture_position",
"component.create",
"component.from_bodies",
"component.insert_design",
"component.properties",
"component.revert_position",
"component.update_links",
"config.configure",
"config.preview",
"config.rules",
"config.table",
"construct.axis.edge",
"construct.axis.normal_to_face",
"construct.axis.through_cylinder",
"construct.axis.two_planes",
"construct.axis.two_points",
"construct.plane.along_path",
"construct.plane.at_angle",
"construct.plane.midplane",
"construct.plane.offset",
"construct.plane.perpendicular",
"construct.plane.tangent",
"construct.plane.three_points",
"construct.plane.two_edges",
"construct.point.along_path",
"construct.point.center",
"construct.point.edge_plane",
"construct.point.three_planes",
"construct.point.two_edges",
"construct.point.vertex",
"contact.check",
"contact.create",
"contact.disable_all",
"contact.edit",
"contact.enable_all",
"contact.enable_sets",
"contact.list",
"document.inspect",
"document.units",
"edit.checkpoint",
"edit.restore_checkpoint",
"explode.create",
"file.insert_mesh",
"file.insert_step",
"file.save_mesh",
"file.send_to_slicer",
"frame.member",
"inspect.accessibility",
"inspect.center_of_mass",
"inspect.colored_components",
"inspect.compare",
"inspect.continuity",
"inspect.curvature_comb",
"inspect.curvature_map",
"inspect.draft",
"inspect.environment_map",
"inspect.interference",
"inspect.isocurve",
"inspect.measure",
"inspect.minimum_radius",
"inspect.section",
"inspect.zebra",
"joint.as_built",
"joint.cam",
"joint.create",
"joint.drive",
"joint.gear",
"joint.limits",
"joint.motion_link",
"joint.origin",
"joint.rack_pinion",
"joint.reach",
"joint.rigid_group",
"joint.screw",
"library.apply",
"library.export",
"library.inspect",
"material.properties.validate",
"mesh.convert",
"motion.study",
"motion.trace",
"occurrence.ground",
"parameters.export",
"parameters.graph",
"parameters.import",
"parameters.move",
"parts.fastener",
"parts.insert",
"parts.library",
"parts.resize",
"plastic.assign_rule",
"plastic.boss",
"plastic.lip",
"plastic.manage_rules",
"plastic.rest",
"plastic.snap_fit",
"sheet.convert",
"sheet.export_bend_table",
"sheet.export_dxf",
"sheet.flange",
"sheet.flat_pattern",
"sheet.fold",
"sheet.hem",
"sheet.manage_rules",
"sheet.path_flange",
"sheet.perforate",
"sheet.refold",
"sheet.unfold",
"sketch.arc.center_point",
"sketch.arc.tangent",
"sketch.arc.three_point",
"sketch.arc3d",
"sketch.auto_constrain",
"sketch.auto_constrain_from_datum",
"sketch.blend_curve",
"sketch.break",
"sketch.cancel",
"sketch.centerline",
"sketch.chamfer.distance_angle",
"sketch.chamfer.equal_distance",
"sketch.chamfer.two_distance",
"sketch.circle.center",
"sketch.circle.three_point",
"sketch.circle.three_tangent",
"sketch.circle.two_point",
"sketch.circle.two_tangent",
"sketch.conic",
"sketch.constrainer",
"sketch.constraint.coincident",
"sketch.constraint.collinear",
"sketch.constraint.concentric",
"sketch.constraint.curvature",
"sketch.constraint.equal",
"sketch.constraint.fix",
"sketch.constraint.horizontal_vertical",
"sketch.constraint.midpoint",
"sketch.constraint.parallel",
"sketch.constraint.perpendicular",
"sketch.constraint.polygon",
"sketch.constraint.symmetry",
"sketch.constraint.tangent",
"sketch.construction",
"sketch.copy",
"sketch.create",
"sketch.cut",
"sketch.dimension",
"sketch.edit",
"sketch.ellipse",
"sketch.extend",
"sketch.fillet",
"sketch.finish",
"sketch.finish_auto_constrain",
"sketch.fit_curves_to_section",
"sketch.include_3d",
"sketch.infinite",
"sketch.insert_dxf",
"sketch.insert_svg",
"sketch.intersect",
"sketch.intersection_curve",
"sketch.isoparametric_curve",
"sketch.line",
"sketch.line.midpoint",
"sketch.line3d",
"sketch.mirror",
"sketch.move",
"sketch.move3d",
"sketch.offset",
"sketch.paste",
"sketch.pattern.circular",
"sketch.pattern.rectangular",
"sketch.point",
"sketch.point3d",
"sketch.polygon.circumscribed",
"sketch.polygon.edge",
"sketch.polygon.inscribed",
"sketch.project",
"sketch.project_to_surface",
"sketch.rectangle.center",
"sketch.rectangle.rounded",
"sketch.rectangle.three_point",
"sketch.rectangle.two_point",
"sketch.scale",
"sketch.slot.arc_center",
"sketch.slot.arc_three_point",
"sketch.slot.center_point",
"sketch.slot.center_to_center",
"sketch.slot.overall",
"sketch.spline.control_point",
"sketch.spline.control_point_5",
"sketch.spline.fit_point",
"sketch.spline3d",
"sketch.spun_profile",
"sketch.text",
"sketch.transform",
"sketch.trim",
"solid.boundary_fill",
"solid.bounding_solid",
"solid.box",
"solid.coil",
"solid.cone",
"solid.cylinder",
"solid.emboss",
"solid.pattern.path",
"solid.pipe",
"solid.rib",
"solid.sphere",
"solid.thread",
"solid.torus",
"solid.web",
"surface.blend",
"surface.boundary",
"surface.extend",
"surface.extrude",
"surface.fair",
"surface.loft",
"surface.match",
"surface.offset",
"surface.patch",
"surface.reverse_normal",
"surface.revolve",
"surface.ruled",
"surface.stitch",
"surface.sweep",
"surface.thicken",
"surface.trim",
"surface.unstitch",
"surface.untrim",
"timeline.dependents",
"view.apply",
"view.delete",
"view.fit",
"view.grid",
"view.ground_shadow",
"view.home",
"view.list",
"view.navigate",
"view.navigation_bar",
"view.rename",
"view.save",
"view.spin",
"view.tool",
"view.visual_style",
];
/// Every command the ribbon offers people, gathered the way the toolbar lays out its panels. A
/// planned command only says "not supported yet"; it gets its help when it is built.
fn toolbar_commands() -> BTreeSet<&'static str> {
let specs = solidcraft_engine::command_specs();
let mut ids = BTreeSet::new();
for section in crate::workspace::SECTIONS {
if let Some((commands, _)) = crate::workspace::layout(section.tab, section.panel, &specs) {
ids.extend(commands.iter().filter(|c| c.planned.is_none() && !crate::workspace::AGENT_ONLY.contains(&c.id)).map(|c| c.id));
}
}
ids
}
#[test]
fn every_toolbar_command_has_help_or_is_on_the_backlog() {
let toolbar = toolbar_commands();
let missing: Vec<_> = toolbar.iter().filter(|id| !DOCUMENTED.contains(id) && !BACKLOG.contains(id)).collect();
let stale: Vec<_> = BACKLOG.iter().filter(|id| !toolbar.contains(*id) || DOCUMENTED.contains(id)).collect();
assert!(
missing.is_empty() && stale.is_empty(),
"toolbar commands without help: {missing:?}. Add `help.<id>` (two short sentences: what the tool does, \
then when to use it) to a file in assets/locales/pending/ and the id to DOCUMENTED. Take these off the backlog \
(documented now, or not on the toolbar): {stale:?}"
);
assert!(BACKLOG.is_sorted());
}
#[test]
fn every_documented_id_is_a_real_command() {
for id in DOCUMENTED {
@@ -109,7 +405,7 @@ mod tests {
for id in DOCUMENTED {
assert!(help(id).is_some_and(|text| !text.is_empty()), "{id}");
}
assert!(help("solid.draft").is_none());
assert!(help("solid.rib").is_none());
}
#[test]
@@ -117,7 +413,7 @@ mod tests {
assert_eq!(row_tip("solid.shell", "Shell", Some("S"), None).as_deref(), Some("Shell (S)"));
assert_eq!(row_tip("solid.hole", "Hole", None, None).as_deref(), Some("Hole"));
assert_eq!(row_tip("solid.hole", "Hole", None, Some("Select a face")).as_deref(), Some("Select a face"));
assert_eq!(row_tip("solid.draft", "Draft", None, None), None);
assert_eq!(row_tip("solid.draft", "Draft", None, Some("No body")).as_deref(), Some("No body"));
assert_eq!(row_tip("solid.rib", "Rib", None, None), None);
assert_eq!(row_tip("solid.rib", "Rib", None, Some("No body")).as_deref(), Some("No body"));
}
}
+8
View File
@@ -49,3 +49,11 @@ ending in the same word (`file.open`: did you mean `doc.open`?).
your command automatically with every documented parameter set to junk. It must return
errors, never panic.
5. For UI work, add a scenario (see [Test harnesses](testing.md)).
6. A command the ribbon shows (through `.at(…)` or a section in `crates/ui-egui/src/workspace.rs`)
ships with its help tooltip: two short sentences, what the tool does and then when to use it,
in your own words. Add the message `help.<id>` to a new file in `assets/locales/pending/`
(English, every catalog in `COMPLETE` in `crates/ui-egui/src/i18n.rs`, which a test requires,
and any other language you can write) and the id to `DOCUMENTED` in
`crates/ui-egui/src/command_help.rs`. The test
`every_toolbar_command_has_help_or_is_on_the_backlog` fails for a ribbon command without help;
the older ones on its `BACKLOG` only shrink (#2758).
+4 -3
View File
@@ -14,9 +14,10 @@ User-visible behaviour is a command. The toolbar, dialogs, sketch tools, palette
4. Give it input and output schemas: a contract and a reply type in `crates/engine/src/schema/`, registered with `checked!`, `.contract` and `.output`. A command should have them and a test warns without them; this will become required. `schema/unconverted.txt` only shrinks. How: `docs/book/src/dev/schemas.md`.
5. Engine tests measure the result: volume, area, face/edge/vertex counts against values you can derive by hand. Where they go: `skills/solidcraft-tests/SKILL.md`.
6. Add the label as `cmd.<command id>` in a pending locale file (`cargo xtask i18n --add-missing` lists what is missing); a test fails without it. See `skills/solidcraft-ui-text/SKILL.md`.
7. Run `cargo xtask features` to see the generated `docs/features.md` change, but do not commit it: `main` regenerates it after each merge.
8. If the command saves something new in a design, add a format file: `skills/solidcraft-file-formats/SKILL.md`.
9. If it needs a dialog or panel: `skills/solidcraft-ui/SKILL.md`.
7. A command the ribbon shows also needs help: `help.<command id>` (what it does, then when to use it) in the pending file, and its id in `DOCUMENTED` in `crates/ui-egui/src/command_help.rs`. A test fails without them; its `BACKLOG` only shrinks.
8. Run `cargo xtask features` to see the generated `docs/features.md` change, but do not commit it: `main` regenerates it after each merge.
9. If the command saves something new in a design, add a format file: `skills/solidcraft-file-formats/SKILL.md`.
10. If it needs a dialog or panel: `skills/solidcraft-ui/SKILL.md`.
## Programmatic calls never open dialogs
`engine.execute` runs the JSON form. Only toolbar clicks (`ui.start`) start interactive tools and dialogs, which then run commands. A dialog is a front-end form that builds the parameters.