Skip to content

Commit

Permalink
Create Block: Remove i18n references from save properties (#43035)
Browse files Browse the repository at this point in the history
* Remove i18n from the save properties for the block templates.

* Remove import from @wordpress/i18n
  • Loading branch information
ryanwelcher authored Aug 8, 2022
1 parent 751eed2 commit e2b293d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions packages/create-block/lib/templates/block/save.js.mustache
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';

/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
Expand All @@ -25,10 +18,7 @@ import { useBlockProps } from '@wordpress/block-editor';
export default function save() {
return (
<p { ...useBlockProps.save() }>
{ __(
'{{title}} – hello from the saved content!',
'{{textdomain}}'
) }
{ '{{title}} – hello from the saved content!' }
</p>
);
}
2 changes: 1 addition & 1 deletion packages/create-block/lib/templates/es5/index.js.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
return el(
'p',
useBlockProps.save(),
__( '{{title}} – hello from the saved content!', '{{textdomain}}' )
'{{title}} – hello from the saved content!',
);
},
} );
Expand Down

0 comments on commit e2b293d

Please sign in to comment.