diff --git a/gettext.c b/gettext.c index 4dab914902..cf0e4a2441 100644 --- a/gettext.c +++ b/gettext.c @@ -167,11 +167,13 @@ void git_setup_gettext(void) if (!is_absolute_path(podir)) podir = p = system_path(podir); - bindtextdomain("git", podir); - setlocale(LC_MESSAGES, ""); - setlocale(LC_TIME, ""); - init_gettext_charset("git"); - textdomain("git"); + if (is_directory(podir)) { + bindtextdomain("git", podir); + setlocale(LC_MESSAGES, ""); + setlocale(LC_TIME, ""); + init_gettext_charset("git"); + textdomain("git"); + } free(p); }