summaryrefslogtreecommitdiff
path: root/gettext.c
diff options
context:
space:
mode:
Diffstat (limited to 'gettext.c')
-rw-r--r--gettext.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gettext.c b/gettext.c
index bb5ba1f..57facbc 100644
--- a/gettext.c
+++ b/gettext.c
@@ -2,15 +2,14 @@
* Copyright (c) 2010 Ævar Arnfjörð Bjarmason
*/
-#include "cache.h"
+#include "git-compat-util.h"
+#include "abspath.h"
+#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
-#include "strbuf.h"
#include "utf8.h"
-#include "config.h"
#ifndef NO_GETTEXT
-# include <locale.h>
# include <libintl.h>
# ifdef GIT_WINDOWS_NATIVE
@@ -80,7 +79,6 @@ static int test_vsnprintf(const char *fmt, ...)
static void init_gettext_charset(const char *domain)
{
- setlocale(LC_CTYPE, "");
charset = locale_charset();
bind_textdomain_codeset(domain, charset);
@@ -102,6 +100,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);
@@ -121,6 +121,8 @@ void git_setup_gettext(void)
init_gettext_charset("git");
textdomain("git");
+ git_gettext_enabled = 1;
+
free(p);
}