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

props ocean90.
fixes #29452.

git-svn-id: https://develop.svn.wordpress.org/trunk@29669 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-09-02 08:09:56 +00:00
parent fb8548fd48
commit 21aa7259c4
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' ] ) );