From ad66f22f3379e3f7600b8d4f789bd3d4585688f5 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 --- .../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 daa9c20bee..f8a86527d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -550,7 +550,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.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 9ab7a1017e..169d0e1750 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -864,7 +864,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.17.1