From 289f0e80517713814fb0752b932fe612ba2d0bc4 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 23 Apr 2023 21:16:52 +0000 Subject: [PATCH] Bug 32701: Fix I18N JavaScript libraries on self checkout help page The help page was missing the fixes from bug 28488. The missing libraries are causing a JavaScript error on the page and likely other issues. To test: * Make sure WebBasedSelfCheck is activated and configured Note: In ktd you don't need to configure anything, it's already set up. * In the OPAC, go to: /cgi-bin/koha/sco/sco-main.pl * Click on the link to the help in the top right corner * Verify you see the error in the console: jQuery.Deferred exception: __ is not defined * Apply patch * Restart things * Reload the page * Veriy the errors are gone Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt index b01c769dad..bc50e98507 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt @@ -2,6 +2,7 @@ [% USE Koha %] [% USE Asset %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Self checkout help › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] @@ -12,8 +13,14 @@ [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] [% IF ( 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 %] [% INCLUDE 'masthead-sco.inc' %] -- 2.39.5