i18n/L10n updates, translator docs updated, superfluous whitespace removed.
This commit is contained in:
parent
bfdb8385ec
commit
fb12094f61
@ -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',
|
||||
|
@ -39,6 +39,4 @@ class Oauth_token_association extends Memcached_DataObject
|
||||
|
||||
return empty($result) ? null : $oau;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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?
|
||||
@ -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.'));
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
*
|
||||
* @see Action::showExportList()
|
||||
*/
|
||||
|
||||
class FeedList extends Widget
|
||||
{
|
||||
var $action = null;
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -52,4 +52,3 @@ class XmppOutQueueHandler extends QueueHandler
|
||||
return $ok;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user