[Interest] Problem with Translations using tr

Nicolas Krieger nicolas.krieger at medecom.fr
Thu Jan 31 17:05:57 CET 2019

Thank you. I did not really know what "Context" meant.

Classes are in namespaces, I added them before "tr" and it works now.

Le 31/01/2019 à 16:16, Kai Koehne a écrit :
>> -----Original Message-----
>> [...]
>> When I use this translation, only those defined for ui files are used. Strings
>> defined by "tr" are not translated.
>> I made a test by replacing "tr" by "QApplication::translate" and it works. What
>> could be wrong in my way to use "tr" ?
> Hard to say without seeing the code. Anyhow, you should double check which tr() is called - it must be the one from the class that is also shown as "Context" in Qt Linguist.  Also, calling ::staticMetaObject.className()  on this class should be the same as the 'Context'.
> Kai
*Nicolas Krieger*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190131/f5e84d30/attachment.html>

More information about the Interest mailing list