Deals with language errors after codeigniter-reactor commit r2307:c43c6dea56fb
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 6c21f11..cd89f8f 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -722,7 +722,7 @@
 	{
 		if ( ! is_array($email))
 		{
-			$this->_set_error_message('email_must_be_array');
+			$this->_set_error_message('lang:email_must_be_array');
 			return FALSE;
 		}
 
@@ -730,7 +730,7 @@
 		{
 			if ( ! $this->valid_email($val))
 			{
-				$this->_set_error_message('email_invalid_address', $val);
+				$this->_set_error_message('lang:email_invalid_address', $val);
 				return FALSE;
 			}
 		}
@@ -1131,7 +1131,7 @@
 
 			if ( ! file_exists($filename))
 			{
-				$this->_set_error_message('email_attachment_missing', $filename);
+				$this->_set_error_message('lang:email_attachment_missing', $filename);
 				return FALSE;
 			}
 
@@ -1146,7 +1146,7 @@
 
 			if ( ! $fp = fopen($filename, FOPEN_READ))
 			{
-				$this->_set_error_message('email_attachment_unreadable', $filename);
+				$this->_set_error_message('lang:email_attachment_unreadable', $filename);
 				return FALSE;
 			}
 
@@ -1353,7 +1353,7 @@
 			( ! isset($this->_bcc_array) AND ! isset($this->_headers['Bcc'])) AND
 			( ! isset($this->_headers['Cc'])))
 		{
-			$this->_set_error_message('email_no_recipients');
+			$this->_set_error_message('lang:email_no_recipients');
 			return FALSE;
 		}
 
@@ -1484,7 +1484,7 @@
 
 					if ( ! $this->_send_with_mail())
 					{
-						$this->_set_error_message('email_send_failure_phpmail');
+						$this->_set_error_message('lang:email_send_failure_phpmail');
 						return FALSE;
 					}
 			break;
@@ -1492,7 +1492,7 @@
 
 					if ( ! $this->_send_with_sendmail())
 					{
-						$this->_set_error_message('email_send_failure_sendmail');
+						$this->_set_error_message('lang:email_send_failure_sendmail');
 						return FALSE;
 					}
 			break;
@@ -1500,14 +1500,14 @@
 
 					if ( ! $this->_send_with_smtp())
 					{
-						$this->_set_error_message('email_send_failure_smtp');
+						$this->_set_error_message('lang:email_send_failure_smtp');
 						return FALSE;
 					}
 			break;
 
 		}
 
-		$this->_set_error_message('email_sent', $this->_get_protocol());
+		$this->_set_error_message('lang:email_sent', $this->_get_protocol());
 		return TRUE;
 	}
 
@@ -1578,8 +1578,8 @@
 
 		if ($status != 0)
 		{
-			$this->_set_error_message('email_exit_status', $status);
-			$this->_set_error_message('email_no_socket');
+			$this->_set_error_message('lang:email_exit_status', $status);
+			$this->_set_error_message('lang:email_no_socket');
 			return FALSE;
 		}
 
@@ -1598,7 +1598,7 @@
 	{
 		if ($this->smtp_host == '')
 		{
-			$this->_set_error_message('email_no_hostname');
+			$this->_set_error_message('lang:email_no_hostname');
 			return FALSE;
 		}
 
@@ -1647,7 +1647,7 @@
 
 		if (strncmp($reply, '250', 3) != 0)
 		{
-			$this->_set_error_message('email_smtp_error', $reply);
+			$this->_set_error_message('lang:email_smtp_error', $reply);
 			return FALSE;
 		}
 
@@ -1674,7 +1674,7 @@
 
 		if ( ! is_resource($this->_smtp_connect))
 		{
-			$this->_set_error_message('email_smtp_error', $errno." ".$errstr);
+			$this->_set_error_message('lang:email_smtp_error', $errno." ".$errstr);
 			return FALSE;
 		}
 
@@ -1737,7 +1737,7 @@
 
 		if (substr($reply, 0, 3) != $resp)
 		{
-			$this->_set_error_message('email_smtp_error', $reply);
+			$this->_set_error_message('lang:email_smtp_error', $reply);
 			return FALSE;
 		}
 
@@ -1766,7 +1766,7 @@
 
 		if ($this->smtp_user == ""  AND  $this->smtp_pass == "")
 		{
-			$this->_set_error_message('email_no_smtp_unpw');
+			$this->_set_error_message('lang:email_no_smtp_unpw');
 			return FALSE;
 		}
 
@@ -1776,7 +1776,7 @@
 
 		if (strncmp($reply, '334', 3) != 0)
 		{
-			$this->_set_error_message('email_failed_smtp_login', $reply);
+			$this->_set_error_message('lang:email_failed_smtp_login', $reply);
 			return FALSE;
 		}
 
@@ -1786,7 +1786,7 @@
 
 		if (strncmp($reply, '334', 3) != 0)
 		{
-			$this->_set_error_message('email_smtp_auth_un', $reply);
+			$this->_set_error_message('lang:email_smtp_auth_un', $reply);
 			return FALSE;
 		}
 
@@ -1796,7 +1796,7 @@
 
 		if (strncmp($reply, '235', 3) != 0)
 		{
-			$this->_set_error_message('email_smtp_auth_pw', $reply);
+			$this->_set_error_message('lang:email_smtp_auth_pw', $reply);
 			return FALSE;
 		}
 
@@ -1815,7 +1815,7 @@
 	{
 		if ( ! fwrite($this->_smtp_connect, $data . $this->newline))
 		{
-			$this->_set_error_message('email_smtp_data_failure', $data);
+			$this->_set_error_message('lang:email_smtp_data_failure', $data);
 			return FALSE;
 		}
 		else
@@ -1942,7 +1942,7 @@
 		$CI =& get_instance();
 		$CI->lang->load('email');
 
-		if (FALSE === ($line = $CI->lang->line($msg)))
+		if (substr($msg, 0, 5) != 'lang:' || FALSE === ($line = $CI->lang->line(substr($msg, 5))))
 		{
 			$this->_debug_msg[] = str_replace('%s', $val, $msg)."<br />";
 		}
@@ -2059,4 +2059,4 @@
 // END CI_Email class
 
 /* End of file Email.php */
-/* Location: ./system/libraries/Email.php */
\ No newline at end of file
+/* Location: ./system/libraries/Email.php */