From 1bafa0e1eab3e93785a637745a2028e6866429ce Mon Sep 17 00:00:00 2001 From: Maryse Simard Date: Mon, 18 Nov 2019 08:50:52 -0500 Subject: [PATCH] Bug 24046: Untranslatable 'Activate filters' Bug 9573 moved the code for the table filters activation to it's own javascript file. The strings contained in this file are not translatable. This patch moves the strings to the datatables include file since the filters are related to datatables. Test plan: Visit the catalogue/detail.pl and reports/itemslost.pl and test that the 'Activate/Deactivate filters' option still work correctly. Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 423cc1053d8740fe220325d2ec1821320e057e14) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc | 3 +++ koha-tmpl/intranet-tmpl/prog/js/table_filters.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc index 5138e7d7ca..fb085a6771 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc @@ -27,5 +27,8 @@ var MSG_DT_COPY_KEYS = _("Press ctrl or ⌘ + C to copy the table data
to your system clipboard.

To cancel, click this message or press escape."); var MSG_DT_COPY_SUCCESS_ONE = _("Copied one row to clipboard"); var MSG_DT_COPY_SUCCESS_X = _("Copied %d rows to clipboard"); + var MSG_CLEAR_FILTER = _("Clear filter"); + var MSG_ACTIVATE_FILTERS = _("Activate filters"); + var MSG_DEACTIVATE_FILTERS = _("Deactivate filters"); [% Asset.js("js/datatables.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js b/koha-tmpl/intranet-tmpl/prog/js/table_filters.js index 6607120d35..d7c4dc8988 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js +++ b/koha-tmpl/intranet-tmpl/prog/js/table_filters.js @@ -23,7 +23,7 @@ function activate_filters(id) { } $('#' + id + '_activate_filters') - .html(' ' + _("Deactivate filters") ) + .html(' ' + MSG_DEACTIVATE_FILTERS ) .unbind('click') .click(function() { deactivate_filters(id); @@ -41,7 +41,7 @@ function deactivate_filters(id) { filters_row.hide(); $('#' + id + '_activate_filters') - .html(' ' + _("Activate filters") ) + .html(' ' + MSG_ACTIVATE_FILTERS ) .unbind('click') .click(function() { activate_filters(id); -- 2.39.5