I18N: Adjust translator comments in `nav-menu.js`.

Includes:
* Moving the comments directly above `wp.i18n._x()` so that they can be picked up properly.
* Simplifying the context to avoid unnecessarily translating the string twice for the same use case.
* Using the established translator comments format for consistency.

Follow-up to [59428].

Reviewed by SergeyBiryukov, desrosj.
Merges [59431 to the 6.7 branch.

Fixes #62402.
Built from https://develop.svn.wordpress.org/branches/6.7@59432


git-svn-id: http://core.svn.wordpress.org/branches/6.7@58818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2024-11-20 13:33:18 +00:00
parent 1bb7777b42
commit e6dee5ed5a
3 changed files with 6 additions and 6 deletions

View File

@ -364,9 +364,9 @@
if ( i == itemPosition ) {
$selected = 'selected';
}
// Translators: %1$s is the current menu item number, %2$s is the total number of menu items.
var itemString = wp.i18n.sprintf(
wp.i18n._x( '%1$s of %2$s', 'indicating a part of a total number of items in a navigation menu' ),
/* translators: 1: The current menu item number, 2: The total number of menu items. */
wp.i18n._x( '%1$s of %2$s', 'part of a total number of menu items' ),
i,
totalMenuItems
);
@ -386,9 +386,9 @@
if ( i == itemPosition ) {
$selected = 'selected';
}
// Translators: %1$s is the current submenu item number, %2$s is the total number of submenu items.
var submenuString = wp.i18n.sprintf(
wp.i18n._x( '%1$s of %2$s', 'indicating a part of a total number of items in a submenu' ),
/* translators: 1: The current submenu item number, 2: The total number of submenu items. */
wp.i18n._x( '%1$s of %2$s', 'part of a total number of menu items' ),
i,
totalSubMenuItems
);

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7.1-alpha-59429';
$wp_version = '6.7.1-alpha-59432';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.