Changeset 5547
- Timestamp:
- 05/25/2007 03:33:47 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-app.php
r5286 r5547 416 416 417 417 if(!current_user_can($cap)) 418 $this->auth_required( 'Sorry, you do not have the right to edit/publish new posts.');418 $this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.')); 419 419 420 420 $blog_ID = (int ) $blog_id; … … 434 434 435 435 if (!$postID) { 436 $this->internal_error( 'Sorry, your entry could not be posted. Something wrong happened.');436 $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); 437 437 } 438 438 … … 473 473 474 474 if(!current_user_can('edit_post', $entry['ID'])) 475 $this->auth_required( 'Sorry, you do not have the right to edit this post.');475 $this->auth_required(__('Sorry, you do not have the right to edit this post.')); 476 476 477 477 $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true; … … 493 493 494 494 if (!$result) { 495 $this->internal_error( 'For some strange yet very annoying reason, this post could not be edited.');495 $this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.')); 496 496 } 497 497 … … 507 507 508 508 if(!current_user_can('edit_post', $postID)) { 509 $this->auth_required( 'Sorry, you do not have the right to delete this post.');509 $this->auth_required(__('Sorry, you do not have the right to delete this post.')); 510 510 } 511 511 … … 516 516 517 517 if (!$result) { 518 $this->internal_error( 'For some strange yet very annoying reason, this post could not be deleted.');518 $this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.')); 519 519 } 520 520 … … 544 544 545 545 if(!current_user_can('upload_files')) 546 $this->auth_required( 'You do not have permission to upload files.');546 $this->auth_required(__('You do not have permission to upload files.')); 547 547 548 548 $fp = fopen("php://input", "rb"); -
trunk/xmlrpc.php
r5542 r5547 971 971 case "post": 972 972 if(!current_user_can("edit_others_posts")) { 973 return(new IXR_Error(401, "You are not allowed to " . 974 "post as this user")); 973 return(new IXR_Error(401, __("You are not allowed to post as this user"))); 975 974 } 976 975 break; 977 976 case "page": 978 977 if(!current_user_can("edit_others_pages")) { 979 return(new IXR_Error(401, "You are not allowed to " . 980 "create pages as this user")); 978 return(new IXR_Error(401, __("You are not allowed to create pages as this user"))); 981 979 } 982 980 break; … … 1157 1155 case "post": 1158 1156 if(!current_user_can("edit_others_posts")) { 1159 return(new IXR_Error(401, "You are not allowed to " . 1160 "change the post author as this user.")); 1157 return(new IXR_Error(401, __("You are not allowed to change the post author as this user."))); 1161 1158 } 1162 1159 break; 1163 1160 case "page": 1164 1161 if(!current_user_can("edit_others_pages")) { 1165 return(new IXR_Error(401, "You are not allowed to " . 1166 "change the page author as this user.")); 1162 return(new IXR_Error(401, __("You are not allowed to change the page author as this user."))); 1167 1163 } 1168 1164 break; … … 1468 1464 $upload = wp_upload_bits($name, $type, $bits, $overwrite); 1469 1465 if ( ! empty($upload['error']) ) { 1470 $errorString = 'Could not write file ' . $name . ' (' . $upload['error'] . ')';1466 $errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']); 1471 1467 logIO('O', '(MW) ' . $errorString); 1472 1468 return new IXR_Error(500, $errorString); … … 1779 1775 } else { 1780 1776 // TODO: Attempt to extract a post ID from the given URL 1781 return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1777 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.')); 1782 1778 } 1783 1779 $post_ID = (int) $post_ID; … … 1789 1785 1790 1786 if ( !$post ) // Post_ID not found 1791 return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1787 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.')); 1792 1788 1793 1789 if ( $post_ID == url_to_postid($pagelinkedfrom) ) … … 1796 1792 // Check if pings are on 1797 1793 if ( 'closed' == $post->ping_status ) 1798 return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1794 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.')); 1799 1795 1800 1796 // Let's check that the remote site didn't already pingback this entry … … 1878 1874 do_action('pingback_post', $comment_ID); 1879 1875 1880 return "Pingback from $pagelinkedfrom to $pagelinkedto registered. Keep the web talking! :-)";1876 return sprintf(__('Pingback from %1$s to %2$s registered. Keep the web talking! :-)'), $pagelinkedfrom, $pagelinkedto); 1881 1877 } 1882 1878 … … 1896 1892 if (!$post_ID) { 1897 1893 // We aren't sure that the resource is available and/or pingback enabled 1898 return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1894 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.')); 1899 1895 } 1900 1896
Note: See TracChangeset
for help on using the changeset viewer.