From 4fd53a7ce655a522850a9e3da39743b9a3c507cb Mon Sep 17 00:00:00 2001 From: Blou Date: Thu, 5 Dec 2019 14:43:49 -0500 Subject: [PATCH] Bug 24172: Allow translation of seasons in details.tt and opac-details.tt Signed-off-by: Martin Renvoize --- .../prog/en/modules/catalogue/detail.tt | 22 ++++++++++++++++++- .../bootstrap/en/modules/opac-detail.tt | 22 ++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index f48413a010..e1b0455681 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -790,7 +790,27 @@ Note that permanent location is a code, and location may be an authval. [% FOREACH latestserial IN subscription.latestserials %] - [% latestserial.serialseq | html %] + + [% IF ( matches = latestserial.serialseq.match('(.*)Spring(.*)') ) %] + [% matches.0 | html %]Spring[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Summer(.*)') ) %] + [% matches.0 | html %]Summer[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Fall(.*)') ) %] + [% matches.0 | html %]Fall[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Winter(.*)') ) %] + [% matches.0 | html %]Winter[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Spr(.*)') ) %] + [% matches.0 | html %]Spr[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Sum(.*)') ) %] + [% matches.0 | html %]Sum[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Fal(.*)') ) %] + [% matches.0 | html %]Fal[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Win(.*)') ) %] + [% matches.0 | html %]Win[% matches.1 | html %] + [% ELSE %] + [% latestserial.serialseq | html %] + [% END %] + [% latestserial.planneddate | $KohaDates %] [% latestserial.publisheddate | $KohaDates %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index e69c3fac73..0ddbdd49a1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -761,7 +761,27 @@ [% FOREACH latestserial IN subscription.latestserials %] - [% latestserial.serialseq | html %] + + [% IF ( matches = latestserial.serialseq.match('(.*)Spring(.*)') ) %] + [% matches.0 | html %]Spring[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Summer(.*)') ) %] + [% matches.0 | html %]Summer[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Fall(.*)') ) %] + [% matches.0 | html %]Fall[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Winter(.*)') ) %] + [% matches.0 | html %]Winter[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Spr(.*)') ) %] + [% matches.0 | html %]Spr[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Sum(.*)') ) %] + [% matches.0 | html %]Sum[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Fal(.*)') ) %] + [% matches.0 | html %]Fal[% matches.1 | html %] + [% ELSIF ( matches = latestserial.serialseq.match('(.*)Win(.*)') ) %] + [% matches.0 | html %]Win[% matches.1 | html %] + [% ELSE %] + [% latestserial.serialseq | html %] + [% END %] + [% latestserial.publisheddate | $KohaDates %] [% latestserial.planneddate | $KohaDates %] -- 2.25.1