From 7ad9f23b12c453b70acd35e4c20a5068ddb1ac37 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 25 Apr 2011 19:27:18 +0200 Subject: [PATCH] Update translator documentation. Break lines in README at or before 80 characters. i18n fixes. Whitespace updates. --- plugins/Mollom/MollomPlugin.php | 3 ++- plugins/Msn/MsnPlugin.php | 12 ++++++++---- plugins/Msn/README | 8 ++++---- plugins/Msn/msnmanager.php | 7 ++++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/plugins/Mollom/MollomPlugin.php b/plugins/Mollom/MollomPlugin.php index d918a6f6b3..382ce2ee5b 100644 --- a/plugins/Mollom/MollomPlugin.php +++ b/plugins/Mollom/MollomPlugin.php @@ -83,7 +83,8 @@ class MollomPlugin extends Plugin ); $response = $this->mollom('mollom.checkContent', $data); 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 unsure, let through diff --git a/plugins/Msn/MsnPlugin.php b/plugins/Msn/MsnPlugin.php index 187486eedc..ccc190334d 100644 --- a/plugins/Msn/MsnPlugin.php +++ b/plugins/Msn/MsnPlugin.php @@ -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 * @link http://status.net/ */ - class MsnPlugin extends ImPlugin { public $user = null; public $password = null; @@ -59,6 +58,7 @@ class MsnPlugin extends ImPlugin { * @return string Name of service */ public function getDisplayName() { + // TRANS: Display name of the MSN instant messaging service. return _m('MSN'); } @@ -184,13 +184,16 @@ class MsnPlugin extends ImPlugin { */ public function initialize() { 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)) { - 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)) { - 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; @@ -209,6 +212,7 @@ class MsnPlugin extends ImPlugin { 'author' => 'Luke Fitzgerald', 'homepage' => 'http://status.net/wiki/Plugin:MSN', 'rawdescription' => + // TRANS: Plugin description. _m('The MSN plugin allows users to send and receive notices over the MSN network.') ); return true; diff --git a/plugins/Msn/README b/plugins/Msn/README index fa7bc2fb22..a56bacd64c 100644 --- a/plugins/Msn/README +++ b/plugins/Msn/README @@ -9,9 +9,10 @@ add "addPlugin('msn', array('setting'=>'value', 'setting2'=>'value2', ...);" to the bottom of your config.php -scripts/imdaemon.php included with StatusNet must be running. It will be started by -the plugin along with their other daemons when you run scripts/startdaemons.sh. -See the StatusNet README for more about queuing and daemons. +scripts/imdaemon.php included with StatusNet must be running. It will be started +by the plugin along with their other daemons when you run +scripts/startdaemons.sh. See the StatusNet README for more about queuing and +daemons. Settings ======== @@ -29,4 +30,3 @@ addPlugin('msn', array( 'password' => '...', 'nickname' => '...' )); - diff --git a/plugins/Msn/msnmanager.php b/plugins/Msn/msnmanager.php index a8996ecafa..82d40d69c9 100644 --- a/plugins/Msn/msnmanager.php +++ b/plugins/Msn/msnmanager.php @@ -29,7 +29,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } * 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. */ - class MsnManager extends ImManager { public $conn = null; protected $lastPing = null; @@ -109,7 +108,8 @@ class MsnManager extends ImManager { 'user' => $this->plugin->user, 'password' => $this->plugin->password, '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 ) ); @@ -240,7 +240,8 @@ class MsnManager extends ImManager { if (!$result) { 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;