summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/apioauthauthorize.php9
-rw-r--r--classes/Oauth_token_association.php2
-rw-r--r--lib/apioauthstore.php6
-rw-r--r--lib/dberroraction.php1
-rw-r--r--lib/feed.php1
-rw-r--r--lib/feedlist.php1
-rw-r--r--lib/groupsbymemberssection.php2
-rw-r--r--lib/groupsbypostssection.php2
-rw-r--r--lib/groupsection.php1
-rw-r--r--lib/grouptagcloudsection.php3
-rw-r--r--lib/xmppmanager.php15
-rw-r--r--lib/xmppoutqueuehandler.php1
12 files changed, 19 insertions, 25 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index ca32c8540..013cca029 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -92,7 +92,6 @@ class ApiOauthAuthorizeAction extends Action
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -120,7 +119,7 @@ class ApiOauthAuthorizeAction extends Action
// Check to make sure we haven't already authorized the token
if ($this->reqToken->state != 0) {
// TRANS: Client error given when an invalid request token was passed to the OAuth API.
- $this->clientError(_("Invalid request token."));
+ $this->clientError(_('Invalid request token.'));
}
}
}
@@ -202,6 +201,7 @@ class ApiOauthAuthorizeAction extends Action
if (!$result) {
common_log_db_error($tokenAssoc, 'INSERT', __FILE__);
+ // TRANS: Server error displayed when a database action fails.
$this->serverError(_('Database error inserting oauth_token_association.'));
}
@@ -251,16 +251,13 @@ class ApiOauthAuthorizeAction extends Action
// Otherwise, inform the user that the rt was authorized
$this->showAuthorized();
-
} else if ($this->arg('cancel')) {
-
try {
$this->store->revoke_token($this->oauthTokenParam, 0);
$this->showCanceled();
} catch (Exception $e) {
$this->ServerError($e->getMessage());
}
-
} else {
// TRANS: Client error given on when invalid data was passed through a form in the OAuth API.
$this->clientError(_('Unexpected form submission.'));
@@ -310,7 +307,6 @@ class ApiOauthAuthorizeAction extends Action
*
* @return string title of the page
*/
-
function title()
{
// TRANS: Title for a page where a user can confirm/deny account access by an external application.
@@ -322,7 +318,6 @@ class ApiOauthAuthorizeAction extends Action
*
* @return void
*/
-
function showContent()
{
$this->elementStart('form', array('method' => 'post',
diff --git a/classes/Oauth_token_association.php b/classes/Oauth_token_association.php
index 051732712..66be22b5d 100644
--- a/classes/Oauth_token_association.php
+++ b/classes/Oauth_token_association.php
@@ -39,6 +39,4 @@ class Oauth_token_association extends Memcached_DataObject
return empty($result) ? null : $oau;
}
-
}
-
diff --git a/lib/apioauthstore.php b/lib/apioauthstore.php
index 6b9b97756..a5e807d03 100644
--- a/lib/apioauthstore.php
+++ b/lib/apioauthstore.php
@@ -48,7 +48,6 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
$app = Oauth_application::getByConsumerKey('anonymous');
if (!$app) {
-
common_debug("API OAuth - creating anonymous application");
$app = new OAuth_application();
$app->owner = 1; // XXX: What to do here?
@@ -66,7 +65,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
$id = $app->insert();
if (!$id) {
- // TRANS: Server error displayed when trying to create an anynymous OAuth application.
+ // TRANS: Server error displayed when trying to create an anynymous OAuth application.
$this->serverError(_("Could not create anonymous OAuth application."));
}
}
@@ -149,6 +148,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
if (!$tokenAssoc) {
throw new Exception(
+ // TRANS: Exception thrown when no token association could be found.
_('Could not find a profile and application associated with the request token.')
);
}
@@ -183,6 +183,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
if (!$result) {
throw new Exception(
+ // TRANS: Exception thrown when no access token can be issued.
_('Could not issue access token.')
);
}
@@ -239,6 +240,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
if (!$result) {
common_log_db_error($appUser, 'INSERT', __FILE__);
+ // TRANS: Server error displayed when a database error occurs.
$this->serverError(_('Database error inserting OAuth application user.'));
}
diff --git a/lib/dberroraction.php b/lib/dberroraction.php
index 2cb66a022..0a6fce100 100644
--- a/lib/dberroraction.php
+++ b/lib/dberroraction.php
@@ -47,7 +47,6 @@ require_once INSTALLDIR.'/lib/servererroraction.php';
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class DBErrorAction extends ServerErrorAction
{
function __construct($message='Error', $code=500)
diff --git a/lib/feed.php b/lib/feed.php
index e9fb6fdff..590265367 100644
--- a/lib/feed.php
+++ b/lib/feed.php
@@ -43,7 +43,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class Feed
{
const RSS1 = 1;
diff --git a/lib/feedlist.php b/lib/feedlist.php
index 4aacf0b3d..076576028 100644
--- a/lib/feedlist.php
+++ b/lib/feedlist.php
@@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*
* @see Action::showExportList()
*/
-
class FeedList extends Widget
{
var $action = null;
diff --git a/lib/groupsbymemberssection.php b/lib/groupsbymemberssection.php
index 19b35eddb..5cf1a563c 100644
--- a/lib/groupsbymemberssection.php
+++ b/lib/groupsbymemberssection.php
@@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class GroupsByMembersSection extends GroupSection
{
function getGroups()
@@ -68,6 +67,7 @@ class GroupsByMembersSection extends GroupSection
function title()
{
+ // TRANS: Title for groups with the most members section.
return _('Groups with most members');
}
diff --git a/lib/groupsbypostssection.php b/lib/groupsbypostssection.php
index 45d49aba6..50d60e87c 100644
--- a/lib/groupsbypostssection.php
+++ b/lib/groupsbypostssection.php
@@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class GroupsByPostsSection extends GroupSection
{
function getGroups()
@@ -68,6 +67,7 @@ class GroupsByPostsSection extends GroupSection
function title()
{
+ // TRANS: Title for groups with the most posts section.
return _('Groups with most posts');
}
diff --git a/lib/groupsection.php b/lib/groupsection.php
index 3b0b3029d..019b13135 100644
--- a/lib/groupsection.php
+++ b/lib/groupsection.php
@@ -45,7 +45,6 @@ define('GROUPS_PER_SECTION', 6);
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class GroupSection extends Section
{
function showContent()
diff --git a/lib/grouptagcloudsection.php b/lib/grouptagcloudsection.php
index f1106cc7b..5b914c007 100644
--- a/lib/grouptagcloudsection.php
+++ b/lib/grouptagcloudsection.php
@@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class GroupTagCloudSection extends TagCloudSection
{
var $group = null;
@@ -53,6 +52,8 @@ class GroupTagCloudSection extends TagCloudSection
function title()
{
+ // TRANS: Title for group tag cloud section.
+ // TRANS: %s is a group name.
return sprintf(_('Tags in %s group\'s notices'), $this->group->nickname);
}
diff --git a/lib/xmppmanager.php b/lib/xmppmanager.php
index 829eaa36c..7acd7663a 100644
--- a/lib/xmppmanager.php
+++ b/lib/xmppmanager.php
@@ -30,7 +30,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 XMPP enabled.
*/
-
class XmppManager extends IoManager
{
protected $site = null;
@@ -102,6 +101,7 @@ class XmppManager extends IoManager
$this->conn->addEventHandler('reconnect', 'handle_reconnect', $this);
$this->conn->setReconnectTimeout(600);
+ // @todo Needs i18n?
jabber_send_presence("Send me a message to post a notice", 'available', null, 'available', 100);
return !is_null($this->conn);
@@ -281,9 +281,9 @@ class XmppManager extends IoManager
$_cur = $user;
if (!$user) {
- $this->from_site($from, 'Unknown user; go to ' .
- common_local_url('imsettings') .
- ' to add your address to your account');
+ // TRANS: %s is the URL to the StatusNet site's Instant Messaging settings.
+ $this->from_site($from, sprintf(_('Unknown user. Go to %s ' .
+ 'to add your address to your account'),common_local_url('imsettings')));
$this->log(LOG_WARNING, 'Message from unknown user ' . $from);
return;
}
@@ -314,7 +314,6 @@ class XmppManager extends IoManager
unset($pl);
}
-
function is_self($from)
{
return preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from));
@@ -400,7 +399,11 @@ class XmppManager extends IoManager
$content_shortened = common_shorten_links($body);
if (Notice::contentTooLong($content_shortened)) {
$from = jabber_normalize_jid($pl['from']);
- $this->from_site($from, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'),
+ // TRANS: Response to XMPP source when it sent too long a message.
+ // TRANS: %1$d the maximum number of allowed characters (used for plural), %2$d is the sent number.
+ $this->from_site($from, sprintf(_m('Message too long. Maximum is %1$d character, you sent %2$d.',
+ 'Message too long. Maximum is %1$d characters, you sent %2$d.',
+ Notice::maxContent()),
Notice::maxContent(),
mb_strlen($content_shortened)));
return;
diff --git a/lib/xmppoutqueuehandler.php b/lib/xmppoutqueuehandler.php
index 2afa260f1..a4c9bbc4d 100644
--- a/lib/xmppoutqueuehandler.php
+++ b/lib/xmppoutqueuehandler.php
@@ -52,4 +52,3 @@ class XmppOutQueueHandler extends QueueHandler
return $ok;
}
}
-