[SailfishDevel] QML translations don't work

Osmo Salomaa otsaloma at iki.fi
Thu Mar 8 20:50:21 UTC 2018


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 translation file. If you happened to copy the Pan Transit style of converting gettext po-files to Qt linguist files, then the context will be empty. I use the following helper function for QML translations: https://github.com/otsaloma/pan-transit/blob/master/qml/pan-transit.qml#L40

-- 
Osmo Salomaa <otsaloma at iki.fi>


More information about the Devel mailing list