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

2012-08-23 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 22, 2012 at 11:22 PM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@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

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

2012-08-23 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 22, 2012 at 11:43 PM, Junio C Hamano gits...@pobox.com wrote: why are you special casing a run of non-blank letters that begin with a dollar sign (swapping two ints is done with %2$d %1$d, a percent still at the beginning, so there must be something else I am missing)? '$' is for

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

2012-08-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@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

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

2012-08-22 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 22, 2012 at 6:13 PM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@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

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

2012-08-22 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@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

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

2012-08-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: +static void translate(const char *msg, struct strbuf *buf) +{ + const char *end = msg + strlen(msg); + const char *text = * GETTEXT POISON *; + int text_len = strlen(text); + int t = 0; + + strbuf_reset(buf); + /*

[PATCH] Support generate poison .mo files for testing

2012-08-21 Thread Nguyễn Thái Ngọc Duy
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. User can run the test with these .mo files by setting POISON_LOCALE