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.

git-svn-id: https://develop.svn.wordpress.org/trunk@54797 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling
2022-11-10 19:38:20 +00:00
parent e180b742ce
commit 1ab43acf4b
4 changed files with 7 additions and 5 deletions
@@ -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" );
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo", $locale );
}
}