| Summary: | [patch] Base selection in events in libcommon.xsl does not work | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | Rudolf Čejka <cejkar> |
| Component: | Books & Articles | Assignee: | Gabor Kovesdan <gabor> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Although the patch provided in PR: www/105333
should fix the problem with the localized
versions of our website (you get an "error 404"
when clicking on a link in the events list)
this solution creates a new problem.
If a translated version of "events.xml" already
exists users will be pointed to the translated
version (even if this file is totally outdated
which is the case with the french version of
"events.xml" for example).
So I think it would be better not to translate
"events.xml" at all and to point users to the
english version of events.xml even from the
localized parts of our website with something
like the following:
--- libcommon.xsl Mon Nov 20 16:03:01 2006
+++ libcommon.xsl.new Wed Nov 22 21:20:54 2006
@@ -1083,8 +1083,7 @@
<a>
<xsl:attribute name="href">
<xsl:choose>
- <xsl:when test="$events.xml = 'none'">&enbase;/</xsl:when>
- <xsl:otherwise>&base;/</xsl:otherwise>
+ <xsl:when test="$events.xml =
$events.xml-master">&enbase;/</xsl:when>
</xsl:choose>
<xsl:text>events/#event:</xsl:text><xsl:value-of
select='@id' />
</xsl:attribute>
But as my knowledge on XML, XSL and so on is rather
limited and additionally my commit bit does not cover
this part of the source tree one of the other
doc/www-committers would have to take a look at this
problem/PR.
J. Kois
Just to follow up this is still a problem. The english events show up
and are linked properly, but most translations show the fist few
events from the english events.xml file but then try to link to
non-existant localized versions of these files. hrs@ or blackend@
would be the best to look at and resolve this PR I think.
- Murray
Responsible Changed From-To: freebsd-www->blackend Be brave and assign it to Marc. Marc can you please have a look at this? Author: gabor Date: Wed Jan 22 18:40:57 2014 New Revision: 43631 URL: http://svnweb.freebsd.org/changeset/doc/43631 Log: - Fix base selection for news, events and press lists on the index page for languages that do not have a translation of these PR: www/105333 Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Modified: head/share/xml/libcommon.xsl Modified: head/share/xml/libcommon.xsl ============================================================================== --- head/share/xml/libcommon.xsl Wed Jan 22 14:34:08 2014 (r43630) +++ head/share/xml/libcommon.xsl Wed Jan 22 18:40:57 2014 (r43631) @@ -1197,6 +1197,10 @@ </span><br /> <a> <xsl:attribute name="href"> + <xsl:choose> + <xsl:when test="$news.project.xml = $news.project.xml-master">&enbase;/</xsl:when> + <xsl:otherwise>&base;/</xsl:otherwise> + </xsl:choose> <xsl:text>news/newsflash.html#</xsl:text> <xsl:call-template name="html-news-generate-anchor"> <xsl:with-param name="label" select="'event'" /> @@ -1311,6 +1315,10 @@ </span><br /> <a> <xsl:attribute name="href"> + <xsl:choose> + <xsl:when test="$news.press.xml = $news.press.xml-master">&enbase;/</xsl:when> + <xsl:otherwise>&base;/</xsl:otherwise> + </xsl:choose> <xsl:text>news/press.html#</xsl:text> <xsl:call-template name="html-news-generate-anchor"> <xsl:with-param name="label" select="'story'" /> @@ -1429,7 +1437,7 @@ <a> <xsl:attribute name="href"> <xsl:choose> - <xsl:when test="$events.xml = 'none'">&enbase;/</xsl:when> + <xsl:when test="$events.xml = $events.xml-master">&enbase;/</xsl:when> <xsl:otherwise>&base;/</xsl:otherwise> </xsl:choose> <xsl:text>events/#</xsl:text> _______________________________________________ svn-doc-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-doc-all To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Fixed, thanks! Responsible Changed From-To: blackend->gabor Fixed, thanks! |
There is code .if exists(${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/events.xml) XML_EVENTS_EVENTS= ${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/events.xml .else XML_EVENTS_EVENTS= ${XML_EVENTS_EVENTS_MASTER} .endif in doc/share/mk/doc.xml.mk, so if there is no localized events.xml file, $xml.events is not empty, but it is the same as $xml.events-master, so code $events.xml = 'none' is never satisfied. Patch below solves this problem and when there is no localized events.xml, proper base &enbase; is selected. --- www/share/sgml/libcommon.xsl.orig Thu Nov 9 13:03:13 2006 +++ www/share/sgml/libcommon.xsl Thu Nov 9 13:03:31 2006 @@ -1083,7 +1083,7 @@ <a> <xsl:attribute name="href"> <xsl:choose> - <xsl:when test="$events.xml = 'none'">&enbase;/</xsl:when> + <xsl:when test="$events.xml = $events.xml-master">&enbase;/</xsl:when> <xsl:otherwise>&base;/</xsl:otherwise> </xsl:choose> <xsl:text>events/#event:</xsl:text><xsl:value-of select='@id' />