diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-10-09 17:55:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-09 17:55:31 -0700 |
commit | 2d69d4a5ef5f2d3e777d77380732c333151fe949 (patch) | |
tree | a62a954a4f0c1fc25e1f749f10510ec6f33ab085 /qt-gui.cpp | |
parent | 1a98e049dc36fc4d385a9a6d02beb73e816a6353 (diff) | |
download | subsurface-2d69d4a5ef5f2d3e777d77380732c333151fe949.tar.gz |
Make sure we handle untranslated Subsurface correctly
At least on the Mac we otherwise switch to the next language which is not what
the user likely intended.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index ac739ad6f..532d1b509 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -85,7 +85,10 @@ void init_ui(int *argcp, char ***argvp) xslt_path = strdup(getSubsurfaceDataPath("xslt").toAscii().data()); QLocale loc; - if (loc.uiLanguages().first() != "en-US") { + // we don't have translations for English - if we don't check for this + // Qt will proceed to load the second language in preference order - not what we want + // on Linux this tends to be en-US, but on the Mac it's just en + if (!loc.uiLanguages().first().startsWith("en")) { qtTranslator = new QTranslator; if (qtTranslator->load(loc,"qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { application->installTranslator(qtTranslator); |