Bug 25082: Don't remove characters from string

At the moment, show-lang-041 will either get a code
or an AV description to deal with. If it's a description,
we don't want to remove spaces and other chars from it.

To test:
- Repeat tests from first patch with an AV in LANG category
  that consists of multiple words, has a - and other possible
  punctuation.
- The description should show correctly in OPAC and staff.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2020-05-05 11:43:39 +00:00 committed by Martin Renvoize
parent 8cfe35b044
commit cc4b6b34c0
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 2 additions and 2 deletions

View File

@ -385,7 +385,7 @@
<span>
<xsl:attribute name="class">lang_code-<xsl:value-of select="translate(., ' .-;|#', '_')"/></xsl:attribute>
<xsl:call-template name="languageCodeText">
<xsl:with-param name="code" select="translate(., ' .-;|#', '')"/>
<xsl:with-param name="code" select="."/>
</xsl:call-template>
<xsl:if test="position() != last()">
<span class="sep"><xsl:text>, </xsl:text></span>

View File

@ -349,7 +349,7 @@
<span>
<xsl:attribute name="class">lang_code-<xsl:value-of select="translate(., ' .-;|#', '_')"/></xsl:attribute>
<xsl:call-template name="languageCodeText">
<xsl:with-param name="code" select="translate(., ' .-;|#', '')"/>
<xsl:with-param name="code" select="."/>
</xsl:call-template>
<xsl:if test="position() != last()">
<span class="separator"><xsl:text>, </xsl:text></span>