[Bug 30958] New: OPAC Overdrive search result page broken for translations
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Bug ID: 30958 Summary: OPAC Overdrive search result page broken for translations Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr If a library does not have the OverDrivePasswordRequired system preference = 'Required' then translated OPAC Overdrive search result pages throw a JavaScript error and do not display results. The problematic line (below) in the English template is: var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %]; Which is translated to the following in the en-NZ (and other languages) template: var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %][% END %]; Like in bug 23713 the line is translated to: var OD_password_required = ; When it should be: var OD_password_required = 0; -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23713 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |alexbuckley@catalyst.net.nz |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 136056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136056&action=edit Bug 30958: OPAC overdrive search result page broken for translations Note: You will need a valid OverDrive subscription to test this. This patch fixes a JavaScript error thrown on the OPAC overdrive search results page for libraries using translation templates and who don't have the OverDrivePasswordRequired system preference = 'Required'. Test plan: 1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_fo... 2. Enable the en-NZ language: - In the OPACLanguages system preference -> tick 'English New Zealand (en-NZ)' checkbox and untick 'English (en)' 3. Fill in the OverDrive system preferences: - Make sure you set: OverDrivePasswordRequired = "Not required" 4. Perform an OPAC search 5. Click on the Overdrive results link 6. Open the browser console and notice there is a JS error, and the OverDrive results do not load 7. Apply patch 8. Update the en_NZ translation: 9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and the OverDrive results do display Sponsored-by: Melbourne Athenaeum Library, Australia -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136056|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 136068 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136068&action=edit Bug 30958: OPAC overdrive search result page broken for translations Note: You will need a valid OverDrive subscription to test this. This patch fixes a JavaScript error thrown on the OPAC overdrive search results page for libraries using translation templates and who don't have the OverDrivePasswordRequired system preference = 'Required'. Test plan: 1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_fo... 2. Enable the en-NZ language: - In the OPACLanguages system preference -> tick 'English New Zealand (en-NZ)' checkbox and untick 'English (en)' 3. Fill in the OverDrive system preferences: - Make sure you set: OverDrivePasswordRequired = "Not required" 4. Perform an OPAC search 5. Click on the Overdrive results link 6. Open the browser console and notice there is a JS error, and the OverDrive results do not load 7. Apply patch 8. Update the en_NZ translation: 9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and the OverDrive results do display Sponsored-by: Melbourne Athenaeum Library, Australia Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- There are a couple of other instances that I saw which should also be addressed. I searched the NZ templates for "1[% ELSE %][% END %]" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30991 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've filed Bug 30991 - [% ELSE %]0[% END %] will break translations if used for assigning variables for fixing any other occurrences so this can move on. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136068|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 136310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136310&action=edit Bug 30958: OPAC overdrive search result page broken for translations Note: You will need a valid OverDrive subscription to test this. This patch fixes a JavaScript error thrown on the OPAC overdrive search results page for libraries using translation templates and who don't have the OverDrivePasswordRequired system preference = 'Required'. Test plan: 1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_fo... 2. Enable the en-NZ language: - In the OPACLanguages system preference -> tick 'English New Zealand (en-NZ)' checkbox and untick 'English (en)' 3. Fill in the OverDrive system preferences: - Make sure you set: OverDrivePasswordRequired = "Not required" 4. Perform an OPAC search 5. Click on the Overdrive results link 6. Open the browser console and notice there is a JS error, and the OverDrive results do not load 7. Apply patch 8. Update the en_NZ translation: 9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and the OverDrive results do display Sponsored-by: Melbourne Athenaeum Library, Australia Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.03 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.03 |22.11.00, 22.05.03, released in| |21.11.11 CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable --- Comment #8 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- backported to 21.11.x for 21.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #10 from Alex Buckley <alexbuckley@catalyst.net.nz> --- (In reply to Victor Grousset/tuxayo from comment #9)
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
Nothing to document, marking resolved.
Hi Victor, We have a client (Melbourne Athenaeum Library - who sponsored this fix) running 21.05.x who would love to have this fix before their next Koha upgrade. Would it be possible for you to backport this fix to 21.05.x please? Many thanks! Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Sure, will try in the next days :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #12 from Alex Buckley <alexbuckley@catalyst.net.nz> --- (In reply to Victor Grousset/tuxayo from comment #11)
Sure, will try in the next days :)
Thanks very much Victor :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.03, |22.11.00, 22.05.03, released in|21.11.11 |21.11.11, 21.05.18 --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 21.05.x branch for 21.05.18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30958 --- Comment #14 from Alex Buckley <alexbuckley@catalyst.net.nz> --- (In reply to Victor Grousset/tuxayo from comment #13)
Backported: Pushed to 21.05.x branch for 21.05.18
Thanks Victor! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org