changeset 424:81cf25402cb0

Merge
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 17 Apr 2014 08:55:16 +0000
parents 3d1e9df24803 (diff) 8f95e7014667 (current diff)
children da3bebdd16ee d7cda835abd6
files
diffstat 8 files changed, 566 insertions(+), 221 deletions(-) [+]
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Thu Apr 17 10:11:40 2014 +0200
+++ b/ui/CMakeLists.txt	Thu Apr 17 08:55:16 2014 +0000
@@ -100,23 +100,37 @@
 # TRUSTBRIDGE_SOURCES in the test subdirectory.
 set(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_SOURCES})
 qt5_add_resources(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES})
-add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES})
-
-target_link_libraries(trustbridge Qt5::Widgets
-   trustbridge_common
-   ${POLARSSL_LIBRARIES}
-   ${EXTRA_STATIC_LIBS}
-   ${PROFILING_LIBS})
 
 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES})
 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES})
 
 if(Qt5LinguistTools_FOUND)
+   # Include translation as a resource
+   # This works in the source directory to enable the rcc dependencies to be found
+   # and it also updates the currently available localization.
+   # This would probably be better placed in a macro
+   configure_file(l10n/administrator.qrc.in administrator.qrc)
+   qt5_add_resources(ADMINISTRATOR_L10N ${CMAKE_CURRENT_BINARY_DIR}/administrator.qrc)
    qt5_create_translation(ADMINISTRATOR_TRANSLATION ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}
-      ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator.ts)
-  add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} ${ADMINISTRATOR_TRANSLATION})
+      ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator_de_DE.ts)
+   add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}
+      ${ADMINISTRATOR_L10N}
+      ${ADMINISTRATOR_TRANSLATION}
+      )
+
+   configure_file(l10n/trustbridge.qrc.in trustbridge.qrc)
+   qt5_add_resources(TRUSTBRIDGE_L10N ${CMAKE_CURRENT_BINARY_DIR}/trustbridge.qrc)
+   qt5_create_translation(TRUSTBRIDGE_TRANSLATION ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}
+      ${CMAKE_CURRENT_SOURCE_DIR}/l10n/trustbridge_de_DE.ts)
+   add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}
+      ${TRUSTBRIDGE_L10N}
+      ${TRUSTBRIDGE_TRANSLATION}
+      )
+
 else()
    message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.")
+   add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES})
+   add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES})
 endif()
 
 target_link_libraries(administrator Qt5::Widgets
@@ -125,6 +139,13 @@
    ${EXTRA_STATIC_LIBS}
    ${PROFILING_LIBS})
 
+target_link_libraries(trustbridge Qt5::Widgets
+   trustbridge_common
+   ${POLARSSL_LIBRARIES}
+   ${EXTRA_STATIC_LIBS}
+   ${PROFILING_LIBS})
+
+
 # Tests
 add_subdirectory(tests)
 
--- a/ui/administrator.cpp	Thu Apr 17 10:11:40 2014 +0200
+++ b/ui/administrator.cpp	Thu Apr 17 08:55:16 2014 +0000
@@ -11,6 +11,8 @@
 #include <QtPlugin>
 #include <QMessageBox>
 #include <QSettings>
+#include <QTranslator>
+#include <QDebug>
 
 #ifndef VERSION
 #define VERSION "0.0.1"
@@ -41,6 +43,17 @@
     QApplication::setApplicationVersion(QString::fromLatin1(VERSION));
     QSettings::setDefaultFormat(QSettings::IniFormat);
 
+    QTranslator translator;
+    if (QLocale::system().name() == "C") {
+        /* Useful for testing / development as the primary target is german */
+        translator.load(":/l10n/administrator_de_DE");
+    } else {
+        translator.load(":/l10n/administrator_" + QLocale::system().name());
+        qDebug() << "Loading translations for: " << "administrator_" +
+            QLocale::system().name();
+    }
+    app.installTranslator(&translator);
+
     AdministratorWindow adminWin;
     adminWin.show();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/l10n/administrator.qrc.in	Thu Apr 17 08:55:16 2014 +0000
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/l10n">
+    <file alias="administrator_de_DE.qm">@CMAKE_CURRENT_BINARY_DIR@/administrator_de_DE.qm</file>
+</qresource>
+</RCC>
--- a/ui/l10n/administrator.ts	Thu Apr 17 10:11:40 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="de">
-<context>
-    <name>AdministratorWindow</name>
-    <message>
-        <location filename="../administratorwindow.cpp" line="49"/>
-        <source>Menu</source>
-        <translation>Menü</translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="51"/>
-        <source>Create Installer</source>
-        <translation>Installationspaket erstellen</translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="52"/>
-        <source>Settings</source>
-        <translation>Einstellungen</translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="54"/>
-        <source>Help</source>
-        <translation>Hilfe</translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="55"/>
-        <source>About</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="57"/>
-        <source>Quit</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="79"/>
-        <source>Managed Certificates</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="102"/>
-        <source>Administrator Application</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="113"/>
-        <source>Save</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="115"/>
-        <source>Load</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="117"/>
-        <source>Add</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="119"/>
-        <source>Remove</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="144"/>
-        <source>Select certificate file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../administratorwindow.cpp" line="165"/>
-        <source>Select certificate</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>CertificateTabelModel</name>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="16"/>
-        <source>Subject CN</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="17"/>
-        <source>Subject O</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="18"/>
-        <source>Issuer CN</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="19"/>
-        <source>Issuer O</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="20"/>
-        <source>valid from</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="21"/>
-        <source>valid to</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetablemodel.cpp" line="22"/>
-        <source>SHA1 Fingerprint</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>CertificateTableDelegate</name>
-    <message>
-        <location filename="../certificatetabledelegate.cpp" line="51"/>
-        <source>add</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificatetabledelegate.cpp" line="54"/>
-        <source>remove</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>CreateCertListDialog</name>
-    <message>
-        <location filename="../createcertlistdialog.cpp" line="21"/>
-        <source>adminstrator - Create signed certificate list</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createcertlistdialog.cpp" line="35"/>
-        <source>Create a new, signed certificate list.
-</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createcertlistdialog.cpp" line="63"/>
-        <source>Create List</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createcertlistdialog.cpp" line="81"/>
-        <source>Select certificate</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createcertlistdialog.cpp" line="88"/>
-        <source>Select target location</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>CreateInstallerDialog</name>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="21"/>
-        <source>adminstrator - Create signed installer binary</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="36"/>
-        <source>Create a new signed installer binary.
-</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="75"/>
-        <source>Create Installer</source>
-        <translation type="unfinished">Installationspaket erstellen</translation>
-    </message>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="93"/>
-        <source>Select certificate</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="100"/>
-        <source>Select source archive</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../createinstallerdialog.cpp" line="107"/>
-        <source>Select target location</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <location filename="../certificate.cpp" line="75"/>
-        <source>Certificate:
-    &lt;bold&gt;%1&lt;/bold&gt;
-    %2, %3
-
-Serial number:
-%4
-Valid from: &lt;bold&gt;%5&lt;/bold&gt; to &lt;bold&gt;%6&lt;/bold&gt;
-
-Issued by: ..</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../certificate.cpp" line="129"/>
-        <source>Failed to parse certificate</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
-</TS>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/l10n/administrator_de_DE.ts	Thu Apr 17 08:55:16 2014 +0000
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de">
+<context>
+    <name>AdministratorWindow</name>
+    <message>
+        <location filename="../administratorwindow.cpp" line="49"/>
+        <source>Menu</source>
+        <translation>Menü</translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="51"/>
+        <source>Create Installer</source>
+        <translation>Installationspaket erstellen</translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="52"/>
+        <source>Settings</source>
+        <translation>Einstellungen</translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="54"/>
+        <source>Help</source>
+        <translation>Hilfe</translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="55"/>
+        <source>About</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="57"/>
+        <source>Quit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="79"/>
+        <source>Managed Certificates</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="102"/>
+        <source>Administrator Application</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="113"/>
+        <source>Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="115"/>
+        <source>Load</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="117"/>
+        <source>Add</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="119"/>
+        <source>Remove</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="144"/>
+        <source>Select certificate file</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="165"/>
+        <source>Select certificate</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>CertificateTabelModel</name>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="16"/>
+        <source>Subject CN</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="17"/>
+        <source>Subject O</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="18"/>
+        <source>Issuer CN</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="19"/>
+        <source>Issuer O</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="20"/>
+        <source>valid from</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="21"/>
+        <source>valid to</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetablemodel.cpp" line="22"/>
+        <source>SHA1 Fingerprint</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>CertificateTableDelegate</name>
+    <message>
+        <location filename="../certificatetabledelegate.cpp" line="51"/>
+        <source>add</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificatetabledelegate.cpp" line="54"/>
+        <source>remove</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>CreateCertListDialog</name>
+    <message>
+        <location filename="../createcertlistdialog.cpp" line="21"/>
+        <source>adminstrator - Create signed certificate list</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createcertlistdialog.cpp" line="35"/>
+        <source>Create a new, signed certificate list.
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createcertlistdialog.cpp" line="63"/>
+        <source>Create List</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createcertlistdialog.cpp" line="81"/>
+        <source>Select certificate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createcertlistdialog.cpp" line="88"/>
+        <source>Select target location</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>CreateInstallerDialog</name>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="21"/>
+        <source>adminstrator - Create signed installer binary</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="36"/>
+        <source>Create a new signed installer binary.
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="75"/>
+        <source>Create Installer</source>
+        <translation type="unfinished">Installationspaket erstellen</translation>
+    </message>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="93"/>
+        <source>Select certificate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="100"/>
+        <source>Select source archive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../createinstallerdialog.cpp" line="107"/>
+        <source>Select target location</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="../certificate.cpp" line="75"/>
+        <source>Certificate:
+    &lt;bold&gt;%1&lt;/bold&gt;
+    %2, %3
+
+Serial number:
+%4
+Valid from: &lt;bold&gt;%5&lt;/bold&gt; to &lt;bold&gt;%6&lt;/bold&gt;
+
+Issued by: ..</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificate.cpp" line="129"/>
+        <source>Failed to parse certificate</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/l10n/trustbridge.qrc.in	Thu Apr 17 08:55:16 2014 +0000
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/l10n">
+    <file alias="trustbridge_de_DE.qm">@CMAKE_CURRENT_BINARY_DIR@/trustbridge_de_DE.qm</file>
+</qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/l10n/trustbridge_de_DE.ts	Thu Apr 17 08:55:16 2014 +0000
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+    <name>AboutDialog</name>
+    <message>
+        <location filename="../aboutdialog.cpp" line="25"/>
+        <source>This dialog contains some text about the application</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../aboutdialog.cpp" line="28"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>Downloader</name>
+    <message>
+        <location filename="../downloader.cpp" line="80"/>
+        <source>Invalid response</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="115"/>
+        <location filename="../downloader.cpp" line="123"/>
+        <location filename="../downloader.cpp" line="162"/>
+        <location filename="../downloader.cpp" line="174"/>
+        <source>Connection lost</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="137"/>
+        <source>Invalid response from the server</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="200"/>
+        <source>Failed to initialize SSL Module.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="207"/>
+        <source>Failed to connect.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="212"/>
+        <source>Connected</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../downloader.cpp" line="262"/>
+        <source>Closing</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HelpDialog</name>
+    <message>
+        <location filename="../helpdialog.cpp" line="25"/>
+        <source>This dialog contains some text to help the user.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../helpdialog.cpp" line="28"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>InstallWrapper</name>
+    <message>
+        <location filename="../installwrapper.cpp" line="70"/>
+        <source>Could not find certificate installation process.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="75"/>
+        <source>Failed to write temporary file.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="108"/>
+        <source>Error executing process: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="119"/>
+        <source>Error monitoring process: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="122"/>
+        <source>Certificate installation timed out.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="135"/>
+        <source>Failed to check process status: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="143"/>
+        <source>The process failed with return code. %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="160"/>
+        <source>Failed to start installer process.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../installwrapper.cpp" line="168"/>
+        <location filename="../installwrapper.cpp" line="173"/>
+        <source>Failed to complete installation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cpp" line="165"/>
+        <source>An updated certificate list is available. Click here to install.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="173"/>
+        <source>An update for %1 is available. Click here to install.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="229"/>
+        <source>Check for Updates</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="231"/>
+        <location filename="../mainwindow.cpp" line="266"/>
+        <location filename="../mainwindow.cpp" line="325"/>
+        <source>Quit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="249"/>
+        <source>TrustBridge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="257"/>
+        <source>Menu</source>
+        <translation>Menü</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="259"/>
+        <source>Force Update</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="260"/>
+        <source>Settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="261"/>
+        <source>Statusdialog</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="263"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="264"/>
+        <source>About</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="292"/>
+        <source>Managed Certificates</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="315"/>
+        <source>autoupdate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="321"/>
+        <source>Install selected</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="335"/>
+        <source>Details</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="457"/>
+        <source>Error executing update</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cpp" line="499"/>
+        <source>Installing certificates...</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="../certificate.cpp" line="75"/>
+        <source>Certificate:
+    &lt;bold&gt;%1&lt;/bold&gt;
+    %2, %3
+
+Serial number:
+%4
+Valid from: &lt;bold&gt;%5&lt;/bold&gt; to &lt;bold&gt;%6&lt;/bold&gt;
+
+Issued by: ..</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../certificate.cpp" line="129"/>
+        <source>Failed to parse certificate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../main.cpp" line="44"/>
+        <source>Couldn&apos;t detect any system tray on this system. This software can only be used in a desktop environment.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>StatusDialog</name>
+    <message>
+        <location filename="../statusdialog.cpp" line="25"/>
+        <source>The following certificates are successfully installed:
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="26"/>
+        <source>* Email CA 2013
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="27"/>
+        <source>* Server CA 2010
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="28"/>
+        <source>
+The following certificates are successfully removed:
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="29"/>
+        <source>* Email CA 2010
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="30"/>
+        <source>
+Errors while processing certificates:
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="31"/>
+        <source>* PCA-1-Verwaltung-08
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../statusdialog.cpp" line="35"/>
+        <source>Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
--- a/ui/main.cpp	Thu Apr 17 10:11:40 2014 +0200
+++ b/ui/main.cpp	Thu Apr 17 08:55:16 2014 +0000
@@ -12,6 +12,8 @@
 #include <QtPlugin>
 #include <QMessageBox>
 #include <QSettings>
+#include <QDebug>
+#include <QTranslator>
 
 #ifndef VERSION
 #define VERSION "0.0.1"
@@ -38,6 +40,17 @@
     QStringList arguments = QApplication::arguments();
     bool trayMode = arguments.contains("--tray");
 
+    QTranslator translator;
+    if (QLocale::system().name() == "C") {
+        /* 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();
+    }
+    app.installTranslator(&translator);
+
     if (!QSystemTrayIcon::isSystemTrayAvailable() ||
             !QSystemTrayIcon::supportsMessages()) {
         QMessageBox::critical(0, QString::fromLatin1(APPNAME),

http://wald.intevation.org/projects/trustbridge/