Bug 14667: Make some strings translatable
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 18 Aug 2015 16:40:46 +0000 (17:40 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Oct 2015 14:23:21 +0000 (11:23 -0300)
This patch 1/ Fixes a regression introduced by the previous patch: the
"Are you sure to delete..." strings was translatable and 2/ Make the
table headers translatable.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt

index ed3f148..e09ca43 100644 (file)
@@ -7,6 +7,7 @@
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
     //<![CDATA[
+        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
         function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
             $(".focus:last").select();
         }
                                                     <tr>
                                                         [% FOREACH text_field IN table_loo.text_fields %]
                                                             [% IF ( text_field.select_field ) %]
-                                                                <td><a class="btn btn-mini" onclick="return confirm('Are you sure you want to delete this?');" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id |url %]&amp;label_id=[% text_field.field_value |url %]"><icon class="icon-trash"></icon> Delete</a> <a class="btn btn-mini" href="#" onclick="GB_showCenter('Export labels','/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value |url %]')"><icon class="icon-share"></icon> Export</a></td>
+                                                                <td><a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id |url %]&amp;label_id=[% text_field.field_value |url %]"><icon class="icon-trash"></icon> Delete</a> <a class="btn btn-mini" href="#" onclick="GB_showCenter('Export labels','/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value |url %]')"><icon class="icon-share"></icon> Export</a></td>
                                                                 <td><center><input type="checkbox" name="action" value="[% text_field.field_value %]"></center></td>
                                                             [% ELSE %]
                                                                 <td>
index 1e435a6..5f2ee43 100644 (file)
@@ -4,6 +4,7 @@
     [% INCLUDE 'greybox.inc' %]
     <script type="text/javascript">
         //<![CDATA[
+            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
             function Xport() {
                 batches= new Array;
                 if(document.layouts.action.length > 0) {
                                         <thead>
                                         <tr>
                                             [% FOREACH header_field IN table_loo.header_fields %]
-                                                 <th>[% header_field.field_label %]</th>
+                                                [% SWITCH header_field.field_label %]
+                                                    [% CASE 'Layout ID'     %]<th>Layout ID</th>
+                                                    [% CASE 'Layout'        %]<th>Layout</th>
+                                                    [% CASE 'Barcode Type'  %]<th>Barcode type</th>
+                                                    [% CASE 'Print Type'    %]<th>Print type</th>
+                                                    [% CASE 'Template ID'   %]<th>Template ID</th>
+                                                    [% CASE 'Template Name' %]<th>Template name</th>
+                                                    [% CASE 'Description'   %]<th>Description</th>
+                                                    [% CASE 'Actions'       %]<th>Actions</th>
+                                                    [% CASE 'Profile ID'    %]<th>Profile ID</th>
+                                                    [% CASE 'Printer Name'  %]<th>Printer name</th>
+                                                    [% CASE 'Paper Bin'     %]<th>Paper bin</th>
+                                                    [% CASE 'Batch ID'      %]<th>Batch ID</th>
+                                                    [% CASE 'Item Count'    %]<th>Item count</th>
+                                                    [% CASE                 %]<th>[% header_field.field_label %]</th>
+                                                [% END %]
                                             [% END %]
                                         </tr>
                                         </thead>
                                         <tr>
                                         [% FOREACH text_field IN table_loo.text_fields %]
                                             [% IF ( text_field.select_field ) %]
-                                                <td align="center"><a class="btn btn-mini" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit&amp;element_id=[% text_field.field_value |url %]"><icon class="icon-edit"></icon> Edit</a>  <a class="btn btn-mini" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=[% text_field.field_value |url %]" onclick="return confirm('Are you sure you want to delete this?');"><icon class="icon-trash"></icon> Delete</a></td>
+                                                <td align="center"><a class="btn btn-mini" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit&amp;element_id=[% text_field.field_value |url %]"><icon class="icon-edit"></icon> Edit</a>  <a class="btn btn-mini" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=[% text_field.field_value |url %]" onclick="return confirm(MSG_CONFIRM_DELETE);"><icon class="icon-trash"></icon> Delete</a></td>
                                                 [% IF label_element == 'batch' %] <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
                                             [% ELSIF ( text_field.field_value ) %]
                                                 <td>[% text_field.field_value %]</td>