From e2b293d2cfcd8c01c778780fa319a025d464b652 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Mon, 8 Aug 2022 03:58:30 -0400 Subject: [PATCH] Create Block: Remove i18n references from save properties (#43035) * Remove i18n from the save properties for the block templates. * Remove import from @wordpress/i18n --- .../lib/templates/block/save.js.mustache | 12 +----------- .../create-block/lib/templates/es5/index.js.mustache | 2 +- 2 files changed, 2 insertions(+), 12 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..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. @@ -25,10 +18,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!', ); }, } );