[Bug 29261] New: Translation script breaks members/tables/members_results.tt
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Bug ID: 29261 Summary: Translation script breaks members/tables/members_results.tt Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: translate.koha-community.org Assignee: koha-bugs@lists.koha-community.org Reporter: nugged@gmail.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart+koha@gmail.com Got this in the errors log: Template process failed: file error - parse error - /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/fi-FI/modules/members/tables/members_results.tt line 6: unexpected token (data) when compared to the original main place of the error localized here, such line: "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap' title='View'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br /><div class='address'><ul>[%~ INCLUDE 'display-address-style' patron=data no_line_break=1 | $To ~%][% IF data.email %]<li>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a></li>[% END %]</ul></div>", broken by script and messed up: "<a %]\"="%]\"" class="\"patron_preview\"" data-borrowernumber="\"[%" data.borrowernumber="data.borrowernumber" href="\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[%" html="html" style="white-space:nowrap" title="Näytä" |="|">[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br /><div class='address'><ul>[%~ INCLUDE 'display-address-style' patron=data no_line_break=1 | $To ~%][% IF data.email %]<li>Sähköposti: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a></li>[% END %]</ul></div>", -- 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=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15812 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15812 [Bug 15812] Checkout search with too many results (single character search) causes poor performance or timeout -- 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=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major Keywords| |rel_21_11_candidate -- 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=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- 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=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126416 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126416&action=edit Bug 29261: (bug 15812 follow-up) Fix translation issue in include file Strings must be surrounded by double quote or it wil break the translate script. Without this patch you get: 5 "dt_name": 6 "<a %]\"="%]\"" in the translated template and the UI explodes with "Template process failed: file error - parse error" Test plan: Apply this patch, update PO files for a given language, translate "View". Search for something like: msgid "\\\"View\\\"" msgstr "\\\"Näytä\\\"" Remove fuzzy. Install the language and search for patrons -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126416|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126423&action=edit Bug 29261: (bug 15812 follow-up) Fix translation issue in include file Strings must be surrounded by double quote or it wil break the translate script. Without this patch you get: 5 "dt_name": 6 "<a %]\"="%]\"" in the translated template and the UI explodes with "Template process failed: file error - parse error" Test plan: Apply this patch, update PO files for a given language, translate "View". Search for something like: msgid "\\\"View\\\"" msgstr "\\\"Näytä\\\"" Remove fuzzy. Install the language and search for patrons Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tested as per the test plan, all works as expected. Signing off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I think we can safely go straight to PQA for this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127064 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127064&action=edit Bug 29261: (bug 15812 follow-up 2) Fix translation issue in include file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #6)
Created attachment 127064 [details] [review] Bug 29261: (bug 15812 follow-up 2) Fix translation issue in include file
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=29261 Bug 29261 depends on bug 15812, which changed state. Bug 15812 Summary: Checkout search with too many results (single character search) causes poor performance or timeout https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15812 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This didn't work, the original problem is still there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed, | |rel_21_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127204&action=edit Bug 29261: (bug 15812 follow-up 3) Fix translation issue in include file This is getting messy. No idea how I tested the previous patches but it was not working, the problem still persisted. This patch is using the I18N TT plugin to make things easier and fix the original problem. Test plan: Apply the patch perl translate update fi-FI Edit misc/translator/po/fi-FI-messages.po Locate and translate "Check out" 61 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:20 62 msgid "Check out" 63 msgstr "Laina" Locate and transate "View" 182 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:22 183 msgid "View" 184 msgstr "Nayta" Apply the change to the fi-FI templates perl translate install fi-FI Now enable the fi-FI in the lang syspref, search for patron and confirm that the result view is displayed correctly. Note that the "Check out" and "View" strings are correctly translated (when you hover the cardnumbers or patron's names) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed, | |rel_21_11_candidate | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Last patch 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=29261 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org