From eedec9e929c641c9dcdb5c002f812ecf034433d4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Jul 2022 08:01:34 +0200 Subject: [PATCH] Bug 30992: Improve translatability for Waiting at|On hold Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/reserve/request.tt | 26 ++++++++++++------- .../bootstrap/en/modules/opac-reserve.tt | 20 +++----------- opac/opac-reserve.pl | 2 +- reserve/request.pl | 2 +- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 3a8b790906..4003c1cb0b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -801,19 +801,25 @@ [% IF ( itemloo.nocancel ) %] Can't be cancelled when item is in transit [% ELSE %] - [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] - [% IF ( itemloo.canreservefromotherbranches ) %] - for [% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %] - [% END %] - [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] - [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% IF ( itemloo.waitingdate ) %] - [% itemloo.waitingdate | $KohaDates %] + [% IF ( itemloo.canreservefromotherbranches ) %] + Waiting for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %] + [% ELSE %] + Waiting at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.waitingdate | $KohaDates %] + [% END %] [% ELSE %] - [% IF ( itemloo.reservedate ) %] - [% itemloo.reservedate | html %] + [% IF ( itemloo.canreservefromotherbranches ) %] + [% IF itemloo.reservedate %] + On hold for [% INCLUDE 'patron-title.inc' patron=itemloo.ReservedFor %] expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since + [% ELSE %] + On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] + [% END %] + [% ELSIF itemloo.reservedate %] + On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since [% itemloo.reservedate | $KohaDates %] + [% ELSE %] + On hold expected at [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] [% END %] - [% END %]. + [% END %] Cancel hold [% END # /IF itemloo.nocancel %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index e16095740e..a6fe88e113 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -438,24 +438,12 @@ [% IF ( itemLoo.reservedate ) %] [% IF ( itemLoo.waitingdate ) %] - Waiting + Waiting for patron at [% itemLoo.ExpectedAtLibrary | html %] since [% itemLoo.waitingdate | $KohaDates %] + [% ELSIF ( itemLoo.reservedate ) %] + On hold for patron expected at [% itemLoo.ExpectedAtLibrary | html %] since [% itemLoo.reservedate | $KohaDates %] [% ELSE %] - On hold + On hold for patron expected at [% itemLoo.ExpectedAtLibrary | html %] [% END %] - for patron - [% IF ( itemLoo.waitingdate ) %] - at - [% ELSE %] - expected at - [% END %] - [% itemLoo.ExpectedAtLibrary | html %] since - [% IF ( itemLoo.waitingdate ) %] - [% itemLoo.waitingdate | $KohaDates %] - [% ELSE %] - [% IF ( itemLoo.reservedate ) %] - [% itemLoo.reservedate | html %] - [% END %] - [% END %]. [% ELSE %] Not on hold diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index cd71a6af29..f60528f0db 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -515,7 +515,7 @@ foreach my $biblioNum (@biblionumbers) { if ( my $first_hold = $holds->next ) { $itemLoopIter->{backgroundcolor} = 'reserved'; - $itemLoopIter->{reservedate} = output_pref({ dt => dt_from_string($first_hold->reservedate), dateonly => 1 }); # FIXME Should be formatted in the template + $itemLoopIter->{reservedate} = $first_hold->reservedate, $itemLoopIter->{ExpectedAtLibrary} = $first_hold->branchcode; $itemLoopIter->{waitingdate} = $first_hold->waitingdate; } diff --git a/reserve/request.pl b/reserve/request.pl index b6bdb0baff..12c675240f 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -431,7 +431,7 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) my $p = Koha::Patrons->find( $first_hold->borrowernumber ); $item->{backgroundcolor} = 'reserved'; - $item->{reservedate} = output_pref({ dt => dt_from_string( $first_hold->reservedate ), dateonly => 1 }); # FIXME Should be formatted in the template + $item->{reservedate} = $first_hold->reservedate; $item->{ReservedFor} = $p; $item->{ExpectedAtLibrary} = $first_hold->branchcode; $item->{waitingdate} = $first_hold->waitingdate; -- 2.39.5