Translations for the FC interface

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

This is a very interesting option. :D
I will wait to hear from you on this topic.

I think a lot of translators would be happy if this had success. :idea:
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Translations for the FC interface

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

This would be an interesting solution if implemented.
It would be useful not only for translators.
8-)
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
kwahoo
Posts: 679
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Translations for the FC interface

Post by kwahoo »

Kunda1 wrote: Fri May 21, 2021 1:10 pm I need to confirm this but it may have been moving the .ts file (which you can download from crowdin yourself) and moving it in to .~/FreeCAD/translations/ (on Linux) and then restarting FreeCAD. But I'm not sure is that is 100% correct
This does work, but you have to add language suffix (individually downloaded files from Crowdin do not have one) and convert a .ts file to .qm one, eg.:

Code: Select all

lrelease Part_pl.ts -qm Part_pl.qm
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

I have installed the qttools5-dev-tools package
  1. downloaded one file from https://crowdin.com/project/freecad/pl#
  2. Code: Select all

    cp FreeCAD.ts FreeCAD_pl.ts
  3. Code: Select all

    lrelease FreeCAD_pl.ts -qm FreeCAD_pl.qm
  4. Code: Select all

    cp FreeCAD_pl.qm ~/.FreeCAD/translations/
    if missing to create
  5. I started FreeCAD
works :!:

:mrgreen:

Thanks a lot gentlemen, this is very helpful :D
Last edited by kaktus on Sat May 22, 2021 5:05 pm, edited 2 times in total.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

Automatic version for many files, for lazy people :P that means for me. :mrgreen:
  1. download all files from https://crowdin.com/project/freecad/pl#
  2. inserts language prefix, here _pl

    Code: Select all

    ls -1 *.ts| sed 's/\.ts//' |xargs -i mv {}.ts {}_pl.ts
  3. performs the conversion and changes the extension

    Code: Select all

    ls -1 *_pl.ts| sed 's/\.ts//' |xargs -i lrelease {}.ts -qm {}.qm
  4. moves prepared language files to a better place

    Code: Select all

    ls -1 *_pl.qm| xargs -i mv {} ~/.FreeCAD/translations/
good luck spoiling ...
:lol:
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Translations for the FC interface

Post by Kunda1 »

so my idea is to run this as a bash script on a server and then offer the language files via the addon manager. Anyone interested in helping me do this?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

Kunda1 wrote: Sat May 29, 2021 7:53 pm so my idea is to run this as a bash script on a server and then offer the language files via the addon manager. Anyone interested in helping me do this?
In the meantime, I prepared a local one-line command that will also clean up, preparing empty space (in the folder) for future imports.

Code: Select all

ls -1 *.ts| sed 's/\.ts//' |xargs -i mv {}.ts {}_pl.ts && ls -1 *_pl.ts| sed 's/\.ts//' |xargs -i lrelease {}.ts -qm {}.qm && ls -1 *_pl.qm| xargs -i mv {} ~/.FreeCAD/translations/ && rm *pl.ts
From this you can easily make a bash script, with the parameter given as a prefix of any language. :idea:

In principle, I could get involved in knowing what you want to do, but I don't know how I could still be helpful to you. :roll:
Last edited by kaktus on Sun May 30, 2021 7:21 pm, edited 1 time in total.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Translations for the FC interface

Post by Kunda1 »

Thanks for the 1-liner. Very handy!
kaktus wrote: Sun May 30, 2021 7:31 am In principle, I could get involved in knowing what you want to do, but I don't know how I could still be helpful to you. :roll:
See https://github.com/FreeCAD/FreeCAD-addo ... -510040217
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kaktus
Veteran
Posts: 1149
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Translations for the FC interface

Post by kaktus »

Kunda1 wrote: Sun May 30, 2021 12:50 pm Thanks for the 1-liner. Very handy!
...
my motivation is laziness, it is a very great and unlimited power ...
:D :lol: :P
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
Post Reply