From 7c045e740c48dbd70f48edb75da5de32b912cbc8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Jan 2025 14:06:00 +0100 Subject: [PATCH] Bug 38664: opac-facets.inc - Fix translation script Finally got an error with the translation script: $ gulp po:update --lang fr-FR --task opac-bootstrap [13:05:23] Using gulpfile /kohadevbox/koha/gulpfile.js [13:05:23] Starting 'po:update'... [13:05:23] Starting 'po_update_opac'... [13:05:24] 'po_update_opac' errored after 975 ms [13:05:24] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -F -o /tmp/koha-6wJN1E/Koha-opac-bootstrap.pot -f /tmp/koha-6wJN1E/files Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131, <$INPUT> line 122. at ChildProcess.exithandler (node:child_process:422:12) at ChildProcess.emit (node:events:517:28) at ChildProcess.emit (node:domain:552:15) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:303:5) at Process.callbackTrampoline (node:internal/async_hooks:128:17) [13:05:24] 'po:update' errored after 980 ms The problem is coming from the '>' within the TT condition. Signed-off-by: Katrin Fischer --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index e34cf6ce56..4014ebe3cc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -77,7 +77,13 @@ [% FOREACH facet IN facets_loo.facets %] [% IF facets_loo.label == 'Collections' %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value, opac =>1 ) || facet.facet_label_value %][% END %] [% IF facets_loo.label == 'Languages' %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %] -
  • 5 && !facet.active %]class="collapsible-facet" style="display:none"[% END %]> + [% SET li_class = '' %] + [% SET li_style = '' %] + [% IF loop.count > 5 && !facet.active %] + [% li_class = "collapsible-facet" %] + [% li_style = "display:none" %] + [% END %] +
  • [% IF facet.active %] [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %] [% facet.facet_label_value | html %]