diff options
Diffstat (limited to 'gettext.h')
-rw-r--r-- | gettext.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -30,10 +30,15 @@ #ifndef NO_GETTEXT extern void git_setup_gettext(void); +extern int gettext_width(const char *s); #else static inline void git_setup_gettext(void) { } +static inline int gettext_width(const char *s) +{ + return strlen(s); +} #endif #ifdef GETTEXT_POISON @@ -44,6 +49,8 @@ extern int use_gettext_poison(void); static inline FORMAT_PRESERVING(1) const char *_(const char *msgid) { + if (!*msgid) + return ""; return use_gettext_poison() ? "# GETTEXT POISON #" : gettext(msgid); } |