From f4e77965b38df4fbec4151ff63cb60d9db58b1d1 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 --- .../prog/en/modules/serials/serials-collection.tt | 16 ++++++++-------- .../prog/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 ad60863..affb3b2 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 @@ -270,14 +270,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 db8a9ec..deed7d4 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.1.4