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: Make string to add Template parts & Patterns consistent and translatable #51743

Merged
merged 2 commits into from
Jun 23, 2023
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/add-new-pattern/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ export default function AddNewPattern() {
{
icon: header,
onClick: () => setShowTemplatePartModal( true ),
title: 'Create a template part',
title: __( 'Create template part' ),
},
{
icon: file,
onClick: () => setShowPatternModal( true ),
title: 'Create a pattern',
title: __( 'Create pattern' ),
},
] }
icon={
<SidebarButton
icon={ plus }
label={ __( 'Create a pattern' ) }
label={ __( 'Create pattern' ) }
/>
}
label="Create a pattern."
label={ __( 'Create pattern.' ) }
/>
{ showPatternModal && (
<CreatePatternModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function CreatePatternModal( {

return (
<Modal
title={ __( 'Create a pattern' ) }
title={ __( 'Create pattern' ) }
onRequestClose={ closeModal }
overlayClassName="edit-site-create-pattern-modal"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function CreateTemplatePartModal( {

return (
<Modal
title={ __( 'Create a template part' ) }
title={ __( 'Create template part' ) }
onRequestClose={ closeModal }
overlayClassName="edit-site-create-template-part-modal"
>
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/specs/site-editor/site-editor-url-navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ test.describe( 'Site editor url navigation', () => {
} ) => {
await admin.visitSiteEditor();
await page.click( 'role=button[name="Library"i]' );
await page.click( 'role=button[name="Create a pattern"i]' );
await page.click( 'role=button[name="Create pattern"i]' );
await page
.getByRole( 'menu', { name: 'Create a pattern' } )
.getByRole( 'menuitem', { name: 'Create a template part' } )
.getByRole( 'menu', { name: 'Create pattern' } )
.getByRole( 'menuitem', { name: 'Create template part' } )
.click();
// Fill in a name in the dialog that pops up.
await page.type(
Expand Down
Loading