Bugzilla – Attachment 189182 Details for
Bug 34198
Interface to define relational rules for MARC fields that use authorised values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34198: Use Koha::I18N as workaround to a bug in template translator
6940ec0.patch (text/plain), 3.01 KB, created by
Julian Maurice
on 2025-11-06 15:25:10 UTC
(
hide
)
Description:
Bug 34198: Use Koha::I18N as workaround to a bug in template translator
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2025-11-06 15:25:10 UTC
Size:
3.01 KB
patch
obsolete
>From 6940ec0be708bd48a7415200b0cc63f3f54b7174 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 6 Nov 2025 14:51:30 +0000 >Subject: [PATCH] Bug 34198: Use Koha::I18N as workaround to a bug in template > translator > >When the template translator find a string to replace in an attribute >(in this case, title) it rewrites the whole tag. And when the tag >contain TT syntax, the result is really bad, for instance: > > <option $raw="$raw" %]="%]" [%="[%" attributes="attributes" > disabled="disabled" title="Les pertes [...]" > value="[%- aval | html -%]" |="|" > >[%- mv.labels.$aval | html -%]</option> > >By having the attribute value translated by Koha::I18N we avoid that >problem. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 864978e0b5b..86242f89fc8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -97,6 +97,7 @@ > > [% BLOCK subfields_for_item %] > [% USE HTML %] >+ [% USE I18N %] > <ol> > [% FOREACH subfield IN subfields %] > [% IF subfield.kohafield == 'items.more_subfields_xml' %] >@@ -145,9 +146,9 @@ > <option value="[%- aval | html -%]" selected="selected" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> > [% ELSE %] > [% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %] >- <option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> >+ <option disabled="disabled" value="[%- aval | html -%]" title="[% I18N.t('Return claims must be processed from the patron details page') | html %]" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> > [% ELSIF subfield.IS_LOST_AV && Koha.Preference("BundleLostValue") && aval == Koha.Preference("BundleLostValue") %] >- <option disabled="disabled" value="[%- aval | html -%]" title="Bundle losses are set at checkin automatically" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> >+ <option disabled="disabled" value="[%- aval | html -%]" title="[ % I18N.t('Bundle losses are set at checkin automatically') | html %]" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> > [% ELSE %] > <option value="[%- aval | html -%]" [% attributes | $raw %]>[%- mv.labels.$aval | html -%]</option> > [% END %] >-- >2.39.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34198
:
189006
|
189007
|
189068
|
189069
| 189182