From a767bd1a65a54db24ea72c07d533e405b936b025 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Fri, 10 May 2024 14:43:53 +0900 Subject: [PATCH] Reword --- .../content-only-settings-menu.js | 90 ++++++++----------- 1 file changed, 37 insertions(+), 53 deletions(-) diff --git a/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js b/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js index a1f793fc33e163..4683dd38593a59 100644 --- a/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js +++ b/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js @@ -10,7 +10,7 @@ import { import { store as coreStore } from '@wordpress/core-data'; import { __experimentalText as Text, MenuItem } from '@wordpress/components'; import { useSelect, useDispatch } from '@wordpress/data'; -import { __, sprintf } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -81,38 +81,30 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) { return ( <> - { + onNavigateToEntityRecord( { + postId: entity.id, + postType: entity.type, + } ); + } } > - { isPattern - ? sprintf( - // translators: %s: pattern's title. - __( - 'This block is part of the pattern: "%s". Edit the pattern to move or delete it.' - ), - entity.title.raw - ) - : sprintf( - // translators: %s: template's title. - __( - 'This block is part of the template: "%s". Edit the template to move or delete it.' - ), - entity.title.rendered - ) } - + { isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) } + - { - onNavigateToEntityRecord( { - postId: entity.id, - postType: entity.type, - } ); - } } + - { isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) } - + { isPattern + ? __( + 'Edit the pattern to move, delete, or make further changes to this block.' + ) + : __( + 'Edit the template to move, delete, or make further changes to this block.' + ) } + ); } @@ -144,33 +136,25 @@ function TemplateLockContentOnlyMenuItems( { clientId, onClose } ) { return ( <> - { + selectBlock( contentLockingParent ); + modifyContentLockBlock( contentLockingParent ); + onClose(); + } } > - { sprintf( - // translators: %s: block's title. - __( - 'The parent "%s" block is partially locked, preventing the movement or deletion of child blocks, as well as the addition of any inner blocks.' - ), - blockDisplayInformation.title - ) } - + { __( 'Unlock' ) } + - { - selectBlock( contentLockingParent ); - modifyContentLockBlock( contentLockingParent ); - onClose(); - } } + - { sprintf( - // translators: %s: block's title. - __( 'Modify "%s"' ), - blockDisplayInformation.title + { __( + 'Temporarily unlock the parent block to edit, delete or make further changes to this block.' ) } - + ); }