Translating external workbenches

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Translating external workbenches

Post by yorik »

I just adapted the BIM workbench to be fully translatable, and documented the procedure on https://www.freecadweb.org/wiki/Transla ... _workbench

Now we can spread the word among addon developers! :mrgreen:

I suggest we let the addons developers who wish so to upload their .ts file on the FreeCAD crowdin account, so they can benefit from the massive community of translators there...
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: Translating external workbenches

Post by galou_breizh »

Hi Yorik,

thanks for this wiki page! I'll study it and try to adapt it to macros.

Something surprised me though: "Text that is only shown in the Python console should not be translated". If such text should really not be translated, all mentions of "FreeCAD.Console" should also be remove from this wiki page.

Gaël
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: Translating external workbenches

Post by galou_breizh »

Ok, I tried again to adapt this to macros but unsuccessfully despite the fact that I think I have everything what is needed (actually even more because I also compiled a resource file).

My current effort is attached
DxfToSketchLayers.zip
(6.01 KiB) Downloaded 175 times
. To test it, unpack it in FreeCAD's macro folder and launch FreeCAD with `LANG=fr_FR.UTF-8 freecad` or `LANG=fr_FR.UTF-8 freecad-daily`. The associated unfinished documentation is at https://github.com/FreeCAD/FreeCAD-macr ... -in-macros.

Thanks for any help!
Gaël
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Translating external workbenches

Post by yorik »

galou_breizh wrote: Sun Jun 02, 2019 9:52 am Something surprised me though: "Text that is only shown in the Python console should not be translated". If such text should really not be translated, all mentions of "FreeCAD.Console" should also be remove from this wiki page.
FreeCAD.Console doesn't print to the Python console, but to the Report window. That's exactly why this is there, translated text goes to the report window, which is where the user would expect to see text made for them to see, while the python console is a technical area, where everything always happens in english and the exact wording can have an impact.

About your file, I'll have a look at it...
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: Translating external workbenches

Post by galou_breizh »

yorik wrote: About your file, I'll have a look at it...
Yorik, I guess you've been very busy but did you manage to have a look a i18n issues with macros?

Thanks at lot!
Gaël
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Translating external workbenches

Post by rockn »

Hello, i'm trying to translate mooc workbench but i'm unable to get it showing translated sentences.

@yorik
I notice that BIM workbench does not display the translated sentences either.
I've just check the BIM Setup sentences, first lines of https://github.com/yorikvanhavre/BIM_Wo ... /BIM_fr.ts and it remains in english.
Formations - Assistance - Développement : https://freecad-france.com
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Translating external workbenches

Post by yorik »

Sorry for the radio silence! Hectically busy here these days :)

Hm you guys are right... Indeed it still doesn't work for the BIM WB either. There must be something wrong somewhere... I'll do the procedure again and try to fix
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Translating external workbenches

Post by triplus »

Didn't test it yet but highly likely translations can be provided as external binary resources:

https://forum.freecadweb.org/viewtopic. ... 50#p307202

P.S. Just like when it comes to icon themes.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Translating external workbenches

Post by vocx »

triplus wrote: Mon Aug 12, 2019 10:46 am Didn't test it yet but highly likely translations can be provided as external binary resources:

https://forum.freecadweb.org/viewtopic. ... 50#p307202

P.S. Just like when it comes to icon themes.
This is already done. See the Translating an external workbench page again.

The .ts text files that define the strings to translate are compiled into .qm resource files, which are supposed to be loaded by Qt. Or are you suggesting to somehow include all those .ts or .qm inside a single .rcc?
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Translating external workbenches

Post by triplus »

vocx wrote: Sat Sep 28, 2019 6:05 pm Or are you suggesting to somehow include all those .ts or .qm inside a single .rcc?
Yes, that likely would work too.
Post Reply