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 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 shell variab

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 wrote: > Nguyen Thai Ngoc Duy 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

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

2012-08-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy 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); > + /* preserve

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

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

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 wrote: > Nguyễn Thái Ngọc Duy 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. Targe

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

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

[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