Make WordPress Core

Ticket #29487: 29487.diff

File 29487.diff, 1.5 KB (added by tenpura, 10 years ago)
  • src/wp-admin/includes/translation-install.php

     
    133133
    134134        echo "<label class='screen-reader-text' for='language'>Select a default language</label>\n";
    135135        echo "<select size='14' name='language' id='language'>\n";
    136         echo '<option value="" lang="en" selected="selected" data-continue="Continue" data-installed="1">English (United States)</option>';
    137         echo "\n";
     136
     137        $selected = ' selected="selected"';
    138138
    139139        if ( ! empty( $wp_local_package ) && isset( $languages[ $wp_local_package ] ) ) {
    140140                if ( isset( $languages[ $wp_local_package ] ) ) {
    141141                        $language = $languages[ $wp_local_package ];
    142                         printf( '<option value="%s" lang="%s" data-continue="%s"%s>%s</option>' . "\n",
     142                        printf( '<option value="%s" lang="%s"' . $selected . ' data-continue="%s"%s>%s</option>' . "\n",
    143143                                esc_attr( $language['language'] ),
    144144                                esc_attr( $language['iso'][1] ),
    145145                                esc_attr( $language['strings']['continue'] ),
     
    147147                                esc_html( $language['native_name'] ) );
    148148
    149149                        unset( $languages[ $wp_local_package ] );
     150                        $selected = '';
    150151                }
    151152        }
    152153
     154        echo '<option value="" lang="en"' . $selected . ' data-continue="Continue" data-installed="1">English (United States)</option>';
     155        echo "\n";
     156
    153157        foreach ( $languages as $language ) {
    154158                printf( '<option value="%s" lang="%s" data-continue="%s"%s>%s</option>' . "\n",
    155159                        esc_attr( $language['language'] ),