Message342258
I tested a small C program and found that setlocale takes precedence for LC_ALL, LC_MESSAGES, and LANG but not for LANGUAGE.
int main(int argc, char **argv) {
char *message1;
//setlocale (LC_ALL, "");
setlocale (LC_ALL, "pt_BR.utf-8");
bindtextdomain ("testc", "/srv/python/cpython/tmp");
textdomain ("testc");
message1 = gettext("lemon");
printf("%s\n", message1);
return 0;
}
$ LC_ALL=es_MX.utf-8 LANGUAGE= LC_MESSAGES=es_MX.utf-8 LANG=es_MX.utf-8 ./test
limão
$ LANGUAGE=es_MX LANG=es_MX.utf-8 ./test
limón
So this could be considered a bug in the stdlib's gettext. If we fix it, we'll need to make sure that we continue to honor LANGUAGE, though. |
|
Date |
User |
Action |
Args |
2019-05-12 14:29:47 | a.badger | set | recipients:
+ a.badger, jwilk, fmoreau |
2019-05-12 14:29:47 | a.badger | set | messageid: <1557671387.19.0.337406446492.issue20044@roundup.psfhosted.org> |
2019-05-12 14:29:47 | a.badger | link | issue20044 messages |
2019-05-12 14:29:47 | a.badger | create | |
|