mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 09:21:50 +00:00
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.
This commit is contained in:
parent
be446bbe0d
commit
87b8e092b5
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
<?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="." />
|
||||
|
|
Loading…
Reference in a new issue