]> git.deb.at Git - pkg/abook.git/blobdiff - abook.c
Minor fix.
[pkg/abook.git] / abook.c
diff --git a/abook.c b/abook.c
index daffe43adab1bd0245e63d4684b469d4f1fe2bc5..2f6c2d53437e3fd95e44652f507a304d08955303 100644 (file)
--- a/abook.c
+++ b/abook.c
@@ -8,6 +8,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <ctype.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -736,17 +737,18 @@ add_email_add_item(int quiet, char *name, char *email)
                }
 
                do {
-                       /* TODO gettext: handle translated keypresses? */
-                       printf(_("Add \"%s <%s>\" to %s? (y/n)\n"),
+                       printf(_("Add \"%s <%s>\" to %s? (%c/%c)\n"),
                                        name,
                                        email,
-                                       datafile);
-                       c = getc(in);
-                       if(c == 'n' || c == 'N') {
+                                       datafile,
+                                       *S_("keybinding for yes|y"),
+                                       *S_("keybinding for no|n"));
+                       c = tolower(getc(in));
+                       if(c == *S_("keybinding for no|n")) {
                                fclose(in);
                                return 0;
                        }
-               } while(c != 'y' && c != 'Y');
+               } while(c != *S_("keybinding for yes|y"));
                fclose(in);
        }