]> git.deb.at Git - pkg/abook.git/commitdiff
Localized keybindings for --add-email
authorCedric Duval <cedricduval@free.fr>
Mon, 26 Sep 2005 16:08:00 +0000 (16:08 +0000)
committerCedric Duval <cedricduval@free.fr>
Mon, 26 Sep 2005 16:08:00 +0000 (16:08 +0000)
abook.c

diff --git a/abook.c b/abook.c
index daffe43adab1bd0245e63d4684b469d4f1fe2bc5..9458cfd44db0777c9c1812840aed13412c751bdd 100644 (file)
--- a/abook.c
+++ b/abook.c
@@ -736,17 +736,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,
+                                       *_("keybinding for yes|y"),
+                                       *_("keybinding for no|n"));
+                       c = tolower(getc(in));
+                       if(c == *_("keybinding for no|n")) {
                                fclose(in);
                                return 0;
                        }
-               } while(c != 'y' && c != 'Y');
+               } while(c != *_("keybinding for yes|y"));
                fclose(in);
        }