From 7a3c801306d5cd73937dd80605a8ead67e2528e7 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 15 Mar 2016 16:36:28 +0100 Subject: [PATCH] Bug 13877 - Make serialseq season name translatable regardless its position in a string Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher (cherry picked from commit adb8d41053357eeb68fa148a04c2202df6e54974) Signed-off-by: Julian Maurice (cherry picked from commit e0f8aff8a958a0ce3b47e94939bb6d467c69ad1b) Signed-off-by: Chris Cormack --- .../en/modules/serials/serials-collection.tt | 16 ++++++++-------- .../en/modules/serials/showpredictionpattern.tt | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 4418baf835..10fa683d31 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -260,14 +260,14 @@ $(document).ready(function() { - [% IF ( matches = serial.serialseq.match('Spring(.*)') ) %] - Spring[% matches.join("") %] - [% ELSIF ( matches = serial.serialseq.match('Summer(.*)') ) %] - Summer[% matches.join("") %] - [% ELSIF ( matches = serial.serialseq.match('Fall(.*)') ) %] - Fall[% matches.join("") %] - [% ELSIF ( matches = serial.serialseq.match('Winter(.*)') ) %] - Winter[% matches.join("") %] + [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %] + [% matches.0 %]Spring[% matches.1 %] + [% IF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %] + [% matches.0 %]Summer[% matches.1 %] + [% IF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %] + [% matches.0 %]Fall[% matches.1 %] + [% IF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %] + [% matches.0 %]Winter[% matches.1 %] [% ELSE %] [% serial.serialseq %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt index db8a9ecda8..deed7d4456 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt @@ -57,14 +57,14 @@ [% FOREACH prediction IN predictions_loop %] - [% IF ( matches = prediction.number.match('Spring(.*)') ) %] - Spring[% matches.join("") %] - [% ELSIF ( matches = prediction.number.match('Summer(.*)') ) %] - Summer[% matches.join("") %] - [% ELSIF ( matches = prediction.number.match('Fall(.*)') ) %] - Fall[% matches.join("") %] - [% ELSIF ( matches = prediction.number.match('Winter(.*)') ) %] - Winter[% matches.join("") %] + [% IF ( matches = prediction.number.match('(.*)Spring(.*)') ) %] + [% matches.0 %]Spring[% matches.1 %] + [% ELSIF ( matches = prediction.number.match('(.*)Summer(.*)') ) %] + [% matches.0 %]Summer[% matches.1 %] + [% ELSIF ( matches = prediction.number.match('(.*)Fall(.*)') ) %] + [% matches.0 %]Fall[% matches.1 %] + [% ELSIF ( matches = prediction.number.match('(.*)Winter(.*)') ) %] + [% matches.0 %]Winter[% matches.1 %] [% ELSE %] [% prediction.number %] [% END %] -- 2.39.5