From 05287662ea56e40a7aad0375205d28b60097d671 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 30 Jun 2023 11:45:26 +0200 Subject: [PATCH] BlockRemovalWarningModal: Fix incorrect '_n' usage (#52164) --- .../components/block-removal-warning-modal/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 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 2e16d2834d2ce3..2ed65481f68959 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 { __, _n } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -75,11 +75,9 @@ export function BlockRemovalWarningModal() { ) }

- { _n( - 'Removing this block is not advised.', - 'Removing these blocks is not advised.', - blockNamesForPrompt.length - ) } + { blockNamesForPrompt.length > 1 + ? __( 'Removing these blocks is not advised.' ) + : __( 'Removing this block is not advised.' ) }