Ticket #495 - Inconsistent translations for workbench names

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 7489
Joined: Thu Jan 05, 2017 9:03 pm

Ticket #495 - Inconsistent translations for workbench names

Postby Kunda1 » Wed Jun 14, 2017 12:41 pm

issue #495 - Inconsistent translations for workbench names
Discussion thread
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ticket #495 - Inconsistent translations for workbench names

Postby NormandC » Sat Jun 17, 2017 5:39 pm

Honestly it's been so long (freaking years), and I'm the only one who seems to care about this, I feel like just throwing the towel and closing this ticket. :roll:
User avatar
yorik
Site Admin
Posts: 11944
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Ticket #495 - Inconsistent translations for workbench names

Postby yorik » Mon Jun 19, 2017 2:48 pm

The thing is, it's not just a simple translation issue... It's like property names. The very name is the "handle" by which FreeCAD handles it. It would require some deep changes to separate all this into a base name and a translatable name.
triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Ticket #495 - Inconsistent translations for workbench names

Postby triplus » Mon Jun 19, 2017 3:59 pm

One option:

Code: Select all

FreeCADGui.activeWorkbench().MenuText
Could continue to return untranslated string. In InitGui.py file everything would stay the same. But when constructing QComboBox or QMenu with workbench names in it. Then the translate function could in addition be used.

P.S. For unique workbench identifier name class name is better suited anyway compared to MenuText name.
triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Ticket #495 - Inconsistent translations for workbench names

Postby triplus » Mon Jun 19, 2017 10:57 pm

I did some tests and got translations working in Selector QComboBox partially. But unfortunately the fun stops there as Workbench author could add context/string to be translated. But the way FreeCAD works is such resources are made available only after Workbench is loaded. Therefore FreeCAD starts and at that time translation for only 1 workbench name would be available. Only after another workbench would be loaded translation for it would be made available. Therefore to have Selector QComboBox fully translated all workbenches would need to be loaded first.