Skip to content
  • Jonathan Nieder's avatar
    i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set · 30955229
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    30955229