Make WordPress Core

Changeset 29705


Ignore:
Timestamp:
09/04/2014 02:38:17 PM (12 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.

Location:
trunk/src/wp-admin
Files:
2 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 {
  • trunk/src/wp-admin/setup-config.php

    r29673 r29705  
    9191if ( ! empty( $_REQUEST['language'] ) ) {
    9292        $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     93} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
     94        $language = $GLOBALS['wp_local_package'];
    9395}
     96
    9497switch($step) {
    9598        case -1:
Note: See TracChangeset for help on using the changeset viewer.