[svn] GnuPG - r4409 - in trunk: agent common po

svn author wk cvs at cvs.gnupg.org
Thu Jan 25 10:15:11 CET 2007


Author: wk
Date: 2007-01-25 10:15:10 +0100 (Thu, 25 Jan 2007)
New Revision: 4409

Modified:
   trunk/agent/ChangeLog
   trunk/agent/genkey.c
   trunk/common/simple-pwquery.c
   trunk/common/simple-pwquery.h
   trunk/po/de.po
Log:
agent/
	* genkey.c (check_passphrase_constraints): Get ngettext call right.


Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2007-01-25 08:30:47 UTC (rev 4408)
+++ trunk/agent/ChangeLog	2007-01-25 09:15:10 UTC (rev 4409)
@@ -1,5 +1,7 @@
 2007-01-25  Werner Koch  <wk at g10code.com>
 
+	* genkey.c (check_passphrase_constraints): Get ngettext call right.
+
 	* protect-tool.c (get_passphrase): New arg OPT_CHECK.
 	(get_new_passphrase): Enable OTP_CHECK on the first call.
 	* command.c (cmd_get_passphrase): Implement option --check.

Modified: trunk/agent/genkey.c
===================================================================
--- trunk/agent/genkey.c	2007-01-25 08:30:47 UTC (rev 4408)
+++ trunk/agent/genkey.c	2007-01-25 09:15:10 UTC (rev 4409)
@@ -87,12 +87,12 @@
   if (strlen (pw) < minlen ) /* FIXME:  should be an utf-8 length. */
     {
       char *desc = xtryasprintf 
-        ( ngettext (_("Warning:  You have entered a passphrase that%%0A"
-                      "is obviously not secure.  A passphrase should%%0A"
-                      "be at least %u character long."), 
-                    _("Warning:  You have entered a passphrase that%%0A"
-                      "is obviously not secure.  A passphrase should%%0A"
-                      "be at least %u characters long."), minlen), minlen );
+        ( ngettext ("Warning:  You have entered a passphrase that%%0A"
+                    "is obviously not secure.  A passphrase should%%0A"
+                    "be at least %u character long.", 
+                    "Warning:  You have entered a passphrase that%%0A"
+                    "is obviously not secure.  A passphrase should%%0A"
+                    "be at least %u characters long.", minlen), minlen );
       if (!desc)
         return gpg_error_from_syserror ();
       

Modified: trunk/common/simple-pwquery.c
===================================================================
--- trunk/common/simple-pwquery.c	2007-01-25 08:30:47 UTC (rev 4408)
+++ trunk/common/simple-pwquery.c	2007-01-25 09:15:10 UTC (rev 4409)
@@ -426,17 +426,19 @@
 
 
 /* Ask the gpg-agent for a passphrase and present the user with a
-   DESCRIPTION, a PROMPT and optiaonlly with a TRYAGAIN extra text.
+   DESCRIPTION, a PROMPT and optionally with a TRYAGAIN extra text.
    If a CACHEID is not NULL it is used to locate the passphrase in in
-   the cache and store it under this ID.  If ERRORCODE is not NULL it
-   should point a variable receiving an errorcode; thsi errocode might
-   be 0 if the user canceled the operation.  The function returns NULL
-   to indicate an error. */
+   the cache and store it under this ID.  If OPT_CHECK is true
+   gpg-agent is asked to apply some checks on the passphrase security.
+   If ERRORCODE is not NULL it should point a variable receiving an
+   errorcode; this errocode might be 0 if the user canceled the
+   operation.  The function returns NULL to indicate an error.  */
 char *
 simple_pwquery (const char *cacheid, 
                 const char *tryagain,
                 const char *prompt,
                 const char *description,
+                int opt_check,
                 int *errorcode)
 {
   int fd = -1;
@@ -463,7 +465,7 @@
     char *line;
     /* We allocate 3 times the needed space so that there is enough
        space for escaping. */
-    line = spwq_malloc (15
+    line = spwq_malloc (15 + 10
                         + 3*strlen (cacheid) + 1
                         + 3*strlen (tryagain) + 1
                         + 3*strlen (prompt) + 1
@@ -476,6 +478,8 @@
       }
     strcpy (line, "GET_PASSPHRASE ");
     p = line+15;
+    if (opt_check)
+      p = stpcpy (p, "--check ");
     p = copy_and_escape (p, cacheid);
     *p++ = ' ';
     p = copy_and_escape (p, tryagain);

Modified: trunk/common/simple-pwquery.h
===================================================================
--- trunk/common/simple-pwquery.h	2007-01-25 08:30:47 UTC (rev 4408)
+++ trunk/common/simple-pwquery.h	2007-01-25 09:15:10 UTC (rev 4409)
@@ -48,14 +48,16 @@
 /* Ask the gpg-agent for a passphrase and present the user with a
    DESCRIPTION, a PROMPT and optiaonlly with a TRYAGAIN extra text.
    If a CACHEID is not NULL it is used to locate the passphrase in in
-   the cache and store it under this ID.  If ERRORCODE is not NULL it
-   should point a variable receiving an errorcode; this errocode might
-   be 0 if the user canceled the operation.  The function returns NULL
-   to indicate an error. */
+   the cache and store it under this ID.  If OPT_CHECK is true
+   gpg-agent is asked to apply some checks on the passphrase security.
+   If ERRORCODE is not NULL it should point a variable receiving an
+   errorcode; this errocode might be 0 if the user canceled the
+   operation.  The function returns NULL to indicate an error. */
 char *simple_pwquery (const char *cacheid, 
                       const char *tryagain,
                       const char *prompt,
                       const char *description,
+                      int opt_check,
                       int *errorcode);
 
 /* Ask the gpg-agent to clear the passphrase for the cache ID CACHEID.  */

Modified: trunk/po/de.po
===================================================================
--- trunk/po/de.po	2007-01-25 08:30:47 UTC (rev 4408)
+++ trunk/po/de.po	2007-01-25 09:15:10 UTC (rev 4409)
@@ -9,13 +9,14 @@
 msgstr ""
 "Project-Id-Version: gnupg-1.9.90\n"
 "Report-Msgid-Bugs-To: translations at gnupg.org\n"
-"POT-Creation-Date: 2007-01-24 19:08+0100\n"
-"PO-Revision-Date: 2007-01-24 19:16+0100\n"
+"POT-Creation-Date: 2007-01-25 09:30+0100\n"
+"PO-Revision-Date: 2007-01-25 09:33+0100\n"
 "Last-Translator: Walter Koch <koch at u32.de>\n"
 "Language-Team: German <de at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 #: agent/call-pinentry.c:193
 #, c-format
@@ -166,14 +167,11 @@
 msgid ""
 "Warning:  You have entered a passphrase that%%0Ais obviously not secure.  A "
 "passphrase should%%0Abe at least %u character long."
-msgstr "WARNUNG:  Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben.  Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
-
-#: agent/genkey.c:93
-#, c-format
-msgid ""
+msgid_plural ""
 "Warning:  You have entered a passphrase that%%0Ais obviously not secure.  A "
 "passphrase should%%0Abe at least %u characters long."
-msgstr "WARNUNG:  Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben.  Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
+msgstr[0] "WARNUNG:  Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben.  Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
+msgstr[1] "WARNUNG:  Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben.  Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
 
 #: agent/genkey.c:100
 msgid "Take this one anyway"
@@ -188,11 +186,11 @@
 msgid "Please enter the passphrase to%0Ato protect your new key"
 msgstr "Bitte geben Sie die Passphrase ein%0Aum Ihren Schlüssel zu schützen"
 
-#: agent/genkey.c:148 agent/genkey.c:266 agent/protect-tool.c:1215
+#: agent/genkey.c:148 agent/genkey.c:266 agent/protect-tool.c:1216
 msgid "Please re-enter this passphrase"
 msgstr "Bitte geben Sie die Passphrase noch einmal ein:"
 
-#: agent/genkey.c:175 agent/genkey.c:293 agent/protect-tool.c:1221
+#: agent/genkey.c:175 agent/genkey.c:293 agent/protect-tool.c:1222
 #: tools/symcryptrun.c:487
 msgid "does not match - try again"
 msgstr "Keine Übereinstimmung - bitte nochmal versuchen"
@@ -481,16 +479,16 @@
 "Syntax: gpg-protect-tool [Optionen] [Argumente]\n"
 "Werkzeug zum Bearbeiten von geheimen Schlüsseln\n"
 
-#: agent/protect-tool.c:1206
+#: agent/protect-tool.c:1207
 msgid "Please enter the passphrase to unprotect the PKCS#12 object."
 msgstr "Bitte geben Sie die Passphrase zum Entsperren des PKCS#12 Objekts ein"
 
-#: agent/protect-tool.c:1209
+#: agent/protect-tool.c:1210
 msgid "Please enter the passphrase to protect the new PKCS#12 object."
 msgstr ""
 "Bitte geben Sie die Passphrase zum Schützen des neuen PKCS#12 Objekts ein"
 
-#: agent/protect-tool.c:1212
+#: agent/protect-tool.c:1213
 msgid ""
 "Please enter the passphrase to protect the imported object within the GnuPG "
 "system."
@@ -498,7 +496,7 @@
 "Bitte geben Sie die Passphrase ein, um das importierte Objekt im GnuPG "
 "System zu schützen."
 
-#: agent/protect-tool.c:1217
+#: agent/protect-tool.c:1218
 msgid ""
 "Please enter the passphrase or the PIN\n"
 "needed to complete this operation."
@@ -506,16 +504,16 @@
 "Die Eingabe der Passphrase bzw. der PIN\n"
 "wird benötigt um diese Aktion auszuführen."
 
-#: agent/protect-tool.c:1222 tools/symcryptrun.c:488
+#: agent/protect-tool.c:1223 tools/symcryptrun.c:488
 msgid "Passphrase:"
 msgstr "Passphrase:"
 
-#: agent/protect-tool.c:1235 tools/symcryptrun.c:501
+#: agent/protect-tool.c:1236 tools/symcryptrun.c:501
 #, c-format
 msgid "error while asking for the passphrase: %s\n"
 msgstr "Fehler bei der Abfrage der Passphrase: %s\n"
 
-#: agent/protect-tool.c:1238 tools/symcryptrun.c:505
+#: agent/protect-tool.c:1239 tools/symcryptrun.c:505
 msgid "cancelled\n"
 msgstr "Vom Benutzer abgebrochen\n"
 
@@ -677,11 +675,11 @@
 msgid "problem setting the gpg-agent options\n"
 msgstr "Beim setzen der gpg-agent Optionen ist ein problem aufgetreten\n"
 
-#: common/simple-pwquery.c:527 common/simple-pwquery.c:615
+#: common/simple-pwquery.c:531 common/simple-pwquery.c:619
 msgid "canceled by user\n"
 msgstr "Vom Benutzer abgebrochen\n"
 
-#: common/simple-pwquery.c:534 common/simple-pwquery.c:621
+#: common/simple-pwquery.c:538 common/simple-pwquery.c:625
 msgid "problem with the agent\n"
 msgstr "Problem mit dem Agenten\n"
 




More information about the Gnupg-commits mailing list