Re-initialize $wp_locale global after changing the default textdomain on installation screens.

props ocean90.
fixes #29452.
Built from https://develop.svn.wordpress.org/trunk@29669


git-svn-id: http://core.svn.wordpress.org/trunk@29443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-09-02 08:10:16 +00:00
parent 2d1cc72d7f
commit b70fdd0c52
2 changed files with 7 additions and 0 deletions

View File

@ -204,6 +204,7 @@ switch($step) {
$loaded_language = wp_download_language_pack( $langugage );
if ( $loaded_language ) {
load_default_textdomain( $loaded_language );
$GLOBALS['wp_locale'] = new WP_Locale();
}
}
@ -221,6 +222,7 @@ switch($step) {
case 2:
if ( ! empty( $langugage ) && load_default_textdomain( $langugage ) ) {
$loaded_language = $langugage;
$GLOBALS['wp_locale'] = new WP_Locale();
} else {
$loaded_language = 'en_US';
}

View File

@ -110,6 +110,7 @@ switch($step) {
$loaded_language = wp_download_language_pack( $language );
if ( $loaded_language ) {
load_default_textdomain( $loaded_language );
$GLOBALS['wp_locale'] = new WP_Locale();
}
}
@ -144,6 +145,8 @@ switch($step) {
case 1:
load_default_textdomain( $language );
$GLOBALS['wp_locale'] = new WP_Locale();
setup_config_display_header();
?>
<form method="post" action="setup-config.php?step=2">
@ -184,6 +187,8 @@ switch($step) {
case 2:
load_default_textdomain( $language );
$GLOBALS['wp_locale'] = new WP_Locale();
$dbname = trim( wp_unslash( $_POST[ 'dbname' ] ) );
$uname = trim( wp_unslash( $_POST[ 'uname' ] ) );
$pwd = trim( wp_unslash( $_POST[ 'pwd' ] ) );