diff --git a/gettext.c b/gettext.c index edce53a4e3..0a974f9cd1 100644 --- a/gettext.c +++ b/gettext.c @@ -169,11 +169,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); }