[Bug 13700] New: Translated item search not working
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Bug ID: 13700 Summary: Translated item search not working Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Testing the new item search from available from the advanced search page in the staff client I found it only working in English, but not in its German translation. This is a 3.18.3 installation with current templates. The Javascript errors shown in Firebug are very unspecific - I haven't been able yet to find the source of the problem. Any help much appreciated. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- I see this problem too. I checked out 3.18.3, installed and switched to the German templates, and tried the item search. The search results table never renders. I don't see any errors in the Firebug console, but looking at the data being sent to DataTables I see some differences in the English versus the German output. English: [ "<a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=5515' title='Go to record detail page'>Endless ocean</a> by ", "", "Nintendo of America,", "", "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=5515#item11264' title='Go to item details'>33000000094272</a>", "Wii Endless", "The Plains", "The Plains", "", "", "", "0", "<a href='/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=5515&itemnumber=11264'>Edit</a>" ] German: [ "<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=5515" title="Zur Detailansicht">Endless ocean</a> von ", "", "Nintendo of America,", "", "<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=5515#item11264" title="Zurück zu den Exemplardetails">33000000094272</a>", "Wii Endless", "The Plains", "The Plains", "", "", "", "0", "<a href='/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=5515&itemnumber=11264'>Bearbeiten</a>" ] In the German version the quotes around HTML attributes are double quotes instead of the single quotes seen in the English version. I assume that is what is breaking things. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx Owen for taking the time to look at this! I fixed a few problems with the strings, but it still doesn't work. And the problem with the quotes does not seem to exist in the po file? I went through all strings for this template, but had no luck finding anything that would explain it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this appears to be a problem with the translation script. It appears other translations that I tested this with are not complete - only in the German version of the file some things appear as translated, but not in fr-FR, nb-NO etc. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The problem also exists in the more complete es-ES translation. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com, | |frederic@tamil.fr Component|Searching |I18N/L10N Assignee|gmcharlt@gmail.com |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- I think there is two different ways to fix this: 1/ Fix tmpl_process3.pl to put the same quotes (single or double) as in the original file 2/ exclude includes/catalogue/itemsearch_item.json.inc from the list of files to translate (by changing its extension ?) and use Koha::I18N for translatable text in this file My preferences goes to 2. What do you think ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Template parsing is done by HTML::Parser and I can't find in the doc how to know if attributes values were specified with single or double quotes. So maybe (1) is not even a solution. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, What about 3)? Could we rewrite the file in a way, that will avoid the multiple quotes? Like building the string separately and then using a variable? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think changing the file ending would work - I have used this trick to avoid auto-translations in some other place in the past. But not a 'nice' solution. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- (2) will fail anyway, in case the translated string contains single quotes ... :/ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 35897 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35897&action=edit Bug 13700: Fix item search templates for translation Since translator rebuild HTML tags with double quotes for attributes values, use double quotes in english template too and escape them with backslash. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Julian Maurice <julian.maurice@biblibre.com> 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=13700 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Yay! Thx Julian! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35897|0 |1 is obsolete| | --- Comment #12 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 35899 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35899&action=edit [SIGNED-OFF] Bug 13700: Fix item search templates for translation Since translator rebuild HTML tags with double quotes for attributes values, use double quotes in english template too and escape them with backslash. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> It works well!! Test: 1) Intall translation (de-DE, es-ES) 2) to Go to item search, in english, do a search that gives results 3) Switch language, repeat search, result's table does not render 4) Apply patch 5) Install translation again 6) Repeat 3, now results are displayed No koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> 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=13700 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35899|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35907 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35907&action=edit [PASSED QA] Bug 13700: Fix item search templates for translation Since translator rebuild HTML tags with double quotes for attributes values, use double quotes in english template too and escape them with backslash. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> It works well!! Test: 1) Intall translation (de-DE, es-ES) 2) to Go to item search, in english, do a search that gives results 3) Switch language, repeat search, result's table does not render 4) Apply patch 5) Install translation again 6) Repeat 3, now results are displayed No koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Julian! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #15 from Chris Cormack <chris@bigballofwax.co.nz> --- String changes, held for 3.18.5 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13700 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #16 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org