[PATCH] Add failure indicator if translation load failed

Wald Commits scm-commit at wald.intevation.org
Mon Sep 1 12:53:28 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409568802 -7200
# Node ID 561cc777e0b6131b1dbfe00dbeebd4323cdba459
# Parent  a1e8ef2d7081da79e6fc3f14007d60423b3105fd
Add failure indicator if translation load failed.

diff -r a1e8ef2d7081 -r 561cc777e0b6 ui/main.cpp
--- a/ui/main.cpp	Mon Sep 01 12:52:05 2014 +0200
+++ b/ui/main.cpp	Mon Sep 01 12:53:22 2014 +0200
@@ -112,9 +112,11 @@
         /* Useful for testing / development as the primary target is german */
         translator.load(":/l10n/trustbridge_de_DE");
     } else {
-        translator.load(":/l10n/trustbridge_" + QLocale::system().name());
         qDebug() << "Loading translations for: " << "trustbridge_" +
             QLocale::system().name();
+        if (!translator.load(":/l10n/trustbridge_" + QLocale::system().name())) {
+            qDebug() << "Failed.";
+        }
     }
     app.installTranslator(&translator);
 /*


More information about the Trustbridge-commits mailing list