Ticket #17144: 17144.i18n.patch
File 17144.i18n.patch, 2.6 KB (added by , 13 years ago) |
---|
-
wp-includes/js/tinymce/langs/wp-langs.php
2 2 3 3 // escape text only if it needs translating 4 4 function mce_escape($text) { 5 global $ language;5 global $wp_editor; 6 6 7 if ( 'en' == $ language )7 if ( 'en' == $wp_editor->mce_locale ) 8 8 return $text; 9 9 else 10 10 return esc_js($text); 11 11 } 12 12 13 $lang = 'tinyMCE.addI18n({' . $ language . ':{13 $lang = 'tinyMCE.addI18n({' . $this->mce_locale . ':{ 14 14 common:{ 15 15 edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '", 16 16 apply:"' . mce_escape( __('Apply') ) . '", … … 232 232 } 233 233 }}); 234 234 235 tinyMCE.addI18n("' . $ language . '.advanced",{235 tinyMCE.addI18n("' . $this->mce_locale . '.advanced",{ 236 236 style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '", 237 237 font_size:"' . mce_escape( __('Font size') ) . '", 238 238 fontdefault:"' . mce_escape( __('Font family') ) . '", … … 298 298 toolbar:"' . mce_escape( __('Toolbar') ) . '" 299 299 }); 300 300 301 tinyMCE.addI18n("' . $ language . '.advanced_dlg",{301 tinyMCE.addI18n("' . $this->mce_locale . '.advanced_dlg",{ 302 302 about_title:"' . mce_escape( __('About TinyMCE') ) . '", 303 303 about_general:"' . mce_escape( __('About') ) . '", 304 304 about_help:"' . mce_escape( __('Help') ) . '", … … 352 352 accessibility_usage_title:"' . mce_escape( __('General Usage') ) . '" 353 353 }); 354 354 355 tinyMCE.addI18n("' . $ language . '.media_dlg",{355 tinyMCE.addI18n("' . $this->mce_locale . '.media_dlg",{ 356 356 title:"' . mce_escape( __('Insert / edit embedded media') ) . '", 357 357 general:"' . mce_escape( __('General') ) . '", 358 358 advanced:"' . mce_escape( __('Advanced') ) . '", … … 462 462 source:"' . mce_escape( __('Source') ) . '" 463 463 }); 464 464 465 tinyMCE.addI18n("' . $ language . '.wordpress",{465 tinyMCE.addI18n("' . $this->mce_locale . '.wordpress",{ 466 466 wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink') ) . ' (Alt+Shift+Z)", 467 467 wp_more_desc:"' . mce_escape( __('Insert More Tag') ) . ' (Alt+Shift+T)", 468 468 wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)", … … 477 477 delgallery:"' . mce_escape( __('Delete Gallery') ) . '" 478 478 }); 479 479 480 tinyMCE.addI18n("' . $ language . '.wpeditimage",{480 tinyMCE.addI18n("' . $this->mce_locale . '.wpeditimage",{ 481 481 edit_img:"' . mce_escape( __('Edit Image') ) . '", 482 482 del_img:"' . mce_escape( __('Delete Image') ) . '", 483 483 adv_settings:"' . mce_escape( __('Advanced Settings') ) . '",