From 309552295af4b0f2ddd1af15d919441b1744523a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 22 Feb 2011 23:41:22 +0000 Subject: 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 --- t/test-lib.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 0840e4a5c9..f4c1e04e4f 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1080,7 +1080,13 @@ test -z "$NO_PERL" && test_set_prereq PERL test -z "$NO_PYTHON" && test_set_prereq PYTHON # Can we rely on git's output in the C locale? -test -z "$GETTEXT_POISON" && test_set_prereq C_LOCALE_OUTPUT +if test -n "$GETTEXT_POISON" +then + GIT_GETTEXT_POISON=YesPlease + export GIT_GETTEXT_POISON +else + test_set_prereq C_LOCALE_OUTPUT +fi # test whether the filesystem supports symbolic links ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS -- cgit v1.2.3