From 8dcd5ddab08e487073943a79c0148f6779d20c17 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 7 Jun 2021 16:02:35 +0000 Subject: [PATCH] Bug 28488: Javascript error in self-checkout (__ is not defined) This patch adds inclusion of the internationalization JavaScript which is required by the newest version of the DataTables include. It references the double-underscore function provided by i18n.js. To test, apply the patch and log into the self-checkout system as a user with checkouts. The table of checkouts should display correctly and there should be no JavaScript errors in the console. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 339a0818e7..33d1d90b3e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -25,8 +25,14 @@ [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] [% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] +[% IF lang && lang != 'en' %] + [% Asset.js(lang _ '/js/locale_data.js') | $raw %] +[% END %] +[% Asset.js('js/Gettext.js') | $raw %] +[% Asset.js('js/i18n.js') | $raw %] [% Asset.js("lib/modernizr.min.js") | $raw %] -- 2.20.1