From 37bfb9e385172c0ff800b2827bc7b15fd8afea8a Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@theke.io>
Date: Wed, 1 Jul 2020 14:45:45 -0300
Subject: [PATCH] Bug 25909: Revert wrong use of js/i18n.js __ in OPAC

This reverts commit 6b82d1416687434c61fe49b4230c15ad8b795b6e

The __ function is not implemented in the OPAC and so the original
implementation that relied on _ should be used instead.
---
 koha-tmpl/intranet-tmpl/prog/js/datatables.js | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
index 13db0e495ca..5c8ab9e4192 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js
@@ -522,7 +522,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
                         'pagingType': 'full_numbers',
                         'processing': true,
                         'language': {
-                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
+                            'emptyTable': (options.emptyTable) ? options.emptyTable : _("No data available in table")
                         },
                         'ajax': {
                             'type': 'GET',
@@ -637,7 +637,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
         var export_buttons = [
             {
                 extend: 'excelHtml5',
-                text: __("Excel"),
+                text: _("Excel"),
                 exportOptions: {
                     columns: exportColumns,
                     format:  export_format
@@ -645,7 +645,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
             },
             {
                 extend: 'csvHtml5',
-                text: __("CSV"),
+                text: _("CSV"),
                 exportOptions: {
                     columns: exportColumns,
                     format:  export_format
@@ -653,7 +653,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
             },
             {
                 extend: 'copyHtml5',
-                text: __("Copy"),
+                text: _("Copy"),
                 exportOptions: {
                     columns: exportColumns,
                     format:  export_format
@@ -661,7 +661,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
             },
             {
                 extend: 'print',
-                text: __("Print"),
+                text: _("Print"),
                 exportOptions: {
                     columns: exportColumns,
                     format:  export_format
@@ -673,9 +673,9 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
             {
                 fade: 100,
                 className: "dt_button_clear_filter",
-                titleAttr: __("Clear filter"),
+                titleAttr: _("Clear filter"),
                 enabled: false,
-                text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + __("Clear filter") + '</span>',
+                text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + _("Clear filter") + '</span>',
                 action: function ( e, dt, node, config ) {
                     dt.search( "" ).draw("page");
                     node.addClass("disabled");
@@ -690,8 +690,8 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
                     fade: 100,
                     columns: included_ids,
                     className: "columns_controls",
-                    titleAttr: __("Columns settings"),
-                    text: '<i class="fa fa-lg fa-gear"></i> <span class="dt-button-text">' + __("Columns") + '</span>',
+                    titleAttr: _("Columns settings"),
+                    text: '<i class="fa fa-lg fa-gear"></i> <span class="dt-button-text">' + _("Columns") + '</span>',
                     exportOptions: {
                         columns: exportColumns
                     }
@@ -705,8 +705,8 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
                 autoClose: true,
                 fade: 100,
                 className: "export_controls",
-                titleAttr: __("Export or print"),
-                text: '<i class="fa fa-lg fa-download"></i> <span class="dt-button-text">' + __("Export") + '</span>',
+                titleAttr: _("Export or print"),
+                text: '<i class="fa fa-lg fa-download"></i> <span class="dt-button-text">' + _("Export") + '</span>',
                 buttons: export_buttons
             }
         );
-- 
2.27.0