Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update standardisation of 'Navigation Menu' to have both words capitalised in user-facing menus #60262

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,7 +12,7 @@ import AccessibleDescription from './accessible-description';
export default function AccessibleMenuDescription( { id } ) {
const [ menuTitle ] = useEntityProp( 'postType', 'wp_navigation', 'title' );
/* translators: %s: Title of a Navigation Menu post. */
const description = sprintf( __( `Navigation menu: "%s"` ), menuTitle );
const description = sprintf( __( `Navigation Menu: "%s"` ), menuTitle );

return (
<AccessibleDescription id={ id }>{ description }</AccessibleDescription>
Expand Down
Expand Up @@ -11,7 +11,7 @@ function DeletedNavigationWarning( { onCreateNew } ) {
<Warning>
{ createInterpolateElement(
__(
'Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>'
'Navigation Menu has been deleted or is unavailable. <button>Create a new menu?</button>'
),
{
button: <Button onClick={ onCreateNew } variant="link" />,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/edit/index.js
Expand Up @@ -847,7 +847,7 @@ function Navigation( {
replaceInnerBlocks( clientId, [] );
showNavigationMenuStatusNotice(
__(
'Navigation menu successfully deleted.'
'Navigation Menu successfully deleted.'
)
);
} }
Expand Down
Expand Up @@ -102,7 +102,7 @@ const MainContent = ( {
const description = navigationMenu
? sprintf(
/* translators: %s: The name of a menu. */
__( 'Structure for navigation menu: %s' ),
__( 'Structure for Navigation Menu: %s' ),
navigationMenu?.title || __( 'Untitled menu' )
)
: __(
Expand All @@ -113,7 +113,7 @@ const MainContent = ( {
<div className="wp-block-navigation__menu-inspector-controls">
{ ! hasChildren && (
<p className="wp-block-navigation__menu-inspector-controls__empty-message">
{ __( 'This navigation menu is empty.' ) }
{ __( 'This Navigation Menu is empty.' ) }
</p>
) }
<PrivateListView
Expand Down
Expand Up @@ -43,7 +43,7 @@ export default function NavigationMenuDeleteControl( { onDelete } ) {
confirmButtonText={ __( 'Delete' ) }
>
{ __(
'Are you sure you want to delete this Navigation menu?'
'Are you sure you want to delete this Navigation Menu?'
) }
</ConfirmDialog>
) }
Expand Down
Expand Up @@ -113,7 +113,7 @@ function NavigationMenuSelector( {
selectorLabel = __( 'Loading…' );
} else if ( noMenuSelected || noBlockMenus || menuUnavailable ) {
// Note: classic Menus may be available.
selectorLabel = __( 'Choose or create a Navigation menu' );
selectorLabel = __( 'Choose or create a Navigation Menu' );
} else {
// Current Menu's title.
selectorLabel = currentTitle;
Expand Down
Expand Up @@ -89,7 +89,7 @@ describe( 'NavigationMenuSelector', () => {
).toBeInTheDocument();
} );

it( 'should show correct dropdown toggle prompt to choose a menu when navigation menus have resolved', async () => {
it( 'should show correct dropdown toggle prompt to choose a menu when Navigation Menus have resolved', async () => {
useNavigationMenu.mockReturnValue( {
navigationMenus: [],
hasResolvedNavigationMenus: true,
Expand All @@ -101,7 +101,7 @@ describe( 'NavigationMenuSelector', () => {

expect(
screen.getByRole( 'button', {
name: 'Choose or create a Navigation menu',
name: 'Choose or create a Navigation Menu',
} )
).toBeInTheDocument();
} );
Expand Down Expand Up @@ -159,7 +159,7 @@ describe( 'NavigationMenuSelector', () => {
render( <NavigationMenuSelector /> );

const toggleButton = screen.getByRole( 'button', {
name: 'Choose or create a Navigation menu',
name: 'Choose or create a Navigation Menu',
} );

await user.click( toggleButton );
Expand All @@ -169,7 +169,7 @@ describe( 'NavigationMenuSelector', () => {
expect( menuPopover ).toHaveAttribute(
'aria-label',
expect.stringContaining(
'Choose or create a Navigation menu'
'Choose or create a Navigation Menu'
)
);

Expand Down Expand Up @@ -324,7 +324,7 @@ describe( 'NavigationMenuSelector', () => {
} );
} );

describe( 'Navigation menus', () => {
describe( 'Navigation Menus', () => {
it( 'should not show a list of menus when menus exist but user does not have permission to switch menus', async () => {
const user = userEvent.setup();

Expand Down Expand Up @@ -445,7 +445,7 @@ describe( 'NavigationMenuSelector', () => {
expect( menuItem ).toBeChecked();
} );

it( 'should call the handler when the navigation menu is selected', async () => {
it( 'should call the handler when the Navigation Menu is selected', async () => {
const user = userEvent.setup();

const handler = jest.fn();
Expand Down