issue with a translation of command on the GUI

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
david69
Veteran
Posts: 1781
Joined: Wed Jan 01, 2014 7:48 pm

issue with a translation of command on the GUI

Post by david69 »

I think there is a mismatch in the code for the following command "Pocket Shape" which forbids the translation. I am using Yorik's advices

if we run the command from the GUI, we read in the Python view:

Code: Select all

>>> Gui.runCommand('Path_Pocket_Shape',0)
and if I look for the code, I find:

Code: Select all

dvd@dvd:/usr/share/freecad-daily$ grep -r "Pocket Shape" *
Mod/Path/PathScripts/PathPocketShapeGui.py:__title__ = "Path Pocket Shape Operation UI"
Mod/Path/PathScripts/PathPocketShapeGui.py:__doc__ = "Pocket Shape operation page controller and command implementation."
Mod/Path/PathScripts/PathPocketShapeGui.py:Command = PathOpGui.SetupOperation('Pocket Shape',
Mod/Path/PathScripts/PathPocketShapeGui.py:        QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Pocket Shape"),
Mod/Path/PathScripts/PathPocketShape.py:__title__ = "Path Pocket Shape Operation"
Mod/Path/PathScripts/PathSelection.py:    opsel['Pocket Shape'] = pocketselect
dvd@dvd:/usr/share/freecad-daily$ 
in particular

Code: Select all

QtCore.QT_TRANSLATE_NOOP("Path_Pocket", "Pocket Shape"),
Am I well understanding? Can it explain why we don't see the translation even if in Crowdin there is one for a while.
I am not yet familiar with these actions.
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: issue with a translation of command on the GUI

Post by sliptonic »

There's lots of issues with use of translation in Path. We've got an organized effort underway to fix it.
https://github.com/sliptonic/FreeCAD/wi ... up-Project
That wiki page links to others that explain translation pretty well.

One PR has already been merged and two more (#5324 #5270) are pending. If you want to help with the cleanup, that page will get you started or ping me on gitter.
david69
Veteran
Posts: 1781
Joined: Wed Jan 01, 2014 7:48 pm

Re: issue with a translation of command on the GUI

Post by david69 »

thank you for the answer and your suggestion to participate to fix these issue on Path workbench.
I have translated almost all the wiki in French and also giving a hand on Crowdin (that's the way I have found "my" small issue). Code is far from my knowledge but if I can spend some time on that, I'll give a try.
david69
Veteran
Posts: 1781
Joined: Wed Jan 01, 2014 7:48 pm

Re: issue with a translation of command on the GUI

Post by david69 »

@Sliptonic, I have pm you through the forum. I don't have account on gitter and don't want.
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: issue with a translation of command on the GUI

Post by sliptonic »

david69 wrote: Sun Jan 16, 2022 10:16 am @Sliptonic, I have pm you through the forum. I don't have account on gitter and don't want.
I didn't get a pm. Please resend
Post Reply