diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-02-22 23:41:22 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-08 12:10:03 -0800 |
commit | 309552295af4b0f2ddd1af15d919441b1744523a (patch) | |
tree | 7ea1908eee1415108fe6f96f527c51e5d1f2dfc5 /Makefile | |
parent | i18n: add GETTEXT_POISON to simulate unfriendly translator (diff) | |
download | tgif-309552295af4b0f2ddd1af15d919441b1744523a.tar.xz |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -217,7 +217,9 @@ all:: # Define NO_REGEX if you have no or inferior regex support in your C library. # # Define GETTEXT_POISON if you are debugging the choice of strings marked -# for translation. This will turn all strings that use gettext into gibberish. +# for translation. In a GETTEXT_POISON build, you can turn all strings marked +# for translation into gibberish by setting the GIT_GETTEXT_POISON variable +# (to any value) in your environment. # # Define JSMIN to point to JavaScript minifier that functions as # a filter to have gitweb.js minified. @@ -1374,6 +1376,7 @@ ifdef NO_SYMLINK_HEAD BASIC_CFLAGS += -DNO_SYMLINK_HEAD endif ifdef GETTEXT_POISON + LIB_OBJS += gettext.o BASIC_CFLAGS += -DGETTEXT_POISON endif ifdef NO_STRCASESTR |