Skip to content

Commit

Permalink
Add test for style variation in subfolder
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Birchler <[email protected]>
  • Loading branch information
swissspidy committed Dec 20, 2024
1 parent 08a807e commit c44ff63
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions features/makepot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3809,7 +3809,7 @@ Feature: Generate a POT file of a WordPress project
}
}
"""
And a foo-theme/incorrect/styles/my-style.json file:
And a foo-theme/styles/deeply/nested/variation.json file:
"""
{
"version": "1",
Expand All @@ -3826,6 +3826,23 @@ Feature: Generate a POT file of a WordPress project
}
}
"""
And a foo-theme/incorrect/styles/my-style.json file:
"""
{
"version": "1",
"settings": {
"blocks": {
"core/paragraph": {
"color": {
"palette": [
{ "slug": "red", "color": "#ff00000", "name": "Red" }
]
}
}
}
}
}
"""

When I try `wp i18n make-pot foo-theme`
Then STDOUT should contain:
Expand All @@ -3838,10 +3855,15 @@ Feature: Generate a POT file of a WordPress project
msgctxt "Color name"
msgid "Black"
"""
And the foo-theme/foo-theme.pot file should not contain:
And the foo-theme/foo-theme.pot file should contain:
"""
msgctxt "Color name"
msgid "White"
"""
And the foo-theme/foo-theme.pot file should not contain:
"""
msgid "Red"
"""

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

0 comments on commit c44ff63

Please sign in to comment.