diff mbox series

[v4,2/9] Makefile: generate "po/git.pot" from stable LOCALIZED_C

Message ID 20220523152128.26380-3-worldhello.net@gmail.com (mailing list archive)
State Superseded
Headers show
Series Incremental po/git.pot update and new l10n workflow | expand

Commit Message

Jiang Xin May 23, 2022, 3:21 p.m. UTC
From: Jiang Xin <zhiyou.jx@alibaba-inc.com>

Different users may generate a different message template file
"po/git.pot". This is because the POT file is generated from
"$(LOCALIZED_C)", which is supposed to list all the sources that we
extract the strings to be translated from. But "$(LOCALIZED_C)"
includes "$(C_OBJ)", which only lists the source files used in the
current build for a specific platform and specific compiler

Instead of using "$(C_OBJ)", we use "$(FOUND_C_SOURCES)", which lists
all source files we keep track of (or ship in a tarball extract), to
form a stable "LOCALIZED_C". We also add "$(SCALAR_SOURCES)", which
is part of "$(C_OBJ)" but not included in "$(FOUND_C_SOURCES)".

With this update, the newly generated "po/git.pot" will have 30 new
entries coming from the following C source files:

 * compat/fsmonitor/fsm-listen-win32.c
 * compat/mingw.c
 * compat/regex/regcomp.c
 * compat/simple-ipc/ipc-win32.c

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/Makefile b/Makefile
index 83e968e2a4..46914dcd80 100644
--- a/Makefile
+++ b/Makefile
@@ -2714,7 +2714,8 @@  XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \
 	--keyword=gettextln --keyword=eval_gettextln
 	--keyword=__ --keyword=N__ --keyword="__n:1,2"
+	      $(GENERATED_H)
 LOCALIZED_SH += git-sh-setup.sh