git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/7] Add new target pot in Makefile

From
Osamu OKANO <okano.osamu@gmail.com>
Date
May 13, 2011, 13:14 UTC
Message-ID
<1305292458-3920-2-git-send-email-okano.osamu@gmail.com>
In-Reply-To
<1305292458-3920-1-git-send-email-okano.osamu@gmail.com>
---
 Documentation/.gitignore |    1 +
 Documentation/Makefile   |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 1c3a9fe..0d8dc2e 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -3,6 +3,7 @@
 *.[1-8]
 *.made
 *.texi
+*.pot
 git.info
 gitman.info
 howto-index.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 36989b7..ac97d5f 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -11,6 +11,7 @@ MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
 MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
+MAN_POT=$(patsubst %.txt,%.pot,$(MAN_TXT))
 
 DOC_HTML=$(MAN_HTML)
 
@@ -41,6 +42,7 @@ man7dir=$(mandir)/man7
 # DESTDIR=
 
 ASCIIDOC=asciidoc
+PO4AG=po4a-gettextize
 ASCIIDOC_EXTRA =
 MANPAGE_XSL = manpage-normal.xsl
 XMLTO_EXTRA =
@@ -151,6 +153,7 @@ ifndef V
 	QUIET_SUBDIR0	= +@subdir=
 	QUIET_SUBDIR1	= ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
 			  $(MAKE) $(PRINT_DIR) -C $$subdir
+	QUIET_PO4AG	= @echo '   ' PO4AG $@;
 	export V
 endif
 endif
@@ -166,6 +169,8 @@ man1: $(DOC_MAN1)
 man5: $(DOC_MAN5)
 man7: $(DOC_MAN7)
 
+pot: $(MAN_POT)
+
 info: git.info gitman.info
 
 pdf: user-manual.pdf
@@ -230,7 +235,7 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
 	date >$@
 
 clean:
-	$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
+	$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 *.pot
 	$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
 	$(RM) howto-index.txt howto/*.html doc.dep
 	$(RM) technical/api-*.html technical/api-index.txt
@@ -256,6 +261,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
 		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
 	mv $@+ $@
 
+%.pot : %.txt
+	$(QUIET_PO4AG)$(RM) $@+ $@ && \
+	$(PO4AG) --master-charset UTF8 --localized-charset UTF8 \
+		--master `basename $@ .pot`.txt \
+		--format text --option asciidoc \
+		--po $@+ $< && \
+	mv $@+ $@
+
 user-manual.xml: user-manual.txt user-manual.conf
 	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
 	$(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book -o $@+ $< && \
-- 
1.7.5.1.169.g505a1.dirty
Previous: Osamu OKANONext: Osamu OKANO
Message 2 of 22 in “Document translation with po4a.”
  1. 0/7 Document translation with po4a.Osamu OKANO, May 13, 2011
  2. 1/7 Add new target pot in MakefileOsamu OKANO, May 13, 2011
  3. 2/7 add make(shell) scriptsOsamu OKANO, May 13, 2011
  4. 3/7 cp git-stage.pot ja/git-stage.poOsamu OKANO, May 13, 2011
  5. 4/7 translate ja/git-stage.poOsamu OKANO, May 13, 2011
  6. 5/7 your fileOsamu OKANO, May 13, 2011
  7. Junio C HamanoMay 13, 2011
  8. Drew NorthupMay 13, 2011
  9. 6/7 update git-stage.poOsamu OKANO, May 13, 2011
  10. Junio C HamanoMay 13, 2011
  11. Osamu OKANOMay 14, 2011
  12. Jonathan NiederMay 14, 2011
  13. Junio C HamanoMay 15, 2011
  14. Jonathan NiederMay 15, 2011
  15. Ævar Arnfjörð BjarmasonMay 15, 2011
  16. Jonathan NiederMay 15, 2011
  17. Jonathan NiederMay 15, 2011
  18. Ævar Arnfjörð BjarmasonMay 15, 2011
  19. Jonathan NiederMay 15, 2011
  20. 7/7 translate and remove fazzyOsamu OKANO, May 13, 2011
  21. Junio C HamanoMay 13, 2011
  22. Ævar Arnfjörð BjarmasonMay 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.