DORMANTno replies

[PATCH] help: report on whether or not gettext is enabled

From: Jiang Xin <hidden>
Date: 2026-01-16 02:29:55
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jiang Xin <redacted>

When users report that Git has no localized output, we need to check not
only their locale settings, but also whether Git was built with GETTEXT
support in the first place.

Expose this information via the existing build info output by adding a
"gettext: enabled|disabled" line to `git version --build-options` (and
therefore also to `git bugreport`). The status is derived from whether
`NO_GETTEXT` is defined at build time.

Signed-off-by: Jiang Xin <redacted>
---
 help.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/help.c b/help.c
index 20e114432d..96d70d8e6c 100644
--- a/help.c
+++ b/help.c
@@ -799,6 +799,11 @@ void get_version_info(struct strbuf *buf, int show_build_options)
 
 		if (fsmonitor_ipc__is_supported())
 			strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
+#if defined NO_GETTEXT
+		strbuf_addstr(buf, "gettext: disabled\n");
+#else
+		strbuf_addstr(buf, "gettext: enabled\n");
+#endif
 #if defined LIBCURL_VERSION
 		strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION);
 #endif
-- 
2.52.0.435.g8745eae506
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help