Bug 25082: Don't remove characters from string
authorKatrin Fischer <katrin.fischer.83@web.de>
Tue, 5 May 2020 11:43:39 +0000 (11:43 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 11 May 2020 08:46:18 +0000 (09:46 +0100)
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>

koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl

index acb122b..7fb14ad 100644 (file)
            <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>
index 4b83326..bc8b4f7 100644 (file)
         <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>