Bug 11364: Label layout types and text justification types are not translatable
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 6 May 2014 08:20:59 +0000 (11:20 +0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 11 Mar 2015 17:32:14 +0000 (14:32 -0300)
To test:

1) cd misc/translator
2) perl translate update xx-YY
3) check that there's no msgids that contain the layout types or
   text justification types in po/xx-YY-i-staff-t-prog-v-3006000.po
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_label_types"
   and "BLOCK translate_justification_types")

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt

index 583f6f0..b5d82c5 100644 (file)
@@ -1,3 +1,12 @@
+[% BLOCK translate_label_types %]
+[%  SWITCH type %]
+[%   CASE 'BIB'    %]Biblio
+[%   CASE 'BARBIB' %]Barcode/Biblio
+[%   CASE 'BIBBAR' %]Biblio/Barcode
+[%   CASE 'ALT'    %]Alternating
+[%   CASE 'BAR'    %]Barcode
+[%  END %]
+[% END %]
     [% INCLUDE 'doc-head-open.inc' %]
     <title>Koha &rsaquo; Tools &rsaquo; Labels</title>
     [% INCLUDE 'doc-head-close.inc' %]
         //]]>
     </script>
 </head>
+[% BLOCK translate_justification_types %]
+[%  SWITCH type %]
+[%   CASE 'L' %]Left
+[%   CASE 'C' %]Center
+[%   CASE 'R' %]Right
+[%  END %]
+[% END %]
 <body id="labels_label-edit-layout" class="tools labels">
     [% INCLUDE 'header.inc' %]
     [% INCLUDE 'cat-search.inc' %]
@@ -58,9 +74,9 @@
                                     <select name="printing_type" id="printing_type">
                                     [% FOREACH label_type IN label_types %]
                                     [% IF ( label_type.selected ) %]
-                                    <option value="[% label_type.type %]" selected="selected">[% label_type.name %]</option>
+                                    <option value="[% label_type.type %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
                                     [% ELSE %]
-                                    <option value="[% label_type.type %]">[% label_type.name %]</option>
+                                    <option value="[% label_type.type %]">[% PROCESS translate_label_types type=label_type.type %]</option>
                                     [% END %]
                                     [% END %]
                                     </select>
                                     <select name="text_justify" id="text_justify">
                                         [% FOREACH text_justification_type IN text_justification_types %]
                                         [% IF ( text_justification_type.selected ) %]
-                                        <option value="[% text_justification_type.type %]" selected="selected">[% text_justification_type.name %]</option>
+                                        <option value="[% text_justification_type.type %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
                                         [% ELSE %]
-                                        <option value="[% text_justification_type.type %]">[% text_justification_type.name %]</option>
+                                        <option value="[% text_justification_type.type %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
                                         [% END %]
                                         [% END %]
                                     </select>