[dolphin/Applications/15.12] src: Call KLocalizedString::setApplicationDomain("dolphin");

Albert Astals Cid aacid at kde.org
Sun Nov 29 18:31:00 GMT 2015


Git commit d00b531c74d509a03389485b116cda59162c73ea by Albert Astals Cid.
Committed on 29/11/2015 at 18:19.
Pushed by aacid into branch 'Applications/15.12'.

Call KLocalizedString::setApplicationDomain("dolphin");

dolphin is using
   -DTRANSLATION_DOMAIN=\"dolphin\"
that is wrong for applications, apps need to use
   KLocalizedString::setApplicationDomain
since that makes some other things like the transltators tab in the about
dialog show.

I have not removed -DTRANSLATION_DOMAIN=\"dolphin\" because on the other hand
this code is also a library (i.e. the dolphin kpart).

The "being pedandly correct" fix would be using -DTRANSLATION_DOMAIN=\"dolphin\"
only to compile the files that are part of the kpart but that's prone to
break at some point and using both KLocalizedString::setApplicationDomain and
-DTRANSLATION_DOMAIN does not create any problem so i went that route

CCMAIL: kfm-devel at kde.org

M  +2    -0    src/main.cpp

http://commits.kde.org/dolphin/d00b531c74d509a03389485b116cda59162c73ea

diff --git a/src/main.cpp b/src/main.cpp
index 0c5ac87..f519329 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,6 +48,8 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
     migrate.setUiFiles(QStringList() << QStringLiteral("dolphinpart.rc") << QStringLiteral("dolphinui.rc"));
     migrate.migrate();
 
+    KLocalizedString::setApplicationDomain("dolphin");
+
     KAboutData aboutData("dolphin", i18n("Dolphin"), QStringLiteral(DOLPHIN_VERSION_STRING),
                          i18nc("@title", "File Manager"),
                          KAboutLicense::GPL,




More information about the kfm-devel mailing list