[Bug 38900] New: translation script explodes without meaningful error when "incorrect" structure is found
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Bug ID: 38900 Summary: translation script explodes without meaningful error when "incorrect" structure is found Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: f.demians@tamil.fr, jonathan.druart@gmail.com Found when working on bug 38714, the translation script can break with en error that does 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38714 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38714 [Bug 38714] Adjust templates for prettier -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38720 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 176568 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176568&action=edit Bug 38900: Provide info about the problematic strings The ranslation script explodes without meaningful error when "incorrect" structure is found (edit) Found when working on bug 38714, the translation script can break with en error that does 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 176569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176569&action=edit Bug 38900: [DO NOT PUSH] show the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176568|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 176570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176570&action=edit Bug 38900: Provide info about the problematic strings The ranslation script explodes without meaningful error when "incorrect" structure is found (edit) Found when working on bug 38714, the translation script can break with en error that does 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176569|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 176583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176583&action=edit Bug 38900: [DO NOT PUSH] show the problem Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176570|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 176584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176584&action=edit Bug 38900: Provide info about the problematic strings The ranslation script explodes without meaningful error when "incorrect" structure is found (edit) Found when working on bug 38714, the translation script can break with en error that does 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|translation script explodes |Translation script explodes |without meaningful error |without a meaningful error |when "incorrect" structure |when an "incorrect" |is found |structure is found Text to go in the| |This fixes the translation release notes| |script so that it now | |provides a more meaningful | |error when updating a | |language that has incorrect | |strings. It now identifies | |exactly where the problem | |comes from, making it | |easier to fix the problem. | | | |An example of the updated | |error message: | | | | gulp | |po:update --lang LANG | | .. | | | |Incorrect structure found | |at | |./koha-tmpl/intranet-tmpl/p | |rog/en/modules/admin/branch | |es.tt:230: '<option | |value="*" ' at | |misc/translator/xgettext.pl | |line 124, <$INPUT> line 65. | | .. CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- Full error after applying the patch: gulp po:update --lang fr-CA [19:17:24] Using gulpfile /kohadevbox/koha/gulpfile.js [19:17:24] Starting 'po:update'... [19:17:24] Starting 'po_update_marc_marc21'... [19:17:24] Starting 'po_update_marc_unimarc'... [19:17:24] Starting 'po_update_staff'... [19:17:24] Starting 'po_update_opac'... [19:17:24] Starting 'po_update_pref'... [19:17:24] Starting 'po_update_messages'... [19:17:24] Starting 'po_update_messages_js'... [19:17:24] Starting 'po_update_installer'... [19:17:24] Starting 'po_update_installer_marc21'... [19:17:24] Starting 'po_update_installer_unimarc'... [19:17:27] Finished 'po_update_installer_unimarc' after 2.43 s [19:17:27] Finished 'po_update_installer' after 2.55 s [19:17:27] Finished 'po_update_installer_marc21' after 2.59 s [19:17:27] Finished 'po_update_pref' after 2.6 s [19:17:27] Finished 'po_update_messages_js' after 2.81 s [19:17:27] Finished 'po_update_opac' after 3.3 s [19:17:27] 'po_update_staff' errored after 3.31 s [19:17:27] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -F -o /tmp/koha-OQ7riK/Koha-staff-prog.pot -f /tmp/koha-OQ7riK/files 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 65. 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) [19:17:27] 'po:update' errored after 3.32 s -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176584|0 |1 is obsolete| | --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 177354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177354&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |baptiste.wojtkowski@biblibr | |e.com Version(s)|25.05.00 |25.05.00,24.11.08 released in| | --- Comment #9 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 24.11.x for 24.11.08 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #10 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38900 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #11 from David Nind <david@davidnind.com> --- Bug fix, no updates to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org