Skip to content

Commit daf30d6

Browse files
committed
Update JavaScript template for block scaffolding command
1 parent 3554992 commit daf30d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/scaffold-block.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Feature: WordPress block code scaffolding
5757
"""
5858
And the {PLUGIN_DIR}/blocks/the-green-mile/block.js file should contain:
5959
"""
60-
title: __( 'The green mile' ),
60+
title: __( 'The green mile', 'movies' ),
6161
"""
6262
And the {PLUGIN_DIR}/blocks/the-green-mile/block.js file should contain:
6363
"""
@@ -81,7 +81,7 @@ Feature: WordPress block code scaffolding
8181
When I run `wp scaffold block shawshank-redemption --plugin=movies --title="The Shawshank Redemption"`
8282
Then the {PLUGIN_DIR}/blocks/shawshank-redemption/block.js file should contain:
8383
"""
84-
title: __( 'The Shawshank Redemption' ),
84+
title: __( 'The Shawshank Redemption', 'movies' ),
8585
"""
8686
And STDOUT should be:
8787
"""

templates/block-block-js.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
// Visit https://wordpress.org/gutenberg/handbook/block-api/ to learn about Block API
66
wp.blocks.registerBlockType( '{{namespace}}/{{slug}}', {
7-
title: __( '{{title_ucfirst}}' ),
7+
title: __( '{{title_ucfirst}}', '{{textdomain}}' ),
88
99
{{#dashicon}}
1010
icon: '{{dashicon}}',

0 commit comments

Comments
 (0)