git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent van Ravesteijn <vfr@lyx.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Vincent van Ravesteijn <vfr@lyx.org>
Subject: [PATCH] Use system_path to find 'po'-dir to resolve relative paths
Date: Wed,  6 Jun 2012 13:01:15 +0000	[thread overview]
Message-ID: <1338987675-7388-1-git-send-email-vfr@lyx.org> (raw)

If the specified path for the 'po'-files is a relative path and if
RUNTIME_PREFIX is set, system_path must be used to resolve the directory relative to the executable.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
 gettext.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gettext.c b/gettext.c
index f75bca7..632ccf8 100644
--- a/gettext.c
+++ b/gettext.c
@@ -4,6 +4,7 @@
 
 #include "git-compat-util.h"
 #include "gettext.h"
+#include "exec_cmd.h"
 
 #ifndef NO_GETTEXT
 #	include <locale.h>
@@ -123,7 +124,7 @@ void git_setup_gettext(void)
 
 	if (!podir)
 		podir = GIT_LOCALE_PATH;
-	bindtextdomain("git", podir);
+	bindtextdomain("git", system_path(podir));
 	setlocale(LC_MESSAGES, "");
 	init_gettext_charset("git");
 	textdomain("git");
-- 
1.7.9.msysgit.0

             reply	other threads:[~2012-06-06 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 13:01 Vincent van Ravesteijn [this message]
2012-06-06 13:03 ` [PATCH] git-upload-pack: Setup exec_path before gettext Vincent van Ravesteijn
2012-06-06 18:28 ` [PATCH] Use system_path to find 'po'-dir to resolve relative paths Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338987675-7388-1-git-send-email-vfr@lyx.org \
    --to=vfr@lyx.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).