Fix localization on Edit Menus screen. props kovshenin. fixes #24228.

git-svn-id: http://core.svn.wordpress.org/trunk@24158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-05-02 12:38:25 +00:00
parent ea1cecebee
commit e043f2ad8a
1 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ $locations_screen = ( isset( $_GET['action'] ) && 'locations' == $_GET['action']
$page_count = wp_count_posts( 'page' ); $page_count = wp_count_posts( 'page' );
$one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false; $one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false;
$l10n = array( $nav_menus_l10n = array(
'oneThemeLocationNoMenus' => $one_theme_location_no_menus, 'oneThemeLocationNoMenus' => $one_theme_location_no_menus,
'moveUp' => __( 'Move up one' ), 'moveUp' => __( 'Move up one' ),
'moveDown' => __( 'Move down one' ), 'moveDown' => __( 'Move down one' ),
@ -397,7 +397,7 @@ $l10n = array(
/* translators: 1: item name, 2: item position, 3: parent item name */ /* translators: 1: item name, 2: item position, 3: parent item name */
'subMenuFocus' => __( '%1$s. Sub item number %2$d under %3$s.' ), 'subMenuFocus' => __( '%1$s. Sub item number %2$d under %3$s.' ),
); );
wp_localize_script( 'nav-menu', 'menus', $l10n ); wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n );
// Redirect to add screen if there are no menus and this users has either zero, or more than 1 theme locations // Redirect to add screen if there are no menus and this users has either zero, or more than 1 theme locations
if ( 0 == $menu_count && ! $add_new_screen && ! $one_theme_location_no_menus ) if ( 0 == $menu_count && ! $add_new_screen && ! $one_theme_location_no_menus )