WordPress.org

Make WordPress Core

Ticket #10117: i18n-to-en_US-hint.diff

File i18n-to-en_US-hint.diff, 1.3 KB (added by nbachiyski, 6 years ago)
  • wp-admin/update-core.php

     
    1414 
    1515function list_core_update( $update ) { 
    1616        global $wp_local_package; 
    17         $version_string = 'en_US' == $update->locale ? 
     17        $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ? 
    1818                        $update->current : sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale); 
    1919        $current = false; 
    2020        if ( !isset($update->response) || 'latest' == $update->response ) 
     
    5353        echo '</p>'; 
    5454        if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) 
    5555            echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>'; 
     56        else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) { 
     57            echo '<p class="hint">'.sprintf( __('You are about to install WordPress %s <strong>in English.</strong> There is a chance this upgrade will break your translation. You may prefer to wait for the localized version to be relased.'), $update->current ).'</p>'; 
     58        } 
    5659        echo '</form>'; 
    5760 
    5861}