Bug 29261: (bug 15812 follow-up) Fix translation issue in include file
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 18 Oct 2021 09:05:18 +0000 (11:05 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Oct 2021 08:04:38 +0000 (10:04 +0200)
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt

index 5e219d2..cd0713e 100644 (file)
@@ -18,7 +18,7 @@
                 "dt_cardnumber":
                 "[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<a href='/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | html %]' title='Checkout'>[% data.cardnumber | html | $To %]</a>[% ELSE %][% data.cardnumber | html | $To %][% END %]",
                 "dt_name":
-                    "<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>",
+                    "<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>",
     "dt_dateofbirth":
         "[% INCLUDE 'patron-age.inc' patron = data %]",
                 "dt_category":