Make WordPress Core

Ticket #2070: i18n-list-manip.diff

File i18n-list-manip.diff, 2.5 KB (added by nbachiyski, 19 years ago)
  • wp-admin/list-manipulation.js

    old new  
     1<?php
     2        require_once '../wp-config.php';
     3        header('Content-Type: text/javascript; charset=utf-8');
     4?>
     5
    16var listItems;
    27var reg_color = '#FFFFFF';
    38var alt_color = '#F1F1F1';
     
    611
    712function deleteSomething( what, id, message ) {
    813        what.replace('-', ' ');
    9         if (!message) message = 'Are you sure you want to delete this ' + what + '?';
     14        if (!message) message = '<?php echo addslashes(__('Are you sure you want to delete this')); ?>' + ' ' + what + '?';
    1015        if ( confirm(message) ) {
    1116                return ajaxDelete( what.replace(' ', '-'), id );
    1217        } else {
     
    2934        if ( ajaxDel.failed ) return true;
    3035        ajaxDel.myResponseElement = getResponseElement();
    3136        ajaxDel.method = 'POST';
    32         ajaxDel.onLoading = function() { ajaxDel.myResponseElement.innerHTML = 'Sending Data...'; };
    33         ajaxDel.onLoaded = function() { ajaxDel.myResponseElement.innerHTML = 'Data Sent...'; };
    34         ajaxDel.onInteractive = function() { ajaxDel.myResponseElement.innerHTML = 'Processing Data...'; };
     37        ajaxDel.onLoading = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>';};
     38                ajaxDel.onLoaded = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>'; };
     39                        ajaxDel.onInteractive = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Processing Data...')); ?>'; };
    3540        ajaxDel.onCompletion = function() { removeThisItem( what + '-' + id ); };
    3641        ajaxDel.runAJAX('action=delete-' + what + '&id=' + id);
    3742        return false;
     
    4146        var response = ajaxDel.response;
    4247        if ( isNaN(response) ) { alert(response); }
    4348        response = parseInt(response, 10);
    44         if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = "You don't have permission to do that."; }
    45         else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "Something odd happened.  Try refreshing the page? Either that or what you tried to delete never existed in the first place."; }
     49        if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>"; }
     50                else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "<?php echo addslashes(__('Something odd happened.  Try refreshing the page? Either that or what you tried to delete never existed in the first place.')); ?>"; }
    4651        else if ( 1 == response ) {
    4752                theItem = document.getElementById(id);
    4853                Fat.fade_element(id,null,700,'#FF3333');