From 0702768d3bf634d5514ddfecca082dbe0c6f04f0 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Wed, 28 Jun 2023 18:01:42 +1000 Subject: [PATCH] Patterns: Fix sidebar tab label (#51953) --- .../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 = () =>