Skip to content

Commit

Permalink
Navigation: Add more explicit labels to the Navigation Menu Selector (#…
Browse files Browse the repository at this point in the history
…47015)

Co-authored-by: Ben Dwyer <[email protected]>
  • Loading branch information
scruffian and Ben Dwyer authored Jan 11, 2023
1 parent f0abb29 commit c8dc3b7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ function NavigationMenuSelector( {
navigationMenus?.map( ( { id, title } ) => {
const label = decodeEntities( title.rendered );
if ( id === currentMenuId && ! isCreatingMenu ) {
setSelectorLabel( currentTitle );
setSelectorLabel(
/* translators: %s is the name of a navigation menu. */
sprintf( __( 'You are currently editing %s' ), label )
);
setEnableOptions( shouldEnableMenuSelector );
}
return {
Expand Down Expand Up @@ -102,7 +105,7 @@ function NavigationMenuSelector( {
if ( ! hasResolvedNavigationMenus ) {
setSelectorLabel( __( 'Loading …' ) );
} else if ( noMenuSelected || noBlockMenus || menuUnavailable ) {
setSelectorLabel( __( 'Select menu' ) );
setSelectorLabel( __( 'Choose a Navigation menu' ) );
setEnableOptions( shouldEnableMenuSelector );
}

Expand Down

1 comment on commit c8dc3b7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in c8dc3b7.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3892285590
📝 Reported issues:

Please sign in to comment.