Check UI translations

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Check UI translations

Post by renatorivo »

Since perhaps other users would like to try their translations, I describe here the procedure I use. It can be improved.

Tested in Linux with FreeCADv0.16

Download and unzip the source code. Rename it "freecad"

From https://crowdin.com/download/project/freecad/it (or .... /freecad/langcode)
(Note not https://crowdin.com/download/project/freecad.zip) Download the latest version of the translations clicking "..." This download .ts file and not the zip file

Place all .ts files in a subfolder of a folder, named both "langcode" ex: it/it


From Source Code
Open src/Tools in terminal
Type: ./updatefromcrowdin.py -d /home/username/Desktop/it
(Where /home/username/Desktop/it is the location of the folder containing the subfolder "it" with translation, and "it" is the language code)
Returns errors, ignore them

This last operation copy all xxx.ts files in the source code in the right location and renames them xxx_lang.ts This avoid a long copy job.

In the source code:

Open the folder with the file .ts, example: src\Mod\Arch\Resources\translations and check that the files have been updated

Open translation files eg. Arch_xx.ts with Qt Linguist, and click on File-> Release
This updates the file xxx_xx.qm
Repeat for all files that you want to update

Compile FreeCAD
Open freecad/bin/FreeCAD and Check

Thanks to those who offer improvements (in particular on the use of updatefromcrowdin.py)
Renato
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Check UI translations

Post by bernd »

Thanks Renato. Problems here ... I made changes to Arch on crowdin yesterday. If I download https://crowdin.com/download/project/freecad/de.zip and unzip files are from 12th of January means 3 days old :(

What has been working for me:

German Translation on crowdin --> https://crowdin.com/project/freecad/de
--> click on Arch.ts --> left upper menue --> File --> Download --> the uptodate file is saved into ~/Desktop for me

terminal:
# copy and rename the file
cd ~/Documents/dev/freecad/freecadbhb_master/src/Mod/Arch/Resources/translations/
cp ~/Desktop/Arch.ts Arch_de.ts
ls -l Arch_de.ts

# create qm file
lrelease Arch_de.ts

# build FreeCAD
cd ~/Documents/dev/freecad/freecadbhb_master/build
cmake ../
make
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Check UI translations

Post by renatorivo »

bernd wrote: Problems here ... I made changes to Arch on crowdin yesterday. If I download https://crowdin.com/download/project/freecad/de.zip and unzip files are from 12th of January means 3 days old :(

What has been working for me:

German Translation on crowdin --> https://crowdin.com/project/freecad/de
--> click on Arch.ts --> left upper menue --> File --> Download --> the uptodate file is saved into ~/Desktop for me
Yes, exactly what I wanted to say, but I have not explained well
Post Reply