Media: Further improvements to the handling of language codes that get passed to MediaElement.
This change means that only the leading portion of a locale code gets passed to MediaElement, removing problems that arise from locales such as `de_DE_formal` and `pt_PT_ao90`. Props erich_k4wp, blobfolio, flixos90, ocean90, joemcgill, SergeyBiryukov. Fixes #42574 Built from https://develop.svn.wordpress.org/trunk@42251 git-svn-id: http://core.svn.wordpress.org/trunk@42080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9b68e59534
commit
d8a995fc15
|
@ -357,7 +357,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1);
|
||||
|
||||
did_action( 'init' ) && $scripts->add_inline_script( 'mediaelement-core', sprintf( 'var mejsL10n = %s;', wp_json_encode( array(
|
||||
'language' => strtolower( str_replace( '_', '-', is_admin() ? get_user_locale() : get_locale() ) ),
|
||||
'language' => strtolower( strtok( is_admin() ? get_user_locale() : get_locale(), '_-' ) ),
|
||||
'strings' => array(
|
||||
'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ),
|
||||
'mejs.fullscreen-off' => __( 'Turn off Fullscreen' ),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42250';
|
||||
$wp_version = '5.0-alpha-42251';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue