[pacman-dev] [PATCH 1/1] always accept untranslated answers 'Y' and 'N'
Christian Hesse
list at eworm.de
Fri Nov 11 20:15:48 UTC 2016
From: Christian Hesse <mail at eworm.de>
'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 <mail at eworm.de>
---
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
More information about the pacman-dev
mailing list