Bugzilla – Attachment 172263 Details for
Bug 38048
po2json outputs a deprecation warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38048: Remove po2json deprecation warning
Bug-38048-Remove-po2json-deprecation-warning.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2024-10-01 13:30:50 UTC
(
hide
)
Description:
Bug 38048: Remove po2json deprecation warning
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-10-01 13:30:50 UTC
Size:
1.77 KB
patch
obsolete
>From 198fc5f0e32c45160b314bd3c5a2b673b4c924d3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 1 Oct 2024 10:58:35 +0200 >Subject: [PATCH] Bug 38048: Remove po2json deprecation warning > >(node:50086) [DEP0128] DeprecationWarning: Invalid 'main' field in '/kohadevbox/node_modules/po2json/package.json' of './lib/po2json'. Please either fix that or report it to the module author >(Use `node --trace-deprecation ...` to show where the warning was created) > >See https://github.com/mikeedwards/po2json/issues/103 >The project is not really maintained, so let's remove the warning on our >side as a quick workaround. > >Test plan: >Run `koha-translate --update es-ES --dev kohadev` > >WNC amended patch - tidied > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > misc/translator/LangInstaller.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index fcf78bba98b..c5b94e826b6 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -455,9 +455,10 @@ sub install_messages { > make_path($modir); > system "$self->{msgfmt} -o $mofile $pofile"; > >- my $tmp_po = sprintf '/tmp/%s-messages.po', $self->{lang}; >+ my $tmp_po = sprintf '/tmp/%s-messages.po', $self->{lang}; > my $po2json_cmd = sprintf '%s %s %s', $self->{po2json}, $js_pofile, $tmp_po; >- `$po2json_cmd`; >+ $po2json_cmd .= q{ 2> >(grep -v -e 'DEP0128' -e 'trace-deprecation' - )}; # Remove deprecation warning >+ `/usr/bin/bash -c "$po2json_cmd"`; # We need bash instead of sh (sh: 1: Syntax error: redirection unexpected) > my $json = read_file($tmp_po); > > my $js_locale_data = sprintf 'var json_locale_data = {"Koha":%s};', $json; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38048
:
172249
| 172263