From c63403de805049a47f8f43747c492c8a99b78534 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 1 Mar 2023 14:34:25 -0500 Subject: [PATCH] Lp 2008925: Patch Templates Adversely Affected by Lp 1992490 The patch for Lp 1992490 wrapped several text blocks in the l() translation function. At least two of these introduced syntax error in Template Toolkit. Some of the others could have been done differntly to fit in better with the general idiom of how we use the fuction in Evergreen. This commit modifies those that stood out as the most egregious examples. An easy way to test this is to login to the OPAC on an unpatched system and click to open "Messages." You will get an Internal Server Error. After you apply this commit and install the affected templates, you will not get an Internal Server Error. The other modified templates do not seem to crash, but use the translation funciton in idiosyncratic ways. This commit attempts to smooth those out. Signed-off-by: Jason Stephenson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 | 2 +- Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 | 2 +- Open-ILS/src/templates-bootstrap/opac/myopac/messages/list.tt2 | 4 ++-- Open-ILS/src/templates-bootstrap/opac/register.tt2 | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 index 7108f72d02..3de821edd4 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 @@ -188,7 +188,7 @@ [% c = c + 1; %] [% IF myopac_cc_allowed %] - + [% END %] diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 index e6c38fdaa2..898098fe89 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/holds.tt2 @@ -153,7 +153,7 @@ - [% l('Hold Number') %] [% cnt; %] + [% l('Hold Number [_1]', cnt); %] diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/messages/list.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/messages/list.tt2 index 902dda922d..877b621227 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/messages/list.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/messages/list.tt2 @@ -95,7 +95,7 @@ [% FOR message IN ctx.patron_messages; %] - [% l('Message Number') count; %] + [% l('Message Number [_1]', count); %] @@ -113,7 +113,7 @@ [% l('Message Options') %] - [% l('Read') %] + [% l('Read') %] [% END %] diff --git a/Open-ILS/src/templates-bootstrap/opac/register.tt2 b/Open-ILS/src/templates-bootstrap/opac/register.tt2 index ef99c686e5..6c36abc155 100755 --- a/Open-ILS/src/templates-bootstrap/opac/register.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/register.tt2 @@ -50,7 +50,7 @@ register_fields = [

[% l('Request a Library Card')%]

- [% l('★ indicates Required Field') %] + ★ [% l('indicates Required Field') %]
[% IF ctx.register.success %] @@ -172,7 +172,7 @@ FOR field_def IN register_fields; value='[% value || CGI.param(field_path) | html %]' [% IF require %]required[% END %]/> [% END %]
- [% l('Please enter a') %] [% field_def.label | html %] + [% l('Please enter a [_1]', field_def.label) | html %]
-- 2.11.0