[Bug 42302] New: xgettext.pl does not output to STDOUT correctly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Bug ID: 42302 Summary: xgettext.pl does not output to STDOUT correctly Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: tadeusz@sosnierz.com QA Contact: testopia@bugs.koha-community.org CC: f.demians@tamil.fr, jonathan.druart@gmail.com xgettext.pl tries to produce output to STDOUT but default, but fails because of the coding error: ``` $ echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles $ ./misc/translator/xgettext.pl -vaf transfiles ./misc/translator/xgettext.pl: Outputting to STDOUT... ./misc/translator/xgettext.pl: Opening input file list "transfiles" ./misc/translator/xgettext.pl: Processing file "./koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc" $ head \&STDOUT # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Koha\n" "POT-Creation-Date: 2026-04-08 13:45+0200\n" ``` It should go to actual STDOUT instead of a file called that :) Patch coming in. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 --- Comment #1 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- Created attachment 196924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196924&action=edit Bug 42302: Fix xgettext.pl's STDOUT output Patch from commit 0f91afa -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from HKS3 Tadeusz Sośnierz <tadeusz@sosnierz.com> --- Test plan: 1. Run xgettext.pl: $ echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles $ ./misc/translator/xgettext.pl -vaf transfiles 2. Observe no stdout-put, and existence of `&STDOUT` file 3. Apply patch 4. Run again 5. Observe STDOUTput -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196924|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 196975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196975&action=edit Bug 42302: Fix xgettext.pl's STDOUT output xgettext.pl tries to produce output to STDOUT by default, but fails because of an error in the code. It should go to the actual STDOUT instead of a file named '&STDOUT'. Test plan: 1. Run xgettext.pl: echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles ./misc/translator/xgettext.pl -vaf transfiles 2. Observe no standard output, and the existence of a file called `&STDOUT`. Output to the screen is: echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles kohadev-koha@kohadevbox:koha(main)$ ./misc/translator/xgettext.pl -vaf transfiles ./misc/translator/xgettext.pl: Outputting to STDOUT... ./misc/translator/xgettext.pl: Opening input file list "transfiles" ./misc/translator/xgettext.pl: Processing file "./koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc" 3. Apply the patch. 4. Run again. 5. Observe that information is output to the screen (see example of outpunt in the bug comment). Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Assignee|koha-bugs@lists.koha-commun |tadeusz@sosnierz.com |ity.org | Keywords| |release-notes-needed --- Comment #4 from David Nind <david@davidnind.com> --- Start of output to the screen after the patch: $ echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles $ vi transfiles $ ./misc/translator/xgettext.pl -vaf transfiles ./misc/translator/xgettext.pl: Outputting to STDOUT... ./misc/translator/xgettext.pl: Opening input file list "transfiles" ./misc/translator/xgettext.pl: Processing file "./koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc" # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Koha\n" "POT-Creation-Date: 2026-04-09 00:19+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. %1$s: END #: koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc:15 #, c-format msgid "%s " msgstr "" #: koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc:5 #, c-format msgid "Bound" msgstr "" ... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196975|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196988 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196988&action=edit Bug 42302: Fix xgettext.pl's STDOUT output xgettext.pl tries to produce output to STDOUT by default, but fails because of an error in the code. It should go to the actual STDOUT instead of a file named '&STDOUT'. Test plan: 1. Run xgettext.pl: echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles ./misc/translator/xgettext.pl -vaf transfiles 2. Observe no standard output, and the existence of a file called `&STDOUT`. Output to the screen is: echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles kohadev-koha@kohadevbox:koha(main)$ ./misc/translator/xgettext.pl -vaf transfiles ./misc/translator/xgettext.pl: Outputting to STDOUT... ./misc/translator/xgettext.pl: Opening input file list "transfiles" ./misc/translator/xgettext.pl: Processing file "./koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc" 3. Apply the patch. 4. Run again. 5. Observe that information is output to the screen (see example of outpunt in the bug comment). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.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=42302 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 --- Comment #7 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #8 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 25.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42302 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #9 from David Nind <david@davidnind.com> --- Bug fix, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org