Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 03/72] t/test-lib.sh: add always-set NO_GETTEXT_POISON prerequisite

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:37

Ævar Arnfjörð Bjarmason [off-list ref] writes:
You shouldn't worry about it for now. FWIW NO_GETTEXT_POISON is
documented in po/README in a patch that I plan to submit later.

NO_GETTEXT_POISON is only relevant to people such as myself who are
adding new translations to the source. I.e. changing "foo" to
_("foo"). It's a sanity check to make sure that by doing so you're not
changing some plumbing test, or at least have to realize what it is
that you're changing.
I also had the same reaction to NO_GETTEXT_POISON as Jonathan, and your
above argument is not quite right.

GETTEXT_POISON _is_ relevant to people like you who are working on the
i18n part of the system.  It is a debugging aid to make sure that you are
not marking plumbing messages that should never be translated.

But you cannot say NO_GETTEXT_POISON is not relevant to others; everybody
else who is not actively working on i18n needs to be aware of it, and
needs to be careful when writing his tests.  When your test depends on
output from Porcelain (which is not something we should encourage, but
that is a separate matter), you need to mark that test as "this test will
be broken under GETTEXT_POISON build".

"This test requires NO_GETTEXT_POISON pre-requisite, which is only true
when git is built without GETTEXT_POISON" makes logical sense as a
statement, but it feels somewhat a roundabout way to explain it.

This is somewhat a tangent, but I've been wondering if it might be a
better design to make GETTEXT_POISON a runtime thing.  When git is run
with GIT_LOCALE=POISON, "_(msg)" will all result in gibberish or rot13,
and instead of building a special test-only binary, always compile i18n
version of git that way.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help