X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..672d6bc6da735e745275ef7a86341dc1178da8d2:/wp-admin/update-core.php diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 25840099..5bd44c7a 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -13,7 +13,8 @@ if ( ! current_user_can('update_plugins') ) wp_die(__('You do not have sufficient permissions to update plugins for this blog.')); function list_core_update( $update ) { - $version_string = 'en_US' == $update->locale ? + global $wp_local_package; + $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ? $update->current : sprintf("%s–%s", $update->current, $update->locale); $current = false; if ( !isset($update->response) || 'latest' == $update->response ) @@ -40,16 +41,21 @@ function list_core_update( $update ) { echo '
'; wp_nonce_field('upgrade-core'); echo '

'; - echo ' '; - echo ''; - echo ''; - echo '' . $download . ' '; + echo ' '; + echo ''; + echo ''; + echo '' . $download . ' '; if ( 'en_US' != $update->locale ) if ( !isset( $update->dismissed ) || !$update->dismissed ) - echo ''; + echo ''; else - echo ''; + echo ''; echo '

'; + if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) + echo '

'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'

'; + else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) { + echo '

'.sprintf( __('You are about to install WordPress %s in English. There is a chance this upgrade will break your translation. You may prefer to wait for the localized version to be released.'), $update->current ).'

'; + } echo '
'; } @@ -58,8 +64,8 @@ function dismissed_updates() { $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); if ( $dismissed ) { - $show_text = js_escape(__('Show hidden updates')); - $hide_text = js_escape(__('Hide hidden updates')); + $show_text = esc_js(__('Show hidden updates')); + $hide_text = esc_js(__('Hide hidden updates')); ?>