gilbsgilbs/babel-plugin-i18next-extract

Support i18next JSON v4's format

acidoxee opened this issue ยท 5 comments

Is your feature request related to a problem? Please describe.

The current JSON format is v3 as mentioned in the README, but since late september i18next has gone into v21, and now uses a new v4 format (for pluralization, among other things, see their migration guide).

As long as the output format of this extractor will be based on v3 instead of the new v4 JSON format, updating i18next in v21 is not possible.

Describe the solution you'd like

Support the new v4 JSON format that comes with i18next v21+.

Additional context

Thanks for your work on this lib, it's greatly appreciated! I hope you'll find the time to perform the upgrade ๐Ÿ’ช

Thanks for spotting this. Unfortunately, I doubt I'll manage to implement this anytime soon, but if somebody can make a PR, I'll gladly review, merge and release it. (I guess I already said that for #198 ๐Ÿคฆโ€โ™‚๏ธ )

No pressure! I also doubt I'd have time to do it unfortunately (plus, I really don't know the internals of Babel plugins), but I hope someone will. Thanks anyway @gilbsgilbs ๐Ÿ˜‰ we'll see what happens

Mine! I have some days for trying to make this one to work. I have never made any Babel plugin though. If I get stuck I will ask.

Got some progress but broke some other stuff. I will try to find some time to finish this and open a MR during this week.

I implemented JSONv4 in #214, you might want to give it a try, but I'm sure when I'll manage to draft a new release yet. Also I'm unsure if I want to make JSONv4 the default now or if I want some beta tests first.