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>
This commit is contained in:
parent
78642d03ea
commit
efad62f91d
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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?&biblionumber=[% ITEM_DAT.biblionumber | uri %]&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?&biblionumber=[% ITEM_DAT.biblionumber | uri %]&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 %] </li>
|
||||
<li><span class="label">Last borrowed:</span>[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] </li>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue