Browse Source

Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates

The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.

This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.

Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates

Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22.11.x
Alex Buckley 2 years ago
committed by Tomas Cohen Arazi
parent
commit
efad62f91d
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 12
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
  2. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
  3. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
  4. 2
      koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
  5. 6
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt

12
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt

@ -203,7 +203,11 @@
[% IF show_rule %]
[% SET row_count = row_count + 1 %]
<tr row_countd="row_[% row_count | html %]">
<td>[% IF ( c == undef ) %]1[% ELSE %]0[% END %]</td>
<td>[% IF ( c == undef ) %]
1
[% ELSE %]
0
[% END %]</td>
<td>
[% IF c == undef %]
<em>All</em>
@ -211,7 +215,11 @@
[% Categories.GetName(c) | html %]
[% END %]
</td>
<td>[% IF ( i == undef ) %]1[% ELSE %]0[% END %]</td>
<td>[% IF ( i == undef ) %]
1
[% ELSE %]
0
[% END %]</td>
<td>
[% IF i == undef %]
<em>All</em>

7
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt

@ -306,7 +306,12 @@
</li>
[% END %]
<li><span class="label">Total checkouts:</span>[% IF ( ITEM_DAT.issues ) %][% ITEM_DAT.issues | html %][% ELSE %]0[% END %] (<a href="/cgi-bin/koha/circ/bookcount.pl?&amp;biblionumber=[% ITEM_DAT.biblionumber | uri %]&amp;itm=[% ITEM_DAT.itemnumber | uri %]">View item's checkout history</a>)</li>
<li><span class="label">Total checkouts:</span>
[% IF ( ITEM_DAT.issues ) %]
[% ITEM_DAT.issues | html %]
[% ELSE %]
0
[% END %] (<a href="/cgi-bin/koha/circ/bookcount.pl?&amp;biblionumber=[% ITEM_DAT.biblionumber | uri %]&amp;itm=[% ITEM_DAT.itemnumber | uri %]">View item's checkout history</a>)</li>
<li><span class="label">Last seen:</span>[% IF ( ITEM_DAT.datelastseen ) %][% ITEM_DAT.datelastseen | $KohaDates %] [%END %]&nbsp;</li>
<li><span class="label">Last borrowed:</span>[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %]&nbsp;</li>

7
koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

@ -517,7 +517,12 @@
<li>
<label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label>
[% IF letter.message_transport_type == 'sms' %]
<span class="sms_counter" id="sms_counter_[% lang | html %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length | html %][% ELSE %]0[% END %]/160 characters</span>
<span class="sms_counter" id="sms_counter_[% lang | html %]">
[% IF letter.content && letter.content.length > 0 %]
[% letter.content.length | html %]
[% ELSE %]
0
[% END %]/160 characters</span>
[% END %]
<table>
<tr>

2
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc

@ -223,7 +223,7 @@
<script>var readCookie;</script>
[% END %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %][% IF Koha.Preference( 'TagsEnabled' ) == 1 %][% Asset.js("js/tags.js") | $raw %][% END %][% ELSE %][% END %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %][% IF Koha.Preference( 'TagsEnabled' ) == 1 %][% Asset.js("js/tags.js") | $raw %][% END %][% END %]
[% IF ( GoogleJackets ) %]
[% Asset.js("js/google-jackets.js") | $raw %]
<script>

6
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt

@ -1304,7 +1304,11 @@
[% IF Koha.Preference('OverDriveCirculation') %]
[% Asset.js("js/overdrive.js") | $raw %]
<script>
var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %];
[%- IF Koha.Preference('OverDrivePasswordRequired') -%]
var OD_password_required = 1;
[%- ELSE -%]
var OD_password_required = 0;
[%- END -%]
$(document).ready(function() {
[% IF ( overdrive_error ) %]
KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");

Loading…
Cancel
Save