]> git.ipfire.org Git - thirdparty/git.git/blobdiff - gettext.c
gettext: avoid using gettext if the locale dir is not present
[thirdparty/git.git] / gettext.c
index 1b564216d03f6a7bb75fb4c867ad1b0e5cfbecd0..610d402fe720aba33281877f47976895f659578f 100644 (file)
--- a/gettext.c
+++ b/gettext.c
@@ -109,6 +109,8 @@ static void init_gettext_charset(const char *domain)
                setlocale(LC_CTYPE, "C");
 }
 
+int git_gettext_enabled = 0;
+
 void git_setup_gettext(void)
 {
        const char *podir = getenv(GIT_TEXT_DOMAIN_DIR_ENVIRONMENT);
@@ -130,6 +132,8 @@ void git_setup_gettext(void)
        init_gettext_charset("git");
        textdomain("git");
 
+       git_gettext_enabled = 1;
+
        free(p);
 }