* [PATCH] Use system_path to find 'po'-dir to resolve relative paths
@ 2012-06-06 13:01 Vincent van Ravesteijn
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
0 siblings, 2 replies; 3+ messages in thread
From: Vincent van Ravesteijn @ 2012-06-06 13:01 UTC (permalink / raw)
To: git; +Cc: gitster, Vincent van Ravesteijn
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] git-upload-pack: Setup exec_path before gettext
2012-06-06 13:01 [PATCH] Use system_path to find 'po'-dir to resolve relative paths Vincent van Ravesteijn
@ 2012-06-06 13:03 ` Vincent van Ravesteijn
2012-06-06 18:28 ` [PATCH] Use system_path to find 'po'-dir to resolve relative paths Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Vincent van Ravesteijn @ 2012-06-06 13:03 UTC (permalink / raw)
To: git; +Cc: gitster, Vincent van Ravesteijn
If RUNTIME_PREFIX is set, git_setup_gettext() uses system_path() to find
the directory with po-files. The function system_path() needs the
exec_path so this needs to be setup first before setting up gettext().
Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
upload-pack.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index bb08e2e..f5ba770 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -791,10 +791,11 @@ int main(int argc, char **argv)
int i;
int strict = 0;
- git_setup_gettext();
-
packet_trace_identity("upload-pack");
git_extract_argv0_path(argv[0]);
+
+ git_setup_gettext();
+
read_replace_refs = 0;
for (i = 1; i < argc; i++) {
--
1.7.9.msysgit.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Use system_path to find 'po'-dir to resolve relative paths
2012-06-06 13:01 [PATCH] Use system_path to find 'po'-dir to resolve relative paths Vincent van Ravesteijn
2012-06-06 13:03 ` [PATCH] git-upload-pack: Setup exec_path before gettext Vincent van Ravesteijn
@ 2012-06-06 18:28 ` Junio C Hamano
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2012-06-06 18:28 UTC (permalink / raw)
To: Vincent van Ravesteijn; +Cc: git
Vincent van Ravesteijn <vfr@lyx.org> writes:
> 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>
> ---
Hrm, I'd prefer to see anything that involves RUNTIME_PREFIX first
tested in msysgit tree and then fed to me through them.
Thanks.
> 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");
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-06 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 13:01 [PATCH] Use system_path to find 'po'-dir to resolve relative paths Vincent van Ravesteijn
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
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).