WordPress.org

Make WordPress Core

Changeset 5167


Ignore:
Timestamp:
04/01/2007 04:06:19 PM (11 years ago)
Author:
ryan
Message:

i18n for quicktags.js. Props Nazgul. fixes #3958

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/quicktags.js

    r3517 r5167  
    169169
    170170function edShowLinks() {
    171     var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected>(Quick Links)</option>';
     171    var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected>' + quicktagsL10n.quickLinks + '</option>';
    172172    for (i = 0; i < edLinks.length; i++) {
    173173        tempStr += '<option value="' + i + '">' + edLinks[i].display + '</option>';
     
    249249    }
    250250    if (word == '') {
    251         word = prompt('Enter a word to look up:', '');
     251        word = prompt(quicktagsL10n.wordLookup, '');
    252252    }
    253253    if (word !== null && /^\w[\w ]*$/.test(word)) {
     
    261261        edShowButton(edButtons[i], i);
    262262    }
    263     document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="Dictionary lookup" value="lookup" />');
    264     document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="Close all open tags" value="Close Tags" />');
     263    document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="' + quicktagsL10n.dictionaryLookup + '" value="' + quicktagsL10n.lookup + '" />');
     264    document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="' + quicktagsL10n.closeAllOpenTags + '" value="' + quicktagsL10n.closeTags + '" />');
    265265//  edShowLinks(); // disabled by default
    266266    document.write('</div>');
     
    367367    }
    368368    if (!edCheckOpenTags(i)) {
    369         var URL = prompt('Enter the URL' ,defaultValue);
     369        var URL = prompt(quicktagsL10n.enterURL, defaultValue);
    370370        if (URL) {
    371371            edButtons[i].tagStart = '<a href="' + URL + '">';
     
    379379
    380380function edInsertImage(myField) {
    381     var myValue = prompt('Enter the URL of the image', 'http://');
     381    var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
    382382    if (myValue) {
    383383        myValue = '<img src="'
    384384                + myValue
    385                 + '" alt="' + prompt('Enter a description of the image', '')
     385                + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
    386386                + '" />';
    387387        edInsertContent(myField, myValue);
  • trunk/wp-includes/script-loader.php

    r5145 r5167  
    1414        $this->add( 'fat', '/wp-includes/js/fat.js', false, '1.0-RC1_3660' );
    1515        $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
    16         $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' );
     16        $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3958' );
     17        $this->localize( 'quicktags', 'quicktagsL10n', array(
     18            'quickLinks' => __('(Quick Links)'),
     19            'wordLookup' => __('Enter a word to look up:'),
     20            'dictionaryLookup' => attribute_escape(__('Dictionary lookup')),
     21            'lookup' => attribute_escape(__('lookup')),
     22            'closeAllOpenTags' => attribute_escape(__('Close all open tags')),
     23            'closeTags' => attribute_escape(__('close tags')),
     24            'enterURL' => __('Enter the URL'),
     25            'enterImageURL' => __('Enter the URL of the image'),
     26            'enterImageDescription' => __('Enter a description of the image')
     27        ) );
    1728        $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
    1829        $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20070326' );
Note: See TracChangeset for help on using the changeset viewer.