[Bug 7821] New: XSLT systempreference multi-language support
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Priority: P5 - low Change sponsored?: --- Bug ID: 7821 Assignee: oleonard@myacpl.org Summary: XSLT systempreference multi-language support QA Contact: koha.sekjal@gmail.com Severity: enhancement Classification: Unclassified OS: All Reporter: dpavlin@rot13.org Hardware: All Status: NEW Version: rel_3_8 Component: OPAC Product: Koha There was discussion on bug 4032 that multi-language support is important. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |4032 Assignee|oleonard@myacpl.org |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8621 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8621&action=edit Bug 7821 - {langcode} will be replaced with current interface language This makes bug 4032 support multi-language Koha installation which is important for some of Koha users. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|rel_3_8 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8621|0 |1 is obsolete| | --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 8626 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8626&action=edit [SIGNED-OFF] Bug 7821 - {langcode} will be replaced with current interface language This makes bug 4032 support multi-language Koha installation which is important for some of Koha users. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> 1) After update XSLT system preferences are set to 'default'. All views (OPAC and staff, results and detail page) work and switching languages selects the correct translated file. 2) Leaving empty works and normal views are used. 3) Putting in a single URL without placeholder works. 4) Putting in a URL with placeholder works. Created local directories have to match the language codes. NOTE: In order to make the URLs and patchs work, the Utils file needs to be copied too. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: small patch, nothing to say, passed QA. Must be applied after 4032 passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Just mentioning: Think the test /{langcode}/ works, but to my knowledge(..) curly braces should better be escaped in a regex. Normally they are used for repetition (a{2} means two characters a). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #5 from Dobrica Pavlinusic <dpavlin@rot13.org> --- I agree. Something like \Q{langcode}\E would be much better. Should I re-submit patch or can QA fix this? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_8 --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #5)
I agree. Something like \Q{langcode}\E would be much better. Should I re-submit patch or can QA fix this?
I've fixed it, by using \{ and \} It work fine, thanks. Note that the result will be broken if you use {langcode} but don't provide a localised stylesheet for each language For example, you have en/stylesheet.xsl fr-FR/stylesheet.xsl set the syspref to {langcode}/stylesheet.xsl and activate german at the OPAC: displaying in english and french will be OK, in german, you'll get a nasty Perl error. Worth specifying it in the documentation! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- I'm getting an error from /cgi-bin/koha/virtualshelves/shelves.pl which git bisect blames on the latest commit from this bug (f91bd36399b1ab46649482f80e0ff1b438a8d9f6): Bareword "C4::Templates::_current_language" not allowed while "strict subs" in use at /home/oleonard/kohaclone/C4/XSLT.pm line 175. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #8 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8724 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8724&action=edit Bug 7821 - fix C4::Templates::_current_language Bareword "C4::Templates::_current_language" not allowed while "strict subs" in use at /home/oleonard/kohaclone/C4/XSLT.pm line 175. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8724|0 |1 is obsolete| | --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 8725 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8725&action=edit Followup for current language call -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8626|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Trivial fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |critical --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Updatig severity - last patch if fixing a bug, not an enhancement. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |blocker --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Updating severity again... Cron <...> $KOHA_CRON_PATH/../migration_tools/rebuild_zebra.pl -b -a -z
/dev/null (failed)
Bareword "C4::Templates::_current_language" not allowed while "strict subs" in use at /home/katrin/kohaclone/C4/XSLT.pm line 175. Compilation failed in require at /home/katrin/kohaclone/C4/Search.pm line 29. BEGIN failed--compilation aborted at /home/katrin/kohaclone/C4/Search.pm line 29. Compilation failed in require at /home/katrin/kohaclone/C4/AuthoritiesMarc.pm line 24. BEGIN failed--compilation aborted at /home/katrin/kohaclone/C4/AuthoritiesMarc.pm line 24. Compilation failed in require at /home/katrin/kohaclone/misc/cronjobs/../migration_tools/rebuild_zebra.pl line 11. BEGIN failed--compilation aborted at /home/katrin/kohaclone/misc/cronjobs/../migration_tools/rebuild_zebra.pl line 11. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |srdjan@catalyst.net.nz --- Comment #13 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Bareword "C4::Templates::_current_language" not allowed while "strict subs" in use at C4/XSLT.pm line 175. Compilation failed in require at C4/Search.pm line 29. It seems that $ is missing from C4::Templates::_current_language in C4/XSLT.pm -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA CC| |chris@bigballofwax.co.nz --- Comment #14 from Chris Cormack <chris@bigballofwax.co.nz> --- Srdjan the latest patch the follow up, is the fix for that, it needs to be pushed ASAP, because master is currently broken until it is -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #15 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Yes, I should be more observant and read all the comments as opposed to be lazy... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed, if someone can explain why the () fixes the problem (or why, without () there is a problem), i'd like to have it !!! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 --- Comment #17 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Comment on attachment 8725 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8725 Followup for current language call () fixes it because _current_language is not a declared symbol, so perl treats it as a bareword, and strict barfs when compiling. _current_language() is a function call, so gets resolved at runtime (C and Java people hate that). C4::Templates::_current_language() exists, so it gets executed. So if you had in C4::Templates (which I thoroughly not recommend) sub _current_language () { return $_current_language; } C4::Templates::_current_language would have worked, () prototypes the function and makes it a symbol. That's why people use constant; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Bug 7821 depends on bug 4032, which changed state. Bug 4032 Summary: XSLT systempreference should take a path to file rather than YesNo http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4032 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7821 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=4403 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org