Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-14 Thread Thomas Tanghus
On Monday 13 January 2014 16:28 Timur Kristóf wrote: Not sure what you mean by already performs all the checks you do - it doesn't check LANG, nor does it check QLocale::system().name() It does check LANG. That's how I test the translations: $ LANG=da_DK harbour-myapp On Mon, Jan 13, 2014

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-13 Thread Timur Kristóf
Not sure what you mean by already performs all the checks you do - it doesn't check LANG, nor does it check QLocale::system().name() Timur On Mon, Jan 13, 2014 at 1:21 PM, Thomas Tanghus tho...@tanghus.net wrote: On Monday 13 January 2014 12:52 Timur Kristóf wrote: Here is how I do it:

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-13 Thread Luciano Montanaro
In my application I am using just: QString locale = QLocale::system().name(); QTranslator translator; if (translator.load(QString(i18n:quandoparte_) + locale)) { qDebug() Translation for locale locale loaded; a-installTranslator(translator); } else {

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-12 Thread Unai IRIGOYEN
Ok, I'm replying to myself here and for reference in case someone else is disappointed. I launched the app from Jolla's app menu and found out it was translated so in fact this only happens when running from QtCreator. -- Unai IRIGOYEN Le dimanche 12 janvier 2014 17:54:50, vous avez écrit :

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-12 Thread Antoine Reversat
When running from Qt Creator the locale is always C, when clicking the app button on the emulator then the locale is right. I also run my app from the emulator through ssh with something like : LC_ALL=fr_FR.UTF-8 my_app to test different locales. On Sun, Jan 12, 2014 at 12:20 PM, Unai IRIGOYEN

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-03 Thread Timur Kristóf
Hi, You can use Qt Linguist, lupdate and other such tools from the regular upstream Qt SDK, you don't need the Sailfish SDK to support it. Cheers, Timur Timur On Thu, Jan 2, 2014 at 6:36 PM, Franck Routier (perso) a...@mecadu.orgwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi,

[SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Franck Routier (perso)
Hi, I would like to translate my QML application, now that it runs fine. I have used qsTr() for literal strings. Then I have tried to run 'lupdate' from tools/external/Linguist in the Sailfish SDK QtCreator, but it does not seem to do anything... Also, 'find . -name lupdate' in the sdk finds

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Andrey Kozhevnikov
its inside build machine. qmake will run lupdate/lrelease from internal path. On 02.01.2014 23:36, Franck Routier (perso) wrote: Hi, I would like to translate my QML application, now that it runs fine. I have used qsTr() for literal strings. Then I have tried to run 'lupdate' from

[SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Franck Routier (perso)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I would like to translate my QML application, now that it runs fine. I have used qsTr() for literal strings. Then I have tried to run 'lupdate' from tools/external/Linguist in the Sailfish SDK QtCreator, but it does not seem to do anything...

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Franck Routier (perso)
Le 02/01/2014 18:37, Andrey Kozhevnikov a écrit : its inside build machine. qmake will run lupdate/lrelease from internal path. Ok, I understand. So I have to start the MerSDK virtual machine for lupdate to work. Then, shouldn't it generate some .ts file in my project ? (its the first time I

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Andrey Kozhevnikov
i'm always using self-created ts.list text file with list of paths to files contains strings and my lupdate syntax: lupdate -verbose -ts languages/en_US.ts @ts.list On 02.01.2014 23:44, Franck Routier (perso) wrote: Le 02/01/2014 18:37, Andrey Kozhevnikov a écrit : its inside build machine.

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Andrey Kozhevnikov
for directly use lupdare/lrelease you need to chroot to target (inside VM): sb2 -t SailfishOS-armv7hl -s sdk-install On 03.01.2014 02:00, Franck Routier (perso) wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I finally used the lupdate binary found in the Harmattan SDK somewhere on my

Re: [SailfishDevel] How to translate (lupdate) ?

2014-01-02 Thread Andrey Kozhevnikov
you can use any /usr/share/appname location. use qm file with QTranslator and install translator to QGuiApplication qsTr is enough you can use LC_ALL On 03.01.2014 02:26, Franck Routier (perso) wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, now I have .ts file, I did translate the