Re: [PATCH/RFC 05/17] gettext: make the simple parts of git-init localizable
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 31, 2010, 15:44 UTC
- Message-ID
- <20100831154446.GJ2315@burratino>
- In-Reply-To
- <AANLkTikd7mc4DjTVaKip_WFqVdezE13ZbL+Vmfqd8yCu@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> 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
> 1153To pursue this a little further: would there be any false positives?
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).
Show 5 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 gefunden