Re: ab/i18n (What's cooking in git.git (Feb 2011, #05; Wed, 23))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 24, 2011 at 02:16, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:
>
>> The commit message for the second one seems to have been mangled:
>>
>> Â Â Â i18n: add GETTEXT_POISON to simulate translated messages unfriendly translator
>
> Yeah, I think I was fooled by the header folding while fixing things up
> inside the mailbox.
>
>> I still don't like the #-sign business in this commit. ÂCouldn't it
>> be split into a separate patch, not to be applied until just before
>> the strings in commit/tag/wt-status are marked for translation?
>
> That might be a sensible thing to do. Â Ãvar what do you think?

It could, but I don't want to spend time on it. I think it's fine that
the choice of string is documented in the commit that introduces it.

>> There is also a patch out there to make this use rot13, which I am
>> somewhat fond of. ÂUnfortunately, it leaks (because it is not clear
>> how long translated strings are supposed to last).
>
> Yeah I would imagine it would leak. ÂAlso blindly running rot13 to turn %d
> into %q is probably not what you want.

Gettext gives you a pointer to the string inside a mmaped .mo file,
effectively, so the caller doesn't have to care about it. So you can't
write something that doesn't leak memory unless you preserve that
characteristic.

But it's a debugging mode, it doesn't matter IMO if it leaks memory.

Anyway, to be blunt I really don't see the point of fiddling around
with this bit so much. Whether it's a `"GETTEXT POISON"` constant or
`rot13(msgid)` the same tests will fail. So it's not functionally
changing what the feature was for in the first place, just adding more
complexity.

Of course there might be cases where a test will fail because it's
supposed to end in \n but the poison string doesn't, but since none of
them did I didn't worry about that.

And even if one did I'd probably just mark it as C_LOCALE_ONLY
anyway. Since the intent is to make the person doing the i18n work not
break plumbing, not to perfectly annotate our test suite. I'd much
rather have a few more tests skipped under this poison mode than 20
extra lines of C code that effectively give us nothing to maintain.

If someone else wants to do the work I don't care. I just think
there's more important things to worry about.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]