aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-07 11:08:10 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-07 11:08:10 -0700
commit800981f40df7de20216f0b364a138fbf5c16b824 (patch)
tree424e24cd4fde8acc1a1ac307bedbe8f211c0cced
parentbdac578482c5076078174f284d7c5d9d06940754 (diff)
parent0c3a433f94d6809bd6c81ef3bd5c5315c844aa5d (diff)
downloadgit-800981f40df7de20216f0b364a138fbf5c16b824.tar.gz
git-800981f40df7de20216f0b364a138fbf5c16b824.tar.xz
Merge branch 'tr/maint-parseopt-avoid-empty'
A workaround to avoid doing _(""), which translates to unwanted magic string in the .po files. * tr/maint-parseopt-avoid-empty: gettext: do not translate empty string
-rw-r--r--gettext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gettext.h b/gettext.h
index 57ba8bb02..376297bf7 100644
--- a/gettext.h
+++ b/gettext.h
@@ -44,6 +44,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);
}