]> git.deb.at Git - pkg/abook.git/blobdiff - list.c
- i18n support
[pkg/abook.git] / list.c
diff --git a/list.c b/list.c
index da6635e5a26d8da58784cff1bb153d32fe8254ca..00e149ad50b2ffc442a2769d01424ba41654fc2b 100644 (file)
--- a/list.c
+++ b/list.c
 #include "ui.h"
 #include "database.h"
 #include "edit.h"
+#include "gettext.h"
 #include "list.h"
 #include "misc.h"
 #include "options.h"
+#include "xmalloc.h"
 
 #define MIN_EXTRA_COLUMN       ADDRESS /* 2 */
 #define MAX_EXTRA_COLUMN       LAST_FIELD
@@ -163,10 +165,10 @@ list_headerline()
 #if defined(A_BOLD) && defined(A_NORMAL)
        attrset(A_BOLD);
 #endif
-       mvaddstr(2, NAMEPOS, abook_fields[NAME].name);
-       mvaddstr(2, EMAILPOS, abook_fields[EMAIL].name);
+       mvaddstr(2, NAMEPOS, gettext(abook_fields[NAME].name));
+       mvaddstr(2, EMAILPOS, gettext(abook_fields[EMAIL].name));
        if(extra_column > 0)
-               mvaddnstr(2, EXTRAPOS, abook_fields[extra_column].name,
+               mvaddnstr(2, EXTRAPOS, gettext(abook_fields[extra_column].name),
                                COLS-EXTRAPOS);
 #if defined(A_BOLD) && defined(A_NORMAL)
        attrset(A_NORMAL);
@@ -354,7 +356,7 @@ duplicate_item()
                return 1;
 
        for(i = 0; i < ITEM_FIELDS; i++)
-               item[i] = database[curitem][i] ? strdup(database[curitem][i]) :
+               item[i] = database[curitem][i] ? xstrdup(database[curitem][i]) :
                        NULL;
 
        if(add_item2database(item))