Bugzilla – Attachment 172249 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.54 KB, created by
Jonathan Druart
on 2024-10-01 09:00:13 UTC
(
hide
)
Description:
Bug 38048: Remove po2json deprecation warning
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-01 09:00:13 UTC
Size:
1.54 KB
patch
obsolete
>From 8b333d407c59868f0605fb59a7c63eca4be7f48b 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` >--- > misc/translator/LangInstaller.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index fcf78bba98b..1aae53b39b6 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -457,7 +457,8 @@ sub install_messages { > > 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.34.1
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