Make WordPress Core

Changeset 4605


Ignore:
Timestamp:
12/05/2006 02:29:45 AM (20 years ago)
Author:
ryan
Message:

upload-js gettext. Props nbachiyski. fixes #3224

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r4595 r4605  
    20342034        </tr>
    20352035        <tr>
    2036                 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to file' ); ?></th>
     2036                <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th>
    20372037                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td>
    20382038        </tr>
  • trunk/wp-admin/upload-js.php

    r4535 r4605  
    7373                                params.ID = '';
    7474                                params.action = '';
    75                                 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='Browse your files' class='back'>&laquo; Back</a>";
    76                         } else {
    77                                 h += "<a href='#' onclick='return theFileList.cancelView();'  title='Browse your files' class='back'>&laquo; Back</a>";
     75                                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>echo wp_specialchars(__('&laquo; Back'), 1);</a>";
     76                        } else {
     77                                h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1) ?></a>";
    7878                        }
    7979                        h += "<div id='file-title'>"
    8080                        if ( !this.currentImage.isImage )
    81                                 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>" + this.currentImage.title + "</a></h2>";
     81                                h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>" + this.currentImage.title + "</a></h2>";
    8282                        else
    8383                                h += "<h2>" + this.currentImage.title + "</h2>";
    8484                        h += " &#8212; <span>";
    85                         h += "<a href='#' onclick='return theFileList.editView(" + id + ");'>Edit</a>"
     85                        h += "<a href='#' onclick='return theFileList.editView(" + id + ");'><?php echo wp_specialchars(__('Edit'), 1); ?></a>"
    8686                        h += "</span>";
    8787                        h += '</div>'
    8888                        h += "<div id='upload-file-view' class='alignleft'>";
    8989                        if ( this.currentImage.isImage ) {
    90                                 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='Direct link to file'>";
     90                                h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>>";
    9191                                h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
    9292                                h += "</a>";
     
    9898                        h += "<table>";
    9999                        if ( this.currentImage.thumb ) {
    100                                 h += "<tr><th style='padding-bottom:.5em'><?php echo js_escape(__('Show:')); ?></th><td style='padding-bottom:.5em'>";
    101                                 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo js_escape(__('Thumbnail')); ?></label><br />";
    102                                 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo js_escape(__('Full size')); ?></label>";
     100                                h += "<tr><th style='padding-bottom:.5em'><?php echo wp_specialchars(__('Show:'), 1); ?></th><td style='padding-bottom:.5em'>";
     101                                h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo wp_specialchars(__('Thumbnail'), 1); ?></label><br />";
     102                                h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo wp_specialchars(__('Full size'), 1); ?></label>";
    103103                                h += "</td></tr>";
    104104                        }
    105105
    106                         h += "<tr><th><?php echo js_escape(__('Link to:')); ?></th><td>";
    107                         h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo js_escape(__('File')); ?></label><br />";
    108                         h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo js_escape(__('Page')); ?></label><br />";
    109                         h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo js_escape(__('None')); ?></label>";
     106                        h += "<tr><th><?php echo wp_specialchars(__('Link to:'), 1); ?></th><td>";
     107                        h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo wp_specialchars(__('File'), 1); ?></label><br />";
     108                        h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo wp_specialchars(__('Page'), 1); ?></label><br />";
     109                        h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo wp_specialchars(__('None'), 1); ?></label>";
    110110                        h += "</td></tr>";
    111111
    112112                        h += "<tr><td colspan='2'><p class='submit'>";
    113                         h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo js_escape(__('Send to editor &raquo;')); ?>' />";
     113                        h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo wp_specialchars(__('Send to editor &raquo;'), 1); ?>' />";
    114114                        h += "</p></td></tr></table>";
    115115                        h += "</form>";
     
    135135                                params.ID = '';
    136136                                params.action = '';
    137                                 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'  title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>&laquo;  <?php echo js_escape(__('Back')); ?></a>";
    138                         } else {
    139                                 h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>&laquo; <?php echo js_escape(__('Back')); ?></a>";
     137                                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>&laquo;  <?php echo wp_specialchars(__('Back'), 1); ?></a>";
     138                        } else {
     139                                h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>&laquo; <?php echo wp_specialchars(__('Back'), 1); ?></a>";
    140140                        }
    141141                        h += "<div id='file-title'>"
    142142                        if ( !this.currentImage.isImage )
    143                                 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";
     143                                h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>" + this.currentImage.title + "</a></h2>";
    144144                        else
    145145                                h += "<h2>" + this.currentImage.title + "</h2>";
    146146                        h += " &#8212; <span>";
    147                         h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php js_escape(__('Insert')); ?></a>"
     147                        h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php wp_specialchars(__('Insert'), 1); ?></a>"
    148148                        h += "</span>";
    149149                        h += '</div>'
    150150                        h += "<div id='upload-file-view' class='alignleft'>";
    151151                        if ( this.currentImage.isImage ) {
    152                                 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>";
     152                                h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file')); ?>'>";
    153153                                h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
    154154                                h += "</a>";
     
    159159
    160160                        h += "<table><col /><col class='widefat' /><tr>"
    161                         h += "<th scope='row'><label for='url'><?php echo js_escape(__('URL')); ?></label></th>";
     161                        h += "<th scope='row'><label for='url'><?php echo wp_specialchars(__('URL'), 1); ?></label></th>";
    162162                        h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.srcBase + this.currentImage.src + "' readonly='readonly' /></td>";
    163163                        h += "</tr><tr>";
    164                         h += "<th scope='row'><label for='post_title'><?php echo js_escape(__('Title')); ?></label></th>";
     164                        h += "<th scope='row'><label for='post_title'><?php echo wp_specialchars(__('Title'), 1); ?></label></th>";
    165165                        h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>";
    166166                        h += "</tr><tr>";
    167                         h += "<th scope='row'><label for='post_content'><?php echo js_escape(__('Description')); ?></label></th>";
     167                        h += "<th scope='row'><label for='post_content'><?php echo wp_specialchars(__('Description'), 1); ?></label></th>";
    168168                        h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>";
    169                         h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo js_escape(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />";
     169                        h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo wp_specialchars(__('Delete File'), 1); ?>' onclick='theFileList.deleteFile(" + id + ");' />";
    170170                        h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />";
    171171                        h += "<input type='hidden' name='action' id='action-value' value='save' />";
    172172                        h += "<input type='hidden' name='ID' value='" + id + "' />";
    173173                        h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />";
    174                         h += "<div class='submit'><input type='submit' value='<?php echo js_escape(__('Save &raquo;')); ?>' /></div>";
     174                        h += "<div class='submit'><input type='submit' value='<?php echo wp_specialchars(__('Save &raquo;'), 1); ?>' /></div>";
    175175                        h += "</td></tr></table></form>";
    176176
     
    245245
    246246                deleteFile: function(id) {
    247                         if ( confirm("<?php printf(js_escape(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") ) {
     247                        if ( confirm("<?php printf(wp_specialchars(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back."), 1), '" + this.currentImage.title + "'); ?>") ) {
    248248                                $('action-value').value = 'delete';
    249249                                $('upload-file').submit();
Note: See TracChangeset for help on using the changeset viewer.