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 <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-01-15 14:06:00 +01:00 committed by Katrin Fischer
parent 597b5234ab
commit 7c045e740c
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 7 additions and 1 deletions

View File

@ -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 %]
<li [% IF loop.count > 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 %]
<li class="[% li_class | html %]" style="[% li_style | html %]">
[% IF facet.active %]
[% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %]
<span class="facet-label">[% facet.facet_label_value | html %]</span>