git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] gitk i18n implementation: Add Makefile with rules for po file creation and installation.
@ 2007-11-07 17:39 Christian Stimming
  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 21:38 ` [PATCH 1/9] gitk i18n implementation: Add Makefile with rules for po file creation and installation Junio C Hamano
  0 siblings, 2 replies; 14+ messages in thread
From: Christian Stimming @ 2007-11-07 17:39 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Junio C Hamano, git

[-- 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 --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* Re: [PATCH 4/9] gitk i18n: Initial German translation.
@ 2007-12-21 10:50 Christian Stimming
  0 siblings, 0 replies; 14+ messages in thread
From: Christian Stimming @ 2007-12-21 10:50 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

Dear Paul,

thanks a lot for applying the i18n patches to the gitk master at 
git.kernel.org. This looks all fine, except for one mistake that slipped in: 
The character encoding of the newly added po/de.po translation was messed up. 
The file must be in UTF-8 encoding (and I submitted it this way), but the one 
that ended up in the repository is in ISO-8859 encoding.

Could you please do 

  recode latin1..utf8 po/de.po

and commit the result? Otherwise a simple "make" will fail, because when 
msgfmt tries to "compile" the de.po it rightfully complains about the file 
not being in valid utf8, although the po file header claims "Content-Type: 
text/plain; charset=UTF-8".

Thank you very much.

Christian

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-12-21 10:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 17:39 [PATCH 1/9] gitk i18n implementation: Add Makefile with rules for po file creation and installation Christian Stimming
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
  -- strict thread matches above, loose matches on Subject: below --
2007-12-21 10:50 [PATCH 4/9] gitk i18n: Initial German translation Christian Stimming

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).