From ebf1ad39f855e4625d1217fb1e6a4ddb390a7a34 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 10 Aug 2022 08:36:18 +0100 Subject: [PATCH] Bug 29723: (QA follow-up) Make button text translatable This patch makes the button text translatable. Whilst we're here I also added a wrench icon, set the title attribute and added a class. Signed-off-by: Martin Renvoize Signed-off-by: Andrew Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 4 +++- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc index 27a7cbba69..1c3af9e495 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -164,7 +164,9 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { if ( CAN_user_parameters_manage_column_config ) { dt_parameters[ "buttons" ].push( { - text: 'Configure this table', + className: "dt_button_configure_table", + titleAttr: __("Configure this table"), + text: ' ' + _("Configure this table") + '', action: function() { window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table']; }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index c5f346f60e..13f4821e93 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -816,7 +816,9 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { if ( CAN_user_parameters_manage_column_config ) { settings[ "buttons" ].push( { - text: 'Configure this table', + className: "dt_button_configure_table", + titleAttr: __("Configure this table"), + text: ' ' + __("Configure this table") + '', action: function() { window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table']; }, -- 2.39.5