Re: [SailfishDevel] QML translations don't work

2018-03-09 Thread Yann Georg Buechau
Hey Osmo, Thanks very much for the hint with the context. I was not using lupdate/lconvert because I don't like the dependency on QT for the build environment. I used xgettext but did not handle the context. I am now using qsTranslate, specifying the context explicitly and telling xgettext wi

Re: [SailfishDevel] QML translations don't work

2018-03-09 Thread Lukáš Karas
Well, I am not familiar with Qt development in Python, but in C++ world, there is necessary to initialise translator before showing QML view... Try to look to these lines: https://github.com/Karry/osmscout-sailfish/blob/master/src/OSMScout.cpp#L147 // install translator QTranslator trans

Re: [SailfishDevel] QML translations don't work

2018-03-08 Thread Boris Pohler
That's how it works with my program. Just to be on the safe side, are the translation files in your rpm and in /usr/share/harbour-sailcash/translations on the device? In your spec file in the given repo this information is missing in my opinion, or am I missing something? Am Donnerstag, den 08.

Re: [SailfishDevel] QML translations don't work

2018-03-08 Thread Yann Büchau
Thanks Boris for the hint with setting the LANG variable. Although it should rather be LANG=de_DE.utf8 :-) Unfortunately, this still doesn't help with the QML translation problem. When I launch the app from the grid (which definitely has the locale set because the Python translation works), the

Re: [SailfishDevel] QML translations don't work

2018-03-08 Thread Osmo Salomaa
On Thu, Mar 8, 2018, at 20:21, Yann Büchau wrote: > Now my question is, what am I doing wrong so QML stuff won't translate? > My QML is just the python-sample with some strings wrapped with qsTr(). What's your translation call like? Note that the context argument needs to match what is in the t

Re: [SailfishDevel] QML translations don't work

2018-03-08 Thread Boris Pohler
Sorry, should be export LANG=de Am Donnerstag, den 08.03.2018, 21:42 +0100 schrieb Boris Pohler: > The behavior is normal and your directory structure is fine. > > If you log in via ssh and want to start the program, the language is not set: > > [nemo@Sailfish ~]$ locale > LANG= > LANGUAGE= >

Re: [SailfishDevel] QML translations don't work

2018-03-08 Thread Boris Pohler
The behavior is normal and your directory structure is fine. If you log in via ssh and want to start the program, the language is not set: [nemo@Sailfish ~]$ locale LANG= LANGUAGE= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PA

[SailfishDevel] QML translations don't work

2018-03-08 Thread Yann Büchau
Hey everyone, I am finally hopping into developing Python-based apps for Sailfish. I am pretty amazed how easy it is actually. Being not so much of a gui guy, I like to do everything from CLI and by hand, not clicking stuff together. I am also more familiar with autotools that the QT build s