tests: rename test to work around GNU gettext bug
[git/dscho.git] / gettext.c
blob7ae5caed42dec1570e70e59a1ceba6cd12f2f11b
1 #include "exec_cmd.h"
2 #include <locale.h>
3 #include <libintl.h>
4 #include <stdlib.h>
6 extern void git_setup_gettext(void) {
7 char *podir;
8 char *envdir = getenv("GIT_TEXTDOMAINDIR");
10 if (envdir) {
11 (void)bindtextdomain("git", envdir);
12 } else {
13 podir = (char *)system_path("share/locale");
14 if (!podir) return;
15 (void)bindtextdomain("git", podir);
16 free(podir);
19 (void)setlocale(LC_MESSAGES, "");
20 (void)setlocale(LC_CTYPE, "");
21 (void)textdomain("git");