Bug 8980 - Untranslatable strings in modborrowers.pl
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Oct 2012 19:24:37 +0000 (15:24 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 30 Oct 2012 17:28:35 +0000 (18:28 +0100)
This patch removes the declaration of interface labels
from the script and puts it in the template where the
labels can be translated. The labels have been modified
to match those used on the patron entry form.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
tools/modborrowers.pl

index 618d056..8f33fe6 100644 (file)
                                     <ol>
                                         [% FOREACH field IN fields %]
                                         <li>
-                                            <label style="width:20em;">[% field.lib %]</label>
+                                            <label style="width:20em;">
+                                            [% SWITCH ( field.name ) %]
+                                                [% CASE 'surname' %]
+                                                Surname:
+                                                [% CASE 'firstname' %]
+                                                First name:
+                                                [% CASE 'branchcode' %]
+                                                Library:
+                                                [% CASE 'categorycode' %]
+                                                Category
+                                                [% CASE 'sort1' %]
+                                                Sort 1:
+                                                [% CASE 'sort2' %]
+                                                Sort 2:
+                                                [% CASE 'dateenrolled' %]
+                                                Registration date:
+                                                [% CASE 'dateexpiry' %]
+                                                Expiry date:
+                                                [% CASE 'debarred' %]
+                                                Restricted:
+                                                [% CASE 'debarredcomment' %]
+                                                Restriction comment:
+                                                [% CASE 'borrowernotes' %]
+                                                Circulation note:
+                                            [% END %]
+                                            </label>
                                             [% IF field.mandatory %]
                                                 <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" readonly="readonly" onclick="return false;" />
                                             [% ELSE %]
                                         [% END %]
                                         [% IF ( patron_attributes_codes ) %]
                                             <li class="attributes">
-                                                <label style="width:20em;">Attribute
+                                                <label style="width:20em;">Attribute:
                                                     <select name="patron_attributes">
                                                         [% FOREACH pac IN patron_attributes_codes %]
                                                             <option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option>
index 50bb668..a2c27c6 100755 (executable)
@@ -155,21 +155,18 @@ if ( $op eq 'show' ) {
     my @fields = (
         {
             name => "surname",
-            lib  => "Surname",
             type => "text",
             mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0
         }
         ,
         {
             name => "firstname",
-            lib  => "Firstname",
             type => "text",
             mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
         }
         ,
         {
             name => "branchcode",
-            lib  => "Branchname",
             type => "select",
             option => \@branches_option,
             mandatory => ( grep /branchcode/, @mandatoryFields ) ? 1 : 0,
@@ -177,7 +174,6 @@ if ( $op eq 'show' ) {
         ,
         {
             name => "categorycode",
-            lib  => "Category",
             type => "select",
             option => \@categories_option,
             mandatory => ( grep /categorycode/, @mandatoryFields ) ? 1 : 0,
@@ -185,7 +181,6 @@ if ( $op eq 'show' ) {
         ,
         {
             name => "sort1",
-            lib  => "Sort 1",
             type => @sort1_option ? "select" : "text",
             option => \@sort1_option,
             mandatory => ( grep /sort1/, @mandatoryFields ) ? 1 : 0,
@@ -193,7 +188,6 @@ if ( $op eq 'show' ) {
         ,
         {
             name => "sort2",
-            lib  => "Sort 2",
             type => @sort2_option ? "select" : "text",
             option => \@sort2_option,
             mandatory => ( grep /sort2/, @mandatoryFields ) ? 1 : 0,
@@ -201,35 +195,30 @@ if ( $op eq 'show' ) {
         ,
         {
             name => "dateenrolled",
-            lib  => "Date enrolled",
             type => "date",
             mandatory => ( grep /dateenrolled/, @mandatoryFields ) ? 1 : 0,
         }
         ,
         {
             name => "dateexpiry",
-            lib  => "Date expiry",
             type => "date",
             mandatory => ( grep /dateexpiry/, @mandatoryFields ) ? 1 : 0,
         }
         ,
         {
             name => "debarred",
-            lib  => "Debarred",
             type => "date",
             mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0,
         }
         ,
         {
             name => "debarredcomment",
-            lib  => "Debarred comment",
             type => "text",
             mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0,
         }
         ,
         {
             name => "borrowernotes",
-            lib  => "Borrower Notes",
             type => "text",
             mandatory => ( grep /borrowernotes/, @mandatoryFields ) ? 1 : 0,
         }