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.

Built from https://develop.svn.wordpress.org/trunk@28112


git-svn-id: http://core.svn.wordpress.org/trunk@27943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-14 03:23:15 +00:00
parent 9c2a27129c
commit 5ab50ba7d5
1 changed files with 6 additions and 14 deletions

View File

@ -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