Re: [PATCH] Support generate poison .mo files for testing

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Support generate poison .mo files for testing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:32

Nguyen Thai Ngoc Duy [off-list ref] writes:
But a better way could be
replacing "tracked" with "t r a c k e d". We know the rule so we can
recreate the that string from "tracked" in test_i18n*. Or reverse the
upper/lower case, whichever is easier for the recreation by test_i18n*
That does not make much sense to me, so either one of us must be
slightly confused.  I thought the only purpose of testing with the
"poison" was to find messages that must not be localized but were
localized by mistake.  For that, we have to make sure that anything
that uses test_i18n* is reading from Porcelain, in other words, we
must use the byte-for-byte comparison without using test_i18n* when
verifying the plumbing output.  And the primary requirement for this
arrangement to work is that the expected output in C locale and the
actual ouptut in the synthetic poison locale are reliably different.
They do not have to be reversible (I was actually going to suggest
rot13 of the original instead of cycling through the "* gettext
poison *" in your patch --- prefixing with QQ would not work, as it
is likely that the test with "grep" may not be anchored at the left
end).

Teaching test_i18n* to fuzzily match the expected output in C locale
against the actual output in synthetic poison locale may or may not
be doable, but spending any cycle working on that sounds like a
total waste of time (even though it might be fun).  It does not test
that we are translating Porcelain messages correctly.

Am I missing something?  Puzzled...

Re: [PATCH] Support generate poison .mo files for testing

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:54:33

On Wed, Aug 22, 2012 at 11:22 PM, Junio C Hamano [off-list ref] wrote:
Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
But a better way could be
replacing "tracked" with "t r a c k e d". We know the rule so we can
recreate the that string from "tracked" in test_i18n*. Or reverse the
upper/lower case, whichever is easier for the recreation by test_i18n*
That does not make much sense to me, so either one of us must be
slightly confused.  I thought the only purpose of testing with the
"poison" was to find messages that must not be localized but were
localized by mistake.  For that, we have to make sure that anything
that uses test_i18n* is reading from Porcelain, in other words, we
must use the byte-for-byte comparison without using test_i18n* when
verifying the plumbing output.  And the primary requirement for this
arrangement to work is that the expected output in C locale and the
actual ouptut in the synthetic poison locale are reliably different.
They do not have to be reversible (I was actually going to suggest
rot13 of the original instead of cycling through the "* gettext
poison *" in your patch --- prefixing with QQ would not work, as it
is likely that the test with "grep" may not be anchored at the left
end).
Yes, for verifying plumbing output that should be enough.
Teaching test_i18n* to fuzzily match the expected output in C locale
against the actual output in synthetic poison locale may or may not
be doable, but spending any cycle working on that sounds like a
total waste of time (even though it might be fun).  It does not test
that we are translating Porcelain messages correctly.
Right. I was aiming at testing translated messages but obviously went
off track trying to test a fake locale instead. Thanks for stopping
me.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help