[Bug 14517] New: Private lists browsing broken in translated staff interface
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Bug ID: 14517 Summary: Private lists browsing broken in translated staff interface Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Lists Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl This bug affects (at least) master and 3.20.x. To reproduce: - On the staff interface create a private list - Go to More > Lists ('Your lists' tab) => SUCCESS: Your private list is shown. - Translate the templates to any language like: $ cd misc/translator/ $ perl translate install es-ES - Enable the translated templates on the sysprefs - Switch to the translated language - Go to the lists page (Mas > Listas in es-ES) => FAIL: The datatable hangs waiting for the svc/shelves script to return data -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 40904 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40904&action=edit Sample broken lists (es-ES) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 40905 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40905&action=edit Sample working lists (en) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=14517 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 40994 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40994&action=edit Bug 14517: List shelves list is broken for translated interfaces The translation script adds quotes ("") around translated string (Edit for instance). Which breaks the json structure. Example: "dt_action": "<a style=\"cursor:pointer\"><form action='shelves.pl' method='get'><input class="editshelf" value="Editar" type="submit" /></form></a>" Test plan: 1/ On the staff interface create a private list 2/ Go to More > Lists ('Your lists' tab) 3/ Translate the templates to any language like: $ cd misc/translator/ $ perl translate install es-ES 4/ Enable the translated templates on the sysprefs 5/ Switch to the translated language 6/ Go to the lists page (Mas > Listas in es-ES) The list should be displayed correctly. Note: There is a limitation. If a translated string contains a simple quote ('), it will also break the json. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14529 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14529 [Bug 14529] Cannot delete a list even if the permission is set -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 40994 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40994 Bug 14517: List shelves list is broken for translated interfaces Review of attachment 40994: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14517&attachment=40994) ----------------------------------------------------------------- I fear trying to understand how this works at this late hour. ::: koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt @@ +29,4 @@
}
[% BLOCK action_form -%] +[%~ SET action_block = '' ~%]
http://template-toolkit.org/docs/manual/Config.html#section_PRE_CHOMP_POST_C... "To remove all whitespace including any number of newlines, use the '~' character instead. [% FOREACH user IN userlist %] [%~ user ~%] [% END %]" --- learned something new. Though this was hard to find in the manual. @@ +32,5 @@
+[%~ SET action_block = '' ~%] +[%~ IF can_manage_shelf OR can_delete_shelf ~%] + [%~ IF can_manage_shelf ~%] + [%~ action_block = '<form action="shelves.pl" method="get">' ~%] + [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%]
http://www.template-toolkit.org/docs/manual/Directives.html#section_SET "You can concatenate strings together using the ' _ ' operator." -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |chris@bigballofwax.co.nz --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Can I get a rebase please Applying: Bug 14517: List shelves list is broken for translated interfaces fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 14517: List shelves list is broken for translated interfaces -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40994|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 41467 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41467&action=edit Bug 14517: List shelves list is broken for translated interfaces The translation script adds quotes ("") around translated string (Edit for instance). Which breaks the json structure. Example: "dt_action": "<a style=\"cursor:pointer\"><form action='shelves.pl' method='get'><input class="editshelf" value="Editar" type="submit" /></form></a>" Test plan: 1/ On the staff interface create a private list 2/ Go to More > Lists ('Your lists' tab) 3/ Translate the templates to any language like: $ cd misc/translator/ $ perl translate install es-ES 4/ Enable the translated templates on the sysprefs 5/ Switch to the translated language 6/ Go to the lists page (Mas > Listas in es-ES) The list should be displayed correctly. Note: There is a limitation. If a translated string contains a simple quote ('), it will also break the json. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- I just noticed that our To plugin, we just use to do JSON .. In future we could maybe use this? But this is a just a comment. No reason to hold the bug http://search.cpan.org/~nuffin/Template-Plugin-JSON-0.06/lib/Template/Plugin... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Chris Cormack from comment #7)
I just noticed that our To plugin, we just use to do JSON .. In future we could maybe use this? But this is a just a comment. No reason to hold the bug
http://search.cpan.org/~nuffin/Template-Plugin-JSON-0.06/lib/Template/Plugin... JSON.pm
The idea was to avoid another dependency. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 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=14517 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41467|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 41624 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41624&action=edit [PASSED QA] Bug 14517: List shelves list is broken for translated interfaces The translation script adds quotes ("") around translated string (Edit for instance). Which breaks the json structure. Example: "dt_action": "<a style=\"cursor:pointer\"><form action='shelves.pl' method='get'><input class="editshelf" value="Editar" type="submit" /></form></a>" Test plan: 1/ On the staff interface create a private list 2/ Go to More > Lists ('Your lists' tab) 3/ Translate the templates to any language like: $ cd misc/translator/ $ perl translate install es-ES 4/ Enable the translated templates on the sysprefs 5/ Switch to the translated language 6/ Go to the lists page (Mas > Listas in es-ES) The list should be displayed correctly. Note: There is a limitation. If a translated string contains a simple quote ('), it will also break the json. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> 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=14517 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Great job Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14544 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14517 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Even though this makes template changes, it stops the templates breaking completely so pushing Will be in 3.20.3 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org