diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-01 14:56:59 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-01 14:56:59 +0000 |
commit | d522253f34a903beb378248a6e8e0e15a688740f (patch) | |
tree | 62117f38918e6884b806f1fb6e744cab519bbfce /curs_lib.c | |
parent | 8ce68753fd6f92728798e88436fc69cdec4dd16a (diff) |
Make mutt_yesorno() language sensitive.
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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); } |