Bug 22569: (QA follow-up) Make 'reason' translatable

Add a transfer_reasons include file for easy translation of the transer
reason codes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-03-05 12:29:42 +00:00 committed by Jonathan Druart
parent 320f82857c
commit bc45249291
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,14 @@
[%- BLOCK transfer_reason -%]
[%- SWITCH transfer.reason -%]
[%- CASE 'Manual' -%]Manual
[%- CASE 'StockrotationAdvance' -%]Stock rotation advance
[%- CASE 'StockrotationRepatriation' -%]Stock rotation repatriation
[%- CASE 'ReturnToHome' -%]Automatic return to home
[%- CASE 'ReturnToHolding' -%]Automatic return to holding
[%- CASE 'RotatingCollection' -%]Rotating collection
[%- CASE 'Reserve' -%]Hold
[%- CASE 'LostReserve' -%]Hold lost
[%- CASE 'CancelReserve' -%]Hold cancelled
[%- CASE -%][% transfer.reason | html %]
[%- END -%]
[%- END -%]

View File

@ -4,6 +4,7 @@
[% USE KohaDates %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% PROCESS 'transfer_reasons.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Transfers to send</title>
[% INCLUDE 'doc-head-close.inc' %]
@ -57,7 +58,7 @@
[% IF ( transfer.item.effective_itemtype ) %] (<b>[% transfer.item.effective_itemtype | html %]</b>)[% END %]
<br />Barcode: [% transfer.item.barcode | html %]
</td>
<td><p>[% transfer.reason | html %]</p></td>
<td><p>[% PROCESS transfer_reason transfer=transfer %]</p></td>
<td>[% IF transfer.item.onloan %]Due [% transfer.item.onloan | $KohaDates %][% ELSE %]On shelf[% END %]</td>
<td>[% Branches.GetName( transfer.item.homebranch ) | html %]</td>
<td>[% transfer.item.itemcallnumber | html %]</td>