[Pkg-gnupg-commit] [gnupg2] 37/159: gpg: Reduce number of strings to translate.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Jan 27 13:23:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 345ec7323d643528d2f904765708b5ecfe51f57b
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 14 20:12:55 2015 +0100

    gpg: Reduce number of strings to translate.
    
    * g10/getkey.c (parse_def_secret_key): Do not make debug messages
    translatable.  Make use of print_reported_error.
    --
    
    This patch also passes all required arguments to log_debug ;-).
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 g10/getkey.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/g10/getkey.c b/g10/getkey.c
index 16986cb..589f240 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1225,19 +1225,22 @@ parse_def_secret_key (ctrl_t ctrl)
           if (pk->flags.revoked)
             {
               if (DBG_LOOKUP)
-                log_debug (_("not using %s as default key, %s"), "revoked");
+                log_debug ("not using %s as default key, %s\n",
+                           t->d, "revoked");
               continue;
             }
           if (pk->has_expired)
             {
               if (DBG_LOOKUP)
-                log_debug (_("not using %s as default key, %s"), "expired");
+                log_debug ("not using %s as default key, %s\n",
+                           t->d, "expired");
               continue;
             }
           if (pk_is_disabled (pk))
             {
               if (DBG_LOOKUP)
-                log_debug (_("not using %s as default key, %s"), "disabled");
+                log_debug ("not using %s as default key, %s\n",
+                           t->d, "disabled");
               continue;
             }
 
@@ -1253,12 +1256,9 @@ parse_def_secret_key (ctrl_t ctrl)
         {
           if (! warned && ! opt.quiet)
             {
-              if (gpg_err_code (err) == GPG_ERR_NO_SECKEY)
-                log_info (_("Warning: not using '%s' as default key: %s.\n"),
-                          t->d, gpg_strerror (err));
-              else
-                log_info (_("Warning: not using '%s' as default key: no secret key available: %s\n"),
-                          t->d, gpg_strerror (err));
+              log_info (_("Warning: not using '%s' as default key: %s\n"),
+                        t->d, gpg_strerror (GPG_ERR_NO_SECKEY));
+              print_reported_error (err, GPG_ERR_NO_SECKEY);
             }
         }
       else
@@ -1271,7 +1271,7 @@ parse_def_secret_key (ctrl_t ctrl)
     }
 
   if (! warned && opt.def_secret_key && ! t)
-    log_info (_("all values passed to '%s' ignored.\n"),
+    log_info (_("all values passed to '%s' ignored\n"),
               "--default-key");
 
   warned = 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list