Koha-clms/misc
Jonathan Druart 311ba8e039
Bug 38900: Provide info about the problematic strings
The translation script explodes without meaningful error when
"incorrect" structure is found (edit)

Found when working on bug 38714, the translation script can break with
an error that does not directly point to the problematic string

[13:00:23] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -F -o /tmp/koha-2rwDEm/Koha-opac-bootstrap.pot -f /tmp/koha-2rwDEm/files
Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131.

    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:00:23] 'po:update' errored after 992 ms

Test plan:
0. Use main and confirm that `gulp po:update --lang LANG` returns
   successfully
1. Apply the first patch
=> The error is
Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131, <$INPUT> line 80.
2. Apply this patch
=> The error is now:
Incorrect structure found at ./koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt:230: '<option value="*" ' at misc/translator/xgettext.pl line 124, <$INPUT> line 100.

Which is way more interesting to fix the problem as we know exactly
where the problem comes from

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a5d8d51ca)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2025-08-06 09:57:02 +00:00
..
admin Bug 37682: Lazy-load modules for setters in koha-preferences tool 2024-08-27 12:14:23 +02:00
bin Bug 38382: Fresh connection when connexion CSRF token expires 2025-01-30 22:54:47 +01:00
cronjobs Bug 40407: Remove legacy "pre-wrap" versions 2025-08-01 15:47:58 +02:00
devel Bug 37448: Add script to allow developers to quickly generate large amounts of data for development and testing 2025-04-22 23:01:38 +02:00
interface_customization
…
maintenance Bug 38762: Make compare_es_to_db.pl provide links to staff interface 2025-08-04 11:42:46 +02:00
migration_tools Bug 37020: (follow-up): Remove memleak when not using Elasticsearch 2025-05-26 20:17:06 +02:00
release_notes Update release notes for 24.11.07 release 2025-07-24 22:37:36 +02:00
search_tools Bug 35345: Add --where option to rebuild_elasticsearch.pl 2024-04-22 12:39:26 +02:00
translator Bug 38900: Provide info about the problematic strings 2025-08-06 09:57:02 +00:00
workers Bug 34070: Display the 'jobs will be processed anyway' message from worker 2025-08-04 10:29:33 +02:00
add_date_fields_to_marc_records.pl Bug 23924: Reset the fields to add 2023-05-05 12:13:53 -03:00
add_statistics_borrowers_categorycode.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
batchCompareMARCvsFrameworks.pl
…
batchDeleteUnusedSubfields.pl
…
batchImportMARCWithBiblionumbers.pl
…
batchRebuildBiblioTables.pl
…
batchRebuildItemsTables.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
batchRepairMissingBiblionumbers.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
batchdeletebiblios.pl
…
check_sysprefs.pl
…
commit_file.pl Bug 15869: Change framework on overlay 2023-02-07 10:32:22 -03:00
export_borrowers.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
export_records.pl Bug 36770: (QA follow-up) Tidy export_records.pl 2024-08-09 18:44:54 +02:00
exportauth.pl
…
import_patrons.pl Bug 34621: Tidy import_patrons.pl 2024-04-12 14:02:43 +02:00
koha-install-log
…
link_bibs_to_authorities.pl Bug 29238: Cataloging cron jobs are not logged 2025-04-22 23:02:26 +02:00
load_yaml.pl
…
mod_zebraqueue.pl
…
process_ill_updates.pl Bug 35581: Koha::Illrequest -> Koha::ILL::Request 2024-04-22 08:57:45 +02:00
recreateIssueStatistics.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to recreateIssueStatistics.pl 2024-03-01 10:57:15 +01:00
sax_parser_print.pl
…
sax_parser_test.pl
…
sip_cli_emulator.pl Bug 40144: Get rid of `sip_cli_emulator.pl` warnings 2025-07-25 15:43:26 +02:00
stage_file.pl
…
z3950_responder.pl
…