Skip to content

Commit

Permalink
Change labels
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Jun 20, 2023
1 parent 88f48f3 commit d477199
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function usePatternsCategories( rootClientId ) {
if ( filteredUnsyncedPatterns.length > 0 ) {
categories.push( {
name: 'reusable',
label: _x( 'Your patterns' ),
label: _x( 'Custom patterns' ),
} );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function ReusableBlocksList( { onHover, onInsert, rootClientId } ) {
}

return (
<InserterPanel title={ __( 'Synced Patterns' ) }>
<InserterPanel title={ __( 'Synced patterns' ) }>
<BlockTypesList
items={ filteredItems }
onSelect={ onSelectItem }
onHover={ onHover }
label={ __( 'Synced Patterns' ) }
label={ __( 'Synced patterns' ) }
/>
</InserterPanel>
);
Expand Down Expand Up @@ -67,7 +67,7 @@ export function ReusableBlocksTab( { rootClientId, onInsert, onHover } ) {
post_type: 'wp_block',
} ) }
>
{ __( 'Manage Your Patterns' ) }
{ __( 'Manage custom patterns' ) }
</Button>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/inserter/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const patternsTab = {
const reusableBlocksTab = {
name: 'reusable',
/* translators: Locally created Patterns tab title in the block inserter. */
title: __( 'Synced Patterns' ),
title: __( 'Synced patterns' ),
icon: reusableBlockIcon,
};
const mediaTab = {
Expand Down
14 changes: 7 additions & 7 deletions packages/e2e-test-utils/src/inserter.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export async function selectGlobalInserterTab( label ) {
case 'Media':
labelSelector = `. = "${ label }"`;
break;
case 'Synced Patterns':
// Synced Patterns tab label is an icon, hence the different selector.
case 'Synced patterns':
// Synced patterns tab label is an icon, hence the different selector.
labelSelector = `@aria-label = "${ label }"`;
break;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ export async function searchGlobalInserter( category, searchTerm ) {
switch ( category ) {
case 'Blocks':
case 'Patterns':
case 'Synced Patterns': {
case 'Synced patterns': {
waitForInsertElement = async () => {
return await page.waitForXPath(
`//*[@role='option' and contains(., '${ searchTerm }')]`
Expand Down Expand Up @@ -220,7 +220,7 @@ export async function searchGlobalInserter( category, searchTerm ) {
* If the entity is not instantly available in the open inserter, a search will
* be performed. If the search returns no results, an error will be thrown.
*
* Available categories: Blocks, Patterns, Synced Patterns and Block Directory.
* Available categories: Blocks, Patterns, Synced patterns and Block Directory.
*
* @param {string} category The category to insert from.
* @param {string} searchTerm The term by which to find the entity to insert.
Expand All @@ -231,7 +231,7 @@ export async function insertFromGlobalInserter( category, searchTerm ) {

let insertButton;

if ( [ 'Blocks', 'Synced Patterns' ].includes( category ) ) {
if ( [ 'Blocks', 'Synced patterns' ].includes( category ) ) {
// If it's a block, see if it's insertable without searching...
try {
insertButton = (
Expand Down Expand Up @@ -260,7 +260,7 @@ export async function insertFromGlobalInserter( category, searchTerm ) {
await insertButton.click();

// Extra wait for the reusable block to be ready.
if ( category === 'Synced Patterns' ) {
if ( category === 'Synced patterns' ) {
await canvas().waitForSelector(
'.block-library-block__reusable-block-container'
);
Expand Down Expand Up @@ -347,7 +347,7 @@ export async function insertPattern( searchTerm ) {
* insert.
*/
export async function insertReusableBlock( searchTerm ) {
await insertFromGlobalInserter( 'Synced Patterns', searchTerm );
await insertFromGlobalInserter( 'Synced patterns', searchTerm );
}

/**
Expand Down

0 comments on commit d477199

Please sign in to comment.