Strange language issue
-
I am currently developing a qt application and I am having a strange language issue. I am using a message handler to write messages out to a log file. The issue is that some of the debug messages are in German and I am not sure why. This only happens when I release the application and not in debug. Also if I delete the translations directory it defaults back to English. Here is some of the code.
qInstallMessageHandler(messageHandler);
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { switch (type) { case QtCriticalMsg: case QtFatalMsg: LogManager::writeError(QString("%1 (%2:%3, %4)").arg(msg.toLocal8Bit().constData(), context.file, QString::number(context.line), context.function)); if(type == QtFatalMsg) abort(); break; default: //QtDebugMsg || QtWarningMsg LogManager::writeDebug((msg + "\r\n").toLocal8Bit().constData() ); break; } }
Here is an example of the output I am seeing
2016-03-02 14:04:22 Debug - qrc:/Qml/SettingsPage.qml:459:13: QML Image: Binding loop detected for property "sourceSize.height" 2016-03-02 14:04:22 Debug - qrc:/Qml/DiagnosticPane.qml:38: TypeError: Cannot call method 'getDiagnosticsInfo' of null 2016-03-02 14:04:22 Debug - qrc:/Qml/Controls/PopupSlider.qml:50:22: Unable to assign null to QQuickAnchorLine 2016-03-02 14:04:22 Debug - qrc:/Qml/Controls/PopupSlider.qml:50:22: Unable to assign null to QQuickAnchorLine 2016-03-02 14:04:22 Debug - qrc:/Qml/Controls/PopupSlider.qml:50:22: Unable to assign null to QQuickAnchorLine 2016-03-02 14:04:22 Debug - <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" 2016-03-02 14:04:22 Debug - <Unknown File>: QML QQuickLayoutAttached: Binding loop detected for property "preferredWidth" 2016-03-02 14:04:22 Debug - qrc:/Qml/SettingsPage.qml:454:9: QML ColumnLayout: Bei der Operation 'centerIn' wurde eine potentielle Endlosschleife der Anker festgestellt.
Notice the last one is in German.
Any ideas what is going on here?
-
Hi,
Since you wrote about deleting the translations directory, do you handle internationalization in your application ?
-
Is your system running in german ?
-
Do you live in a german speaking country ?
-
Nope, I live in the US. It is happening on all the machines I have tested it on. I also noticed that the buttons on the message boxes are in German as well. I'm not sure where it is getting German from, there should be nothing German related on any of the machines using the software.
-
Do you have a qt_en.qm file in your application folder ?
If so, remove it.