[Bug 33780] New: Multi-line TT comment: [%% item.object.itemnotes.replace('\n', '
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Bug ID: 33780 Summary: Multi-line TT comment: [%% item.object.itemnotes.replace('\n',' Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Keywords: Academy Severity: trivial Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org TT comments broken on multiple lines will lead to artifacts in the po files. Better to use a format that keeps them on one line or enclose each line in [%% ... %%] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:581 [%% item.object.itemnotes.replace('\n',' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This line? 594 <td><div class="itemnotes">[% item.object.itemnotes.replace('\n','<br />') | $raw %]</div></td> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Katrin Fischer from comment #0)
[%% item.object.itemnotes.replace('\n','
I don't see this string anywhere but in Koha-staff-prog.pot -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Owen Leonard from comment #2)
I don't see this string anywhere but in Koha-staff-prog.pot
Sorry, scratch that, I was on the wrong branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff 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=33780 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 151677 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151677&action=edit Bug 33780: Use TT html_line_break filter to format itemnotes This patch removes a snippet of TT code which was causing problems with translation. Putting HTML inside a TT replace() method resulted in TT code being processed for translation. To test, apply the patch and edit an item record's public note field so that it contains line breaks ("\n"). Since the notes field in the editor is a text field, you might want to update the record in the database: update items set itemnotes = "Line 1\nLine 2\n\n\n\nLine 3" where biblionumber = 228; View the bibliographic details page in the staff interface. The note in the holdings table should have the correct line breaks. If you inspect the HTML you should see that each "\n" has been replaced with "<br />" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I am not sure this is about what was reporting Katrin. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- This is an improvement so I will sign-off. Will let Katrin decide if this was what she initially reported. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151677|0 |1 is obsolete| | --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 151703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151703&action=edit Bug 33780: Use TT html_line_break filter to format itemnotes This patch removes a snippet of TT code which was causing problems with translation. Putting HTML inside a TT replace() method resulted in TT code being processed for translation. To test, apply the patch and edit an item record's public note field so that it contains line breaks ("\n"). Since the notes field in the editor is a text field, you might want to update the record in the database: update items set itemnotes = "Line 1\nLine 2\n\n\n\nLine 3" where biblionumber = 228; View the bibliographic details page in the staff interface. The note in the holdings table should have the correct line breaks. If you inspect the HTML you should see that each "\n" has been replaced with "<br />" Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=33780 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au Status|Signed Off |Failed QA --- Comment #8 from David Cook <dcook@prosentient.com.au> --- The effect of the patch is different to the issue description. Note that before the patch, you could include HTML in the item note field. After the patch, the HTML is escaped. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151703|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33780 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org