l10n: Ensure JavaScript language packages are loaded for the user locale.

`load_script_textdomain()` had a reversed check to decide if the user locale should be loaded. This check is now replaced with `determine_local()`.

Props ocean90.

Merges [43959] into trunk.

Fixes #45465.
Built from https://develop.svn.wordpress.org/trunk@44278


git-svn-id: http://core.svn.wordpress.org/trunk@44108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2018-12-17 19:36:52 +00:00
parent e188e2d3a3
commit d92ccd83a0
2 changed files with 2 additions and 2 deletions

View File

@ -913,7 +913,7 @@ function load_script_textdomain( $handle, $domain, $path = null ) {
global $wp_scripts;
$path = untrailingslashit( $path );
$locale = is_admin() ? get_locale() : get_user_locale();
$locale = determine_locale();
// If a path was given and the handle file exists simply return it.
$file_base = $domain === 'default' ? $locale : $domain . '-' . $locale;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44277';
$wp_version = '5.1-alpha-44278';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.