Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 5545)
+++ xmlrpc.php	(working copy)
@@ -970,14 +970,12 @@
 			switch($post_type) {
 				case "post":
 					if(!current_user_can("edit_others_posts")) {
-						return(new IXR_Error(401, "You are not allowed to " .
-							"post as this user"));
+						return(new IXR_Error(401, __("You are not allowed to post as this user")));
 					}
 					break;
 				case "page":
 					if(!current_user_can("edit_others_pages")) {
-						return(new IXR_Error(401, "You are not allowed to " .
-							"create pages as this user"));
+						return(new IXR_Error(401, __("You are not allowed to create pages as this user")));
 					}
 					break;
 				default:
@@ -1156,14 +1154,12 @@
 			switch($post_type) {
 				case "post":
 					if(!current_user_can("edit_others_posts")) {
-						return(new IXR_Error(401, "You are not allowed to " .
-							"change the post author as this user."));
+						return(new IXR_Error(401, __("You are not allowed to change the post author as this user.")));
 					}
 					break;
 				case "page":
 					if(!current_user_can("edit_others_pages")) {
-						return(new IXR_Error(401, "You are not allowed to " .
-							"change the page author as this user."));
+						return(new IXR_Error(401, __("You are not allowed to change the page author as this user.")));
 					}
 					break;
 				default:
@@ -1467,7 +1463,7 @@
 
 		$upload = wp_upload_bits($name, $type, $bits, $overwrite);
 		if ( ! empty($upload['error']) ) {
-			$errorString = 'Could not write file ' . $name . ' (' . $upload['error'] . ')';
+			$errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']);
 			logIO('O', '(MW) ' . $errorString);
 			return new IXR_Error(500, $errorString);
 		}
@@ -1778,7 +1774,7 @@
 			}
 		} else {
 			// TODO: Attempt to extract a post ID from the given URL
-	  		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.');
+	  		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.'));
 		}
 		$post_ID = (int) $post_ID;
 
@@ -1788,14 +1784,14 @@
 		$post = get_post($post_ID);
 
 		if ( !$post ) // Post_ID not found
-	  		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.');
+	  		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.'));
 
 		if ( $post_ID == url_to_postid($pagelinkedfrom) )
 			return new IXR_Error(0, __('The source URL and the target URL cannot both point to the same resource.'));
 
 		// Check if pings are on
 		if ( 'closed' == $post->ping_status )
-	  		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.');
+	  		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.'));
 
 		// Let's check that the remote site didn't already pingback this entry
 		$result = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_ID' AND comment_author_url = '$pagelinkedfrom'");
@@ -1877,7 +1873,7 @@
 		$comment_ID = wp_new_comment($commentdata);
 		do_action('pingback_post', $comment_ID);
 
-		return "Pingback from $pagelinkedfrom to $pagelinkedto registered. Keep the web talking! :-)";
+		return sprintf(__('Pingback from %2$s to %2$s registered. Keep the web talking! :-)'), $pagelinkedfrom, $pagelinkedto);
 	}
 
 
@@ -1895,7 +1891,7 @@
 		$post_ID = url_to_postid($url);
 		if (!$post_ID) {
 			// We aren't sure that the resource is available and/or pingback enabled
-	  		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.');
+	  		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.'));
 		}
 
 		$actual_post = wp_get_single_post($post_ID, ARRAY_A);
Index: wp-app.php
===================================================================
--- wp-app.php	(revision 5545)
+++ wp-app.php	(working copy)
@@ -415,7 +415,7 @@
 		$cap = ($publish) ? 'publish_posts' : 'edit_posts';
 
 		if(!current_user_can($cap))
-			$this->auth_required('Sorry, you do not have the right to edit/publish new posts.');
+			$this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.'));
 
 		$blog_ID = (int ) $blog_id;
 		$post_status = ($publish) ? 'publish' : 'draft';
@@ -433,7 +433,7 @@
 		$postID = wp_insert_post($post_data);
 
 		if (!$postID) {
-			$this->internal_error('Sorry, your entry could not be posted. Something wrong happened.');
+			$this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.'));
 		}
 
 		$output = $this->get_entry($postID);
@@ -472,7 +472,7 @@
 		$this->escape($GLOBALS['entry']);
 
 		if(!current_user_can('edit_post', $entry['ID']))
-			$this->auth_required('Sorry, you do not have the right to edit this post.');
+			$this->auth_required(__('Sorry, you do not have the right to edit this post.'));
 
 		$publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true;
 
@@ -492,7 +492,7 @@
 		$result = wp_update_post($postdata);
 
 		if (!$result) {
-			$this->internal_error('For some strange yet very annoying reason, this post could not be edited.');
+			$this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.'));
 		}
 
 		log_app('function',"put_post($postID)");
@@ -506,7 +506,7 @@
 		$this->set_current_entry($postID);
 
 		if(!current_user_can('edit_post', $postID)) {
-			$this->auth_required('Sorry, you do not have the right to delete this post.');
+			$this->auth_required(__('Sorry, you do not have the right to delete this post.'));
 		}
 
 		if ($entry['post_type'] == 'attachment') {
@@ -515,7 +515,7 @@
 			$result = wp_delete_post($postID);
 
 			if (!$result) {
-				$this->internal_error('For some strange yet very annoying reason, this post could not be deleted.');
+				$this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.'));
 			}
 
 			log_app('function',"delete_post($postID)");
@@ -543,7 +543,7 @@
 		$type = $this->get_accepted_content_type();
 
 		if(!current_user_can('upload_files'))
-			$this->auth_required('You do not have permission to upload files.');
+			$this->auth_required(__('You do not have permission to upload files.'));
 
 		$fp = fopen("php://input", "rb");
 		$bits = NULL;
