core: Only load translations if running stand-alone
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 30 May 2018 22:25:00 +0000 (00:25 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Jun 2018 19:12:17 +0000 (21:12 +0200)
For the monolithic client, the UI part takes care of loading the
translations configured by the user; the core should not override
them.

Only if the core is running stand-alone, it needs to load
translations itself (using the system locale, since there is no
core-side configuration for this).

src/core/core.cpp

index b103b42..3089a73 100644 (file)
@@ -104,7 +104,9 @@ bool Core::init()
 {
     _startTime = QDateTime::currentDateTime().toUTC(); // for uptime :)
 
 {
     _startTime = QDateTime::currentDateTime().toUTC(); // for uptime :)
 
-    Quassel::loadTranslation(QLocale::system());
+    if (Quassel::runMode() == Quassel::RunMode::CoreOnly) {
+        Quassel::loadTranslation(QLocale::system());
+    }
 
     // check settings version
     // so far, we only have 1
 
     // check settings version
     // so far, we only have 1