From 4bca320a7759269600a4fe6e88b0a734e62966ca Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 30 Oct 2015 08:56:36 +0000 Subject: [PATCH] Don't use `` in translatable string in `wp-includes/nav-menu.php`. Add translator commment. Props ramiy. Fixes #34505. git-svn-id: https://develop.svn.wordpress.org/trunk@35452 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/nav-menu.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index 1fe2bc339a..91a102a880 100644 --- a/src/wp-includes/nav-menu.php +++ b/src/wp-includes/nav-menu.php @@ -277,15 +277,27 @@ function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) { ! is_wp_error( $_possible_existing ) && isset( $_possible_existing->term_id ) && $_possible_existing->term_id != $menu_id - ) - return new WP_Error( 'menu_exists', sprintf( __('The menu name %s conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) ); + ) { + return new WP_Error( 'menu_exists', + /* translators: %s: menu name */ + sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ), + '' . esc_html( $menu_data['menu-name'] ) . '' + ) + ); + } // menu doesn't already exist, so create a new menu if ( ! $_menu || is_wp_error( $_menu ) ) { $menu_exists = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' ); - if ( $menu_exists ) - return new WP_Error( 'menu_exists', sprintf( __('The menu name %s conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) ); + if ( $menu_exists ) { + return new WP_Error( 'menu_exists', + /* translators: %s: menu name */ + sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ), + '' . esc_html( $menu_data['menu-name'] ) . '' + ) + ); + } $_menu = wp_insert_term( $menu_data['menu-name'], 'nav_menu', $args );