Ticket #29487: 29487.3.diff
File 29487.3.diff, 3.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/install.php
181 181 die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'Your <code>wp-config.php</code> file has an empty database table prefix, which is not supported.' ) . '</p></body></html>' ); 182 182 } 183 183 184 $langu gage = '';184 $language = ''; 185 185 if ( ! 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']; 187 189 } 188 190 189 191 switch($step) { 190 192 case 0: // Step 0 191 193 192 if ( wp_can_install_language_pack() && empty( $langu gage ) && ( $languages = wp_get_available_translations() ) ) {194 if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) { 193 195 display_header( 'language-chooser' ); 194 196 echo '<form id="setup" method="post" action="?step=1">'; 195 197 wp_install_language_form( $languages ); … … 200 202 // Deliberately fall through if we can't reach the translations API. 201 203 202 204 case 1: // Step 1, direct link or from language chooser. 203 if ( ! empty( $langu gage ) ) {204 $loaded_language = wp_download_language_pack( $langu gage );205 if ( ! empty( $language ) ) { 206 $loaded_language = wp_download_language_pack( $language ); 205 207 if ( $loaded_language ) { 206 208 load_default_textdomain( $loaded_language ); 207 209 $GLOBALS['wp_locale'] = new WP_Locale(); … … 211 213 display_header(); 212 214 ?> 213 215 <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’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’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p> 215 217 216 218 <h1><?php _e( 'Information needed' ); ?></h1> 217 219 <p><?php _e( 'Please provide the following information. Don’t worry, you can always change these settings later.' ); ?></p> … … 220 222 display_setup_form(); 221 223 break; 222 224 case 2: 223 if ( ! empty( $langu gage ) && load_default_textdomain( $langugage ) ) {224 $loaded_language = $langu gage;225 if ( ! empty( $language ) && load_default_textdomain( $language ) ) { 226 $loaded_language = $language; 225 227 $GLOBALS['wp_locale'] = new WP_Locale(); 226 228 } else { 227 229 $loaded_language = 'en_US'; -
src/wp-admin/setup-config.php
90 90 $language = ''; 91 91 if ( ! empty( $_REQUEST['language'] ) ) { 92 92 $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] ); 93 } elseif ( isset( $GLOBALS['wp_local_package'] ) ) { 94 $language = $GLOBALS['wp_local_package']; 93 95 } 96 94 97 switch($step) { 95 98 case -1: 96 99 if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {