Bug 13877 - Make serialseq season name translatable regardless its position in a...
authorAlex Arnaud <alex.arnaud@biblibre.com>
Tue, 15 Mar 2016 15:36:28 +0000 (16:36 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 19 Jun 2016 21:51:20 +0000 (09:51 +1200)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit adb8d41053357eeb68fa148a04c2202df6e54974)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e0f8aff8a958a0ce3b47e94939bb6d467c69ad1b)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt

index 4418baf..10fa683 100644 (file)
@@ -260,14 +260,14 @@ $(document).ready(function() {
                     </span>
                 </td>
                 <td>
-                    [% 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 %]
index db8a9ec..deed7d4 100644 (file)
     [% FOREACH prediction IN predictions_loop %]
       <tr>
         <td>
-            [% 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 %]