I18N: Revert [54795] from the 6.1 branch.

This will be added again once committed to trunk first.

See #57060.
Built from https://develop.svn.wordpress.org/branches/6.1@54796


git-svn-id: http://core.svn.wordpress.org/branches/6.1@54348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2022-11-10 19:36:12 +00:00
parent 78f74518f1
commit 0609e60b70
5 changed files with 6 additions and 8 deletions

View File

@ -13,9 +13,7 @@ if ( ! defined( 'WP_ADMIN' ) ) {
* some setup was skipped. Make sure the admin message catalog is loaded since
* load_default_textdomain() will not have done so in this context.
*/
$admin_locale = get_locale();
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . $admin_locale . '.mo', $admin_locale );
unset( $admin_locale );
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' );
}
/** WordPress Administration Hooks */

View File

@ -6347,7 +6347,7 @@ function wp_timezone_choice( $selected_zone, $locale = null ) {
$locale_loaded = $locale ? $locale : get_locale();
$mofile = WP_LANG_DIR . '/continents-cities-' . $locale_loaded . '.mo';
unload_textdomain( 'continents-cities' );
load_textdomain( 'continents-cities', $mofile, $locale_loaded );
load_textdomain( 'continents-cities', $mofile );
$mo_loaded = true;
}

View File

@ -1392,9 +1392,9 @@ function wp_load_translations_early() {
foreach ( $locales as $locale ) {
foreach ( $locations as $location ) {
if ( file_exists( $location . '/' . $locale . '.mo' ) ) {
load_textdomain( 'default', $location . '/' . $locale . '.mo', $locale );
load_textdomain( 'default', $location . '/' . $locale . '.mo' );
if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) {
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo', $locale );
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' );
}
break 2;
}

View File

@ -336,7 +336,7 @@ class WP_REST_Site_Health_Controller extends WP_REST_Controller {
// Accounts for inner REST API requests in the admin.
if ( ! is_admin() ) {
$locale = determine_locale();
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo", $locale );
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
}
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1.1-alpha-54795';
$wp_version = '6.1.1-alpha-54796';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.