abook_SOURCES = abook.c database.c filter.c list.c misc.c \
options.c edit.c ldif.c ui.c getname.c \
- getopt.c getopt1.c abook_rl.c mbswidth.c \
+ getopt.c getopt1.c gettext.c abook_rl.c mbswidth.c \
xmalloc.c \
abook.h database.h filter.h list.h misc.h help.h \
options.h edit.h ldif.h abook_curses.h ui.h getname.h \
am_abook_OBJECTS = abook.$(OBJEXT) database.$(OBJEXT) filter.$(OBJEXT) \
list.$(OBJEXT) misc.$(OBJEXT) options.$(OBJEXT) edit.$(OBJEXT) \
ldif.$(OBJEXT) ui.$(OBJEXT) getname.$(OBJEXT) getopt.$(OBJEXT) \
- getopt1.$(OBJEXT) abook_rl.$(OBJEXT) mbswidth.$(OBJEXT) \
- xmalloc.$(OBJEXT)
+ getopt1.$(OBJEXT) gettext.$(OBJEXT) abook_rl.$(OBJEXT) \
+ mbswidth.$(OBJEXT) xmalloc.$(OBJEXT)
abook_OBJECTS = $(am_abook_OBJECTS)
abook_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
target_alias = @target_alias@
abook_SOURCES = abook.c database.c filter.c list.c misc.c \
options.c edit.c ldif.c ui.c getname.c \
- getopt.c getopt1.c abook_rl.c mbswidth.c \
+ getopt.c getopt1.c gettext.c abook_rl.c mbswidth.c \
xmalloc.c \
abook.h database.h filter.h list.h misc.h help.h \
options.h edit.h ldif.h abook_curses.h ui.h getname.h \
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettext.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldif.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbswidth.Po@am__quote@
}
char *
-abook_readline(WINDOW *w, int y, int x, char *s, int limit, bool use_completion)
+abook_readline(WINDOW *w, int y, int x, char *s, bool use_completion)
{
char *ret;
#include "abook_curses.h"
-char *abook_readline(WINDOW *w, int y, int x, char *s, int limit,
+char *abook_readline(WINDOW *w, int y, int x, char *s,
bool use_completion);
#endif
# if ENABLE_NLS
# include <libintl.h>
+char *sgettext(const char *msgid); /* Strip context prefix */
# else
# define gettext(Msgid) ((const char *) (Msgid))
+# define sgettext(Msgid) ((const char *) (Msgid))
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# endif
+# endif /* ENABLE_NLS */
# define _(String) gettext (String)
# define gettext_noop(String) String
# define N_(String) gettext_noop (String)
+# define S_(String) sgettext (String)
-#endif
+#endif /* _GETTEXT_H */
# Set of available languages
-fr sv fi
+fr sv
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=S_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: <cedricduval+abook@free.fr>\n"
-"POT-Creation-Date: 2005-09-21 19:53+0300\n"
+"POT-Creation-Date: 2005-09-23 18:38+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Terminal is too small. Minium terminal size for abook is %dx%d\n"
msgstr ""
-#: ui.c:336
+#: ui.c:256
+msgid " (Y/n)?"
+msgstr ""
+
+#: ui.c:256
+msgid " (y/N)?"
+msgstr ""
+
+#: ui.c:265
+msgid "keybinding for no|n"
+msgstr ""
+
+#: ui.c:267
+msgid "keybinding for yes|y"
+msgstr ""
+
+#: ui.c:334
msgid "help"
msgstr ""
-#: ui.c:345
+#: ui.c:343
msgid "Press any key to continue..."
msgstr ""
-#: ui.c:466
+#: ui.c:464
msgid "Remove selected item(s)"
msgstr ""
-#: ui.c:476
+#: ui.c:474
msgid "Clear WHOLE database"
msgstr ""
-#: ui.c:503
+#: ui.c:502
msgid "Search hit bottom, continuing at top"
msgstr ""
-#: ui.c:526
+#: ui.c:525
msgid "Your current data will be lost - Press 'y' to continue"
msgstr ""
-#: ui.c:545
+#: ui.c:544
msgid "Print All/Selected/Cancel (a/s/C)?"
msgstr ""
-#: ui.c:553
+#: ui.c:552
msgid "No selected items"
msgstr ""
-#: ui.c:579
+#: ui.c:578
msgid "File to open: "
msgstr ""
-#: ui.c:589
+#: ui.c:588
msgid "Save current database"
msgstr ""
-#: ui.c:597
+#: ui.c:596
msgid "Sorry, that specified file appears not to be a valid abook addressbook"
msgstr ""
msgstr ""
"Project-Id-Version: abook\n"
"Report-Msgid-Bugs-To: <cedricduval+abook@free.fr>\n"
-"POT-Creation-Date: 2005-09-21 19:53+0300\n"
+"POT-Creation-Date: 2005-09-23 18:38+0300\n"
"PO-Revision-Date: 2005-09-14 22:48+0200\n"
"Last-Translator: YOUR NAME <E-MAIL@ADDRESS>\n"
"Language-Team: french\n"
msgid "Terminal is too small. Minium terminal size for abook is %dx%d\n"
msgstr "Terminal trop petit. Taille minimale de terminal pour abook: %dx%d\n"
-#: ui.c:336
+#: ui.c:256
+msgid " (Y/n)?"
+msgstr ""
+
+#: ui.c:256
+msgid " (y/N)?"
+msgstr ""
+
+#: ui.c:265
+msgid "keybinding for no|n"
+msgstr ""
+
+#: ui.c:267
+msgid "keybinding for yes|y"
+msgstr ""
+
+#: ui.c:334
msgid "help"
msgstr "aide"
-#: ui.c:345
+#: ui.c:343
msgid "Press any key to continue..."
msgstr "Pressez n'importe quelle touche pour continuer..."
-#: ui.c:466
+#: ui.c:464
msgid "Remove selected item(s)"
msgstr "supprimer les entrées sélectionnées"
-#: ui.c:476
+#: ui.c:474
msgid "Clear WHOLE database"
msgstr "effacer entièrement la base de données"
-#: ui.c:503
+#: ui.c:502
msgid "Search hit bottom, continuing at top"
msgstr "La recherche a atteint la fin, poursuite au début"
-#: ui.c:526
+#: ui.c:525
msgid "Your current data will be lost - Press 'y' to continue"
msgstr "Vos donnée actuelles seront perdues - Pressez 'y' pour continuer"
-#: ui.c:545
+#: ui.c:544
msgid "Print All/Selected/Cancel (a/s/C)?"
msgstr "Afficher tout/sélectionné/annuler (a/s/C)?"
-#: ui.c:553
+#: ui.c:552
msgid "No selected items"
msgstr "Pas d'entrée sélectionnée"
-#: ui.c:579
+#: ui.c:578
msgid "File to open: "
msgstr "Fichier à ouvrir: "
-#: ui.c:589
+#: ui.c:588
msgid "Save current database"
msgstr "Sauvegarder la base de donnée"
-#: ui.c:597
+#: ui.c:596
msgid "Sorry, that specified file appears not to be a valid abook addressbook"
msgstr ""
"Désolé, le fichier spécifier ne semble pas être un carnet d'adresses abook "
msgstr ""
"Project-Id-Version: abook 0.5.4\n"
"Report-Msgid-Bugs-To: <cedricduval+abook@free.fr>\n"
-"POT-Creation-Date: 2005-09-21 19:53+0300\n"
+"POT-Creation-Date: 2005-09-23 18:38+0300\n"
"PO-Revision-Date: 2005-09-14 23:12+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Terminalfönstret är alltför litet. Den minsta tillåtna storleken för abook "
"är %dx%d\n"
-#: ui.c:336
+#: ui.c:256
+msgid " (Y/n)?"
+msgstr ""
+
+#: ui.c:256
+msgid " (y/N)?"
+msgstr ""
+
+#: ui.c:265
+msgid "keybinding for no|n"
+msgstr ""
+
+#: ui.c:267
+msgid "keybinding for yes|y"
+msgstr ""
+
+#: ui.c:334
msgid "help"
msgstr "hjälp"
-#: ui.c:345
+#: ui.c:343
msgid "Press any key to continue..."
msgstr "Tryck på en tangent för att fortsätta..."
-#: ui.c:466
+#: ui.c:464
msgid "Remove selected item(s)"
msgstr "Ta bort valda post(er)"
-#: ui.c:476
+#: ui.c:474
msgid "Clear WHOLE database"
msgstr "Nollställ HELA databasen"
-#: ui.c:503
+#: ui.c:502
msgid "Search hit bottom, continuing at top"
msgstr "Sök nådde slutet, fortsätter från början"
-#: ui.c:526
+#: ui.c:525
msgid "Your current data will be lost - Press 'y' to continue"
msgstr "Nuvarande data kommer att förloras - Tryck på 'y' för att fortsätta"
-#: ui.c:545
+#: ui.c:544
msgid "Print All/Selected/Cancel (a/s/C)?"
msgstr "Skriv ut Alla/Valda/Avbryt (a/s/C)?"
-#: ui.c:553
+#: ui.c:552
msgid "No selected items"
msgstr "Inga poster valda"
-#: ui.c:579
+#: ui.c:578
msgid "File to open: "
msgstr "Öppna fil: "
-#: ui.c:589
+#: ui.c:588
msgid "Save current database"
msgstr "Spara denna databas"
-#: ui.c:597
+#: ui.c:596
msgid "Sorry, that specified file appears not to be a valid abook addressbook"
msgstr ""
"Förlåt, men den angivna filen verkar inte vara en giltig abook-adressbok"
}
char *
-ui_readline(char *prompt, char *s, int limit, bool use_completion)
+ui_readline(char *prompt, char *s, size_t limit, bool use_completion)
{
int y, x;
char *ret;
statusline_ask_boolean(char *msg, int def)
{
int ret;
- char *msg2 = strconcat(msg, def ? " (Y/n)?" : " (y/N)?", NULL);
+ char *msg2 = strconcat(msg, def ? _(" (Y/n)?") : _(" (y/N)?"), NULL);
+ char ch;
statusline_addstr(msg2);
free(msg2);
- switch(tolower(getch())) {
- case 'n':
- ret = FALSE;
- break;
- case 'y':
- ret = TRUE;
- break;
- default:
- ret = def;
- break;
- }
+ ch = tolower(getch());
+
+ if(ch == *(S_("keybinding for no|n")))
+ ret = FALSE;
+ else if(ch == *(S_("keybinding for yes|y")))
+ ret = TRUE;
+ else
+ ret = def;
clear_statusline();
void clear_statusline();
void display_help(int help);
void statusline_addstr(const char *str);
-char * ui_readline(char *prompt, char *s, int limit, bool use_completion);
+char * ui_readline(char *prompt, char *s, size_t limit, bool use_completion);
void refresh_statusline();
void get_commands();
void ui_remove_items();