| Summary: | [PATCH] Support for $enbase in news.xml | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | Rudolf Čejka <cejkar> |
| Component: | Books & Articles | Assignee: | jcamou |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-www->jcamou Grab this one. State Changed From-To: open->closed Your patches have been committed, thanks! |
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),