Bug 30352: Allow translation of Not for loan in OPAC XSLT results

Note: Test plan below can be followed in English. If you would like
to see the vernacular results, you need to update PO files and
translate 'Not for loan', and update templates (xslt files) accordingly.
The bootstrap PO does not yet include that string without %s suffix
in the current codebase.

Test plan:
[1] Apply this patch and make the following change in
MARC21slim2OPACResults.xsl, line 1207.
Change:
  <status english="Not for loan">Not for loan</status>
to:
  <status english="Not for loan">NOT for loan</status>
Important: Change text inside, not the attribute!
Restart all.

[2] Pick a biblio, add some items with different statuses: Checked out,
Damaged, Not for loan, Staff collection.
[3] Make it appear in a OPAC results display (not detail).
[4] You should see the different statuses, including NOT for loan. The
uppercase NOT serves to prove that the string has been translated. Also
verify that you see Staff collection as-is.
[5] Bonus: Toggle with values in Reference_NFL_Statuses to move results
from Reference section to Not available section v.v.
[6] Revert the change from step 1. Sign off :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d7e3cec32)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9871a02b26)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a8cd43127)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Marcel de Rooy 2023-04-19 13:52:16 +00:00 committed by Arthur Suzuki
parent 148fa05f9b
commit 98a575fcff
No known key found for this signature in database
GPG Key ID: 7558BEE2BEEEBCAA
1 changed files with 7 additions and 13 deletions

View File

@ -1310,7 +1310,10 @@
<xsl:call-template name="listCallNumbers">
<xsl:with-param name="items" select="$reference_items[items:resultbranch=$currentbranch and items:substatus=$current_substatus]"/>
<xsl:with-param name="max" select="$OPACResultsMaxItems"/>
<xsl:with-param name="status_text" select="concat($currentbranch,': ',$current_substatus)"/>
<xsl:with-param name="status_text">
<xsl:value-of select="concat($currentbranch,': ')"/>
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
</xsl:with-param>
<xsl:with-param name="class_block" select="concat('notforloandesc_',$current_substatus)"/>
<xsl:with-param name="class_status" select="'ItemBranch'"/>
<xsl:with-param name="OPACItemLocation" select="$OPACItemLocation"/>
@ -1331,6 +1334,7 @@
<status english="Pending hold">Pending hold</status>
<status english="In transit">In transit</status>
<status english="Waiting">On hold</status>
<status english="Not for loan">Not for loan</status>
</xsl:variable>
<xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')|key('item-by-status', 'other')"/>
<xsl:choose>
@ -1350,12 +1354,7 @@
<xsl:with-param name="status_text">
<xsl:value-of select="$currentbranch"/>
<xsl:text>: </xsl:text>
<xsl:if test="items:status='other'">
<xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/>
</xsl:if>
<xsl:if test="items:status='reallynotforloan'">
<xsl:value-of select="$current_substatus"/>
</xsl:if>
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
</xsl:with-param>
<xsl:with-param name="class_block" select="concat('unavailable_',items:substatus)"/>
<xsl:with-param name="class_status" select="'ItemBranch'"/>
@ -1374,12 +1373,7 @@
<xsl:with-param name="items" select="$unavailable_items[items:substatus=$current_substatus]"/>
<xsl:with-param name="max" select="0"/>
<xsl:with-param name="status_text">
<xsl:if test="items:status='other'">
<xsl:value-of select="exsl:node-set($other_status_list)/status[@english=$current_substatus]"/>
</xsl:if>
<xsl:if test="items:status='reallynotforloan'">
<xsl:value-of select="$current_substatus"/>
</xsl:if>
<xsl:value-of select="exsl:node-set($item_status_list)/status[@english=$current_substatus]|$current_substatus"/>
</xsl:with-param>
<xsl:with-param name="class_block" select="concat('unavailable_',$current_substatus)"/>
<xsl:with-param name="class_status" select="UnavailableSubstatus"/>