Re: [PATCH/RFC 05/17] gettext: make the simple parts of git-init localizable

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

 



On Tue, Aug 31, 2010 at 15:44, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
>> The only way that could work is if I taught xgettext to extract
>> strings passed to die(), but then managing the false positives would
>> probably be more effort than just marking them manually, and it would
>> be a big load on the translators:
>>
>>     $ ack 'die\("(.*?)"' --output '$1' *[ch] builtin/*[ch] | sort -u | wc -l
>>     1153
>
> To pursue this a little further: would there be any false positives?

Maybe I can see a few probable plumbing messages here, but probably
nothing that's unmanagable: http://gist.github.com/559255

> We could avoid overwhelming translators by waiting until a file has
> been fulling gettextized before allowing xgettext to scavenge it
> (i.e., temporarily using a hard-coded list of files in the xgettext
> invocation).

Yeah we could go this route. But I'm a bit uneasy about it. The way
I'm doing it now I have to manually look at every message to determine
if it's a porcelain error or not.

But it's easier to accidentally mark something with a filelist like
that, or to mark a future plumbing die message that gets introduced
after a file has made the OK list.

Maybe we should have die_plumbing() and die_porcelain() functions to
indicate the nature of the message, although we could get the same
thing with die() and die(_()) once I'm done.

>>> Will strerror() cope correctly without LC_CTYPE set up?  (Not part
>>> of this series, just something I was reminded of.)
>>
>> My GNU/Linux strerror(3) claims to use LC_MESSAGES, but I didn't test
>> it.
>
> Sounds like no, then.
>
> $ cat foo.c
> #include <stdio.h>
> #include <locale.h>
> #include <errno.h>
>
> int main(void)
> {
>        setlocale(LC_ALL, "");
>        setlocale(LC_CTYPE, "C");
>        errno = ENODEV;
>        perror("test");
>        return 0;
> }
> $ make foo
> cc     foo.c   -o foo
> $ ./foo
> test: No such device
> $ LANG=de_DE.UTF-8 ./foo
> test: Kein passendes Ger?t gefunden

What about with MESSAGES instead of ALL, like we're doing?

    setlocale(LC_MESSAGES, "");
    setlocale(LC_CTYPE, "C");

I don't have a box here with a localized C library to test it on.
--
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]