From e1ea986af5c0a7acb8770d8ed585c91d5ef62ee1 Mon Sep 17 00:00:00 2001
From: George Mamadashvili <georgemamadashvili@gmail.com>
Date: Thu, 28 Sep 2023 00:13:04 +0400
Subject: [PATCH] Block Editor: Update strings in blocks 'RenameModal'
 component (#54887)

---
 .../block-editor/src/hooks/block-rename-ui.js | 24 +++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/packages/block-editor/src/hooks/block-rename-ui.js b/packages/block-editor/src/hooks/block-rename-ui.js
index ddb4b743df3e5..9025bfee61983 100644
--- a/packages/block-editor/src/hooks/block-rename-ui.js
+++ b/packages/block-editor/src/hooks/block-rename-ui.js
@@ -44,17 +44,21 @@ function RenameModal( { blockName, originalBlockName, onClose, onSave } ) {
 	);
 
 	const handleSubmit = () => {
-		// Must be assertive to immediately announce change.
-		speak(
-			sprintf(
-				/* translators: %1$s: type of update (either reset of changed). %2$s: new name/label for the block */
-				__( 'Block name %1$s to: "%2$s".' ),
-				nameIsOriginal || nameIsEmpty ? __( 'reset' ) : __( 'changed' ),
-				editedBlockName
-			),
-			'assertive'
-		);
+		const message =
+			nameIsOriginal || nameIsEmpty
+				? sprintf(
+						/* translators: %s: new name/label for the block */
+						__( 'Block name reset to: "%s".' ),
+						editedBlockName
+				  )
+				: sprintf(
+						/* translators: %s: new name/label for the block */
+						__( 'Block name changed to: "%s".' ),
+						editedBlockName
+				  );
 
+		// Must be assertive to immediately announce change.
+		speak( message, 'assertive' );
 		onSave( editedBlockName );
 
 		// Immediate close avoids ability to hit save multiple times.