[Koha-bugs] [Bug 30991] [% ELSE %]0[% END %] will break translations if used for assigning variables

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Dec 4 13:53:23 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30991

--- Comment #9 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Jonathan Druart from comment #8)
> I mean, it's not solid for future changes, another author can put the
> statement back on one line.

Maybe this would be a little more solid?

-    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 -%]

I have an open issue with those 0 too: 
Bug 31563 - Numbers on claims tab not showing in translated templates

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list