Update translator documentation.
Break lines in README at or before 80 characters. i18n fixes. Whitespace updates.
This commit is contained in:
parent
a4c5a0a229
commit
7ad9f23b12
|
@ -83,7 +83,8 @@ class MollomPlugin extends Plugin
|
||||||
);
|
);
|
||||||
$response = $this->mollom('mollom.checkContent', $data);
|
$response = $this->mollom('mollom.checkContent', $data);
|
||||||
if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
|
if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
|
||||||
throw new ClientException(_m("Spam Detected."), 400);
|
// TRANS: Client exception thrown when notice content triggers the spam filter.
|
||||||
|
throw new ClientException(_m('Spam Detected.'), 400);
|
||||||
}
|
}
|
||||||
if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
|
if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
|
||||||
//if unsure, let through
|
//if unsure, let through
|
||||||
|
|
|
@ -46,7 +46,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/ext
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MsnPlugin extends ImPlugin {
|
class MsnPlugin extends ImPlugin {
|
||||||
public $user = null;
|
public $user = null;
|
||||||
public $password = null;
|
public $password = null;
|
||||||
|
@ -59,6 +58,7 @@ class MsnPlugin extends ImPlugin {
|
||||||
* @return string Name of service
|
* @return string Name of service
|
||||||
*/
|
*/
|
||||||
public function getDisplayName() {
|
public function getDisplayName() {
|
||||||
|
// TRANS: Display name of the MSN instant messaging service.
|
||||||
return _m('MSN');
|
return _m('MSN');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,13 +184,16 @@ class MsnPlugin extends ImPlugin {
|
||||||
*/
|
*/
|
||||||
public function initialize() {
|
public function initialize() {
|
||||||
if (!isset($this->user)) {
|
if (!isset($this->user)) {
|
||||||
throw new Exception("Must specify a user");
|
// TRANS: Exception thrown when configuration for the MSN plugin is incomplete.
|
||||||
|
throw new Exception(_m('Must specify a user.'));
|
||||||
}
|
}
|
||||||
if (!isset($this->password)) {
|
if (!isset($this->password)) {
|
||||||
throw new Exception("Must specify a password");
|
// TRANS: Exception thrown when configuration for the MSN plugin is incomplete.
|
||||||
|
throw new Exception(_m('Must specify a password.'));
|
||||||
}
|
}
|
||||||
if (!isset($this->nickname)) {
|
if (!isset($this->nickname)) {
|
||||||
throw new Exception("Must specify a nickname");
|
// TRANS: Exception thrown when configuration for the MSN plugin is incomplete.
|
||||||
|
throw new Exception(_m('Must specify a nickname.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -209,6 +212,7 @@ class MsnPlugin extends ImPlugin {
|
||||||
'author' => 'Luke Fitzgerald',
|
'author' => 'Luke Fitzgerald',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:MSN',
|
'homepage' => 'http://status.net/wiki/Plugin:MSN',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('The MSN plugin allows users to send and receive notices over the MSN network.')
|
_m('The MSN plugin allows users to send and receive notices over the MSN network.')
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -9,9 +9,10 @@ add "addPlugin('msn',
|
||||||
array('setting'=>'value', 'setting2'=>'value2', ...);"
|
array('setting'=>'value', 'setting2'=>'value2', ...);"
|
||||||
to the bottom of your config.php
|
to the bottom of your config.php
|
||||||
|
|
||||||
scripts/imdaemon.php included with StatusNet must be running. It will be started by
|
scripts/imdaemon.php included with StatusNet must be running. It will be started
|
||||||
the plugin along with their other daemons when you run scripts/startdaemons.sh.
|
by the plugin along with their other daemons when you run
|
||||||
See the StatusNet README for more about queuing and daemons.
|
scripts/startdaemons.sh. See the StatusNet README for more about queuing and
|
||||||
|
daemons.
|
||||||
|
|
||||||
Settings
|
Settings
|
||||||
========
|
========
|
||||||
|
@ -29,4 +30,3 @@ addPlugin('msn', array(
|
||||||
'password' => '...',
|
'password' => '...',
|
||||||
'nickname' => '...'
|
'nickname' => '...'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
* In a multi-site queuedaemon.php run, one connection will be instantiated
|
* In a multi-site queuedaemon.php run, one connection will be instantiated
|
||||||
* for each site being handled by the current process that has MSN enabled.
|
* for each site being handled by the current process that has MSN enabled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MsnManager extends ImManager {
|
class MsnManager extends ImManager {
|
||||||
public $conn = null;
|
public $conn = null;
|
||||||
protected $lastPing = null;
|
protected $lastPing = null;
|
||||||
|
@ -109,7 +108,8 @@ class MsnManager extends ImManager {
|
||||||
'user' => $this->plugin->user,
|
'user' => $this->plugin->user,
|
||||||
'password' => $this->plugin->password,
|
'password' => $this->plugin->password,
|
||||||
'alias' => $this->plugin->nickname,
|
'alias' => $this->plugin->nickname,
|
||||||
'psm' => 'Send me a message to post a notice',
|
// TRANS: MSN bot status message.
|
||||||
|
'psm' => _m('Send me a message to post a notice'),
|
||||||
'debug' => false
|
'debug' => false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -240,7 +240,8 @@ class MsnManager extends ImManager {
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($wm, 'INSERT', __FILE__);
|
common_log_db_error($wm, 'INSERT', __FILE__);
|
||||||
throw new ServerException('DB error inserting queue item');
|
// TRANS: Server exception thrown when a message to be sent through MSN cannot be added to the database queue.
|
||||||
|
throw new ServerException(_m('Database error inserting queue item.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user