Plugin Author
Tim W
(@timwhitlock)
Thanks for the suggestion. String extraction from JSON files is not supported, and JS parsing is severely limited.
I am not familiar with block.json or how it’s localised, but I generally recommend that wp i18n make-pot is used for script extraction, as noted here.
Thanks Tim. We’ve been using JS and JSX extraction via Loco Translate in all of our projects (themes and plugins) since 2020 and haven’t encountered any issues. If this isn’t a solution you’ll be progressing, I’ll be happy to find an alternative solution.
Plugin Author
Tim W
(@timwhitlock)
I’d be happy to look at supporting JSON, but I was completely unaware this was a localisable format in WordPress. If you can post any useful links about this I will investigate.
I don’t plan to improve JavaScript extraction due to the many problems I run into every time I look into it. When a better tool exists in the WordPress ecosystem I’d recommend using it, but I’m glad to hear my tool works for you.