mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
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>
This commit is contained in:
parent
2ea1aebc92
commit
345ec7323d
20
g10/getkey.c
20
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user