git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Stimming <stimming@tuhh.de>
To: Paul Mackerras <paulus@samba.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH 1/9] gitk i18n implementation: Add Makefile with rules for po file creation and installation.
Date: Wed, 7 Nov 2007 18:39:08 +0100	[thread overview]
Message-ID: <200711071839.08570.stimming@tuhh.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]

The compiled .msg files will be installed into $(sharedir)/gitk/lib/msgs
according to Junio's mailing list proposal on 2007-07-28.
---
These patches are against master of gitk.git at git.kernel.org.

Just in case any of the mailers might mess up whitespaces, I've also
attached all 9 patches in the attached tarball.

 Makefile |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..38154b6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
+# Set the installation directories; this section is needed only in
+# gitk.git but probably not in git.git.
+ifndef gitexecdir
+	gitexecdir := $(shell git --exec-path)
+endif
+ifndef sharedir
+	sharedir := $(dir $(gitexecdir))share
+endif
+
+# From here on, these are needed in git.git/gitk/Makefile.
+gitk_libdir   ?= $(sharedir)/gitk/lib
+msgsdir    ?= $(gitk_libdir)/msgs
+msgsdir_SQ  = $(subst ','\'',$(msgsdir))
+
+## Beginning of po-file creation rules
+XGETTEXT   ?= xgettext
+MSGFMT     ?= msgfmt
+PO_TEMPLATE = po/gitk.pot
+ALL_POFILES = $(wildcard po/*.po)
+ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
+
+all:: $(ALL_MSGFILES)
+
+$(PO_TEMPLATE): gitk
+	$(XGETTEXT) -kmc -LTcl -o $@ gitk
+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 $@)
+
+clean::
+	rm -f $(ALL_PROGRAMS) po/*.msg
+## End of po-file creation rules
+
+# Install rules for po-files
+install: all
+	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
+	$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
+
+uninstall:
+	$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
+	$(QUIET)$(REMOVE_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(REMOVE_D1)
+	$(QUIET)$(REMOVE_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(REMOVE_D1)
+	$(QUIET)$(REMOVE_D0)`dirname '$(DESTDIR_SQ)$(libdir_SQ)'` $(REMOVE_D1)
-- 
1.5.3.4.206.g58ba4


[-- Attachment #2: gitk-i18n-patches.tar.gz --]
[-- Type: application/x-tgz, Size: 19643 bytes --]

             reply	other threads:[~2007-11-07 17:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 17:39 Christian Stimming [this message]
2007-11-07 17:40 ` [PATCH 2/9] gitk i18n implementation: Import msgcat for message string translation; load translation catalogs Christian Stimming
2007-11-07 17:42   ` [PATCH 3/9] gitk i18n implementation: Markup many strings for translation Christian Stimming
2007-11-07 17:44     ` [PATCH 4/9] gitk i18n: Initial German translation Christian Stimming
2007-11-07 17:44       ` [PATCH 5/9] gitk i18n: More i18n markup: findtype options menu Christian Stimming
2007-11-07 17:45         ` [PATCH 6/9] gitk i18n: More i18n markup: highlight_related and selectedhlview " Christian Stimming
2007-11-07 17:45           ` [PATCH 7/9] gitk i18n: More i18n markup: findloc optionmenu Christian Stimming
2007-11-07 17:46             ` [PATCH 8/9] gitk i18n: More i18n markup: gdttype optionmenu Christian Stimming
2007-11-07 17:47               ` [PATCH 9/9] gitk i18n: Recode gitk from latin1 to utf8 so that the (c) copyright character is valid utf8 Christian Stimming
2007-12-11 23:22       ` [PATCH 4/9] gitk i18n: Initial German translation Paul Mackerras
2007-12-12  8:23         ` Christian Stimming
2007-11-07 21:38 ` [PATCH 1/9] gitk i18n implementation: Add Makefile with rules for po file creation and installation Junio C Hamano
2007-11-07 22:18   ` Christian Stimming

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

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

  git send-email \
    --in-reply-to=200711071839.08570.stimming@tuhh.de \
    --to=stimming@tuhh.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=paulus@samba.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.
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 NNTP newsgroup(s).