From 7ed66b6264210d85660ef04c858487a977e49112 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 25 Sep 2024 10:14:47 +0100 Subject: [PATCH] Remove block name if custom name is available --- .../block-editor/src/components/block-card/index.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/block-card/index.js b/packages/block-editor/src/components/block-card/index.js index 4d40fe07d55471..ee0c9df67673b5 100644 --- a/packages/block-editor/src/components/block-card/index.js +++ b/packages/block-editor/src/components/block-card/index.js @@ -13,7 +13,7 @@ import { __experimentalVStack as VStack, } from '@wordpress/components'; import { chevronLeft, chevronRight } from '@wordpress/icons'; -import { __, isRTL, sprintf } from '@wordpress/i18n'; +import { __, isRTL } from '@wordpress/i18n'; import { useSelect, useDispatch } from '@wordpress/data'; /** @@ -66,14 +66,7 @@ function BlockCard( { title, icon, description, blockType, className, name } ) {

- { name?.length - ? sprintf( - // translators: %1$s: Custom block name. %2$s: Block title. - __( '%1$s (%2$s)' ), - name, - title - ) - : title } + { name?.length ? name : title }

{ description && (