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)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-11-02 09:42:05 +01:00
parent fab97c6d38
commit 4f57531d14

View file

@ -1,4 +1,5 @@
[% USE raw %]
[% USE I18N %]
[% USE To %]
[% USE AuthorisedValues %]
[% USE KohaDates %]
@ -16,9 +17,9 @@
"<label for='check[% data.borrowernumber | html %]' class='content_hidden'>Select patron</label><input type='checkbox' id='check[% data.borrowernumber | html %]' class='selection' name='borrowernumber' value='[% data.borrowernumber | html %]' />",
[% END %]
"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 %]",
"[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<a href='/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | html %]' title=\"[% I18N.t("Check out") %]\">[% 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=\"[% I18N.t("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":