diff options
Diffstat (limited to 'gettext.h')
-rw-r--r-- | gettext.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -28,8 +28,6 @@ #define FORMAT_PRESERVING(n) __attribute__((format_arg(n))) -int use_gettext_poison(void); - #ifndef NO_GETTEXT extern int git_gettext_enabled; void git_setup_gettext(void); @@ -38,7 +36,6 @@ int gettext_width(const char *s); #define git_gettext_enabled (0) static inline void git_setup_gettext(void) { - use_gettext_poison(); /* getenv() reentrancy paranoia */ } static inline int gettext_width(const char *s) { @@ -50,15 +47,14 @@ static inline FORMAT_PRESERVING(1) const char *_(const char *msgid) { if (!*msgid) return ""; - return use_gettext_poison() ? "# GETTEXT POISON #" : - !git_gettext_enabled ? msgid : gettext(msgid); + if (!git_gettext_enabled) + return msgid; + return gettext(msgid); } static inline FORMAT_PRESERVING(1) FORMAT_PRESERVING(2) const char *Q_(const char *msgid, const char *plu, unsigned long n) { - if (use_gettext_poison()) - return "# GETTEXT POISON #"; if (!git_gettext_enabled) return n == 1 ? msgid : plu; return ngettext(msgid, plu, n); |