From d6b18a0f25503652a2a1b3f110b8a4b2ce902a1d Mon Sep 17 00:00:00 2001 From: scruffian Date: Thu, 7 Dec 2023 14:55:18 +0000 Subject: [PATCH 1/4] Improve text and design of the block removal warnings --- .../block-removal-warning-modal/index.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/block-editor/src/components/block-removal-warning-modal/index.js b/packages/block-editor/src/components/block-removal-warning-modal/index.js index 08f3deccb5ae08..c48733ff23ced8 100644 --- a/packages/block-editor/src/components/block-removal-warning-modal/index.js +++ b/packages/block-editor/src/components/block-removal-warning-modal/index.js @@ -8,7 +8,7 @@ import { Button, __experimentalHStack as HStack, } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; +import { __, _n } from '@wordpress/i18n'; /** * Internal dependencies @@ -51,19 +51,12 @@ export function BlockRemovalWarningModal( { rules } ) { title={ __( 'Are you sure?' ) } onRequestClose={ clearBlockRemovalPrompt } > - { blockNamesForPrompt.length === 1 ? ( -

{ rules[ blockNamesForPrompt[ 0 ] ] }

- ) : ( - - ) }

- { blockNamesForPrompt.length > 1 - ? __( 'Removing these blocks is not advised.' ) - : __( 'Removing this block is not advised.' ) } + { _n( + 'Be careful! Post or page content will not be displayed if you delete this block.', + 'Be careful! Post or page content will not be displayed if you delete these blocks.', + blockNamesForPrompt.length + ) }