summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/apiauth.php5
-rw-r--r--lib/apioauthstore.php9
-rw-r--r--lib/applicationlist.php9
3 files changed, 10 insertions, 13 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php
index 0ebd7aa10..1dacf1409 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -263,7 +263,7 @@ class ApiAuthAction extends ApiAction
// show error if the user clicks 'cancel'
// TRANS: Client error thrown when authentication fails becaus a user clicked "Cancel".
- $this->clientError(_("Could not authenticate you."), 401, $this->format);
+ $this->clientError(_('Could not authenticate you.'), 401, $this->format);
exit;
} else {
@@ -290,7 +290,7 @@ class ApiAuthAction extends ApiAction
);
$this->logAuthFailure($msg);
// TRANS: Client error thrown when authentication fails.
- $this->clientError(_("Could not authenticate you."), 401, $this->format);
+ $this->clientError(_('Could not authenticate you.'), 401, $this->format);
exit;
}
}
@@ -342,7 +342,6 @@ class ApiAuthAction extends ApiAction
*
* @param string $logMsg additional log message
*/
-
function logAuthFailure($logMsg)
{
list($proxy, $ip) = common_client_ip();
diff --git a/lib/apioauthstore.php b/lib/apioauthstore.php
index e30eea129..76df6c1ed 100644
--- a/lib/apioauthstore.php
+++ b/lib/apioauthstore.php
@@ -37,7 +37,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
$con->consumer_secret = $consumerKey;
$result = $con->insert();
if (!$result) {
- $this->serverError(_("Could not create anonymous consumer."));
+ // TRANS: Server error displayed when trying to create an anynymous OAuth consumer.
+ $this->serverError(_('Could not create anonymous consumer.'));
}
$app = new OAuth_application();
$app->consumer_key = $con->consumer_key;
@@ -49,7 +50,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
$app->access_type = 3; // read + write
$id = $app->insert();
if (!$id) {
- $this->serverError(_("Could not create anonymous OAuth application."));
+ // TRANS: Server error displayed when trying to create an anynymous OAuth application.
+ $this->serverError(_('Could not create anonymous OAuth application.'));
}
} else {
return null;
@@ -230,7 +232,6 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
*
* @return OAuthToken $token a new unauthorized OAuth request token
*/
-
function new_request_token($consumer, $callback)
{
$t = new Token();
@@ -255,6 +256,4 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
return new OAuthToken($t->tok, $t->secret);
}
}
-
-
}
diff --git a/lib/applicationlist.php b/lib/applicationlist.php
index 6801fb6cf..ff9ac5a20 100644
--- a/lib/applicationlist.php
+++ b/lib/applicationlist.php
@@ -142,10 +142,8 @@ class ApplicationList extends Widget
{
return;
}
-
}
-
/**
* Widget to show a list of connected OAuth clients
*
@@ -279,7 +277,9 @@ class ConnectedAppsList extends Widget
$this->out->element(
'p', array(
'class' => 'access_token'),
- _('Access token starting with: ') . substr($this->connection->token, 0, 7)
+ // TRANS: Access token in the application list.
+ // TRANS: %s are the first 7 characters of the access token.
+ sprintf(_('Access token starting with: %s'), substr($this->connection->token, 0, 7))
);
$this->out->elementStart(
@@ -295,11 +295,10 @@ class ConnectedAppsList extends Widget
$this->out->hidden('oauth_token', $this->connection->token);
$this->out->hidden('token', common_session_token());
// TRANS: Button label
- $this->out->submit('revoke', _('Revoke'));
+ $this->out->submit('revoke', _m('BUTTON','Revoke'));
$this->out->elementEnd('fieldset');
$this->out->elementEnd('form');
$this->out->elementEnd('li');
-
}
}