summaryrefslogtreecommitdiff
path: root/gettext.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 15:59:17 +0900
committerJunio C Hamano <gitster@pobox.com>2018-05-08 15:59:17 +0900
commit92034a9cd5e71cf686ef66029433bdaba75027b0 (patch)
tree48a2d6429c993e75dc0f4ab76268509dcc82de5f /gettext.c
parentc988f6425acbd9765c55490c45d61f7531d5d83b (diff)
parent64f982b8a791a8e9e612a103d05e5f01a08fce0f (diff)
downloadgit-92034a9cd5e71cf686ef66029433bdaba75027b0.tar.gz
Merge branch 'dj/runtime-prefix'
A build-time option has been added to allow Git to be told to refer to its associated files relative to the main binary, in the same way that has been possible on Windows for quite some time, for Linux, BSDs and Darwin. * dj/runtime-prefix: Makefile: quote $INSTLIBDIR when passing it to sed Makefile: remove unused @@PERLLIBDIR@@ substitution variable mingw/msvc: use the new-style RUNTIME_PREFIX helper exec_cmd: provide a new-style RUNTIME_PREFIX helper for Windows exec_cmd: RUNTIME_PREFIX on some POSIX systems Makefile: add Perl runtime prefix support Makefile: generate Perl header from template file
Diffstat (limited to 'gettext.c')
-rw-r--r--gettext.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gettext.c b/gettext.c
index db727ea020..baba28343c 100644
--- a/gettext.c
+++ b/gettext.c
@@ -2,7 +2,8 @@
* Copyright (c) 2010 Ævar Arnfjörð Bjarmason
*/
-#include "git-compat-util.h"
+#include "cache.h"
+#include "exec-cmd.h"
#include "gettext.h"
#include "strbuf.h"
#include "utf8.h"
@@ -157,10 +158,11 @@ static void init_gettext_charset(const char *domain)
void git_setup_gettext(void)
{
- const char *podir = getenv("GIT_TEXTDOMAINDIR");
+ const char *podir = getenv(GIT_TEXT_DOMAIN_DIR_ENVIRONMENT);
if (!podir)
- podir = GIT_LOCALE_PATH;
+ podir = system_path(GIT_LOCALE_PATH);
+
bindtextdomain("git", podir);
setlocale(LC_MESSAGES, "");
setlocale(LC_TIME, "");