Skip to content

Commit 654475f

Browse files
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]. See #62402. git-svn-id: https://develop.svn.wordpress.org/trunk@59431 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 193f6eb commit 654475f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/_enqueues/lib/nav-menu.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@
364364
if ( i == itemPosition ) {
365365
$selected = 'selected';
366366
}
367-
// Translators: %1$s is the current menu item number, %2$s is the total number of menu items.
368367
var itemString = wp.i18n.sprintf(
369-
wp.i18n._x( '%1$s of %2$s', 'indicating a part of a total number of items in a navigation menu' ),
368+
/* translators: 1: The current menu item number, 2: The total number of menu items. */
369+
wp.i18n._x( '%1$s of %2$s', 'part of a total number of menu items' ),
370370
i,
371371
totalMenuItems
372372
);
@@ -386,9 +386,9 @@
386386
if ( i == itemPosition ) {
387387
$selected = 'selected';
388388
}
389-
// Translators: %1$s is the current submenu item number, %2$s is the total number of submenu items.
390389
var submenuString = wp.i18n.sprintf(
391-
wp.i18n._x( '%1$s of %2$s', 'indicating a part of a total number of items in a submenu' ),
390+
/* translators: 1: The current submenu item number, 2: The total number of submenu items. */
391+
wp.i18n._x( '%1$s of %2$s', 'part of a total number of menu items' ),
392392
i,
393393
totalSubMenuItems
394394
);

0 commit comments

Comments
 (0)