aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-01 09:30:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-01 09:30:14 -0700
commitcdc96662814082c9163ce6814d223fa3483a9a80 (patch)
treed2b7c9eaa45960e1cab4becd82e96ee25f4882c0 /core
parentc7b64b6819faa5bcd5db6cc1ab055a68e1cb7e7f (diff)
downloadsubsurface-cdc96662814082c9163ce6814d223fa3483a9a80.tar.gz
Core: use British translations in South Africa
For unrecognized locales we use en_US by default. It makes much more sense for South Africa to use en_GB. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/qt-init.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/qt-init.cpp b/core/qt-init.cpp
index bccb10472..ad1671655 100644
--- a/core/qt-init.cpp
+++ b/core/qt-init.cpp
@@ -51,11 +51,17 @@ void init_qt_late()
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif
- // find plugins installed in the application directory (without this SVGs don't work on Windows)
qPref::load();
+ // find plugins installed in the application directory (without this SVGs don't work on Windows)
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());
QLocale loc;
+
+ // assign en_GB for use in South African locale
+ if (loc.country() == QLocale::SouthAfrica) {
+ loc.setDefault(QLocale("en_GB"));
+ loc = QLocale();
+ }
QString uiLang = uiLanguage(&loc);
QLocale::setDefault(loc);