git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2012, 16:22 UTC
Message-ID
<7v393ec2w9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACsJy8Dp5FZd9Ko6o18r5TeS5dfbjv61wOmP1452zyvHfX5LMQ@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> 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...
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 7 of 10 in “Build in gettext poison feature unconditionally”
  1. Build in gettext poison feature unconditionallyNguyễn Thái Ngọc Duy, Aug 21, 2012
  2. Jonathan NiederAug 21, 2012
  3. Junio C HamanoAug 21, 2012
  4. Support generate poison .mo files for testingNguyễn Thái Ngọc Duy, Aug 22, 2012
  5. Junio C HamanoAug 22, 2012
  6. Nguyen Thai Ngoc DuyAug 22, 2012
  7. Junio C HamanoAug 22, 2012
  8. Nguyen Thai Ngoc DuyAug 23, 2012
  9. Junio C HamanoAug 22, 2012
  10. Nguyen Thai Ngoc DuyAug 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.