Skip to content

Commit

Permalink
Use the term menu instead of navigation in nav elements labels. (Word…
Browse files Browse the repository at this point in the history
…Press#68683)

* Use the term menu instead of navigation in nav elements labels.

* Adjust translators comments for clarity.

Co-authored-by: afercia <[email protected]>
Co-authored-by: SergeyBiryukov <[email protected]>
  • Loading branch information
3 people authored Jan 28, 2025
1 parent 2abe6fa commit 0a26fe6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function useConvertClassicToBlockMenu(
} catch ( err ) {
throw new Error(
sprintf(
// translators: %s: the name of a menu (e.g. Header navigation).
// translators: %s: The name of a menu (e.g. Header menu).
__( `Unable to fetch classic menu "%s" from API.` ),
menuName
),
Expand All @@ -61,7 +61,7 @@ function useConvertClassicToBlockMenu(
if ( classicMenuItems === null ) {
throw new Error(
sprintf(
// translators: %s: the name of a menu (e.g. Header navigation).
// translators: %s: The name of a menu (e.g. Header menu).
__( `Unable to fetch classic menu "%s" from API.` ),
menuName
)
Expand Down Expand Up @@ -98,7 +98,7 @@ function useConvertClassicToBlockMenu(
} catch ( err ) {
throw new Error(
sprintf(
// translators: %s: the name of a menu (e.g. Header navigation).
// translators: %s: The name of a menu (e.g. Header menu).
__( `Unable to create Navigation Menu "%s".` ),
menuName
),
Expand Down Expand Up @@ -155,7 +155,7 @@ function useConvertClassicToBlockMenu(
if ( throwOnError ) {
throw new Error(
sprintf(
// translators: %s: the name of a menu (e.g. Header navigation).
// translators: %s: The name of a menu (e.g. Header menu).
__( `Unable to create Navigation Menu "%s".` ),
menuName
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export default function useGenerateDefaultNavigationTitle( clientId ) {

const title = area
? sprintf(
// translators: %s: the name of a menu (e.g. Header navigation).
__( '%s navigation' ),
// translators: %s: the name of a menu (e.g. Header menu).
__( '%s menu' ),
area
)
: // translators: 'navigation' as in website navigation.
__( 'Navigation' );
: // translators: 'menu' as in website navigation menu.
__( 'Menu' );

// Determine how many menus start with the automatic title.
const matchingMenuTitleCount = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function ScreenRevisions() {
changePage={ setCurrentPage }
totalItems={ revisionsCount }
disabled={ isLoading }
label={ __( 'Global Styles pagination navigation' ) }
label={ __( 'Global Styles pagination' ) }
/>
</div>
) }
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function Pagination( {
className,
disabled = false,
buttonVariant = 'tertiary',
label = __( 'Pagination Navigation' ),
label = __( 'Pagination' ),
} ) {
return (
<HStack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ test.describe( 'Style Revisions', () => {
}
await userGlobalStylesRevisions.openStylesPanel();
await page.getByRole( 'button', { name: 'Revisions' } ).click();
const pagination = page.getByLabel(
'Global Styles pagination navigation'
);
const pagination = page.getByLabel( 'Global Styles pagination' );
await expect( pagination ).toContainText( '1 of 2' );
await pagination.getByRole( 'button', { name: 'Next page' } ).click();
await expect( pagination ).toContainText( '2 of 2' );
Expand Down

0 comments on commit 0a26fe6

Please sign in to comment.