vslavik / poedit

Translations editor for Mac, Windows and Unix
https://poedit.net
MIT License
1.8k stars 279 forks source link

block.json and theme.json translation WordPress #797

Open Levdbas opened 1 year ago

Levdbas commented 1 year ago

I am working with block.json files in WordPress. This is a preview on how such a block looks like: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/

It seems that poedit is not able to extract this kind of block data. In wp-cli there is a option to extract these strings though.

See: https://github.com/wp-cli/i18n-command/blob/main/src/BlockExtractor.php and https://github.com/wp-cli/i18n-command/blob/main/src/JsonSchemaExtractor.php

It would be nice if Poedit supported the discovering of these kind of strings as well.

vslavik commented 1 year ago

Thanks for alerting me to this!

vslavik commented 1 year ago

Similarly, https://github.com/wp-cli/i18n-command/blob/main/src/ThemeJsonExtractor.php

wp-cli issues: