Bug 19522: Label creator - some strings are not translatable
authorVictor Grousset <victor.grousset@biblibre.com>
Wed, 25 Oct 2017 13:22:11 +0000 (15:22 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Mar 2018 20:31:13 +0000 (17:31 -0300)
Templates: new form:
Add hardcoded unit names to make them translatable.

Test plan:
1. install the fr_FR locale
2. go to /cgi-bin/koha/labels/label-edit-template.pl?op=new
3. then you should see the "Unités" dropdown with english units
4. apply this patch
5. install the language
6. refresh the page
7. then you should see the "Unités" dropdown with french units

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt

index e4fc9f9..1a107ef 100644 (file)
                                  <label for="units">Units:</label>
                                  <select id="units" name="units">
                                  [% FOREACH unit IN units %]
-
                                                                        [% IF ( unit.selected ) %]
                                                                        <option value="[% unit.type %]" selected="selected">
                                                                        [% ELSE %]
                                                                        <option value="[% unit.type %]">
                                                                        [% END %]
 
-                                 [% unit.desc %]
+                                     [% SWITCH unit.type %]
+                                     [%   CASE 'POINT' %]
+                                     PostScript Points
+                                     [%   CASE 'AGATE' %]
+                                     Adobe Agates
+                                     [%   CASE 'INCH' %]
+                                     US Inches
+                                     [%   CASE 'MM' %]
+                                     SI Millimeters
+                                     [%   CASE 'CM' %]
+                                     SI Centimeters
+                                     [% END %]
                                  </option>
                                  [% END %]
                                  </select>