diff options
author | Werner Koch <wk@gnupg.org> | 2015-12-14 20:12:55 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-12-15 13:40:10 +0100 |
commit | 345ec7323d643528d2f904765708b5ecfe51f57b (patch) | |
tree | ed653e8e853df8ea2ad051249e323ef6cb1de675 /g10/getkey.c | |
parent | gpg: New function to printed a detailed error code. (diff) | |
download | gnupg2-345ec7323d643528d2f904765708b5ecfe51f57b.tar.xz gnupg2-345ec7323d643528d2f904765708b5ecfe51f57b.zip |
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@gnupg.org>
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index 16986cb94..589f24080 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; |