Bug 20332: Allow translating some grouped opac results texts
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Mon, 5 Mar 2018 10:10:56 +0000 (12:10 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 13 Jul 2018 11:49:36 +0000 (11:49 +0000)
The grouped OPAC results page has several untranslatable
javascript-added texts, including the selection modifiers "Clear all"
and "Select all" links, and the entries in the shelves/lists dropdown.

Compare to opac-results.tt

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt

index b0ba7d5..f12ef5d 100644 (file)
@@ -296,9 +296,9 @@ $(document).ready(function(){
     $('#sort_by').change(function() {
         $('#bookbag_form').submit();
     });
-    $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">Clear all</a>");
-    $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">Select all</a>");
-    $("span.addto").html("<label for=\"addto\">Add to: </label><select name=\"addto\" id=\"addto\"><option value=\"\"></option>[% IF Koha.Preference( 'opacbookbag' ) == 1 %]<option value=\"addtocart\">Cart</option>[% END %][% IF Koha.Preference( 'virtualshelves' ) == 1 %][% IF ( loggedinusername ) %]<optgroup label=\"Lists:\">[% IF ( barshelves ) %][% FOREACH barshelvesloo IN barshelvesloop %][% IF ( category == 1 ) %]<option id=\"s[% barshelvesloo.shelfnumber %]\" value=\"addtolist\">[% barshelvesloo.shelfname | html %]</option>[% END %][% END %][% END %]<option value=\"newlist\">[ New list ]</option></optgroup>[% ELSE %]<option value=\"newlist\">List</option>[% END %][% END %]</select> <input type=\"submit\" class=\"submit\" value=\"Save\" />");
+    $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">" + _("Clear all") + "</a>");
+    $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">" + _("Select all") + "</a>");
+    $("span.addto").html("<label for=\"addto\">" + _("Add to: ") + "</label><select name=\"addto\" id=\"addto\"><option value=\"\"></option>[% IF Koha.Preference( 'opacbookbag' ) == 1 %]<option value=\"addtocart\">" + _("Cart") + "</option>[% END %][% IF Koha.Preference( 'virtualshelves' ) == 1 %][% IF ( loggedinusername ) %]<optgroup label=\"" + _("Lists:") + "\">[% IF ( barshelves ) %][% FOREACH barshelvesloo IN barshelvesloop %][% IF ( category == 1 ) %]<option id=\"s[% barshelvesloo.shelfnumber %]\" value=\"addtolist\">[% barshelvesloo.shelfname | html %]</option>[% END %][% END %][% END %]<option value=\"newlist\">" + _("[ New list ]") + "</option></optgroup>[% ELSE %]<option value=\"newlist\">" + _("List") + "</option>[% END %][% END %]</select> <input type=\"submit\" class=\"submit\" value=\"" + _("Save") + "\" />");
     $("#addto").change(function(){
         cartList();
     });