From b6534f6836e3028afade0fca068195e197daa5bd Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 5 Aug 2022 12:56:45 -0400 Subject: [PATCH 1/2] Remove i18n from the save properties for the block templates. --- packages/create-block/lib/templates/block/save.js.mustache | 5 +---- packages/create-block/lib/templates/es5/index.js.mustache | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/create-block/lib/templates/block/save.js.mustache b/packages/create-block/lib/templates/block/save.js.mustache index 705e06973e6de0..ddc1a608dbe629 100644 --- a/packages/create-block/lib/templates/block/save.js.mustache +++ b/packages/create-block/lib/templates/block/save.js.mustache @@ -25,10 +25,7 @@ import { useBlockProps } from '@wordpress/block-editor'; export default function save() { return (

- { __( - '{{title}} – hello from the saved content!', - '{{textdomain}}' - ) } + { '{{title}} – hello from the saved content!' }

); } diff --git a/packages/create-block/lib/templates/es5/index.js.mustache b/packages/create-block/lib/templates/es5/index.js.mustache index 89ea222570061d..895cd9f97aebd4 100644 --- a/packages/create-block/lib/templates/es5/index.js.mustache +++ b/packages/create-block/lib/templates/es5/index.js.mustache @@ -108,7 +108,7 @@ return el( 'p', useBlockProps.save(), - __( '{{title}} – hello from the saved content!', '{{textdomain}}' ) + '{{title}} – hello from the saved content!', ); }, } ); From 0ca08f5163601376482a5c14122302ec86571c7e Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Fri, 5 Aug 2022 12:58:31 -0400 Subject: [PATCH 2/2] Remove import from @wordpress/i18n --- packages/create-block/lib/templates/block/save.js.mustache | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/create-block/lib/templates/block/save.js.mustache b/packages/create-block/lib/templates/block/save.js.mustache index ddc1a608dbe629..eeb81e432055cf 100644 --- a/packages/create-block/lib/templates/block/save.js.mustache +++ b/packages/create-block/lib/templates/block/save.js.mustache @@ -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.