Make WordPress Core


Ignore:
Timestamp:
10/30/2015 08:56:36 AM (9 years ago)
Author:
SergeyBiryukov
Message:

Don't use <strong> in translatable string in wp-includes/nav-menu.php.

Add translator commment.

Props ramiy.
Fixes #34505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r35382 r35452  
    278278        isset( $_possible_existing->term_id ) &&
    279279        $_possible_existing->term_id != $menu_id
    280     )
    281         return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) );
     280    ) {
     281        return new WP_Error( 'menu_exists',
     282            /* translators: %s: menu name */
     283            sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ),
     284                '<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>'
     285            )
     286        );
     287    }
    282288
    283289    // menu doesn't already exist, so create a new menu
     
    285291        $menu_exists = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
    286292
    287         if ( $menu_exists )
    288             return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) );
     293        if ( $menu_exists ) {
     294            return new WP_Error( 'menu_exists',
     295                /* translators: %s: menu name */
     296                sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ),
     297                    '<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>'
     298                )
     299            );
     300        }
    289301
    290302        $_menu = wp_insert_term( $menu_data['menu-name'], 'nav_menu', $args );
Note: See TracChangeset for help on using the changeset viewer.