path: root/gettext.h
diff options
authorJonathan Nieder <>2011-02-22 23:41:22 (GMT)
committerJunio C Hamano <>2011-03-08 20:10:03 (GMT)
commit309552295af4b0f2ddd1af15d919441b1744523a (patch)
tree7ea1908eee1415108fe6f96f527c51e5d1f2dfc5 /gettext.h
parentbb946bba761288e24b3eb621a3782a4fa804f21d (diff)
i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set
Tweak the GETTEXT_POISON facility so it is activated at run time instead of compile time. If the GIT_GETTEXT_POISON environment variable is set, _(msg) will result in gibberish as before; but if the GIT_GETTEXT_POISON variable is not set, it will return the message for human-readable output. So the behavior of mistranslated and untranslated git can be compared without rebuilding git in between. For simplicity we always set the GIT_GETTEXT_POISON variable in tests. This does not affect builds without the GETTEXT_POISON compile-time option set, so non-i18n git will not be slowed down. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'gettext.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/gettext.h b/gettext.h
index 11d82b0..04b5958 100644
--- a/gettext.h
+++ b/gettext.h
@@ -16,7 +16,7 @@
#define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
-#define use_gettext_poison() 1
+extern int use_gettext_poison(void);
#define use_gettext_poison() 0