aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-01-18 10:20:15 +0000
committerWerner Koch <[email protected]>2016-01-18 10:20:15 +0000
commit437965e5622612941ed0fa55584811c65069242e (patch)
tree4977ccb7f8684b95f0a7c286d0ac58ee201ee42f /g10/keyedit.c
parentdoc: Fix description of --s2k-* options to match gpg 2.1. (diff)
downloadgnupg-437965e5622612941ed0fa55584811c65069242e.tar.gz
gnupg-437965e5622612941ed0fa55584811c65069242e.zip
Use ngettext for some strings.
* scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for some diagnostics. (do_genkey): Ditto. * g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto. * g10/keylist.c (print_signature_stats): Ditto. * g10/keyserver.c (keyserver_refresh): Ditto. * g10/sig-check.c (check_signature_metadata_validity): Ditto. * g10/sign.c (do_sign): Ditto. * g10/trustdb.c (reset_trust_records): Ditto. (validate_keys): Use a table like diagnostic output. -- Suggested-by: Ineiev <[email protected]> Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/keyedit.c')
-rw-r--r--g10/keyedit.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 497fd1b6c..30f52a4b0 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -382,23 +382,25 @@ check_all_keysigs (KBNODE keyblock, int only_selected, int only_selfsigs)
}
if (!has_selfsig)
mis_selfsig++;
- if (inv_sigs == 1)
- tty_printf (_("1 bad signature\n"));
- else if (inv_sigs)
- tty_printf (_("%d bad signatures\n"), inv_sigs);
- if (no_key == 1)
- tty_printf (_("1 signature not checked due to a missing key\n"));
- else if (no_key)
- tty_printf (_("%d signatures not checked due to missing keys\n"), no_key);
- if (oth_err == 1)
- tty_printf (_("1 signature not checked due to an error\n"));
- else if (oth_err)
- tty_printf (_("%d signatures not checked due to errors\n"), oth_err);
- if (mis_selfsig == 1)
- tty_printf (_("1 user ID without valid self-signature detected\n"));
- else if (mis_selfsig)
- tty_printf (_("%d user IDs without valid self-signatures detected\n"),
- mis_selfsig);
+
+ if (inv_sigs)
+ tty_printf (ngettext("%d bad signature\n",
+ "%d bad signatures\n", inv_sigs), inv_sigs);
+
+ if (no_key)
+ tty_printf (ngettext("%d signature not checked due to a missing key\n",
+ "%d signatures not checked due to missing keys\n",
+ no_key), no_key);
+
+ if (oth_err)
+ tty_printf (ngettext("%d signature not checked due to an error\n",
+ "%d signatures not checked due to errors\n",
+ oth_err), oth_err);
+
+ if (mis_selfsig)
+ tty_printf (ngettext("%d user ID without valid self-signature detected\n",
+ "%d user IDs without valid self-signatures detected\n",
+ mis_selfsig), mis_selfsig);
return inv_sigs || no_key || oth_err || mis_selfsig;
}
@@ -3722,8 +3724,8 @@ menu_delsig (KBNODE pub_keyblock)
if (changed)
{
commit_kbnode (&pub_keyblock);
- tty_printf (changed == 1 ? _("Deleted %d signature.\n")
- : _("Deleted %d signatures.\n"), changed);
+ tty_printf (ngettext("Deleted %d signature.\n",
+ "Deleted %d signatures.\n", changed), changed);
}
else
tty_printf (_("Nothing deleted.\n"));
@@ -3769,11 +3771,9 @@ menu_clean (KBNODE keyblock, int self_only)
}
else if (sigs)
{
- tty_printf (sigs == 1 ?
- _("User ID \"%s\": %d signature removed\n") :
- _("User ID \"%s\": %d signatures removed\n"),
- user, sigs);
-
+ tty_printf (ngettext("User ID \"%s\": %d signature removed\n",
+ "User ID \"%s\": %d signatures removed\n",
+ sigs), user, sigs);
modified = 1;
}
else