Base translation not working
-
Hello, I've just upgraded Qt from version 5.2 to 5.5. Everything worked fine except the translation of the QObjects (e.g. "Yes", "No", "Cancel", etc).
The qt_pt.qm file didn't change after the upgraded, which striked me as odd (but I opened it with Linguist and it seemed okay). The translation is correctly loaded and installed, but it doesn't have any effect. Also, all my custom translations are working fine.
Could anyone help me? I have no idea what is going on and I cannot find any documentation about the QObject translation.
Thank you very much,
Pedro Tabacof. -
Hi,
Can you provide a minimal project that shows that it works with an older version of Qt and not with 5.5 ?
-
@SGaist Hello,
I've created a small example and checked it with Qt 5.2 (MinGW 4.8) and 5.5 (MinGW 4.9).
In the old Qt it works just fine, but in the new one it doesn't work at all (even if it says the translation was loaded and installed correctly).
You can find the zipped project here: https://drive.google.com/file/d/0BzpEPYc7dTD0eWFwYmQzZ1g1RWs/view?usp=sharing
Any help would be greatly appreciated!
Pedro.
-
You are not translating your application, there's no tr around your texts
-
@SGaist My problem is with the standard Qt objects (such as the "Save/No/Cancel" text in the message box example), things I cannot wrap a "tr" around. All my "tr" text is translating just fine.
The "qt_pt.qm" file I put on the example was not generated by myself, I got it from Qt\5.5\mingw492_32\translations. This used to work just fine (Qt 5.2), but now it doesn't work anymore.
-
The standard translations for Ok, Cancel, Save had been moved into <name>QPlatformTheme</name>
They are missing now in all the old qt_??.ts and are only available in the newer qtbase_??.tsI had copied the QPlatformTheme messages into the ts-files I needed.
Markus