From bc452492916e9f2cd22cbaf9024aa9ea5f6f2612 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 5 Mar 2021 12:29:42 +0000 Subject: [PATCH] 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 Signed-off-by: Jonathan Druart --- .../prog/en/includes/transfer_reasons.inc | 14 ++++++++++++++ .../prog/en/modules/circ/transfers_to_send.tt | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/transfer_reasons.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/transfer_reasons.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/transfer_reasons.inc new file mode 100644 index 0000000000..f1736669ad --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/transfer_reasons.inc @@ -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 -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt index 69c988fc80..4fe2058382 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt @@ -4,6 +4,7 @@ [% USE KohaDates %] [% USE Branches %] [% SET footerjs = 1 %] +[% PROCESS 'transfer_reasons.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Transfers to send [% INCLUDE 'doc-head-close.inc' %] @@ -57,7 +58,7 @@ [% IF ( transfer.item.effective_itemtype ) %] ([% transfer.item.effective_itemtype | html %])[% END %]
Barcode: [% transfer.item.barcode | html %] -

[% transfer.reason | html %]

+

[% PROCESS transfer_reason transfer=transfer %]

[% IF transfer.item.onloan %]Due [% transfer.item.onloan | $KohaDates %][% ELSE %]On shelf[% END %] [% Branches.GetName( transfer.item.homebranch ) | html %] [% transfer.item.itemcallnumber | html %] -- 2.39.5