Lines 455-463
sub install_messages {
Link Here
|
455 |
make_path($modir); |
455 |
make_path($modir); |
456 |
system "$self->{msgfmt} -o $mofile $pofile"; |
456 |
system "$self->{msgfmt} -o $mofile $pofile"; |
457 |
|
457 |
|
458 |
my $tmp_po = sprintf '/tmp/%s-messages.po', $self->{lang}; |
458 |
my $tmp_po = sprintf '/tmp/%s-messages.po', $self->{lang}; |
459 |
my $po2json_cmd = sprintf '%s %s %s', $self->{po2json}, $js_pofile, $tmp_po; |
459 |
my $po2json_cmd = sprintf '%s %s %s', $self->{po2json}, $js_pofile, $tmp_po; |
460 |
`$po2json_cmd`; |
460 |
$po2json_cmd .= q{ 2> >(grep -v -e 'DEP0128' -e 'trace-deprecation' - )}; # Remove deprecation warning |
|
|
461 |
`/usr/bin/bash -c "$po2json_cmd"`; # We need bash instead of sh (sh: 1: Syntax error: redirection unexpected) |
461 |
my $json = read_file($tmp_po); |
462 |
my $json = read_file($tmp_po); |
462 |
|
463 |
|
463 |
my $js_locale_data = sprintf 'var json_locale_data = {"Koha":%s};', $json; |
464 |
my $js_locale_data = sprintf 'var json_locale_data = {"Koha":%s};', $json; |
464 |
- |
|
|