Bug 11588: fix untranslatable subscription frequency units
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Thu, 24 Apr 2014 10:20:06 +0000 (13:20 +0300)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 25 Apr 2014 15:40:28 +0000 (15:40 +0000)
To test:

1) cd misc/translator
2) perl translate update xx-YY
3) check that there's no msgid that contains the subscription
   frequencies (day, week, month and year) in
   po/xx-YY-i-staff-t-prog-v-3006000.po (search for
   "BLOCK translate_frequnit")
4) apply patch
5) perl translate update xx-YY
6) check po/xx-YY-i-staff-t-prog-v-3006000.po that it contains the
   msgid for the frequencies. (search for "BLOCK translate_frequnit")

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt

index a9a07d6..db8da0e 100644 (file)
@@ -70,6 +70,15 @@ $(document).ready(function() {
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'serials-search.inc' %]
 
+[% BLOCK translate_frequnit %]
+[%  SWITCH frequnit %]
+[%   CASE 'day'     %] day
+[%   CASE 'week'    %] week
+[%   CASE 'month'   %] month
+[%   CASE 'year'    %] year
+[%  END %]
+[% END %]
+
 <div id="breadcrumbs">
     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
     <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo;
@@ -110,7 +119,7 @@ $(document).ready(function() {
                     [% ELSE %]
                       <option value="[% unit.val %]">
                     [% END %]
-                      [% unit.val %]
+                      [% PROCESS translate_frequnit frequnit=unit.val %]
                     </option>
                   [% END %]
                 </select>
@@ -189,7 +198,7 @@ $(document).ready(function() {
               [% FOREACH frequency IN frequencies_loop %]
                 <tr>
                   <td>[% frequency.description %]</td>
-                  <td>[% frequency.unit %]</td>
+                  <td>[% PROCESS translate_frequnit frequnit=frequency.unit %]</td>
                   <td>[% frequency.issuesperunit %]</td>
                   <td>[% frequency.unitsperissue %]</td>
                   <td>[% frequency.displayorder %]</td>