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

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

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 22, 2012, 12:37 UTC
Message-ID
<CACsJy8Dp5FZd9Ko6o18r5TeS5dfbjv61wOmP1452zyvHfX5LMQ@mail.gmail.com>
In-Reply-To
<7vboi3b2n8.fsf@alter.siamese.dyndns.org>
On Wed, Aug 22, 2012 at 6:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> test-poisongen does a similar job to gettext poison feature except
>> that it does it at build time. Gibberish .mo files are generated for
>> all supported langauges and put in po/build/poison-locale. Target
>> "poison-locale" is for this.
>
> What is the significance of this locale being "Gibberish"?
> Currently, for any string, we give "### gettext poison ###" or
> something but the only thing we care about in the poison mode is
> that it is different from the message id, no?  I was wondering if
> these phony translations can be something simple like "Add QQ at the
> beginning of the message id string" and still can catch mistakenly
> marked messages that come from the plumbing layer, or something.

I'm gradually getting there, partly thanks to your question about grepping "tracked" in another thread. This patch does not really generate random strings. It repeats the pattern "* gettext poison *" for evey character that can be replaced. 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*

Show 5 quoted lines
>>  mode change 100644 => 100755 t/test-lib.sh
>>  create mode 100644 test-poisongen.c
>>  mode change 100644 => 100755 wrap-for-bin.sh
>
> Thanks.  I suspect two mode changes weren't intentional?
It's an emacs hook gone bad.
-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 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.