commit 6dd308d0fb117921c01af02791184a81159fd798
parent 4872f42cd23a4b842c8e31a2776a6781344f146d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 19 Apr 2018 21:24:03 +0200
prompt: recognize Yes/No/All in English when the locale gives no match
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/prompt.c b/src/prompt.c
@@ -716,12 +716,21 @@ int do_yesno_prompt(bool all, const char *msg)
kbinput = get_kbinput(bottomwin, !all);
/* See if the pressed key is in the Yes, No, or All strings. */
+#ifdef ENABLE_NLS
if (strchr(yesstr, kbinput) != NULL)
response = 1;
else if (strchr(nostr, kbinput) != NULL)
response = 0;
else if (all && strchr(allstr, kbinput) != NULL)
response = 2;
+ else
+#endif
+ if (strchr("Yy", kbinput) != NULL)
+ response = 1;
+ else if (strchr("Nn", kbinput) != NULL)
+ response = 0;
+ else if (all && strchr("Aa", kbinput) != NULL)
+ response = 2;
else if (func_from_key(&kbinput) == do_cancel)
response = -1;
#ifdef ENABLE_MOUSE