Make WordPress Core

Changeset 59432


Ignore:
Timestamp:
11/20/2024 01:31:13 PM (11 days ago)
Author:
desrosj
Message:

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.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/js/_enqueues/lib/nav-menu.js

    r59428 r59432  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.