Date: Tue, 18 Jan 2005 12:42:36 +0100 (CET) From: Rudolf Cejka <cejkar@fit.vutbr.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: www/76403: [PATCH] Support for $enbase in news.xml Message-ID: <200501181142.j0IBgaIZ059780@kazi.fit.vutbr.cz> Resent-Message-ID: <200501181150.j0IBoWrp092888@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76403 >Category: www >Synopsis: [PATCH] Support for $enbase in news.xml >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-www >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 18 11:50:32 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Rudolf Cejka >Release: FreeBSD 5.3-STABLE i386 >Organization: FIT, Brno University of Technology, Czech Republic >Environment: >Description: Is it possible to add support for $enbase in news.xml, please? I think that it is much easier for translation teams, if both varialbes are supported in all places, base and enbase too. My patches are below. Thanks. Index: newsflash.xsl =================================================================== RCS file: /ftp/pub/FreeBSD-cvs/main/www/en/news/newsflash.xsl,v retrieving revision 1.12 diff -u -r1.12 newsflash.xsl --- newsflash.xsl 30 Dec 2004 17:53:43 -0000 1.12 +++ newsflash.xsl 18 Jan 2005 10:56:56 -0000 @@ -79,16 +79,19 @@ </html> </xsl:template> - <!-- When the href attribute contains a '$base', expand it to the current - value of the $base variable. --> + <!-- When the href attribute contains a '$base' or '$enbase', expand it + to the current value of the $base or $enbase variable. --> - <!-- All your $base are belong to us. Ho ho ho --> + <!-- All your $base or $enbase are belong to us. Ho ho ho --> <xsl:template match="a"> <a><xsl:attribute name="href"> <xsl:choose> <xsl:when test="contains(@href, '$base')"> <xsl:value-of select="concat(substring-before(@href, '$base'), $base, substring-after(@href, '$base'))"/> </xsl:when> + <xsl:when test="contains(@href, '$enbase')"> + <xsl:value-of select="concat(substring-before(@href, '$enbase'), $enbase, substring-after(@href, '$enbase'))"/> + </xsl:when> <xsl:otherwise> <xsl:value-of select="@href"/> </xsl:otherwise> Index: news.xml =================================================================== RCS file: /ftp/pub/FreeBSD-cvs/main/www/en/news/news.xml,v retrieving revision 1.263 diff -u -r1.263 news.xml --- news.xml 18 Jan 2005 05:11:56 -0000 1.263 +++ news.xml 18 Jan 2005 10:57:39 -0000 @@ -9,9 +9,9 @@ Each <event> contains an optional <title>, and then a <p>. <p> elements can contain <a> anchors. Within the "href" attribute of the anchor - $base will be replaced with the base URI necessary to reach the FreeBSD - document root, and should always be used to start URLs at www.FreeBSD.org - or one of the mirrors. + $base or $enbase will be replaced with the base URI necessary to reach + the FreeBSD document root, and should always be used to start URLs at + www.FreeBSD.org or one of the mirrors. Use the <title> element if the <p> content is lengthy. When generating synopses of this information (e.g., for syndication using RDF files), >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501181142.j0IBgaIZ059780>