Make WordPress Core

Ticket #17144: 17144.i18n.patch

File 17144.i18n.patch, 2.6 KB (added by SergeyBiryukov, 13 years ago)
  • wp-includes/js/tinymce/langs/wp-langs.php

     
    22
    33// escape text only if it needs translating
    44function mce_escape($text) {
    5         global $language;
     5        global $wp_editor;
    66
    7         if ( 'en' == $language )
     7        if ( 'en' == $wp_editor->mce_locale )
    88                return $text;
    99        else
    1010                return esc_js($text);
    1111}
    1212
    13 $lang = 'tinyMCE.addI18n({' . $language . ':{
     13$lang = 'tinyMCE.addI18n({' . $this->mce_locale . ':{
    1414common:{
    1515edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '",
    1616apply:"' . mce_escape( __('Apply') ) . '",
     
    232232}
    233233}});
    234234
    235 tinyMCE.addI18n("' . $language . '.advanced",{
     235tinyMCE.addI18n("' . $this->mce_locale . '.advanced",{
    236236style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '",
    237237font_size:"' . mce_escape( __('Font size') ) . '",
    238238fontdefault:"' . mce_escape( __('Font family') ) . '",
     
    298298toolbar:"' . mce_escape( __('Toolbar') ) . '"
    299299});
    300300
    301 tinyMCE.addI18n("' . $language . '.advanced_dlg",{
     301tinyMCE.addI18n("' . $this->mce_locale . '.advanced_dlg",{
    302302about_title:"' . mce_escape( __('About TinyMCE') ) . '",
    303303about_general:"' . mce_escape( __('About') ) . '",
    304304about_help:"' . mce_escape( __('Help') ) . '",
     
    352352accessibility_usage_title:"' . mce_escape( __('General Usage') ) . '"
    353353});
    354354
    355 tinyMCE.addI18n("' . $language . '.media_dlg",{
     355tinyMCE.addI18n("' . $this->mce_locale . '.media_dlg",{
    356356title:"' . mce_escape( __('Insert / edit embedded media') ) . '",
    357357general:"' . mce_escape( __('General') ) . '",
    358358advanced:"' . mce_escape( __('Advanced') ) . '",
     
    462462source:"' . mce_escape( __('Source') ) . '"
    463463});
    464464
    465 tinyMCE.addI18n("' . $language . '.wordpress",{
     465tinyMCE.addI18n("' . $this->mce_locale . '.wordpress",{
    466466wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink') )  . ' (Alt+Shift+Z)",
    467467wp_more_desc:"' . mce_escape( __('Insert More Tag') ) . ' (Alt+Shift+T)",
    468468wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)",
     
    477477delgallery:"' . mce_escape( __('Delete Gallery') ) . '"
    478478});
    479479
    480 tinyMCE.addI18n("' . $language . '.wpeditimage",{
     480tinyMCE.addI18n("' . $this->mce_locale . '.wpeditimage",{
    481481edit_img:"' . mce_escape( __('Edit Image') )  . '",
    482482del_img:"' . mce_escape( __('Delete Image') )  . '",
    483483adv_settings:"' . mce_escape( __('Advanced Settings') )  . '",