Changeset 5547 for trunk/xmlrpc.php
- Timestamp:
- 05/25/2007 03:33:47 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.