Make WordPress Core

Changeset 35722


Ignore:
Timestamp:
11/20/2015 05:45:57 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Customizer: Use correct context and translator comments for menu location strings.

See #33431.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/nav-menus.php

    r33862 r35722  
    799799                                        <?php foreach ( $locations as $location => $description ) : ?>
    800800                                        <dd class="checkbox-input">
    801                                             <input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
     801                                            <input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
     802                                            <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
    802803                                            <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
    803                                             <span class="theme-location-set"> <?php printf( __( "(Currently set to: %s)" ), wp_get_nav_menu_object( $menu_locations[ $location ] )->name ); ?> </span>
     804                                                <span class="theme-location-set"><?php
     805                                                    /* translators: %s: menu name */
     806                                                    printf( _x( '(Currently set to: %s)', 'menu location' ),
     807                                                        wp_get_nav_menu_object( $menu_locations[ $location ] )->name
     808                                                    );
     809                                                ?></span>
    804810                                            <?php endif; ?>
    805811                                        </dd>
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r35694 r35722  
    337337                'unnamed'           => _x( '(unnamed)', 'Missing menu name.' ),
    338338                'custom_label'      => __( 'Custom Link' ),
    339                 /* translators: %s: Current menu location */
    340                 'menuLocation'      => _x( '(Currently set to: %s)', 'Current menu location' ),
     339                /* translators: %s: menu location slug */
     340                'menuLocation'      => _x( '(Currently set to: %s)', 'menu' ),
    341341                'menuNameLabel'     => __( 'Menu Name' ),
    342342                'itemAdded'         => __( 'Menu item added' ),
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-control.php

    r35695 r35722  
    7272                <label>
    7373                    <input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" /> <?php echo $description; ?>
    74                     <span class="theme-location-set"><?php printf( /* translators: %s: menu name */ _x( '(Current: %s)', 'Current menu location' ), '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>' ); ?></span>
     74                    <span class="theme-location-set"><?php
     75                        /* translators: %s: menu name */
     76                        printf( _x( '(Current: %s)', 'menu location' ),
     77                            '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
     78                        );
     79                    ?></span>
    7580                </label>
    7681            </li>
Note: See TracChangeset for help on using the changeset viewer.