Skip to content

Commit

Permalink
Change "Copy block" to "Copy" (WordPress#51532)
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor authored and sethrubenstein committed Jul 13, 2023
1 parent 36dea55 commit bfcddba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const BlockActionsMenu = ( {
},
copyButton: {
id: 'copyButtonOption',
label: __( 'Copy block' ),
label: __( 'Copy' ),
value: 'copyButtonOption',
onSelect: () => {
const serializedBlock = serialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe( 'Block Actions Menu', () => {
fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) );

// Tap on the Copy button
fireEvent.press( getByLabelText( /Copy block/ ) );
fireEvent.press( getByLabelText( /Copy/ ) );

// Get Paragraph block
paragraphBlock = await getBlock( screen, 'Paragraph' );
Expand Down Expand Up @@ -293,7 +293,7 @@ describe( 'Block Actions Menu', () => {
fireEvent.press( getByLabelText( /Open Block Actions Menu/ ) );

// Tap on the Copy button
fireEvent.press( getByLabelText( /Copy block/ ) );
fireEvent.press( getByLabelText( /Copy/ ) );

// Get Paragraph block
paragraphBlock = await getBlock( screen, 'Paragraph' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const POPOVER_PROPS = {
function CopyMenuItem( { blocks, onCopy, label } ) {
const ref = useCopyToClipboard( () => serialize( blocks ), onCopy );
const copyMenuItemBlocksLabel =
blocks.length > 1 ? __( 'Copy blocks' ) : __( 'Copy block' );
blocks.length > 1 ? __( 'Copy blocks' ) : __( 'Copy' );
const copyMenuItemLabel = label ? label : copyMenuItemBlocksLabel;
return <MenuItem ref={ ref }>{ copyMenuItemLabel }</MenuItem>;
}
Expand Down

0 comments on commit bfcddba

Please sign in to comment.