[PATCH] (issue94) Move install / remove labels into ctor and translate them

Wald Commits scm-commit at wald.intevation.org
Tue Sep 2 14:43:52 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409661828 -7200
# Node ID 9c4543128666cef120152003792fe06026a09692
# Parent  c1f32c87716ac4e5db397435dd74be9f50318eb3
(issue94) Move install / remove labels into ctor and translate them.

diff -r c1f32c87716a -r 9c4543128666 ui/certificateitemwidget.cpp
--- a/ui/certificateitemwidget.cpp	Tue Sep 02 12:18:04 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Tue Sep 02 14:43:48 2014 +0200
@@ -21,6 +21,12 @@
     mInstallLabel (installLabel),
     mRemoveLabel (removeLabel)
 {
+    if (mInstallLabel.isEmpty()) {
+        mInstallLabel = tr("Install");
+    }
+    if (mRemoveLabel.isEmpty()) {
+        mRemoveLabel = tr("Remove");
+    }
     mCertificate = cert;
     mState = state;
     mEditable = editable;
diff -r c1f32c87716a -r 9c4543128666 ui/certificateitemwidget.h
--- a/ui/certificateitemwidget.h	Tue Sep 02 12:18:04 2014 +0200
+++ b/ui/certificateitemwidget.h	Tue Sep 02 14:43:48 2014 +0200
@@ -38,8 +38,8 @@
         const Certificate &cert = Certificate(),
         bool state = false,
         bool editable = true,
-        const QString& installLabel = tr("install"),
-        const QString& removeLabel = tr("remove"));
+        const QString& installLabel = QString(),
+        const QString& removeLabel = QString());
 
     bool state();
     void setState(bool state);
diff -r c1f32c87716a -r 9c4543128666 ui/certificatelistwidget.h
--- a/ui/certificatelistwidget.h	Tue Sep 02 12:18:04 2014 +0200
+++ b/ui/certificatelistwidget.h	Tue Sep 02 14:43:48 2014 +0200
@@ -32,8 +32,8 @@
 
     void addCertificate(const Certificate &certificate, bool state,
                         bool editable = true,
-                        const QString& installLabel = tr("install"),
-                        const QString& removeLabel = tr("remove"));
+                        const QString& installLabel = QString(),
+                        const QString& removeLabel = QString());
     void removeCertificate(const Certificate &cert);
     void setCertState(bool state, const Certificate &cert);
     void clear();
diff -r c1f32c87716a -r 9c4543128666 ui/l10n/administrator_de_DE.ts
--- a/ui/l10n/administrator_de_DE.ts	Tue Sep 02 12:18:04 2014 +0200
+++ b/ui/l10n/administrator_de_DE.ts	Tue Sep 02 14:43:48 2014 +0200
@@ -70,116 +70,127 @@
 <context>
     <name>AdministratorWindow</name>
     <message>
-        <location filename="../administratorwindow.cpp" line="34"/>
-        <location filename="../administratorwindow.cpp" line="102"/>
+        <location filename="../administratorwindow.cpp" line="39"/>
+        <location filename="../administratorwindow.cpp" line="110"/>
         <source>TrustBridge Administration</source>
         <translation>TrustBridge Verwaltung</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="52"/>
+        <location filename="../administratorwindow.cpp" line="57"/>
         <source>Menu</source>
         <translation>Menü</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="54"/>
+        <location filename="../administratorwindow.cpp" line="59"/>
         <source>Create installer ...</source>
         <translation>Installationspaket erstellen ...</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="55"/>
+        <location filename="../administratorwindow.cpp" line="60"/>
         <source>About TrustBridge</source>
         <translation>Über TrustBridge</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="57"/>
+        <location filename="../administratorwindow.cpp" line="61"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../administratorwindow.cpp" line="64"/>
         <source>Quit</source>
         <translation>Beenden</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="78"/>
+        <location filename="../administratorwindow.cpp" line="86"/>
         <source>All managed root certificates of the certificate list: </source>
         <translatorcomment>The english original should be improved</translatorcomment>
         <translation>In der Liste enthaltene Zertifikate:</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="144"/>
+        <location filename="../administratorwindow.cpp" line="152"/>
         <source>Select certificate list file</source>
         <translation>Zertifikatsliste auswählen</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="150"/>
-        <location filename="../administratorwindow.cpp" line="234"/>
-        <location filename="../administratorwindow.cpp" line="244"/>
+        <location filename="../administratorwindow.cpp" line="158"/>
+        <location filename="../administratorwindow.cpp" line="242"/>
+        <location filename="../administratorwindow.cpp" line="252"/>
+        <location filename="../administratorwindow.cpp" line="322"/>
         <source>Error!</source>
         <translation>Fehler!</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="150"/>
+        <location filename="../administratorwindow.cpp" line="158"/>
         <source>Failed to load the certificate list.</source>
         <translation>Fehler beim Laden der Zertifikatsliste.</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="234"/>
+        <location filename="../administratorwindow.cpp" line="242"/>
         <source>Failed to open log file: </source>
         <translation>Fehler beim Öffnen der Log-Datei:</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="235"/>
-        <location filename="../administratorwindow.cpp" line="245"/>
+        <location filename="../administratorwindow.cpp" line="243"/>
+        <location filename="../administratorwindow.cpp" line="253"/>
         <source> Changes are not logged!</source>
         <translation> Änderungen wurden nicht geloggt!</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="244"/>
+        <location filename="../administratorwindow.cpp" line="252"/>
         <source>Failed to write log file: </source>
         <translation>Fehler beim Schreiben der Log-Datei: </translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="262"/>
+        <location filename="../administratorwindow.cpp" line="270"/>
         <source> new certificatelist </source>
         <translation> neue Zertifikatsliste </translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="264"/>
+        <location filename="../administratorwindow.cpp" line="272"/>
         <source> based on list from </source>
         <translation> basiert auf der Liste vom </translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="267"/>
+        <location filename="../administratorwindow.cpp" line="275"/>
         <source>signing certificate: 
 </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="270"/>
+        <location filename="../administratorwindow.cpp" line="278"/>
         <source>
 new certificates:
 </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="284"/>
+        <location filename="../administratorwindow.cpp" line="292"/>
         <source>certificates marked to remove:
 </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location filename="../administratorwindow.cpp" line="322"/>
+        <source>Failed to find the manual</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <source>signing certificate: 
 </source>
-        <translation type="vanished">Signaturzertifikat: 
+        <translation type="obsolete">Signaturzertifikat: 
 </translation>
     </message>
     <message>
         <source>
 new certificates:
 </source>
-        <translation type="vanished">Neue Zertifikate:
+        <translation type="obsolete">Neue Zertifikate:
 </translation>
     </message>
     <message>
         <source>certificates marked to remove:
 </source>
-        <translation type="vanished">Zertifikate zum löschen markiert:
+        <translation type="obsolete">Zertifikate zum löschen markiert:
 </translation>
     </message>
     <message>
@@ -192,27 +203,27 @@
         <translation type="vanished">Alle verwalteten Wurzelzertifikate der Zertifikatsliste:</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="104"/>
+        <location filename="../administratorwindow.cpp" line="112"/>
         <source>Management application of the BSI certificate installer</source>
         <translation>Verwaltungsanwendung des BSI-Zertifikatsinstallers</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="114"/>
+        <location filename="../administratorwindow.cpp" line="122"/>
         <source>Save list</source>
         <translation>Liste speichern</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="116"/>
+        <location filename="../administratorwindow.cpp" line="124"/>
         <source>Load list</source>
         <translation>Liste laden</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="118"/>
+        <location filename="../administratorwindow.cpp" line="126"/>
         <source>Add certificate</source>
         <translation>Zertifikat hinzufügen</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="120"/>
+        <location filename="../administratorwindow.cpp" line="128"/>
         <source>Remove certificate</source>
         <translation>Zertifikat entfernen</translation>
     </message>
@@ -221,7 +232,7 @@
         <translation type="vanished">Zertifikatslistendatei auswählen</translation>
     </message>
     <message>
-        <location filename="../administratorwindow.cpp" line="171"/>
+        <location filename="../administratorwindow.cpp" line="179"/>
         <source>Select certificate</source>
         <translation>Zertifikat auswählen</translation>
     </message>
diff -r c1f32c87716a -r 9c4543128666 ui/l10n/trustbridge_de_DE.ts
--- a/ui/l10n/trustbridge_de_DE.ts	Tue Sep 02 12:18:04 2014 +0200
+++ b/ui/l10n/trustbridge_de_DE.ts	Tue Sep 02 14:43:48 2014 +0200
@@ -51,39 +51,57 @@
         <translation type="vanished">Fingerabdruck (SHA1): &lt;%1&gt; </translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="50"/>
+        <source>install</source>
+        <translation type="vanished">Installieren</translation>
+    </message>
+    <message>
+        <source>remove</source>
+        <translation type="vanished">Entfernen</translation>
+    </message>
+    <message>
+        <location filename="../certificateitemwidget.cpp" line="25"/>
+        <source>Install</source>
+        <translation>Installieren</translation>
+    </message>
+    <message>
+        <location filename="../certificateitemwidget.cpp" line="28"/>
+        <source>Remove</source>
+        <translation>Entfernen</translation>
+    </message>
+    <message>
+        <location filename="../certificateitemwidget.cpp" line="56"/>
         <source>Validity: %1 until %2</source>
         <translation>Gültigkeit: %1 bis %2</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="53"/>
+        <location filename="../certificateitemwidget.cpp" line="59"/>
         <source>Fingerprint (SHA1): <code>%1</code></source>
         <translation>Fingerabdruck (SHA1): <code>%1</code></translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="74"/>
-        <location filename="../certificateitemwidget.cpp" line="94"/>
+        <location filename="../certificateitemwidget.cpp" line="80"/>
+        <location filename="../certificateitemwidget.cpp" line="100"/>
         <source>This certificate is currently installed.</source>
         <translation>Dieses Zertifikat ist aktuell installiert.</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="78"/>
+        <location filename="../certificateitemwidget.cpp" line="84"/>
         <source>This certificate is currently not installed.</source>
         <translation>Dieses Zertifikat ist aktuell nicht installiert.</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="88"/>
+        <location filename="../certificateitemwidget.cpp" line="94"/>
         <source>This certificate was uninstalled.</source>
         <translation>Dieses Zertifikat wurde deinstalliert.</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="92"/>
-        <location filename="../certificateitemwidget.cpp" line="115"/>
+        <location filename="../certificateitemwidget.cpp" line="98"/>
+        <location filename="../certificateitemwidget.cpp" line="121"/>
         <source>uninstall</source>
         <translation>Deinstallieren</translation>
     </message>
     <message>
-        <location filename="../certificateitemwidget.cpp" line="93"/>
+        <location filename="../certificateitemwidget.cpp" line="99"/>
         <source>keep</source>
         <translation>Behalten</translation>
     </message>


More information about the Trustbridge-commits mailing list