mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
doc: Remove language code from title
This code currently works only by assuming that the language code is either 2 or 5 chars long. This is not entirely correct but works for now. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
46b587196f
commit
d67412220a
@ -46,8 +46,15 @@
|
||||
<xsl:param name="title"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($title, '/')">
|
||||
<xsl:value-of select="substring-before($title, '/')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<!-- Skip copying the language code -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(string-length(substring-before($title, '/'))=2)
|
||||
and
|
||||
not(string-length(substring-before($title, '/'))=5 and contains(substring-before($title, '/'), '-'))">
|
||||
<xsl:value-of select="substring-before($title, '/')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:call-template name="clean-title">
|
||||
<xsl:with-param name="title" select="substring-after($title, '/')"/>
|
||||
</xsl:call-template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user