Make WordPress Core

Changeset 59431


Ignore:
Timestamp:
11/20/2024 11:20:36 AM (11 days ago)
Author:
SergeyBiryukov
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].

See #62402.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/nav-menu.js

    r59426 r59431  
    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.