Commit 87b8e092 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

data/tips/Makefile.am let the transformation work on the multi-language

2005-06-26  Sven Neumann  <sven@gimp.org>

	* data/tips/Makefile.am
	* data/tips/fortunes.xsl: let the transformation work on the
	multi-language XML file and pass a language parameter to it.
parent be446bbe
2005-06-26 Sven Neumann <sven@gimp.org>
* data/tips/Makefile.am
* data/tips/fortunes.xsl: let the transformation work on the
multi-language XML file and pass a language parameter to it.
2005-06-26 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppropwidgets.c: use dgettext() instead of
......
......@@ -27,9 +27,9 @@ if HAVE_XMLLINT
( echo "* gimp-tips.xml INVALID *"; exit 1; )
endif
fortunes: gimp-tips.xml.in fortunes.xsl
fortunes: gimp-tips.xml fortunes.xsl
if HAVE_XSLTPROC
$(XSLTPROC) fortunes.xsl $< > $(@) || rm -f $(@)
$(XSLTPROC) --stringparam lang en fortunes.xsl $< > $(@) || rm -f $(@)
else
@echo "xsltproc is needed to build fortunes"; exit 1;
endif
......
<?xml version="1.0" encoding="utf-8"?>
<!-- This simple XSL transformation creates a text version from
gimp-tips.xml.in which can then be used to seed
http://wiki.gimp.org/gimp/FortuneCookies in the GIMP Wiki. -->
<!-- This simple XSL transformation creates a text version from
gimp-tips.xml.in which can then be used to seed
http://wiki.gimp.org/gimp/FortuneCookies in the GIMP Wiki. -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Pass this stylesheet a lang parameter in order to select a language. -->
<xsl:param name="lang" />
<xsl:output method="text" />
<xsl:template match="/">
<xsl:apply-templates select="//_thetip" />
<xsl:apply-templates select="//thetip[lang($lang)]" />
</xsl:template>
<xsl:template match="_thetip">
<xsl:template match="thetip">
* <xsl:apply-templates />
</xsl:template>
......@@ -23,8 +26,7 @@
<xsl:text>}}}</xsl:text>
</xsl:template>
<!-- this sucks
but I don't seem to get xsl:strip-space to work with xsltproc -->
<!-- This sucks, but I don't seem to get xsl:strip-space to work. -->
<xsl:template match="text()">
<xsl:call-template name="search-and-replace">
<xsl:with-param name="input" select="." />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment