From: Christian Hesse <[email protected]>

'YES' translates to 'JA' in German, thus answer 'J' is expected for
positive answer. This changes the behaviour to always accept 'Y'
and 'N', in addition to the translated values.

Signed-off-by: Christian Hesse <[email protected]>
---
 src/pacman/util.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index fd7438b..e878cb3 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1587,9 +1587,13 @@ static int question(short preset, const char *format, 
va_list args)
                        fprintf(stream, "%s\n", response);
                }
 
-               if(mbscasecmp(response, _("Y")) == 0 || mbscasecmp(response, 
_("YES")) == 0) {
+               if(mbscasecmp(response, "Y") == 0 /* always accept untranslated 
*/
+                               || mbscasecmp(response, _("Y")) == 0
+                               || mbscasecmp(response, _("YES")) == 0) {
                        return 1;
-               } else if(mbscasecmp(response, _("N")) == 0 || 
mbscasecmp(response, _("NO")) == 0) {
+               } else if(mbscasecmp(response, "N") == 0 /* always accept 
untranslated */
+                               || mbscasecmp(response, _("N")) == 0
+                               || mbscasecmp(response, _("NO")) == 0) {
                        return 0;
                }
        }
-- 
2.10.2

Reply via email to