Author: jseidel-guest
Date: 2007-08-23 15:58:04 +0000 (Thu, 23 Aug 2007)
New Revision: 3779

Modified:
   packages/trunk/hex-a-hop/debian/changelog
   packages/trunk/hex-a-hop/debian/control
   packages/trunk/hex-a-hop/debian/i18n/Makefile
Log:
* Create manpage translation from PO file using po4a.
  Thanks to Helge Kreutzmann <[EMAIL PROTECTED]>.
  Closes: #438676.


Modified: packages/trunk/hex-a-hop/debian/changelog
===================================================================
--- packages/trunk/hex-a-hop/debian/changelog   2007-08-23 15:42:10 UTC (rev 
3778)
+++ packages/trunk/hex-a-hop/debian/changelog   2007-08-23 15:58:04 UTC (rev 
3779)
@@ -21,11 +21,14 @@
     short for Russian and Bulgarian (in UTF-8 encoding).
     This should be responsible for the bogus menu entries
     in the screenshot to #438800.
+  * Create manpage translation from PO file using po4a.
+    Thanks to Helge Kreutzmann <[EMAIL PROTECTED]>.
+    Closes: #438676.
 
   [Miriam Ruiz]
   * Updated Spanish Translation. Thanks quique.
 
- -- Jens Seidel <[EMAIL PROTECTED]>  Thu, 22 Aug 2007 04:44:41 +0200
+ -- Jens Seidel <[EMAIL PROTECTED]>  Thu, 23 Aug 2007 18:44:41 +0200
 
 hex-a-hop (0.0.20070315-3) unstable; urgency=low
 

Modified: packages/trunk/hex-a-hop/debian/control
===================================================================
--- packages/trunk/hex-a-hop/debian/control     2007-08-23 15:42:10 UTC (rev 
3778)
+++ packages/trunk/hex-a-hop/debian/control     2007-08-23 15:58:04 UTC (rev 
3779)
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Debian Games Team <[EMAIL PROTECTED]> 
 Uploaders: Miriam Ruiz <[EMAIL PROTECTED]>, Jens Seidel <[EMAIL PROTECTED]>, 
Sam Hocevar (Debian packages) <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 5), quilt, gettext, libsdl1.2-dev, 
libsdl-pango-dev, sed
+Build-Depends: debhelper (>= 5), quilt, gettext, libsdl1.2-dev, 
libsdl-pango-dev, sed, po4a
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/hex-a-hop/
 XS-Vcs-Browser: 
http://svn.debian.org/wsvn/pkg-games/packages/trunk/hex-a-hop/?op=log

Modified: packages/trunk/hex-a-hop/debian/i18n/Makefile
===================================================================
--- packages/trunk/hex-a-hop/debian/i18n/Makefile       2007-08-23 15:42:10 UTC 
(rev 3778)
+++ packages/trunk/hex-a-hop/debian/i18n/Makefile       2007-08-23 15:58:04 UTC 
(rev 3779)
@@ -25,7 +25,7 @@
 hex_puzzzle_preprocessed.cpp: ../../hex_puzzzle.cpp ../../menus.h 
../../level_list.h
        cd ../..; $(CXX) $(CXXFLAGS) -E hex_puzzzle.cpp -o debian/i18n/$@
 
-hex-a-hop.pot: hex_puzzzle_preprocessed.cpp
+hex-a-hop.pot: hex_puzzzle_preprocessed.cpp ../../gfx.cpp ../hex-a-hop.6
        @echo Creating Template \"[EMAIL PROTECTED]"
 # Yes, we specify both hex_puzzzle.cpp AND 
debian/i18n/hex_puzzzle_preprocessed.cpp
 # as the preprocessed file does not contain all strings as preprocessor
@@ -34,22 +34,30 @@
        cd ../..; xgettext --add-comments="TRANSLATORS:" -k_ -o 
"debian/i18n/[EMAIL PROTECTED]" \
          gfx.cpp hex_puzzzle.cpp debian/i18n/hex_puzzzle_preprocessed.cpp \
                [EMAIL PROTECTED] \
-               --copyright-holder="Tom Beaumont" --from-code=iso-8859-1
-       sed "/^#$$/ r hex-a-hop.pot.comments" [EMAIL PROTECTED] > $@
-       rm -f [EMAIL PROTECTED]
+               --copyright-holder="Tom Beaumont"
+       cd ../..; po4a-updatepo -f man -m debian/hex-a-hop.6 -p 
debian/i18n/hex-a-hop.6.pot
+       @# lets now merge the POT files containing messages from source and 
manpage
+       sed 's/charset=CHARSET/charset=ascii/' hex-a-hop.pot.templ > 
hex-a-hop.pot.templ.po
+       sed 's/charset=CHARSET/charset=ascii/' hex-a-hop.6.pot > 
hex-a-hop.6.pot.po
+       @# The first sed commands prints only the header, the seconds inserts 
hex-a-hop.pot.comments
+       sed -n '1,/^$$/ p' hex-a-hop.pot.templ | sed "/^#$$/ r 
hex-a-hop.pot.comments" > hex-a-hop.pot
+       msgcat hex-a-hop.pot.templ.po hex-a-hop.6.pot.po | sed -n '1,/^$$/ !p' 
>> hex-a-hop.pot
+       rm -f hex-a-hop.pot.templ hex-a-hop.6.pot hex-a-hop.pot.templ.po 
hex-a-hop.6.pot.po
 
 build: build-stamp
 build-stamp: hex-a-hop.pot
-       # Merge all (old) PO files with POT file to ship up-to-date files!
-       # (it cannot happen as usual in the clean target as there are not all 
patches
-       # applied yet)
+       @# Merge all (old) PO files with POT file to ship up-to-date files!
+       @# (it cannot happen as usual in the clean target as there are not all 
patches
+       @# applied yet)
        @cd ../..; for i in `cat debian/i18n/languages.list`; do \
                echo Updating \"$$i\" translation; \
                msgmerge --update debian/i18n/$$i.po debian/i18n/hex-a-hop.pot; 
\
        done
        @for i in `cat languages.list`; do \
                echo Building \"$$i\" translation; \
-               msgfmt $$i.po -o $$i.mo ; \
+               msgfmt $$i.po -o $$i.mo; \
+               addendum=""; test -r ../hex-a-hop.$$i.add && addendum="-a 
../hex-a-hop.$$i.add"; \
+               po4a-translate -f man -m ../hex-a-hop.6 -p $$i.po $$addendum -l 
../hex-a-hop.$$i.6; \
        done
        touch build-stamp
 
@@ -57,6 +65,9 @@
        rm -f *.mo
        rm -f hex_puzzzle_preprocessed.cpp
        rm -f build-stamp
+       @for i in `cat languages.list`; do \
+         rm -f ../hex-a-hop.$$i.6; \
+       done
 
 install: build-stamp
        @for i in `cat languages.list`; do \


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to