Bug 20302: Allow translating Delete button in Patron batch mod tool
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Tue, 27 Feb 2018 10:59:56 +0000 (12:59 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 27 Feb 2018 16:53:16 +0000 (13:53 -0300)
There is an untranslatable Delete-button in the patron batch modification
tool. Allow translating it.

Test plan:

1) Go to Home -> Tools -> Batch patron modification, put a patron's
   card number in the box, and click on Continue
2) At the bottom of the screen there is an drop-down entry for
   Attribute, click on the "New" at the nd of that line
3) There should now be another Attribute -line, with "Delete" -link
   at the end of that line
4) Apply patch, install a language
5) Repeat 1-3 in that language, the Delete-link should be shown in
   the correct language, if the msgid "Delete" was translated
   in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt

index d4a9e23..175c9c8 100644 (file)
             var li_node = $("li.attributes:last");
             var li_clone = $(li_node).clone();
             if ( $(li_clone).find("a.del_attributes").length == 0 ) {
-                $(li_clone).append('<a href="#" title="Delete" class="del_attributes"><i class="fa fa-fw fa-trash"></i> Delete</a>');
+                $(li_clone).append('<a href="#" title="' + _("Delete") + '" class="del_attributes"><i class="fa fa-fw fa-trash"></i> ' + _("Delete") + '</a>');
             }
             $(li_clone).find('select[name="patron_attributes"]').change(function() {
                 updateAttrValues(this);