I18N: Always pass $locale to load_textdomain().
In [53874] the optional `$locale` parameter was added to `load_textdomain()`. While most `load_textdomain()` calls in core were were updated, some were missed. Passing the original locale avoids the need to call `determine_locale()` by `load_textdomain()` which is used as a fallback. Props ocean90, swissspidy, desrosj. See #57060. Built from https://develop.svn.wordpress.org/trunk@54797 git-svn-id: http://core.svn.wordpress.org/trunk@54349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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' );
|
||||
load_textdomain( 'default', $location . '/' . $locale . '.mo', $locale );
|
||||
if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) {
|
||||
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' );
|
||||
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo', $locale );
|
||||
}
|
||||
break 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user