2 * Copyright (c) 2010-2011 Ævar Arnfjörð Bjarmason
4 * This is a skeleton no-op implementation of gettext for Git.
5 * You can replace it with something that uses libintl.h and wraps
6 * gettext() to try out the translations.
12 #if defined(_) || defined(Q_)
13 #error "namespace conflict: '_' or 'Q_' is pre-defined?"
16 #define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
19 extern int use_gettext_poison(void);
21 #define use_gettext_poison() 0
24 static inline FORMAT_PRESERVING(1) const char *_(const char *msgid
)
26 return use_gettext_poison() ? "# GETTEXT POISON #" : msgid
;
29 static inline FORMAT_PRESERVING(1) FORMAT_PRESERVING(2)
30 const char *Q_(const char *msgid
, const char *plu
, unsigned long n
)
32 if (use_gettext_poison())
33 return "# GETTEXT POISON #";
34 return n
== 1 ? msgid
: plu
;
37 /* Mark msgid for translation but do not translate it. */
38 #define N_(msgid) (msgid)