Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Update the template list action labels #37576

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/edit-site/src/components/list/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ export default function Actions( { template } ) {
template.id
);

createSuccessNotice( __( 'Template reverted.' ), {
createSuccessNotice( __( 'Entity reverted.' ), {
type: 'snackbar',
} );
} catch ( error ) {
const errorMessage =
error.message && error.code !== 'unknown_error'
? error.message
: __( 'An error occurred while reverting the template.' );
: __( 'An error occurred while reverting the entity.' );

createErrorNotice( errorMessage, { type: 'snackbar' } );
}
Expand Down Expand Up @@ -74,13 +74,13 @@ export default function Actions( { template } ) {
onClose();
} }
>
{ __( 'Delete template' ) }
{ __( 'Delete' ) }
</MenuItem>
</>
) }
{ isRevertable && (
<MenuItem
info={ __( 'Restore template to default state' ) }
info={ __( 'Restore to default state' ) }
onClick={ () => {
revertAndSaveTemplate();
onClose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ export default function RenameMenuItem( { template, onClose } ) {
throw lastError;
}

createSuccessNotice( __( 'Template has been renamed.' ), {
createSuccessNotice( __( 'Entity renamed.' ), {
type: 'snackbar',
} );
} catch ( error ) {
const errorMessage =
error.message && error.code !== 'unknown_error'
? error.message
: __( 'An error occurred while renaming the template.' );
: __( 'An error occurred while renaming the entity.' );

createErrorNotice( errorMessage, { type: 'snackbar' } );
}
Expand All @@ -86,7 +86,7 @@ export default function RenameMenuItem( { template, onClose } ) {
</MenuItem>
{ isModalOpen && (
<Modal
title={ __( 'Rename template' ) }
title={ __( 'Rename' ) }
closeLabel={ __( 'Close' ) }
onRequestClose={ () => {
setIsModalOpen( false );
Expand Down