author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 22 Feb 2011 23:41:22 +0000 (23:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 8 Mar 2011 20:10:03 +0000 (12:10 -0800) | ||
commit | 309552295af4b0f2ddd1af15d919441b1744523a | |
tree | 7ea1908eee1415108fe6f96f527c51e5d1f2dfc5 | tree | snapshot |
parent | bb946bba761288e24b3eb621a3782a4fa804f21d | commit | 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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history | |
gettext.c | [new file with mode: 0644] | blob |
gettext.h | diff | blob | history | |
t/test-lib.sh | diff | blob | history |