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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
d345453a23
commit
0bcf87df38
|
|
@ -380,7 +380,7 @@ if ( defined $output && $output ne '-' ) {
|
|||
open( $OUTPUT, '>:encoding(utf-8)', $output ) || die "$output: $!\n";
|
||||
} else {
|
||||
print STDERR "$0: Outputting to STDOUT...\n" if $verbose_p;
|
||||
open( $OUTPUT, q{>}, "&STDOUT" );
|
||||
$OUTPUT = *STDOUT;
|
||||
}
|
||||
|
||||
if ( defined $files_from ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue