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

See #33431.
Built from https://develop.svn.wordpress.org/trunk@35722


git-svn-id: http://core.svn.wordpress.org/trunk@35686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-11-20 17:46:25 +00:00
parent 277747f944
commit 17af54fc7c
4 changed files with 17 additions and 6 deletions

View File

@ -798,9 +798,15 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<dt class="howto"><?php _e( 'Theme locations' ); ?></dt>
<?php foreach ( $locations as $location => $description ) : ?>
<dd class="checkbox-input">
<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>
<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>
<?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
<span class="theme-location-set"> <?php printf( __( "(Currently set to: %s)" ), wp_get_nav_menu_object( $menu_locations[ $location ] )->name ); ?> </span>
<span class="theme-location-set"><?php
/* translators: %s: menu name */
printf( _x( '(Currently set to: %s)', 'menu location' ),
wp_get_nav_menu_object( $menu_locations[ $location ] )->name
);
?></span>
<?php endif; ?>
</dd>
<?php endforeach; ?>

View File

@ -336,8 +336,8 @@ final class WP_Customize_Nav_Menus {
'untitled' => _x( '(no label)', 'missing menu item navigation label' ),
'unnamed' => _x( '(unnamed)', 'Missing menu name.' ),
'custom_label' => __( 'Custom Link' ),
/* translators: %s: Current menu location */
'menuLocation' => _x( '(Currently set to: %s)', 'Current menu location' ),
/* translators: %s: menu location slug */
'menuLocation' => _x( '(Currently set to: %s)', 'menu' ),
'menuNameLabel' => __( 'Menu Name' ),
'itemAdded' => __( 'Menu item added' ),
'itemDeleted' => __( 'Menu item deleted' ),

View File

@ -71,7 +71,12 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
<li class="customize-control customize-control-checkbox assigned-menu-location">
<label>
<input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" /> <?php echo $description; ?>
<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>
<span class="theme-location-set"><?php
/* translators: %s: menu name */
printf( _x( '(Current: %s)', 'menu location' ),
'<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
);
?></span>
</label>
</li>
<?php endforeach; ?>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta4-35721';
$wp_version = '4.4-beta4-35722';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.