From a055004156053dbef175546de03c258351f35b74 Mon Sep 17 00:00:00 2001 From: Katrin Fischer <katrin.fischer.83@web.de> Date: Fri, 10 Feb 2023 00:29:55 +0100 Subject: [PATCH] Bug 31563: Make zero claims show correctly for translations A tag that only contains 0 is turned into an empty tag by the translation scripts. This turns "Claims ( 0 0 )" into "Claims ( )" in translated templates. To test: * Install an additional language (fr-FR, es-ES) and activate it in the system preferences * Look at the checkouts and details tabs in any patron account in the staff interface * Verify the claims tab shows without the zeros as described above * Apply the patch * Update the translation so the templates are recreated with the change * Verify that the 0 0 now show correctly. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 5 +++-- .../intranet-tmpl/prog/en/modules/members/moremember.tt | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index a24fece83ca..600202d0258 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -871,10 +871,11 @@ [% END %]) </a> [% ELSE %] + [% no_claims = 0 %] <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> Claims - (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span> - <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>) + (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% no_claims %]</span> + <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% no_claims %]</span>) </a> [% END %] </li> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index e37050d1afe..10b57a94c2f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -703,10 +703,11 @@ [% END %]) </a> [% ELSE %] + [% no_claims = 0 %] <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> Claims - (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span> - <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>) + (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% no_claims %]</span> + <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% no_claims %]</span>) </a> [% END %] </li> -- 2.25.1