1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-21 15:01:41 +02:00

g10: Improve error message.

* g10/keyedit.c (keyedit_menu): When complaining that a user ID or key
must be selected, indicate what command to use to do this.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-09-16 15:03:40 +02:00
parent 6845737736
commit 172af881a1

View File

@ -1769,7 +1769,7 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
int n1; int n1;
if (!(n1 = count_selected_uids (keyblock))) if (!(n1 = count_selected_uids (keyblock)))
tty_printf (_("You must select at least one user ID.\n")); tty_printf (_("You must select at least one user ID (use the 'uid' command).\n"));
else if (real_uids_left (keyblock) < 1) else if (real_uids_left (keyblock) < 1)
tty_printf (_("You can't delete the last user ID!\n")); tty_printf (_("You can't delete the last user ID!\n"));
else if (cpr_get_answer_is_yes else if (cpr_get_answer_is_yes
@ -1789,7 +1789,7 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
int n1; int n1;
if (!(n1 = count_selected_uids (keyblock))) if (!(n1 = count_selected_uids (keyblock)))
tty_printf (_("You must select at least one user ID.\n")); tty_printf (_("You must select at least one user ID (use the 'uid' command).\n"));
else if (menu_delsig (keyblock)) else if (menu_delsig (keyblock))
{ {
/* No redisplay here, because it may scroll away some /* No redisplay here, because it may scroll away some
@ -1949,7 +1949,7 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
int n1; int n1;
if (!(n1 = count_selected_keys (keyblock))) if (!(n1 = count_selected_keys (keyblock)))
tty_printf (_("You must select at least one key.\n")); tty_printf (_("You must select at least one key (use the 'key' command).\n"));
else if (!cpr_get_answer_is_yes else if (!cpr_get_answer_is_yes
("keyedit.remove.subkey.okay", ("keyedit.remove.subkey.okay",
n1 > 1 ? _("Do you really want to delete the " n1 > 1 ? _("Do you really want to delete the "
@ -1985,7 +1985,7 @@ keyedit_menu (ctrl_t ctrl, const char *username, strlist_t locusr,
int n1; int n1;
if (!(n1 = count_selected_uids (keyblock))) if (!(n1 = count_selected_uids (keyblock)))
tty_printf (_("You must select at least one user ID.\n")); tty_printf (_("You must select at least one user ID (use the 'uid' command).\n"));
else if (cpr_get_answer_is_yes else if (cpr_get_answer_is_yes
("keyedit.revoke.uid.okay", ("keyedit.revoke.uid.okay",
n1 > 1 ? _("Really revoke all selected user IDs? (y/N) ") n1 > 1 ? _("Really revoke all selected user IDs? (y/N) ")