WordPress.org

Make WordPress Core

Changeset 5114


Ignore:
Timestamp:
03/26/2007 10:05:36 PM (13 years ago)
Author:
ryan
Message:

Fallback to loading english for tinyMCE if requested locale is not there. see #3882

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r5108 r5114  
    120120
    121121    // Add core languages
     122    $lang_content = '';
    122123    foreach ($languages as $lang)
    123         $content .= getFileContents("langs/" . $lang . ".js");
     124        $lang_content .= getFileContents("langs/" . $lang . ".js");
     125    if ( empty($lang_content) )
     126        $lang_content .= getFileContents("langs/en.js");
     127    $content .= $lang_content;
    124128
    125129    // Add themes
     
    127131        $content .= wp_compact_tinymce_js(getFileContents( "themes/" . $theme . "/editor_template" . $suffix . ".js"));
    128132
     133        $lang_content = '';
    129134        foreach ($languages as $lang)
    130             $content .= getFileContents("themes/" . $theme . "/langs/" . $lang . ".js");
     135            $lang_content .= getFileContents("themes/" . $theme . "/langs/" . $lang . ".js");
     136        if ( empty($lang_content) )
     137            $lang_content .= getFileContents("themes/" . $theme . "/langs/en.js");
     138        $content .= $lang_content;
    131139    }
    132140
     
    135143        $content .= getFileContents("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js");
    136144
     145        $lang_content = '';
    137146        foreach ($languages as $lang)
    138             $content .= getFileContents("plugins/" . $plugin . "/langs/" . $lang . ".js");
     147            $lang_content .= getFileContents("plugins/" . $plugin . "/langs/" . $lang . ".js");
     148        if ( empty($lang_content) )
     149            $lang_content .= getFileContents("plugins/" . $plugin . "/langs/en.js");
     150        $content .= $lang_content;
    139151    }
    140152
  • trunk/wp-includes/script-loader.php

    r5108 r5114  
    1616        $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' );
    1717        $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
    18         $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070325' );
     18        $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070326' );
    1919        $mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
    2020        $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' );
Note: See TracChangeset for help on using the changeset viewer.