[yelp] data/domains: Use itstool -j to create xsl domain



commit 07eea5d853481c3c7787d5774a1bf68e4c2c3281
Author: Shaun McCance <shaunm gnome org>
Date:   Fri Nov 2 16:22:33 2012 -0400

    data/domains: Use itstool -j to create xsl domain

 configure.ac             |    4 ++++
 data/domains/Makefile.am |   17 ++++-------------
 data/domains/yelp.pot    |    5 +++--
 data/domains/yelp.xml.in |    2 ++
 4 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 306a729..79edab8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,10 @@ AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
 if test x"$ITSTOOL" = x; then
   AC_MSG_ERROR([itstool is required to build the translation XML files])
 fi
+ITSTOOL_VERSION=`itstool --version | cut -d' ' -f2 | awk -F. '{print $ 1 * 10000 + $ 2 * 100 + $ 3; }'`
+if test "$ITSTOOL_VERSION" -lt 10200; then
+  AC_MSG_ERROR([itstool >= 1.1.2 is required to build the translation XML files])
+fi
 
 LIBLZMA_REQUIRED=4.9
 AC_ARG_ENABLE(lzma,
diff --git a/data/domains/Makefile.am b/data/domains/Makefile.am
index 8725af7..a3b80d0 100644
--- a/data/domains/Makefile.am
+++ b/data/domains/Makefile.am
@@ -6,21 +6,12 @@ yelp.pot: yelp.xml.in
 all: yelp.xml yelp.pot
 
 yelp.xml: yelp.xml.in
-	@echo "  GEN    $@"; \
-	if [ ! -d .yelp ]; then mkdir .yelp; fi; \
-	echo '<files>' > ".yelp.files"; \
-	echo '<source href="yelp.xml.in"/>' >> ".yelp.files"; \
+	$(AM_V_GEN) ( \
 	for lang in $(ALL_LINGUAS); do \
-	  msgfmt -o ".yelp/$$lang.mo" "$(top_srcdir)/po/$$lang.po" || exit 1; \
-	  (cd .yelp && itstool -o "$$lang.xml" -m "$$lang.mo" "../yelp.xml.in") || exit 1; \
-	  rm ".yelp/$$lang.mo" || exit 1; \
-	  echo '<file href="'".yelp/$$lang.xml"'"/>' >> ".yelp.files"; \
+	  msgfmt -o "$$lang.mo" "$(top_srcdir)/po/$$lang.po" || exit 1; \
 	done; \
-	echo '</files>' >> ".yelp.files"; \
-	xsltproc -o "$@" "$(srcdir)/msgs.xsl" ".yelp.files" || exit 1; \
-	for lang in $(ALL_LINGUAS); do rm ".yelp/$$lang.xml"; done; \
-	rmdir .yelp; \
-	rm .yelp.files
+	itstool -o "$@" -j "$^" $(foreach ll,$(ALL_LINGUAS),$(ll).mo); \
+	rm $(foreach ll,$(ALL_LINGUAS),$(ll).mo))
 
 xsldir=$(datadir)/yelp-xsl/xslt/common/domains
 
diff --git a/data/domains/yelp.pot b/data/domains/yelp.pot
index 58e06e3..57d6b77 100644
--- a/data/domains/yelp.pot
+++ b/data/domains/yelp.pot
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-05-14 13:45-0400\n"
+"POT-Creation-Date: 2012-11-02 16:11-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
 "Language-Team: LANGUAGE <LL li org>\n"
@@ -9,6 +9,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#. (itstool) path: msg/msgstr
 #. ID: install.tooltip
 #. This is a format message used to format tooltips on install: links. These
 #. links allow users to install packages by clicking a link in the help. The
@@ -18,7 +19,7 @@ msgstr ""
 #. 
 #. <string/> - The package to install
 #. 
-#: yelp.xml.in:29(msg/msgstr)
+#: yelp.xml.in:31
 msgid "Install <string/>"
 msgstr ""
 
diff --git a/data/domains/yelp.xml.in b/data/domains/yelp.xml.in
index dc94dbe..c35f098 100644
--- a/data/domains/yelp.xml.in
+++ b/data/domains/yelp.xml.in
@@ -13,6 +13,8 @@
 
   <itst:preserveSpaceRule selector="/msg:l10n/msg:msg/its:locNote" preserveSpace="yes"/>
   <its:locNoteRule selector="/msg:l10n/msg:msg/msg:msgstr" locNotePointer="../its:locNote"/>
+
+  <itst:dropRule selector="//its:*" drop="yes"/>
 </its:rules>
 
 <msg id="install.tooltip">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]