Update dependencies (gettext-parser 9, gettext-to-messageformat 0.4, commander 15, jest 30) and fix the CLI - #104
Update dependencies (gettext-parser 9, gettext-to-messageformat 0.4, commander 15, jest 30) and fix the CLI#104hthetiot wants to merge 16 commits into
Conversation
|
Note: gettext-parser@4+ break tests so I upgraded to gettext-parser@3 at least. |
|
Fixed using version 1.0.0-beta-3 |
|
Still using 1.0.0-beta-3, "{" character get escaped in the string, while using 0.4 it was not the case. |
…Plural-Forms), while po2json has always emitted lower-cased header names. Keep our output stable.
|
Hello @eemeli Can you review my update that support gettext-to-messageformat@4 and gettext-parser@9 and full deps updates. I just had to fix headers case and minor fixes. |
|
I don't understand what the ask of me here is? I'd be happy to review a PR on |
gettext-to-messageformat escapes { } # and \ so that MessageFormat reads them
as literals, which writes a {{error}} placeholder out as \{\{error\}\}. That is
what you want when the JSON is compiled by MessageFormat, but not for consumers
reading it as plain strings and using braces for their own translation
parameters, ngx-translate among them (issue mikeedwards#77).
escape-params defaults to true, so output is unchanged unless it is turned off,
through the option or --no-escape-params on the command line. The replacement
list it swaps in is g2m's own minus the escaping rule, exported as
po2json.mfReplacements to build a custom mfOptions.replacements from. Anything
passed through mfOptions still wins over both.
Also document mfOptions, which had none, and cut the 1.0.1 release notes.
Refs mikeedwards#77
I would d'like you if possible, to review this PR that use updated Generally I thought you may be interested in this PR to land to keep the po2json using up-to-date package that you maintain and would be a good reviewer for that. Sorry if was not the right call. |
|
See fork notes: https://github.com/Baladins/po2json#fork-notes |
|
updated description to be more clear |
Sorry, I don't really have the bandwidth for that. I've not worked on the code around this for a while, and the stuff near this that I'm maintaining for work is in Python: https://github.com/mozilla/moz-l10n/tree/main/python/moz/l10n/formats/gettext |
|
Thank you @eemeli i completely understand. Thank you for taking the time replying. |

The dependency tree on
masteris several majors behind and trips GitHub/npm security alerts. This brings it current and fixes the breakage the upgrades surfaced along the way. Output is unchanged, header names included.Changes proposed
1.0.1 / 2026-07-23
Dependency refresh, existing output is unchanged.
escape-paramsoption (--no-escape-params), set it tofalseto keep{,},#and\unescaped informat: 'mf'(issue [1-alpha] Over escaping braces #77).--full-mf/-Mand--fallback-to-msgidflags.@messageformat/core,messageformat@4is a different thing.Forked until merged
Until this lands, the same main is published as
@baladins/po2json(https://www.npmjs.com/package/@baladins/po2json) pkg on npm while (https://github.com/Baladins/po2json/tree/master) is this PR for anyone who needs the audit fixes today, see fork notes. It is meant to stay a drop-in replacement and will be deprecated if this is merged.