Przeglądaj źródła

Add gettext context infrastructure support

Guillem Jover 15 lat temu
rodzic
commit
63e047b9c2
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 1 0
      lib/dpkg/i18n.h
  2. 2 1
      po/Makevars

+ 1 - 0
lib/dpkg/i18n.h

@@ -30,6 +30,7 @@ DPKG_BEGIN_DECLS
 #define _(str) gettext(str)
 #define P_(str, str_plural, n) ngettext(str, str_plural, n)
 #define N_(str) gettext_noop(str)
+#define C_(ctxt, str) pgettext(ctxt, str)
 
 DPKG_END_DECLS
 

+ 2 - 1
po/Makevars

@@ -8,7 +8,8 @@ subdir = po
 top_builddir = ..
 
 # These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=P_:1,2 --from-code=UTF-8
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ \
+                   --keyword=P_:1,2 --keyword=C_:1c,2
 
 MSGMERGE_OPTIONS = --previous