poedit icon indicating copy to clipboard operation
poedit copied to clipboard

block.json and theme.json translation WordPress

Open Levdbas opened this issue 1 year ago • 2 comments

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.

Levdbas avatar Jun 21 '23 07:06 Levdbas

Thanks for alerting me to this!

vslavik avatar Jun 21 '23 07:06 vslavik

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

wp-cli issues:

  • https://github.com/wp-cli/i18n-command/issues/224
  • https://github.com/wp-cli/i18n-command/issues/163

vslavik avatar Jul 19 '23 09:07 vslavik