summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-01 14:56:59 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-01 14:56:59 +0000
commitd522253f34a903beb378248a6e8e0e15a688740f (patch)
tree62117f38918e6884b806f1fb6e744cab519bbfce /curs_lib.c
parent8ce68753fd6f92728798e88436fc69cdec4dd16a (diff)
Make mutt_yesorno() language sensitive.
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/curs_lib.c b/curs_lib.c
index 26ad60fc..dc21b477 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -127,9 +127,12 @@ void mutt_edit_file (const char *editor, const char *data)
int mutt_yesorno (const char *msg, int def)
{
int ch;
-
+ const char *yes = _("yes");
+ const char *no = _("no");
+
CLEARLINE(LINES-1);
- printw("%s: [%c] ", msg, def ? 'y' : 'n');
+ printw("%s ([%c]/%c): ", msg, def ? *yes : *no,
+ def ? *no : *yes);
FOREVER
{
mutt_refresh ();
@@ -137,12 +140,12 @@ int mutt_yesorno (const char *msg, int def)
if (ch == ERR) return(-1);
if (CI_is_return (ch))
break;
- else if (ch == 'y')
+ else if (tolower(ch) == tolower(*yes))
{
def = 1;
break;
}
- else if (ch == 'n')
+ else if (tolower(ch) == tolower(*no))
{
def = 0;
break;
@@ -152,7 +155,7 @@ int mutt_yesorno (const char *msg, int def)
BEEP();
}
}
- addstr (def ? "Yes" : "No");
+ addstr (def ? yes : no);
mutt_refresh ();
return (def);
}