summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-29 10:04:34 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-29 10:04:34 (GMT)
commit4086a006e2dc9f5f723fad4fdccd7bff7b4f0683 (patch)
treee0151745306f8d89bd761b42ebb2d388b9e86995
parent751d68d1fb5f2916554d82a4945499631a70c07d (diff)
downloadswift-4086a006e2dc9f5f723fad4fdccd7bff7b4f0683.zip
swift-4086a006e2dc9f5f723fad4fdccd7bff7b4f0683.tar.bz2
Temporary workaround for translations being used instead of English
-rw-r--r--Swift/QtUI/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index bb1c662..c8f7705 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -13,6 +13,7 @@
#include <QTextCodec>
#include <QTranslator>
#include <QLocale>
+#include <QStringList>
#include <Swift/Controllers/Translator.h>
#include <Swift/Controllers/ApplicationInfo.h>
@@ -21,6 +22,7 @@
#include "QtSwift.h"
#include "QtTranslator.h"
+#include "QtSwiftUtil.h"
int main(int argc, char* argv[]) {
QApplication app(argc, argv);
@@ -33,7 +35,9 @@ int main(int argc, char* argv[]) {
QTranslator qtTranslator;
if (!someTranslationPath.empty()) {
#if QT_VERSION >= 0x040800
- qtTranslator.load(QLocale::system(), QString(SWIFT_APPLICATION_NAME).toLower(), "_", someTranslationPath.parent_path().string().c_str());
+ if (QLocale::system().uiLanguages().first() != "en") {
+ qtTranslator.load(QLocale::system(), QString(SWIFT_APPLICATION_NAME).toLower(), "_", someTranslationPath.parent_path().string().c_str());
+ }
#else
//std::cout << "Loading " << std::string(QLocale::system().name().toUtf8()) << std::endl;
qtTranslator.load(QString(SWIFT_APPLICATION_NAME).toLower() + "_" + QLocale::system().name(), someTranslationPath.parent_path().string().c_str());