Skip to content

Commit

Permalink
Merge pull request #407 from oandregal/revert/title-from-block-style-…
Browse files Browse the repository at this point in the history
…variations
  • Loading branch information
swissspidy authored Jun 28, 2024
2 parents 643422d + f962ff3 commit 6f52398
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 88 deletions.
9 changes: 0 additions & 9 deletions assets/theme-i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@
}
}
},
"styles": {
"blocks": {
"variations": {
"*": {
"title": "Style variation name"
}
}
}
},
"customTemplates": [
{
"title": "Custom template name"
Expand Down
79 changes: 0 additions & 79 deletions features/makepot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3717,51 +3717,6 @@ 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 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:
Expand Down Expand Up @@ -3810,18 +3765,6 @@ Feature: Generate a POT file of a WordPress project
}
}
}
},
"styles": {
"blocks": {
"variations": {
"myVariation": {
"title": "My variation",
"color": {
"background": "grey"
}
}
}
}
}
}
"""
Expand All @@ -3839,18 +3782,6 @@ Feature: Generate a POT file of a WordPress project
}
}
}
},
"styles": {
"blocks": {
"variations": {
"otherVariation": {
"title": "My other variation",
"color": {
"background": "grey"
}
}
}
}
}
}
"""
Expand All @@ -3866,20 +3797,10 @@ Feature: Generate a POT file of a WordPress project
msgctxt "Color name"
msgid "Black"
"""
And the foo-theme/foo-theme.pot file should contain:
"""
msgctxt "Style variation name"
msgid "My variation"
"""
And the foo-theme/foo-theme.pot file should not contain:
"""
msgid "White"
"""
And the foo-theme/foo-theme.pot file should not contain:
"""
msgctxt "Style variation name"
msgid "My other variation"
"""

Scenario: Extract strings from the patterns directory
Given an empty foo-theme/patterns directory
Expand Down

0 comments on commit 6f52398

Please sign in to comment.