Re: [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 7, 2010, 08:47 UTC
- Message-ID
- <AANLkTinp5R+jMKpHpkMYK3MDWLuUpM7T-+KBZ+NG4g-G@mail.gmail.com>
- In-Reply-To
- <20100907053420.GR1182@burratino>
On Tue, Sep 7, 2010 at 05:34, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 20 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>
>> to do this we'd have steal some locale.
>
> Alas. Thanks for explaining.
>
>> Also, the set of tests we want to skip under POISON (i.e. automated
>> garbage) is slightly different from the tests we want to skip under
>> TEST_LOCALE=, because some of those tests are checking for the %s in
>> "file failed: %s". So they'll fail under POISON, but shouldn't fail
>> under any translation.
>
> This could be fixable in the long term, no? e.g., under POISON we
> could have something like
>
> _ () {
> perl -pe 's/(?<!%)[^%#]*/POISON/g'
> }
>
> to preserve commit message comments and % directives.Yeah, but rather than do fancy stuff like that in C I just made a dumb implementation.
It's far easier to just skip a few more tests than it is to come up with your own parser that avoids printf directives but still poisons the message enough that e.g. <grep "Clone" ..> won't work anymore.