Translator documentation updated.

Whitespace updates.
This commit is contained in:
Siebrand Mazeland 2011-06-17 15:41:45 +02:00
parent dbde94fc34
commit 59ee7e0f5b
3 changed files with 22 additions and 13 deletions

View File

@ -88,34 +88,38 @@ class Queued_XMPP extends XMPPHP_XMPP
*/ */
public function connect($timeout = 30, $persistent = false, $sendinit = true) public function connect($timeout = 30, $persistent = false, $sendinit = true)
{ {
throw new Exception("Can't connect to server from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot connect to server from fake XMPP.');
} }
public function disconnect() public function disconnect()
{ {
throw new Exception("Can't connect to server from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot connect to server from fake XMPP.');
} }
public function process() public function process()
{ {
throw new Exception("Can't read stream from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot read stream from fake XMPP.');
} }
public function processUntil($event, $timeout=-1) public function processUntil($event, $timeout=-1)
{ {
throw new Exception("Can't read stream from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot read stream from fake XMPP.');
} }
public function read() public function read()
{ {
throw new Exception("Can't read stream from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot read stream from fake XMPP.');
} }
public function readyToProcess() public function readyToProcess()
{ {
throw new Exception("Can't read stream from fake XMPP."); // No i18n needed. Test message.
throw new Exception('Cannot read stream from fake XMPP.');
} }
//@} //@}
} }

View File

@ -402,16 +402,20 @@ class XmppPlugin extends ImPlugin
*/ */
function queuedConnection(){ function queuedConnection(){
if(!isset($this->server)){ if(!isset($this->server)){
throw new Exception("must specify a server"); // TRANS: Exception thrown when the plugin configuration is incorrect.
throw new Exception(_m('You must specify a server in the configuration.'));
} }
if(!isset($this->port)){ if(!isset($this->port)){
throw new Exception("must specify a port"); // TRANS: Exception thrown when the plugin configuration is incorrect.
throw new Exception(_m('You must specify a port in the configuration.'));
} }
if(!isset($this->user)){ if(!isset($this->user)){
throw new Exception("must specify a user"); // TRANS: Exception thrown when the plugin configuration is incorrect.
throw new Exception(_m('You must specify a user in the configuration.'));
} }
if(!isset($this->password)){ if(!isset($this->password)){
throw new Exception("must specify a password"); // TRANS: Exception thrown when the plugin configuration is incorrect.
throw new Exception(_m('You must specify a password in the configuration.'));
} }
return new Queued_XMPP($this, $this->host ? return new Queued_XMPP($this, $this->host ?
@ -436,6 +440,7 @@ class XmppPlugin extends ImPlugin
'author' => 'Craig Andrews, Evan Prodromou', 'author' => 'Craig Andrews, Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:XMPP', 'homepage' => 'http://status.net/wiki/Plugin:XMPP',
'rawdescription' => 'rawdescription' =>
// TRANS: Plugin description.
_m('The XMPP plugin allows users to send and receive notices over the XMPP/Jabber network.')); _m('The XMPP plugin allows users to send and receive notices over the XMPP/Jabber network.'));
return true; return true;
} }

View File

@ -245,7 +245,7 @@ class XmppManager extends ImManager
function special_presence($type, $to=null, $show=null, $status=null) function special_presence($type, $to=null, $show=null, $status=null)
{ {
// FIXME: why use this instead of send_presence()? // @todo FIXME: why use this instead of send_presence()?
$this->connect(); $this->connect();
if (!$this->conn || $this->conn->isDisconnected()) { if (!$this->conn || $this->conn->isDisconnected()) {
return false; return false;