TinyMCE: Always load translations, even in English, as we modify some strings.
Move a setting to after the translations filter, and remove unused strings. see #24067. git-svn-id: https://develop.svn.wordpress.org/trunk@28112 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7c57669ec2
commit
e1c90794e5
@ -754,13 +754,6 @@ final class _WP_Editors {
|
||||
// Default TinyMCE strings
|
||||
'New document' => __( 'New document' ),
|
||||
'Formats' => _x( 'Formats', 'TinyMCE' ),
|
||||
'Headers' => _x( 'Headings', 'TinyMCE' ),
|
||||
'Header 1' => __( 'Heading 1' ),
|
||||
'Header 2' => __( 'Heading 2' ),
|
||||
'Header 3' => __( 'Heading 3' ),
|
||||
'Header 4' => __( 'Heading 4' ),
|
||||
'Header 5' => __( 'Heading 5' ),
|
||||
'Header 6' => __( 'Heading 6' ),
|
||||
|
||||
'Headings' => _x( 'Headings', 'TinyMCE' ),
|
||||
'Heading 1' => __( 'Heading 1' ),
|
||||
@ -983,11 +976,6 @@ final class _WP_Editors {
|
||||
$baseurl = self::$baseurl;
|
||||
$mce_locale = self::$mce_locale;
|
||||
|
||||
// Set direction
|
||||
if ( is_rtl() ) {
|
||||
$mce_translation['_dir'] = 'rtl';
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter translated strings prepared for TinyMCE.
|
||||
*
|
||||
@ -1004,6 +992,11 @@ final class _WP_Editors {
|
||||
}
|
||||
}
|
||||
|
||||
// Set direction
|
||||
if ( is_rtl() ) {
|
||||
$mce_translation['_dir'] = 'rtl';
|
||||
}
|
||||
|
||||
return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
|
||||
"tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
|
||||
}
|
||||
@ -1097,8 +1090,7 @@ final class _WP_Editors {
|
||||
echo "<script type='text/javascript' src='{$baseurl}/plugins/compat3x/plugin{$suffix}.js?$version'></script>\n";
|
||||
}
|
||||
|
||||
if ( 'en' != self::$mce_locale )
|
||||
echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
|
||||
echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
|
||||
|
||||
if ( self::$ext_plugins ) {
|
||||
// Load the old-format English strings to prevent unsightly labels in old style popups
|
||||
|
Loading…
Reference in New Issue
Block a user