OSDN Git Service

kuassel: load the translations via KGlobal
authorIvailo Monev <xakepa10@gmail.com>
Sun, 25 Jan 2015 18:16:50 +0000 (18:16 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 25 Jan 2015 18:16:50 +0000 (18:16 +0000)
since it is a multi-component application some of the translations
did not apply, specificly those that are bundled and only basic
(kdelibs4) translations were loaded. to fix this manually load the
catalogs has to be done

kuassel/src/core/core.cpp
kuassel/src/qtui/qtui.cpp

index b2fbf7d..f33741a 100644 (file)
@@ -21,6 +21,7 @@
 #include <QCoreApplication>
 
 #include <KLocale>
+#include <KGlobal>
 
 #include "core.h"
 #include "coreauthhandler.h"
@@ -92,6 +93,8 @@ Core::Core()
 #endif
     _startTime = QDateTime::currentDateTime().toUTC(); // for uptime :)
 
+    KGlobal::locale()->insertCatalog("kuassel");
+
     // FIXME: MIGRATION 0.3 -> 0.4: Move database and core config to new location
     // Move settings, note this does not delete the old files
 #ifdef Q_OS_MAC
index dd955bd..4dd8d8f 100644 (file)
@@ -51,6 +51,7 @@ QtUi::QtUi() : GraphicalUi()
     _instance = this;
 
     QtUiSettings uiSettings;
+    KGlobal::locale()->insertCatalog("kuassel");
 
     setContextMenuActionProvider(new ContextMenuActionProvider(this));
     setToolBarActionProvider(new ToolBarActionProvider(this));