Re: [PATCH/RFC 05/17] gettext: make the simple parts of git-init localizable
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:25
Æ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
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).
quoted
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