Bunch of TechDraw pages don't have the correct name

Discussions about the wiki documentation of FreeCAD and its translation.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Bunch of TechDraw pages don't have the correct name

Postby NormandC » Mon Mar 05, 2018 5:33 am

The FreeCAD user Manual is supplied with FreeCAD. It is made with Qt Assistant and extracted from the wiki. On Windows and presumably Mac, it's added with the installer. On Ubuntu and presumably other distros, it's installed separately with the freecad-doc package.

When using the "What's this?" tool on a tool, it should open the help file with the proper page.

It's not working with a bunch of TechDraw command pages, because they were not created with the same name as the sWhatsThis field found for these commands in Command.cpp, CommandCreateDims.cpp and CommandDecorate.cpp.

Here's a demonstration:
FC_TechDraw_toolname_01.gif
FC_TechDraw_toolname_01.gif (527.51 KiB) Viewed 1589 times

This is shortly covered in Gui_Command (maybe not in enough detail). Most pages follow this rule: the sWhatsThis field is the same as the internal command name; the command page on the wiki shares the same name.

To follow these guidelines, a bunch of wiki pages would have to be renamed. Unfortunately, what complicates the matter is that all those pages have already been completely translated in French and Italian.

A quick hack would be to change the sWhatsThis fields to match the currently named wiki pages.

Here's the list of pages that would have to be renamed:

Left=current / Right=new name
TechDraw_New_Default ---> TechDraw_NewPageDef
TechDraw_New_Pick ---> TechDraw_NewPage
TechDraw_NewProjGroup ---> TechDraw_ProjGroup
TechDraw_NewSection ---> TechDraw_NewViewSection
TechDraw_NewAnnotation ---> TechDraw_Annotation
TechDraw_NewDraft ---> TechDraw_DraftView
TechDraw_NewArch ---> TechDraw_ArchView
TechDraw_Dimension_Length ---> TechDraw_NewLengthDimension
TechDraw_NewDetail ---> TechDraw_NewViewDetail
TechDraw_Dimension_Horizontal ---> TechDraw_NewDistanceXDimension
TechDraw_Dimension_Vertical ---> TechDraw_NewDistanceYDimension
TechDraw_Dimension_Radius ---> TechDraw_NewRadiusDimension
TechDraw_Dimension_Diameter ---> TechDraw_NewDiameterDimension
TechDraw_Dimension_Angle ---> TechDraw_NewAngleDimension
TechDraw_Dimension_Link ---> TechDraw_LinkDimension
TechDraw_SaveSVG ---> TechDraw_ExportPage
TechDraw_Hatch ---> TechDraw_NewHatch
TechDraw_GeomHatch ---> TechDraw_NewGeomHatch
TechDraw_Toggle ---> TechDraw_ToggleFrame
TechDraw_Redraw ---> TechDraw_RedrawPage

That's a hell of a job to rename all of this and to redo all the translations. :?

What do you guys think we should do?
renatorivo wrote:ping
wandererfan wrote:ping
Thanks.
User avatar
Kunda1
Posts: 9222
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby Kunda1 » Mon Mar 05, 2018 11:33 am

NormandC wrote:
Mon Mar 05, 2018 5:33 am
A quick hack would be to change the sWhatsThis fields to match the currently named wiki pages.
I'd be happy to do this if I get the green light.
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 30822
Joined: Tue Mar 17, 2015 9:14 am

Re: Bunch of TechDraw pages don't have the correct name

Postby chrisb » Mon Mar 05, 2018 1:07 pm

From my point of view wandererfan should say which is the cleanest solution - and we should go for it. I am willing to help if someone tells me what to do.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby wandererfan » Mon Mar 05, 2018 1:48 pm

NormandC wrote:
Mon Mar 05, 2018 5:33 am
To follow these guidelines, a bunch of wiki pages would have to be renamed. Unfortunately, what complicates the matter is that all those pages have already been completely translated in French and Italian.

A quick hack would be to change the sWhatsThis fields to match the currently named wiki pages.
Changing "sWhatsThis" looks like the way to go. Thanks for catching this.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby wandererfan » Mon Mar 05, 2018 3:40 pm

NormandC wrote:
Mon Mar 05, 2018 5:33 am
A quick hack would be to change the sWhatsThis fields to match the currently named wiki pages.
I've changed all the "what's this" fields, but I seem to have an old help file. Do I have to download a new one or change a build switch?
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bunch of TechDraw pages don't have the correct name

Postby NormandC » Mon Mar 05, 2018 6:03 pm

The Qt Assistant file needs to be rebuilt. There are scripts that have to be run to extract (and format?) content from the wiki. Yorik usually does it a short time before a release.

It's possible that the help file hasn't been rebuilt for a long time, prior to the creation of the relevant wiki pages.
User avatar
yorik
Site Admin
Posts: 12148
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Bunch of TechDraw pages don't have the correct name

Postby yorik » Mon Mar 05, 2018 6:56 pm

Indeed, the current help file is old. I'll build a new one these next days
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby ulrich1a » Mon Mar 05, 2018 9:47 pm

NormandC wrote:
Mon Mar 05, 2018 6:03 pm
The Qt Assistant file needs to be rebuilt. There are scripts that have to be run to extract (and format?) content from the wiki. Yorik usually does it a short time before a release.

It's possible that the help file hasn't been rebuilt for a long time, prior to the creation of the relevant wiki pages.
I have been working on the scripts to generate the Qt Assistant file. My version has the ability to generate also help files from wiki pages in other languages like French, Italian or German.

I found that there are much more cases, where the sWhatsThis name in the source code points to not existing wiki pages. Other examples are the constraints in the sketcher and the measurement tools in the Part-workbench.

So we need to find all those wrong sWhatsThis-entries and fix them.

I am just scanning the wiki in order to generate an new help-file.

Ulrich
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby ulrich1a » Mon Mar 05, 2018 10:47 pm

An actual helpfile can be found here: https://www.magentacloud.de/share/7l35vpqsig

Ulrich
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Bunch of TechDraw pages don't have the correct name

Postby wandererfan » Mon Mar 05, 2018 11:28 pm

ulrich1a wrote:
Mon Mar 05, 2018 10:47 pm
An actual helpfile can be found here: https://www.magentacloud.de/share/7l35vpqsig
Is this an old one? It talks about Sourceforge accounts and doesn't have Path or TechDraw.