Skip to content
Permalink
Browse files

l10n: Ensure JavaScript language packages are loaded for the user loc…

…ale.

`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.
See #45465.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43959 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
pento committed Dec 4, 2018
1 parent 764de9f commit d09e22ff417f161046576011a1492c75661a6282
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/wp-includes/l10n.php
@@ -889,7 +889,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;

0 comments on commit d09e22f

Please sign in to comment.
You can’t perform that action at this time.