Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

[PATCH/RFC 3/2] i18n: do not use gettext.sh by default when NO_GETTEXT is set

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:52:51
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

From: Junio C Hamano <redacted>

When NO_GETTEXT is set, even if a usable installed gettext.sh is
detected to be present, it can only help to use git's simple fallback
stub implementations of gettext and eval_gettext for shell scripts
instead.  That way:

 1) we avoid the complication of autodetection of gettext.sh support
    at runtime;

 2) in particular, if the operating system provides gettext.sh but
    it is unusable, we will not be tricked into trying to use it.

So this patch makes USE_GETTEXT_SCHEME default to fallthrough when
NO_GETTEXT is set.  This is only a default so the operator can set
USE_GETTEXT_SCHEME=gnu or ...=gettext_without_eval_gettext to try the
other schemes.

Signed-off-by: Jonathan Nieder <redacted>
---
Junio C Hamano wrote:
Should be easy to do so, like this?
Probably too late to be useful, but here's a patch with commit message
implementing the same.

 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index b2b738bb..e9b4a2f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1524,6 +1524,9 @@ ifdef GETTEXT_POISON
 endif
 ifdef NO_GETTEXT
 	BASIC_CFLAGS += -DNO_GETTEXT
+	ifndef USE_GETTEXT_SCHEME
+		USE_GETTEXT_SCHEME = fallthrough
+	endif
 endif
 ifdef NO_STRCASESTR
 	COMPAT_CFLAGS += -DNO_STRCASESTR
-- 
1.7.9.rc2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help