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>",
Created attachment 126416 [details] [review] 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
Created attachment 126423 [details] [review] 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>
Tested as per the test plan, all works as expected. Signing off
I think we can safely go straight to PQA for this one.
Pushed to master for 21.11, thanks to everybody involved!
Created attachment 127064 [details] [review] Bug 29261: (bug 15812 follow-up 2) Fix translation issue in include file
(In reply to Jonathan Druart from comment #6) > Created attachment 127064 [details] [review] [review] > Bug 29261: (bug 15812 follow-up 2) Fix translation issue in include file Pushed to master.
This didn't work, the original problem is still there.
Created attachment 127204 [details] [review] 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)
Last patch pushed to master.