Re: [PATCH/RFC 05/17] gettext: make the simple parts of git-init localizable
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 31, 2010, 16:05 UTC
- Message-ID
- <AANLkTimPndcAu7RTnzpB0LZ1bHpFC5-QxNkPPAkoD5Hc@mail.gmail.com>
- In-Reply-To
- <20100831154446.GJ2315@burratino>
On Tue, Aug 31, 2010 at 15:44, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Æ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.
Show 27 quoted lines
>>> 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 gefundenWhat 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.