Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
5.15.2
-
None
-
Windows 10 Education, QtCreator 4.13.1, QMake build, Qt 5.15.2 (but same issue in earlier versions)
-
e6e23d061cb8ac81007119603f8e7c64fc572e04
Description
Hi,
the documentation at https://doc.qt.io/qt-5/qtranslator.html#load-1 lists ".qm" files that are loaded in the specified order.
However, the order is different in the source code comment, see https://github.com/qt/qtbase/blob/5.15.2/src/corelib/kernel/qtranslator.cpp#L753-L763
As far as I can see, the documentation on doc.qt.io is wrong.
I ran into an issue where a fresh Windows 10 Education installation (German version) had the following `QLocale().uiLanguages() = ("de-DE", "en-US")`. I had following *.qm files:
- App_de.qm
- App_en_US.qm
- App_en.qm
- App_...qm
The application was loaded in English. The following workarounds worked:
- Rename App_de.qm to App_de_DE.qm
- Remove App_en_US.qm
IMHO, there is a mismatch between documentation and source code. I think that the source comment is correct but did no further investigation.
Regards,
Andre