Add code name in GuiCommand

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Add code name in GuiCommand

Post by renatorivo »

In translations, the name that the command has in the code is often lost.
What do you think of adding it in GuiCommand? As in this example, or something similar
Nome codice.PNG
Nome codice.PNG (25.02 KiB) Viewed 1275 times
david69
Veteran
Posts: 1781
Joined: Wed Jan 01, 2014 7:48 pm

Re: Add code name in GuiCommand

Post by david69 »

not sure to understand what you mean.
I force myself to respect this part and all my translations on this part follows the rules.
Capture du 2020-04-19 12-49-45.png
Capture du 2020-04-19 12-49-45.png (16.27 KiB) Viewed 774 times
now, if i interpret your demand, i have the feeling you want to add some code here:
{{GuiCommand
|Name=Draft Wire
|MenuLocation=Draft → Polyline
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]
|Shortcut=P L
|SeeAlso=[[Draft Line|Draft Line]], [[Draft BSpline|Draft BSpline]]
|Version=0.7
}}

how do you want to modify it?
and i guess as a consequence, all the references of the workbench already present in this part should be removed.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Add code name in GuiCommand

Post by renatorivo »

My intention is to make the command name appear also in the translated pages, in the GuiCommand box, not in the context.

In the example, the command is Draft_Wire, but Draft Fil (or Polilinea in Italian) is not the name of the command.

The result would be this
Nome codice1.PNG
Nome codice1.PNG (21.83 KiB) Viewed 767 times
1 - What appears in the translated interface, what the user sees.
2 - The real name of the command, the command shown in the Python console, and also the object searched for by What's This.
3 - The path that the user must follow.

This only in the translations, on the English page the name is already shown.

If it matters, it's very simple, just edit GuiCommand/yx and the change is automatically applied to all pages that use GuiCommand/xy.
david69
Veteran
Posts: 1781
Joined: Wed Jan 01, 2014 7:48 pm

Re: Add code name in GuiCommand

Post by david69 »

yes why not. I see now.
in the text of the wiki page itself, the English text is refering to the command. Very often, the name of the command = the name of the tool which is not the case when we translate.
with your idea, the reader will also have in his mind the name of the command.
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Add code name in GuiCommand

Post by onekk »

This wil be useful as in some Translation some properties names are translated so when doing scripting or Macro is diffult to find out the proper name.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Add code name in GuiCommand

Post by Kunda1 »

:+1:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply