From ce094205acb41232d02498957ea583e3486f84ef Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:48:08 +1000 Subject: [PATCH] Patterns: Fix sidebar tab label --- .../sidebar-edit-mode/settings-header/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-edit-mode/settings-header/index.js b/packages/edit-site/src/components/sidebar-edit-mode/settings-header/index.js index 10ce08e8e7401..7bc951524e7e5 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/settings-header/index.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/settings-header/index.js @@ -18,6 +18,12 @@ import { STORE_NAME } from '../../../store/constants'; import { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from '../constants'; import { store as editSiteStore } from '../../../store'; +const entityLabels = { + wp_navigation: __( 'Navigation' ), + wp_block: __( 'Pattern' ), + wp_template: __( 'Template' ), +}; + const SettingsHeader = ( { sidebarName } ) => { const { hasPageContentFocus, entityType } = useSelect( ( select ) => { const { getEditedPostType, hasPageContentFocus: _hasPageContentFocus } = @@ -29,8 +35,7 @@ const SettingsHeader = ( { sidebarName } ) => { }; } ); - const entityLabel = - entityType === 'wp_navigation' ? __( 'Navigation' ) : __( 'Template' ); + const entityLabel = entityLabels[ entityType ] || entityLabels.wp_template; const { enableComplementaryArea } = useDispatch( interfaceStore ); const openTemplateSettings = () =>