git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: [PATCH 02/15] Makefile rules for translation catalog generation and installation.
Date: Sun, 2 Sep 2007 17:26:13 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0709021725520.28586@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0709021719380.28586@racer.site>

From: Christian Stimming <stimming@tuhh.de>

[jes: with fixes by the i18n team.]

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Makefile |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1bac6fe..559e65e 100644
--- a/Makefile
+++ b/Makefile
@@ -103,6 +103,21 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 $(GITGUI_BUILT_INS): git-gui
 	$(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
 
+XGETTEXT   ?= xgettext
+msgsdir    ?= $(libdir)/msgs
+msgsdir_SQ  = $(subst ','\'',$(msgsdir))
+PO_TEMPLATE = po/git-gui.pot
+ALL_POFILES = $(wildcard po/*.po)
+ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
+
+$(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
+	$(XGETTEXT) -kmc -LTcl -o $@ $(SCRIPT_SH) $(ALL_LIBFILES)
+update-po:: $(PO_TEMPLATE)
+	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
+$(ALL_MSGFILES): %.msg : %.po
+	@echo Generating catalog $@
+	msgfmt --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
+
 lib/tclIndex: $(ALL_LIBFILES)
 	$(QUIET_INDEX)if echo \
 	  $(foreach p,$(PRELOAD_FILES),source $p\;) \
@@ -136,7 +151,7 @@ GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
 		echo 1>$@ "$$VARS"; \
 	fi
 
-all:: $(ALL_PROGRAMS) lib/tclIndex
+all:: $(ALL_PROGRAMS) lib/tclIndex $(ALL_MSGFILES)
 
 install: all
 	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -145,13 +160,15 @@ install: all
 	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
 	$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
 	$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
+	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
+	$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
 
 dist-version:
 	@mkdir -p $(TARDIR)
 	@echo $(GITGUI_VERSION) > $(TARDIR)/version
 
 clean::
-	rm -f $(ALL_PROGRAMS) lib/tclIndex
+	rm -f $(ALL_PROGRAMS) lib/tclIndex po/*.msg
 	rm -f GIT-VERSION-FILE GIT-GUI-VARS
 
 .PHONY: all install dist-version clean
-- 
1.5.3.2.g46909

  parent reply	other threads:[~2007-09-02 16:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 16:23 [PATCH 00/15] i18n support for git-gui Johannes Schindelin
2007-09-02 16:25 ` [PATCH 01/15] Mark strings for translation Johannes Schindelin
2007-09-02 16:28   ` Johannes Schindelin
2007-09-02 16:25 ` [PATCH 02/15] Makefile rules for translation catalog generation and installation Johannes Schindelin
2007-09-02 16:26 ` Johannes Schindelin [this message]
2007-09-02 16:30 ` [PATCH 03/15] git-gui po/README: Guide to translators Johannes Schindelin
2007-09-02 16:31 ` [PATCH 04/15] Add po/git-gui.pot Johannes Schindelin
2007-09-02 16:31 ` [PATCH 05/15] Ignore po/*.msg Johannes Schindelin
2007-09-02 16:32 ` [PATCH 06/15] Add glossary that can be converted into a po file for each language Johannes Schindelin
2007-09-02 16:32 ` [PATCH 07/15] Add glossary translation template into git Johannes Schindelin
2007-09-02 16:34 ` [PATCH 08/15] German translation for git-gui Johannes Schindelin
2007-09-02 16:34 ` [PATCH 09/15] Initial Chinese " Johannes Schindelin
2007-09-02 16:35 ` [PATCH 10/15] Japanese translation of git-gui Johannes Schindelin
2007-09-02 16:35 ` [PATCH 11/15] Italian " Johannes Schindelin
2007-09-02 16:36 ` [PATCH 12/15] git-gui: initial version of russian translation Johannes Schindelin
2007-09-02 16:37 ` [PATCH 13/15] Hungarian translation of git-gui Johannes Schindelin
2007-09-02 16:37 ` [PATCH 14/15] German glossary for translation Johannes Schindelin
2007-09-02 16:38 ` [PATCH 15/15] git-gui: Added initial version of po/glossary/zh_cn.po Johannes Schindelin
2007-09-02 16:39 ` [PATCH 00/15] i18n support for git-gui Johannes Schindelin
2007-09-03  4:49   ` Shawn O. Pearce
2007-09-03 12:17     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0709021725520.28586@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).