cvs: php-gtk-doc /stylesheets/xsl locale.xsl.in /stylesheets/xsl/locale de.xsl default.xsl en.xsl

From: Date: Sat, 11 Aug 2001 16:12:23 +0000
Subject: cvs: php-gtk-doc /stylesheets/xsl locale.xsl.in /stylesheets/xsl/locale de.xsl default.xsl en.xsl
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2794@lists.php.net to get a copy of this message
jmoore Sat Aug 11 12:12:23 2001 EDT Added files: /php-gtk-doc/stylesheets/xsl locale.xsl.in /php-gtk-doc/stylesheets/xsl/locale default.xsl Modified files: /php-gtk-doc/stylesheets/xsl/locale de.xsl en.xsl Log: Beginings of locale system that works with LibXSLT Index: php-gtk-doc/stylesheets/xsl/locale/de.xsl diff -u php-gtk-doc/stylesheets/xsl/locale/de.xsl:1.2 php-gtk-doc/stylesheets/xsl/locale/de.xsl:1.3 --- php-gtk-doc/stylesheets/xsl/locale/de.xsl:1.2 Tue Jun 26 12:54:17 2001 +++ php-gtk-doc/stylesheets/xsl/locale/de.xsl Sat Aug 11 12:12:23 2001 @@ -1,22 +1,45 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> -<!-- Locale Text --> -<xsl:template name="php.gtk.authors.text"> - <xsl:text>PHP-GTK Autoren</xsl:text> -</xsl:template> +<!-- + German Localisation file. -<xsl:template name="php.gtk.contributors.text"> - <xsl:text>PHP-GTK Mitwirkende</xsl:text> -</xsl:template> + See: locale.xsl.in for more information. -<xsl:template name="php.gtk.manual.contributors.text"> - <xsl:text>PHP-GTK Mitwirkende am Handbuch</xsl:text> -</xsl:template> + $Id: de.xsl,v 1.3 2001/08/11 16:12:23 jmoore Exp $ -<xsl:template name="php.gtk.edited.by.text"> - <xsl:text>Herausgegeben von</xsl:text> -</xsl:template> +--> + + + <xsl:template name="get.locale.text"> + <xsl:param name="text"/> + <xsl:choose> + <xsl:when test="$text='authors'"> + <xsl:text>PHP-GTK Autoren</xsl:text> + </xsl:when> + <xsl:when test="$text='contributors'"> + <xsl:text>PHP-GTK Mitwirkende</xsl:text> + </xsl:when> + <xsl:when test="$text='manual.contributors'"> + <xsl:text>PHP-GTK Mitwirkende am Handbuch</xsl:text> + </xsl:when> + <xsl:when test="$text='edited.by'"> + <xsl:text>Herausgegeben von</xsl:text> + </xsl:when> + + <xsl:otherwise> + <xsl:message> + <xsl:text>Could not find Locale text for </xsl:text> + <xsl:value-of select="$text"/> + <xsl:text>. Defaulting to en Locale</xsl:text> + <xsl:call-template name="get.default.text"> + <xsl:with-param name="text" select="$text"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + + </xsl:template> + </xsl:stylesheet> Index: php-gtk-doc/stylesheets/xsl/locale/en.xsl diff -u php-gtk-doc/stylesheets/xsl/locale/en.xsl:1.2 php-gtk-doc/stylesheets/xsl/locale/en.xsl:1.3 --- php-gtk-doc/stylesheets/xsl/locale/en.xsl:1.2 Tue Jun 26 12:54:17 2001 +++ php-gtk-doc/stylesheets/xsl/locale/en.xsl Sat Aug 11 12:12:23 2001 @@ -1,21 +1,25 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> -<!-- Locale Text --> -<xsl:template name="php.gtk.authors.text"> - <xsl:text>PHP-GTK Authors</xsl:text> -</xsl:template> +<!-- + English Localisation file. -<xsl:template name="php.gtk.contributors.text"> - <xsl:text>PHP-GTK Contributors</xsl:text> -</xsl:template> + See: locale.xsl.in for more information. -<xsl:template name="php.gtk.manual.contributors.text"> - <xsl:text>PHP-GTK Manual Contributors</xsl:text> -</xsl:template> + $Id: en.xsl,v 1.3 2001/08/11 16:12:23 jmoore Exp $ -<xsl:template name="php.gtk.edited.by.text"> - <xsl:text>Edited By</xsl:text> -</xsl:template> +--> + + + <xsl:template name="get.locale.text"> + <xsl:param name="text"/> + <!-- Pass through to default template for english --> + <xsl:call-template name="get.default.text"> + <xsl:with-param name="text" select="$text"/> + </xsl:call-template> + + </xsl:template> + </xsl:stylesheet> + Index: php-gtk-doc/stylesheets/xsl/locale.xsl.in +++ php-gtk-doc/stylesheets/xsl/locale.xsl.in <!-- Localisation Stylesheet This stylesheet is used to localise the different pieces of text and numbers used throughout the stylysheet, each language file implements the get.locale.text template which either returns the correct text or no if it cannot find the text, this should then fall back to default.xsl in locale which returns the english text, the get.locale.text in the en.xsl file is very simply a wrapper around get.default.text so only one file needs to be updated. $Id: locale.xsl.in,v 1.1 2001/08/11 16:12:22 jmoore Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:include href="locale/@LANG@.xsl"/> <xsl:include href="locale/default.xsl"/> </xsl:stylesheet> Index: php-gtk-doc/stylesheets/xsl/locale/default.xsl +++ php-gtk-doc/stylesheets/xsl/locale/default.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Default Localisation file. See: locale.xsl.in for more information. $Id: default.xsl,v 1.1 2001/08/11 16:12:23 jmoore Exp $ --> <xsl:template name="get.default.text"> <xsl:param name="text"/> <xsl:choose> <xsl:when test="$text='authors'"> <xsl:text>PHP-GTK Authors</xsl:text> </xsl:when> <xsl:when test="$text='contributors'"> <xsl:text>PHP-GTK Contributors</xsl:text> </xsl:when> <xsl:when test="$text='manual.contributors'"> <xsl:text>PHP-GTK Manual Contributors</xsl:text> </xsl:when> <xsl:when test="$text='edited.by'"> <xsl:text>Edited By</xsl:text> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Could Not find Localisation or Default text for </xsl:text> <xsl:value-of select="$text"/> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>

« previous php.gtk (#2794) next »