Skip to content

Commit

Permalink
Site Editor: Make string to add Template parts & Patterns consistent …
Browse files Browse the repository at this point in the history
…and translatable (#51743)

* Site Editor: Make Template Parts & Patterns Management dropdown translatable

* Make strings consistent
  • Loading branch information
t-hamano authored and tellthemachines committed Jun 27, 2023
1 parent d04f19f commit 0a92405
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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

0 comments on commit 0a92405

Please sign in to comment.