WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/04/2014 02:38:17 PM (5 years ago)
Author:
nacin
Message:

i18n: Skip language chooser for localized packages.

Also fixes the install.php welcome string, which was not bring printed.

fixes #29487.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r29673 r29705  
    182182}
    183183
    184 $langugage = '';
     184$language = '';
    185185if ( ! empty( $_REQUEST['language'] ) ) {
    186     $langugage = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     186    $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     187} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
     188    $language = $GLOBALS['wp_local_package'];
    187189}
    188190
     
    190192    case 0: // Step 0
    191193
    192         if ( wp_can_install_language_pack() && empty( $langugage ) && ( $languages = wp_get_available_translations() ) ) {
     194        if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
    193195            display_header( 'language-chooser' );
    194196            echo '<form id="setup" method="post" action="?step=1">';
     
    201203
    202204    case 1: // Step 1, direct link or from language chooser.
    203         if ( ! empty( $langugage ) ) {
    204             $loaded_language = wp_download_language_pack( $langugage );
     205        if ( ! empty( $language ) ) {
     206            $loaded_language = wp_download_language_pack( $language );
    205207            if ( $loaded_language ) {
    206208                load_default_textdomain( $loaded_language );
     
    212214?>
    213215<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
    214 <p><?php __( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
     216<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
    215217
    216218<h1><?php _e( 'Information needed' ); ?></h1>
     
    221223        break;
    222224    case 2:
    223         if ( ! empty( $langugage ) && load_default_textdomain( $langugage ) ) {
    224             $loaded_language = $langugage;
     225        if ( ! empty( $language ) && load_default_textdomain( $language ) ) {
     226            $loaded_language = $language;
    225227            $GLOBALS['wp_locale'] = new WP_Locale();
    226228        } else {
Note: See TracChangeset for help on using the changeset viewer.