aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog4
-rw-r--r--util/errors.c2
-rw-r--r--util/miscutil.c11
3 files changed, 12 insertions, 5 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index c249e8d67..9ef232582 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+Tue Aug 11 15:12:35 1998 Werner Koch (wk@(none))
+
+ * miscutil.c (answer_is_yes): i18ned
+
Sat Aug 8 18:35:00 1998 Werner Koch (wk@(none))
* ttyio.c (cleanup): New.
diff --git a/util/errors.c b/util/errors.c
index 6b72576b5..54671a297 100644
--- a/util/errors.c
+++ b/util/errors.c
@@ -91,7 +91,7 @@ g10_errstr( int err )
X(UNEXPECTED ,"Unexpected data")
X(TIME_CONFLICT ,"Timestamp conflict")
X(WR_PUBKEY_ALGO ,"Unusable pubkey algorithm")
-
+ X(FILE_EXISTS ,"File exists")
default: p = buf; sprintf(buf, "g10err=%d", err); break;
}
#undef X
diff --git a/util/miscutil.c b/util/miscutil.c
index e4c2cf1ae..041c6faa5 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -25,6 +25,7 @@
#include <ctype.h>
#include "types.h"
#include "util.h"
+#include "i18n.h"
u32
make_timestamp()
@@ -79,14 +80,16 @@ print_string( FILE *fp, byte *p, size_t n, int delim )
putc(*p, fp);
}
+
int
answer_is_yes( const char *s )
{
- if( !stricmp(s, "yes") )
- return 1;
- if( *s == 'y' && !s[1] )
+ char *long_yes = _("yes");
+ char *short_yes = _("yY");
+
+ if( !stricmp(s, long_yes ) )
return 1;
- if( *s == 'Y' && !s[1] )
+ if( strchr( short_yes, *s ) && !s[1] )
return 1;
return 0;
}