mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
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 Merges [42251] to the 4.9 branch. Built from https://develop.svn.wordpress.org/branches/4.9@42252 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0236fd226e
commit
4ae2ee9869
@ -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 = '4.9.1-alpha-42248';
|
||||
$wp_version = '4.9.1-alpha-42252';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user