i18n: Makefile: "pot" target to extract messages marked for translation
Add rules to generate a template (po/git.pot) listing messages marked for translation in the C portion of git. To get started translating, just run "make pot". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0c9ea33b90
commit
cd5513a716
16
Makefile
16
Makefile
@ -321,6 +321,7 @@ INSTALL = install
|
|||||||
RPMBUILD = rpmbuild
|
RPMBUILD = rpmbuild
|
||||||
TCL_PATH = tclsh
|
TCL_PATH = tclsh
|
||||||
TCLTK_PATH = wish
|
TCLTK_PATH = wish
|
||||||
|
XGETTEXT = xgettext
|
||||||
PTHREAD_LIBS = -lpthread
|
PTHREAD_LIBS = -lpthread
|
||||||
PTHREAD_CFLAGS =
|
PTHREAD_CFLAGS =
|
||||||
GCOV = gcov
|
GCOV = gcov
|
||||||
@ -1590,6 +1591,7 @@ ifndef V
|
|||||||
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
|
||||||
QUIET_GEN = @echo ' ' GEN $@;
|
QUIET_GEN = @echo ' ' GEN $@;
|
||||||
QUIET_LNCP = @echo ' ' LN/CP $@;
|
QUIET_LNCP = @echo ' ' LN/CP $@;
|
||||||
|
QUIET_XGETTEXT = @echo ' ' XGETTEXT $@;
|
||||||
QUIET_GCOV = @echo ' ' GCOV $@;
|
QUIET_GCOV = @echo ' ' GCOV $@;
|
||||||
QUIET_SUBDIR0 = +@subdir=
|
QUIET_SUBDIR0 = +@subdir=
|
||||||
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
|
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
|
||||||
@ -2057,6 +2059,20 @@ info:
|
|||||||
pdf:
|
pdf:
|
||||||
$(MAKE) -C Documentation pdf
|
$(MAKE) -C Documentation pdf
|
||||||
|
|
||||||
|
XGETTEXT_FLAGS = \
|
||||||
|
--force-po \
|
||||||
|
--add-comments \
|
||||||
|
--msgid-bugs-address="Git Mailing List <git@vger.kernel.org>" \
|
||||||
|
--from-code=UTF-8
|
||||||
|
XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --keyword=_ --keyword=N_ --language=C
|
||||||
|
LOCALIZED_C := $(C_OBJ:o=c)
|
||||||
|
|
||||||
|
po/git.pot: $(LOCALIZED_C)
|
||||||
|
$(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ $(XGETTEXT_FLAGS_C) $(LOCALIZED_C) && \
|
||||||
|
mv $@+ $@
|
||||||
|
|
||||||
|
pot: po/git.pot
|
||||||
|
|
||||||
$(ETAGS_TARGET): FORCE
|
$(ETAGS_TARGET): FORCE
|
||||||
$(RM) $(ETAGS_TARGET)
|
$(RM) $(ETAGS_TARGET)
|
||||||
$(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)
|
$(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)
|
||||||
|
1
po/.gitignore
vendored
Normal file
1
po/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/git.pot
|
Loading…
Reference in New Issue
Block a user