mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Fix wp.i18n.isRTL()
Fixes a bug causing wp.i18n.isRTL() to return false in RTL langauges by manually loading the translated 'ltr' string for the i18n dependency. This ports over an identical fix that was made in Gutenberg. Fixes #52441. Props @jonsurrell @youknowriad. git-svn-id: https://develop.svn.wordpress.org/trunk@50259 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -723,6 +723,9 @@ JS;
|
||||
$expected .= "<script type='text/javascript' src='/wp-includes/js/dist/dom-ready{$suffix}.js' id='wp-dom-ready-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' src='/wp-includes/js/dist/hooks{$suffix}.js' id='wp-hooks-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' src='/wp-includes/js/dist/i18n{$suffix}.js' id='wp-i18n-js'></script>\n";
|
||||
$expected .= "<script type='text/javascript' id='wp-i18n-js-after'>\n";
|
||||
$expected .= "wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } );\n";
|
||||
$expected .= "</script>\n";
|
||||
$expected .= "<script type='text/javascript' id='wp-a11y-js-translations'>\n";
|
||||
$expected .= "( function( domain, translations ) {\n";
|
||||
$expected .= " var localeData = translations.locale_data[ domain ] || translations.locale_data.messages;\n";
|
||||
|
||||
Reference in New Issue
Block a user