WordPress.org

Make WordPress Core

Changeset 18518


Ignore:
Timestamp:
08/07/11 16:26:31 (3 years ago)
Author:
azaozz
Message:

Fix i18n for wp_editor, props SergeyBiryukov, see #17144

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/langs/wp-langs.php

    r18247 r18518  
    33// escape text only if it needs translating 
    44function mce_escape($text) { 
    5     global $language; 
    6  
    7     if ( 'en' == $language ) 
     5    global $wp_editor; 
     6 
     7    if ( 'en' == $wp_editor->mce_locale ) 
    88        return $text; 
    99    else 
     
    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?') ) . '", 
     
    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') ) . '", 
     
    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') ) . '", 
     
    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') ) . '", 
     
    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)", 
     
    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') )  . '", 
Note: See TracChangeset for help on using the changeset viewer.