fsfe-website/build/xslt/translation_list.xsl
Reinhard Müller 1b01e753b9
All checks were successful
continuous-integration/drone/push Build is passing
Fix use of semantic HTML5 elements
Fixes #281
Fixes #282
2020-05-26 22:04:59 +02:00

49 lines
2.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="translation_list">
<xsl:if test="not(/buildinfo/document/@external)">
<xsl:element name="nav">
<xsl:attribute name="id">translations</xsl:attribute>
<xsl:attribute name="class">alert</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="class">close</xsl:attribute>
<xsl:attribute name="data-toggle">collapse</xsl:attribute>
<xsl:attribute name="data-target">#translations</xsl:attribute>
<xsl:attribute name="href">#</xsl:attribute>
×
</xsl:element>
<xsl:element name="a">
<xsl:attribute name="class">contribute-translation</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/contribute/translators/</xsl:attribute>
<xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translate'" /></xsl:call-template>
</xsl:element>
<xsl:element name="ul">
<xsl:for-each select="/buildinfo/trlist/tr">
<xsl:sort select="@id" />
<xsl:choose>
<xsl:when test="@id=/buildinfo/@language">
<xsl:element name="li">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="li">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="$urlprefix"/><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:element>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:element>
</xsl:element>
</xsl:if>
</xsl:template>
</xsl:stylesheet>