gimp-help-2 r2604 - in branches/xml2po-support: . quickreference stylesheets tools tools/migrate



Author: ulfehlert
Date: Sun Nov 30 19:57:42 2008
New Revision: 2604
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2604&view=rev

Log:
2008-11-30  Ulf-D. Ehlert  <ulfehlert svn gnome org>

	* stylesheets/authors_docbook.xsl
	* tools/migrate.sh: add 'lang' attribute to the gimp-team
	section of src/preface/authors.xml (required for splitting)

	* tools/migrate/convert-glossary.py: minor changes

	* Makefile.am: replaced "ln_s" with "LN_S"; call xsltproc with
	default.language "nb" instead of "no"; fixed default.language when
	making "gimp.xml"

	* quickreference/Makefile.am: removed GIMP_HELP_BUILD variable
	(created via the "--disable-build" configure option)


Modified:
   branches/xml2po-support/ChangeLog
   branches/xml2po-support/Makefile.am
   branches/xml2po-support/quickreference/Makefile.am
   branches/xml2po-support/stylesheets/authors_docbook.xsl
   branches/xml2po-support/tools/migrate.sh
   branches/xml2po-support/tools/migrate/convert-glossary.py

Modified: branches/xml2po-support/Makefile.am
==============================================================================
--- branches/xml2po-support/Makefile.am	(original)
+++ branches/xml2po-support/Makefile.am	Sun Nov 30 19:57:42 2008
@@ -340,7 +340,7 @@
 	$(cmd) src_dir=$$(cd $(srcdir)/$(xmldir) && pwd); \
 	poxml_dir=$(xmlpodir); \
 	test -d $${poxml_dir} || $(mkdir_p) $${poxml_dir}; \
-	test -d $${poxml_dir}/en || $(ln_s) $(abs_builddir)/$${src_dir} $${poxml_dir}/en; \
+	test -d $${poxml_dir}/en || $(LN_S) $(abs_builddir)/$${src_dir} $${poxml_dir}/en; \
 	touch $@
 
 # Special case: en
@@ -390,12 +390,13 @@
 	$(msg) "*** Making html for $* ... "
 	$(cmd) rm -rf $(htmldir)/$*
 	$(cmd) $(mkdir_p) $(htmldir)/$*
-	$(cmd) test -h $(htmldir)/images || $(ln_s) ../images $(htmldir)/
+	$(cmd) test -h $(htmldir)/images || $(LN_S) ../images $(htmldir)/
 
-	$(cmd) $(XSLTPROC) \
+	$(cmd) test "$*" = "no" && lang="nb" || lang="$*"; \
+	$(XSLTPROC) \
 	  $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
 	  --xinclude \
-	  --stringparam l10n.gentext.default.language $* \
+	  --stringparam l10n.gentext.default.language $${lang} \
 	  -o html/$*/ \
 	  stylesheets/plainhtml.xsl \
 	  $(xmlpodir)/$*/gimp.xml
@@ -528,10 +529,11 @@
 		echo "Making $${destdir}/$${id}-draft.html ... "; \
 		xmlfile="$<"; xmlfile=$${xmlfile#*/}; \
 		xmlfile=$(xmlpodir)/$${lang}/$${xmlfile#$${lang}/}; \
+		if [ "$${lang}" = "no" ]; then lang="nb"; fi; \
 		$(XSLTPROC) \
 		    $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
 		    --xinclude \
-		    --stringparam l10n.gentext.default.language $$lang \
+		    --stringparam l10n.gentext.default.language $${lang} \
 		    --novalid \
 		    --output $${destdir}/$${id}-draft.html \
 		    $(srcdir)/stylesheets/drafthtml.xsl \

Modified: branches/xml2po-support/quickreference/Makefile.am
==============================================================================
--- branches/xml2po-support/quickreference/Makefile.am	(original)
+++ branches/xml2po-support/quickreference/Makefile.am	Sun Nov 30 19:57:42 2008
@@ -56,11 +56,9 @@
 
 docbook: $(foreach lang,$(QUICKREFERENCE_ALL_LINGUAS),docbook/gimp-keys-$(lang).xml)
 
-if GIMP_HELP_BUILD
 if HAVE_XML2PO
 all-local: svg docbook
 endif
-endif
 
 clean-local:
 	rm -rf docbook

Modified: branches/xml2po-support/stylesheets/authors_docbook.xsl
==============================================================================
--- branches/xml2po-support/stylesheets/authors_docbook.xsl	(original)
+++ branches/xml2po-support/stylesheets/authors_docbook.xsl	Sun Nov 30 19:57:42 2008
@@ -28,7 +28,7 @@
     from "stylesheets/authors.xml".
 </xsl:comment>
 
-    <sect1 id="gimp-team">
+    <sect1 id="gimp-team" lang="en">
       <title>
         <xsl:choose>
           <xsl:when test="dc:title">

Modified: branches/xml2po-support/tools/migrate.sh
==============================================================================
--- branches/xml2po-support/tools/migrate.sh	(original)
+++ branches/xml2po-support/tools/migrate.sh	Sun Nov 30 19:57:42 2008
@@ -38,7 +38,7 @@
    [ -e stylesheets/authors_docbook.xsl ] &&
    [ -e stylesheets/authors.xml ]
 then
-    echo "Creating src/preface/authors.xml:"
+    echo "Creating src/preface/authors.xml..."
     xsltproc --nonet \
         --output $srcdir/preface/authors.xml \
         stylesheets/authors_docbook.xsl \
@@ -46,6 +46,7 @@
 else
     echo >&2 "ERROR: Cannot make $srcdir/preface/authors.xml"
 fi
+echo
 
 # split
 echo "Splitting the source XML:"
@@ -60,7 +61,6 @@
     $SPLIT --lang="$LINGUAS" --file="$srcfile" \
            --dest="$xmldir"/'*'/"${base#/}"/
 done
-test -e $srcdir/preface/authors.xml && rm -f $srcdir/preface/authors.xml
 echo
 
 # oldsrc
@@ -69,6 +69,11 @@
 mv -vi "$xmldir"/en "$srcdir" && \
 echo Creating link "$xmldir"/en ...
 ln -vs $PWD/"$srcdir" "$xmldir"/en
+echo Removing authors files ...
+test -e $srcdir/preface/titles.xml && \
+    rm -vf $srcdir/preface/titles.xml
+test -e $oldsrcdir/preface/authors.xml && \
+    rm -vf $oldsrcdir/preface/authors.xml
 echo
 
 # src/glossary/glossary.xml

Modified: branches/xml2po-support/tools/migrate/convert-glossary.py
==============================================================================
--- branches/xml2po-support/tools/migrate/convert-glossary.py	(original)
+++ branches/xml2po-support/tools/migrate/convert-glossary.py	Sun Nov 30 19:57:42 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# _*_ coding: utf8 -*_
+# -*- coding: utf8 -*-
 """
 FIXME: Missing docstring
 """
@@ -43,8 +43,7 @@
     filename = sys.stdin
     doc = xml.dom.minidom.parse(filename)
 
-    # document element is last child of document root
-    old_glossary = doc.childNodes[-1]
+    old_glossary = doc.documentElement
     assert old_glossary.nodeName == "glossary"
     assert old_glossary.getAttribute("lang")
 



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