Page 1 of 2

Slovenian translation

Posted: Sat Nov 09, 2013 10:13 pm
by miharix
Hi,

I would like to teach children in our school how to use QCAD,
but before that I would like to translate QCAD to their mother language.

Now when I look in https://github.com/qcad/qcad/tree/master/ts I already see some files ending with "_sl.qm" that are 6 months old
but those files I can't find under my C:\Program Files (x86)\QCAD\ts
and also when I run QCAD and go to edit->Application Preferences->Language Settings->Language I can't see option Slovenian
I tried to copy the files from github to local ts folder and then I can select Slovenian, but I can't see any change in interface after QCAD restart.

I assume that translation just isn't complete yet.

So who is working on it?
& Can I help ?

Re: Slovenian translation

Posted: Mon Nov 11, 2013 9:26 am
by Husky
Hi miharix - welcome in the forum,
miharix wrote:I would like to teach children in our school how to use QCAD,
but before that I would like to translate QCAD to their mother language.
Nice idea! :D

miharix wrote:I tried to copy the files from github to local ts folder and then I can select Slovenian, but I can't see any change in interface after QCAD restart.
Me too - I just see a couple buttons which have changed - that's all!
Husky-2013.11.11-01.png
Husky-2013.11.11-01.png (26.26 KiB) Viewed 41308 times
@Andrew
Any news or suggestion on that?

Re: Slovenian translation

Posted: Mon Nov 11, 2013 4:30 pm
by andrew
miharix: Many thanks for your offer to help!

The complete QCAD user interface has been translated to English, German, French, Italian, Spanish, Portuguese and Japanese.

I have checked in translation sources for Slovenian today as a start for a Slovenian translation.

Please note that due to the modular design of QCAD, translation sources are located in the 'ts' directory of each individual tool.
For example for the tool to draw lines from two points, translation sources are located in 'scripts/Draw/Line/Line2P/ts':
https://github.com/qcad/qcad/tree/maste ... /Line2P/ts

Those .ts files can be translated with Qt Linguist if you download the .ts files or clone the complete QCAD sources from github.
I've also attached a dictionary file with some known translations which can be loaded with Qt Linguist to provide known translations.

Please let me know if you need any help with the translation process, cloning sources, etc.

If you have a github account, I'm also happy to add you to the contributors list, so you can push translations directly (just let me know what your user name on github is in this case).

Re: Slovenian translation

Posted: Mon Nov 11, 2013 8:37 pm
by Husky
andrew wrote:Please note that due to the modular design of QCAD, translation sources are located in the 'ts' directory of each individual tool.
:oops: Hihi - I never realized that before - thanks for the enlightenment! :wink:

Re: Slovenian translation

Posted: Tue Nov 12, 2013 10:46 pm
by miharix
Hi,

thanks for all the info.
Especially about multiple ts folders. How did I mis that when looking the structure of install dir? :roll: :oops:

Till now I haven't used "Qt Linguist" for translations only "POedit",
so I'll will probably ask some stupid question if I get stuck at configuring.
andrew wrote: Please let me know if you need any help with the translation process, cloning sources, etc.
"cloning" Isn't it just git clone (or download zip) and then copy->paste->rename one existing translation -> Qt Linguist->fix language settings & translate content ? :oops:
andrew wrote: If you have a github account, I'm also happy to add you to the contributors list
Thanks, I'll let you know when there is some progress to show.

Re: Slovenian translation

Posted: Tue Nov 12, 2013 10:54 pm
by andrew
miharix wrote:"cloning" Isn't it just git clone (or download zip)
Yes, indeed.
miharix wrote:and then copy->paste->rename one existing translation -> Qt Linguist->fix language settings & translate content ? :oops:
Meanwhile, I've checked in all "*_sl.ts" files, so if you clone or download now, you will already get all the (unfinished) .ts files for the Slovenian translation.
miharix wrote:so I'll will probably ask some stupid question if I get stuck at configuring
Don't hesitate to ask anything anytime :) I appreciate any contributions to QCAD and I am of course happy to help with any problems you might experience!

Re: Slovenian translation

Posted: Wed Nov 13, 2013 7:30 pm
by miharix
andrew wrote: I've also attached a dictionary file with some known translations which can be loaded with Qt Linguist to provide known translations.
Was this Phrase book somehow generated from old QCAD version (LibreCAD?) or is it from some public Phrase server?
Because when I tried to open it id Qt Linguist it reported error on line 277.
After checking the file, I saw that all unknown phrases have are missing </target> so simple find and replace had fixed this error.

I'm just asking this to know if at some (later?) time is smart to do a full translation of this file, to help others.

Re: Slovenian translation

Posted: Wed Nov 13, 2013 8:16 pm
by andrew
miharix wrote:Was this Phrase book somehow generated from old QCAD version (LibreCAD?) or is it from some public Phrase server?
Yes, that was generated form various sources.
miharix wrote:Because when I tried to open it id Qt Linguist it reported error on line 277.
After checking the file, I saw that all unknown phrases have are missing </target> so simple find and replace had fixed this error.
Thanks for letting me know.
miharix wrote:I'm just asking this to know if at some (later?) time is smart to do a full translation of this file, to help others.
Don't worry about that - I can automatically regenerate that file anytime from QCAD 2 / QCAD 3 sources and any other .ts or .po files.

Re: Slovenian translation

Posted: Sat Nov 30, 2013 8:29 pm
by miharix
Hi,

I'm progressing slow, but steady.
For now I only translated the files > 2KB, so now there are only approx 230 files left :lol:

Just for fun I tried, to see how the current translations looks in QCAD,
so I copied all .ts and .qm files from dir "ts" and "scripts" to QCAD install dir.
but QCAD doest seem to grab the new files.

Do I need to perform, some sort of recompiling, to make the translation visible ?

Re: Slovenian translation

Posted: Sun Dec 01, 2013 11:20 am
by andrew
Thanks for your work!

To use .ts files with QCAD, you have to convert them into .qm files first (in Qt Linguist File - Release).
These .qm files have to be copied to the appropriate location in your QCAD installation.

For example for the line drawing tool:
./scripts/Draw/Line/Line2P/ts/Line2P_sl.qm

The compiled .qm translations of C++ sources (qcadcore, qcadentity, ...) have to be installed in the 'ts' directory of your QCAD installation.

This process is fully automated here, so only the .ts files are needed to create a release with the Slovenian translation.

If you like you can also send me some files you have already translated so I can test them and make some screenshots.

Re: Slovenian translation

Posted: Sun Dec 01, 2013 12:17 pm
by miharix
It's working! :D

Does the "Qt Linguist" have some hidden console switches, or how do you perform the bach release?
I'm asking because, friends over Slovenian RC forum, are wiling to check the correctness of the translation.

I keep translation files in my public dropbox folder ( sh/5p0aetr1llzgw2v/nHpkezNThJ ).

Re: Slovenian translation

Posted: Sun Dec 01, 2013 12:29 pm
by andrew
miharix wrote:It's working! :D
Cool :)
miharix wrote:Does the "Qt Linguist" have some hidden console switches, or how do you perform the bach release?
Qt comes with a command line utility to do releases: lrelease

My release script does something like this (Bash):
find src -name "*.pro" | xargs lrelease
find scripts -name "*.pro" | xargs lrelease

Re: Slovenian translation

Posted: Sun Dec 01, 2013 1:50 pm
by miharix
8)
Great tip!

For other potential QCAD translators, that may stumble over this thread. This is the windows batch version:

Code: Select all

FOR /R "<dir path>\qcad-master" %%F IN (*_sl.ts) DO ( "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\lrelease.exe" "%%F" )

Almost done

Posted: Sun Dec 08, 2013 12:44 am
by miharix
Hi!

I'm almost done, but I stuck on 8 files that are crashing Qt Linguist.
In all I see there is missing a part of the "<xml>" structure.
I also looked in other translations but other files are also "broken"

The files are:
  • \scripts\Widgets\OptionsToolBar\ts\OptionsToolBar_sl.ts
  • \scripts\ImportExport\SvgImporter\ts\SvgImporter_sl.ts
  • \scripts\Widgets\AutoZoomView\ts\AutoZoomView_sl.ts
  • \scripts\Widgets\MouseDisplay\ts\MouseDisplay_sl.ts
  • \scripts\Widgets\ProgressBar\ts\ProgressBar_sl.ts
  • \scripts\View\ViewToolBars\ts\ViewToolBars_sl.ts
  • \scripts\Misc\MiscDraw\ts\MiscDraw_sl.ts
  • \scripts\Widgets\TabBar\ts\TabBar_sl.ts

Re: Slovenian translation

Posted: Sun Dec 08, 2013 11:32 am
by andrew
Thanks for the report.

These files are empty (there is nothing to translate there).

I wasn't aware that Qt Linguist might crash because of those, so I will remove those ts folders entirely.