Skip to content

Commit

Permalink
cleanup copy pasta from the block editor components
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Jul 12, 2023
1 parent 56b08e6 commit 607d005
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/block-editor/src/components/use-block-commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const useTransformCommands = () => {
const {
getBlockRootClientId,
getBlockTransformItems,
__experimentalGetPatternTransformItems,
canRemoveBlocks,
} = select( blockEditorStore );
const rootClientId = getBlockRootClientId(
Expand All @@ -51,10 +50,6 @@ export const useTransformCommands = () => {
rootClientId
),
canRemove: canRemoveBlocks( clientIds, rootClientId ),
patterns: __experimentalGetPatternTransformItems(
blocks,
rootClientId
),
};
},
[ clientIds, blocks ]
Expand Down Expand Up @@ -97,7 +92,7 @@ export const useTransformCommands = () => {
const commands = possibleBlockTransformations.map( ( transformation ) => {
const { name, title, icon } = transformation;
return {
name: 'core/block-editor/transform-to-' + name,
name: 'core/block-editor/transform-to-' + name.replace( '/', '-' ),
// translators: %s: block title/name.
label: sprintf( __( 'Transform to %s' ), title ),
icon: icon.src,
Expand Down Expand Up @@ -271,9 +266,9 @@ const useActionsCommands = () => {
.replace( 'on', '' )
.replace( /([a-z])([A-Z])/g, '$1 $2' );
return {
name: 'core/block-edotpr/action-' + callback.name,
// translators: %s: block title/name.
label: `${ action } block`,
name: 'core/block-editor/action-' + callback.name,
// translators: %s: type of the command.
label: sprintf( __( `%s block` ), action ),
icon: copy,
callback: ( { close } ) => {
callback();
Expand Down

0 comments on commit 607d005

Please sign in to comment.