diff --git a/features/makepot.feature b/features/makepot.feature index 4df6200..853e4e3 100644 --- a/features/makepot.feature +++ b/features/makepot.feature @@ -3682,6 +3682,51 @@ Feature: Generate a POT file of a WordPress project msgid "My style variation" """ + Scenario: Extract strings from the styles.blocks.variations section of theme.json files + Given an empty foo-theme directory + And a foo-theme/theme.json file: + """ + { + "version": "1", + "settings": { + "color": { + "duotone": [ + { "slug": "dark-grayscale", "name": "Dark grayscale", "colors": [] } + ], + } + }, + "styles": { + "blocks": { + "variations": { + "variationSlug": { + "title": "My variation", + "color": { + "background": "grey" + } + } + } + } + } + } + """ + + When I try `wp i18n make-pot foo-theme` + Then STDOUT should be: + """ + Success: POT file successfully generated. + """ + And the foo-theme/foo-theme.pot file should exist + And the foo-theme/foo-theme.pot file should contain: + """ + msgctxt "Duotone name" + msgid "Dark grayscale" + """ + And the foo-theme/foo-theme.pot file should contain: + """ + msgctxt "Style variation name" + msgid "My style variation" + """ + Scenario: Extract strings from the blocks section of theme.json files Given an empty foo-theme directory And a foo-theme/theme.json file: