From ebd51179943b8400ff7794f1181f2b00aad38988 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 20 Oct 2020 11:22:07 +0000 Subject: [PATCH] Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode This patch adds the "Print" string to datatables.js so that it can be picked up for translation. To test, apply the patch and add some items to the cart in the OPAC. - Open the cart. You should see a button labeled "Print." - The print button should work correctly. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/opac-tmpl/bootstrap/js/datatables.js for translation: msgid "Print" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation: > perl translate install fr-FR - Switch to your newly translated language in the OPAC and repeat the test plan above. The translated strings should appear. --- koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js index e201097724..231ef74219 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js @@ -27,7 +27,8 @@ var dataTablesDefaults = { "copySuccess": { _: window.MSG_DT_COPIED_ROWS || "Copied %d rows to clipboard", 1: window.MSG_DT_COPIED_ONE_ROW || "Copied one row to clipboard", - } + }, + "print": __("Print") } }, "dom": 't', -- 2.11.0