Open hasecilu opened 5 months ago
isn't it possible to rename the wiki pages?
I think that would be possible but it would break the "naming convention". I asked on the wiki forum: https://forum.freecad.org/viewtopic.php?t=85208
I checked the code and it seems we only need to rename the command on gui.addCommand()
to make it work, so no need to mess with the class names. But I'm still figuring out why using What's this?
adds an /
to the url making it to not open correctly, you need to manualy remove it going to Web WB and use Web_BrowserSetURL
. That doesn't happen with native FreeCAD commands.
Maybe the Wiki should redirect removing /
.
Edit: Looking at the log it opens es
docs, it's just that the url in the url bar doesn't correspond to opened url, removing the translation suffix on Help preferences fix it, so it's working fine.
Log: Help: opening https://wiki.freecad.org/FCGear_InvoluteGear/es
commands = [
"FCGear_InvoluteGear",
...
]
gui.addCommand("FCGear_InvoluteGear", CreateInvoluteGear())
gui.addCommand("FCGear_InternalInvoluteGear", CreateInternalInvoluteGear())
...
As you may know FreeCAD have a Help module where using the
What's this?
command you can click on a command on the toolbar and the wiki page for it will open.The way it works is: it opens
https://wiki.freecad.org/{$Command_name}
.In the wiki the convention to name pages is: WorkbenchName_CommandName, so in order to make this work, ideally your commands should be named the same. Example: https://wiki.freecad.org/PartDesign_Pad
For instance to create an InvoluteGear with FCGear WB you use
CreateInvoluteGear
command, when usingWhat's this?
command on it opens https://wiki.freecad.org/CreateInvoluteGear/ when the documentation of that command is in https://wiki.freecad.org/FCGear_InvoluteGear article.Help
module and somehow hardcode the redirections