[Bug 38031] New: po2json not found
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Bug ID: 38031 Summary: po2json not found Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 37303 If you run `yarn run po2json` from /kohadevbox/koha and no local node_modules directory exists, you will get: error Command "po2json" not found. See the different outputs: root@kohadevbox:koha$ pwd /kohadevbox/koha root@kohadevbox:koha$ yarn run --env yarn run v1.22.22 error There are no binary scripts available. root@kohadevbox:kohadevbox$ pwd /kohadevbox root@kohadevbox:kohadevbox$ yarn run --env yarn run v1.22.22 info Commands available from binary scripts: JSONStream, acorn, ansi-html, atob, autoprefixer, boast, browser-pack, browserify, browserslist, browserslist-lint, color-support, cssesc, cypress, deps-sort, detective, envinfo, eslint-config-prettier, esparse, esvalidate, extract-zip, findup, gulp, handlebars, he, highlight, html-minifier-terser, import-local-fixture, insert-module-globals, is-ci, is-docker, is-inside-container, js-yaml, jsesc, json5, loose-envify, marked, miller-rabin, mime, mkdirp, module-deps, multicast-dns, nanoid, node-which, oas-validate, openapi, opener, parser, po2json, prettier, redocly, regjsparser, resolve, rimraf, rspack, rtlcss, sass, semver, sha.js, sshpk-conv, sshpk-sign, sshpk-verify, stylelint, svgo, swagger-cli, swagger2openapi, terser, tsc, tsserver, uglifyjs, umd, undeclared-identifiers, uuid, vue-cli-service, vue-demi-fix, vue-demi-switch, watchify, webpack, webpack-bundle-analyzer, webpack-cli, webpack-dev-server I didn't find a cause of a possible regression. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37303 [Bug 37303] Fuzzy translations displayed on the UI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 172217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172217&action=edit Bug 38031: Make po2json available to yarn If you run `yarn run po2json` from /kohadevbox/koha and no local node_modules directory exists, you will get: error Command "po2json" not found. I didn't find a cause of a possible regression. Having it listed in package.json fixes the problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com, | |paul.derscheid@lmscloud.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172217|0 |1 is obsolete| | --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 172220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172220&action=edit Bug 38031: Make po2json available to yarn If you run `yarn run po2json` from /kohadevbox/koha and no local node_modules directory exists, you will get: error Command "po2json" not found. I didn't find a cause of a possible regression. Having it listed in package.json fixes the problem. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- root@kohadevbox:koha$ sudo koha-translate --update fr-FR --dev kohadev /bin/sh: 1: po2json: not found error Command failed with exit code 127. read_file '/tmp/fr-FR-messages.po' - open: No such file or directory at /kohadevbox/koha/misc/translator/LangInstaller.pm line 461. root@kohadevbox:koha$ koha-translate --update fr-FR --dev kohadev (node:25950) [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) (Ignore the warning for now) It does not work with sudo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38048 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- If I apply the patch, remove node_modules and run `yarn run po2json` I get: yarn run v1.22.20 $ po2json /bin/sh: 1: po2json: not found error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Do you have po2json installed globally ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- In ktd we have node_modules in /kohadevbox, embedded in the image. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- The right way to install with yarn inside KTD is by running: ```shell sudo yarn install --modules-folder /kohadevbox/node_modules sudo chown -R kohadev-koha:kohadev-koha /kohadevbox/node_modules ``` After doing it, if I run the proposed command I get: ```shell kohadev-koha@kohadevbox:koha(qa_38031)$ yarn run po2json yarn run v1.22.22 $ po2json input argument is required Usage: po2json <input> <output> [options] ``` is that enough for QA? I don't have full context for this feature. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #6)
The right way to install with yarn inside KTD is by running:
```shell sudo yarn install --modules-folder /kohadevbox/node_modules sudo chown -R kohadev-koha:kohadev-koha /kohadevbox/node_modules ```
After doing it, if I run the proposed command I get:
```shell kohadev-koha@kohadevbox:koha(qa_38031)$ yarn run po2json yarn run v1.22.22 $ po2json
input argument is required
Usage: po2json <input> <output> [options] ```
is that enough for QA? I don't have full context for this feature.
You don't need to install actually, but yes, it's is what it fixed. Without this patch `yarn run po2json` results in "command not found". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Bug 38164 as it is, will short circuit this ticket. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Signed Off |RESOLVED --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Bug 37303 reverted, we no longer need this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38031 Bug 38031 depends on bug 37303, which changed state. Bug 37303 Summary: Fuzzy translations displayed on the UI https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37303 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |CLOSED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org