Merge remote branch 'gitorious/testing' into testing

This commit is contained in:
Evan Prodromou 2011-01-24 06:54:09 -07:00
commit c309bbae93
547 changed files with 55799 additions and 22391 deletions

View File

@ -39,7 +39,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/ * @link http://status.net/
*/ */
class ApiAtomServiceAction extends ApiBareAuthAction class ApiAtomServiceAction extends ApiBareAuthAction
{ {
/** /**
@ -50,13 +49,13 @@ class ApiAtomServiceAction extends ApiBareAuthAction
* @return boolean success flag * @return boolean success flag
* *
*/ */
function prepare($args) function prepare($args)
{ {
parent::prepare($args); parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id')); $this->user = $this->getTargetUser($this->arg('id'));
if (empty($this->user)) { if (empty($this->user)) {
// TRANS: Client error displayed when making an Atom API request for an unknown user.
$this->clientError(_('No such user.'), 404, $this->format); $this->clientError(_('No such user.'), 404, $this->format);
return; return;
} }
@ -71,7 +70,6 @@ class ApiAtomServiceAction extends ApiBareAuthAction
* *
* @return void * @return void
*/ */
function handle($args) function handle($args)
{ {
parent::handle($args); parent::handle($args);
@ -83,13 +81,15 @@ class ApiAtomServiceAction extends ApiBareAuthAction
'xmlns:atom' => 'http://www.w3.org/2005/Atom', 'xmlns:atom' => 'http://www.w3.org/2005/Atom',
'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/')); 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'));
$this->elementStart('workspace'); $this->elementStart('workspace');
$this->element('atom:title', null, _('Main')); // TRANS: Title for Atom feed.
$this->element('atom:title', null, _m('ATOM','Main'));
$this->elementStart('collection', $this->elementStart('collection',
array('href' => common_local_url('ApiTimelineUser', array('href' => common_local_url('ApiTimelineUser',
array('id' => $this->user->id, array('id' => $this->user->id,
'format' => 'atom')))); 'format' => 'atom'))));
$this->element('atom:title', $this->element('atom:title',
null, null,
// TRANS: Title for Atom feed. %s is a user nickname.
sprintf(_("%s timeline"), sprintf(_("%s timeline"),
$this->user->nickname)); $this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry'); $this->element('accept', null, 'application/atom+xml;type=entry');
@ -100,6 +100,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('subscriber' => $this->user->id)))); array('subscriber' => $this->user->id))));
$this->element('atom:title', $this->element('atom:title',
null, null,
// TRANS: Title for Atom feed with a user's subscriptions. %s is a user nickname.
sprintf(_("%s subscriptions"), sprintf(_("%s subscriptions"),
$this->user->nickname)); $this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry'); $this->element('accept', null, 'application/atom+xml;type=entry');
@ -110,6 +111,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('profile' => $this->user->id)))); array('profile' => $this->user->id))));
$this->element('atom:title', $this->element('atom:title',
null, null,
// TRANS: Title for Atom feed with a user's favorite notices. %s is a user nickname.
sprintf(_("%s favorites"), sprintf(_("%s favorites"),
$this->user->nickname)); $this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry'); $this->element('accept', null, 'application/atom+xml;type=entry');
@ -120,6 +122,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('profile' => $this->user->id)))); array('profile' => $this->user->id))));
$this->element('atom:title', $this->element('atom:title',
null, null,
// TRANS: Title for Atom feed with a user's memberships. %s is a user nickname.
sprintf(_("%s memberships"), sprintf(_("%s memberships"),
$this->user->nickname)); $this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry'); $this->element('accept', null, 'application/atom+xml;type=entry');

View File

@ -92,6 +92,7 @@ class ApiBlockCreateAction extends ApiAuthAction
} }
if (empty($this->user) || empty($this->other)) { if (empty($this->user) || empty($this->other)) {
// TRANS: Client error displayed when trying to block a non-existing user or a user from another site.
$this->clientError(_('No such user.'), 404, $this->format); $this->clientError(_('No such user.'), 404, $this->format);
return; return;
} }

View File

@ -84,6 +84,7 @@ class ApiOauthAccessTokenAction extends ApiOauthAction
common_debug(var_export($req, true)); common_debug(var_export($req, true));
$code = $e->getCode(); $code = $e->getCode();
$this->clientError($e->getMessage(), empty($code) ? 401 : $code, 'text'); $this->clientError($e->getMessage(), empty($code) ? 401 : $code, 'text');
return;
} }
if (empty($atok)) { if (empty($atok)) {
@ -98,7 +99,7 @@ class ApiOauthAccessTokenAction extends ApiOauthAction
common_log(LOG_WARNING, $msg); common_log(LOG_WARNING, $msg);
// TRANS: Client error given from the OAuth API when the request token or verifier is invalid. // TRANS: Client error given from the OAuth API when the request token or verifier is invalid.
$this->clientError(_("Invalid request token or verifier.", 400, 'text')); $this->clientError(_("Invalid request token or verifier."), 400, 'text');
} else { } else {
common_log( common_log(
LOG_INFO, LOG_INFO,

View File

@ -114,6 +114,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
$this->deleteNotice(); $this->deleteNotice();
break; break;
default: default:
// TRANS: Client error displayed calling an unsupported HTTP error in API status show.
$this->clientError(_('HTTP method not supported.'), 405); $this->clientError(_('HTTP method not supported.'), 405);
return; return;
} }
@ -138,6 +139,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
$this->showSingleAtomStatus($this->notice); $this->showSingleAtomStatus($this->notice);
break; break;
default: default:
// TRANS: Exception thrown requesting an unsupported notice output format.
// TRANS: %s is the requested output format.
throw new Exception(sprintf(_("Unsupported format: %s"), $this->format)); throw new Exception(sprintf(_("Unsupported format: %s"), $this->format));
} }
} else { } else {
@ -171,7 +174,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD'); return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
@ -220,6 +223,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
function deleteNotice() function deleteNotice()
{ {
if ($this->format != 'atom') { if ($this->format != 'atom') {
// TRANS: Client error displayed when trying to delete a notice not using the Atom format.
$this->clientError(_("Can only delete using the Atom format.")); $this->clientError(_("Can only delete using the Atom format."));
return; return;
} }
@ -227,7 +231,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
if (empty($this->auth_user) || if (empty($this->auth_user) ||
($this->notice->profile_id != $this->auth_user->id && ($this->notice->profile_id != $this->auth_user->id &&
!$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) { !$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) {
$this->clientError(_('Can\'t delete this notice.'), 403); // TRANS: Client error displayed when a user has no rights to delete notices of other users.
$this->clientError(_('Cannot delete this notice.'), 403);
return; return;
} }
@ -240,6 +245,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
header('HTTP/1.1 200 OK'); header('HTTP/1.1 200 OK');
header('Content-Type: text/plain'); header('Content-Type: text/plain');
// TRANS: Confirmation of notice deletion in API. %d is the ID (number) of the deleted notice.
print(sprintf(_('Deleted notice %d'), $this->notice->id)); print(sprintf(_('Deleted notice %d'), $this->notice->id));
print("\n"); print("\n");
} }

View File

@ -241,7 +241,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD'); return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
@ -307,11 +307,13 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$xml = trim(file_get_contents('php://input')); $xml = trim(file_get_contents('php://input'));
if (empty($xml)) { if (empty($xml)) {
// TRANS: Client error displayed attempting to post an empty API notice.
$this->clientError(_('Atom post must not be empty.')); $this->clientError(_('Atom post must not be empty.'));
} }
$dom = DOMDocument::loadXML($xml); $dom = DOMDocument::loadXML($xml);
if (!$dom) { if (!$dom) {
// TRANS: Client error displayed attempting to post an API that is not well-formed XML.
$this->clientError(_('Atom post must be well-formed XML.')); $this->clientError(_('Atom post must be well-formed XML.'));
} }
@ -375,6 +377,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
} else { } else {
// @fixme fetch from $sourceUrl? // @fixme fetch from $sourceUrl?
// TRANS: Client error displayed when posting a notice without content through the API. // TRANS: Client error displayed when posting a notice without content through the API.
// TRANS: %d is the notice ID (number).
$this->clientError(sprintf(_('No content for notice %d.'), $this->clientError(sprintf(_('No content for notice %d.'),
$note->id)); $note->id));
return; return;
@ -427,14 +430,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$profile = Profile::fromURI($uri); $profile = Profile::fromURI($uri);
if (!empty($profile)) { if (!empty($profile)) {
$options['replies'] = $uri; $options['replies'][] = $uri;
} else { } else {
$group = User_group::staticGet('uri', $uri); $group = User_group::staticGet('uri', $uri);
if (!empty($group)) { if (!empty($group)) {
$options['groups'] = $uri; $options['groups'][] = $uri;
} else { } else {
// @fixme: hook for discovery here // @fixme: hook for discovery here
common_log(LOG_WARNING, sprintf(_('AtomPub post with unknown attention URI %s'), $uri)); common_log(LOG_WARNING, sprintf('AtomPub post with unknown attention URI %s', $uri));
} }
} }
} }

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Feed of ActivityStreams 'favorite' actions * Feed of ActivityStreams 'favorite' actions
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubfavoritefeedAction extends ApiAuthAction class AtompubfavoritefeedAction extends ApiAuthAction
{ {
private $_profile = null; private $_profile = null;
@ -59,7 +58,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -67,7 +65,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->_profile = Profile::staticGet('id', $this->trimmed('profile')); $this->_profile = Profile::staticGet('id', $this->trimmed('profile'));
if (empty($this->_profile)) { if (empty($this->_profile)) {
throw new ClientException(_('No such profile'), 404); // TRANS: Client exception thrown when requesting a favorite feed for a non-existing profile.
throw new ClientException(_('No such profile.'), 404);
} }
$offset = ($this->page-1) * $this->count; $offset = ($this->page-1) * $this->count;
@ -76,7 +75,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->_faves = Fave::byProfile($this->_profile->id, $this->_faves = Fave::byProfile($this->_profile->id,
$offset, $offset,
$limit); $limit);
return true; return true;
} }
@ -87,7 +86,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -101,6 +99,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->addFavorite(); $this->addFavorite();
break; break;
default: default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
throw new ClientException(_('HTTP method not supported.'), 405); throw new ClientException(_('HTTP method not supported.'), 405);
return; return;
} }
@ -113,7 +112,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function showFeed() function showFeed()
{ {
header('Content-Type: application/atom+xml; charset=utf-8'); header('Content-Type: application/atom+xml; charset=utf-8');
@ -139,21 +137,25 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$feed->addAuthor($this->_profile->getBestName(), $feed->addAuthor($this->_profile->getBestName(),
$this->_profile->getURI()); $this->_profile->getURI());
// TRANS: Title for Atom favorites feed.
// TRANS: %s is a user nickname.
$feed->setTitle(sprintf(_("%s favorites"), $feed->setTitle(sprintf(_("%s favorites"),
$this->_profile->getBestName())); $this->_profile->getBestName()));
$feed->setSubtitle(sprintf(_("Notices %s has favorited to on %s"), // TRANS: Subtitle for Atom favorites feed.
// TRANS: %1$s is a user nickname, %2$s is the StatusNet sitename.
$feed->setSubtitle(sprintf(_("Notices %1$s has favorited on %2$s"),
$this->_profile->getBestName(), $this->_profile->getBestName(),
common_config('site', 'name'))); common_config('site', 'name')));
$feed->addLink(common_local_url('showfavorites', $feed->addLink(common_local_url('showfavorites',
array('nickname' => array('nickname' =>
$this->_profile->nickname))); $this->_profile->nickname)));
$feed->addLink($url, $feed->addLink($url,
array('rel' => 'self', array('rel' => 'self',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
// If there's more... // If there's more...
if ($this->page > 1) { if ($this->page > 1) {
@ -162,9 +164,9 @@ class AtompubfavoritefeedAction extends ApiAuthAction
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
$feed->addLink(common_local_url('AtomPubFavoriteFeed', $feed->addLink(common_local_url('AtomPubFavoriteFeed',
array('profile' => array('profile' =>
$this->_profile->id), $this->_profile->id),
array('page' => array('page' =>
$this->page - 1)), $this->page - 1)),
array('rel' => 'prev', array('rel' => 'prev',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
@ -205,17 +207,17 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function addFavorite() function addFavorite()
{ {
// XXX: Refactor this; all the same for atompub // XXX: Refactor this; all the same for atompub
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) { $this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't add someone else's". // TRANS: Client exception thrown when trying to set a favorite for another user.
" subscription"), 403); throw new ClientException(_("Cannot add someone else's".
" subscription."), 403);
} }
$xml = file_get_contents('php://input'); $xml = file_get_contents('php://input');
$dom = DOMDocument::loadXML($xml); $dom = DOMDocument::loadXML($xml);
@ -234,9 +236,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) { if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
if ($activity->verb != ActivityVerb::FAVORITE) { if ($activity->verb != ActivityVerb::FAVORITE) {
// TRANS: Client error displayed when not using the POST verb. // TRANS: Client exception thrown when trying use an incorrect activity verb for the Atom pub method.
// TRANS: Do not translate POST. throw new ClientException(_('Can only handle favorite activities.'));
throw new ClientException(_('Can only handle Favorite activities.'));
return; return;
} }
@ -245,6 +246,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (!in_array($note->type, array(ActivityObject::NOTE, if (!in_array($note->type, array(ActivityObject::NOTE,
ActivityObject::BLOGENTRY, ActivityObject::BLOGENTRY,
ActivityObject::STATUS))) { ActivityObject::STATUS))) {
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
throw new ClientException(_('Can only fave notices.')); throw new ClientException(_('Can only fave notices.'));
return; return;
} }
@ -253,6 +255,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (empty($notice)) { if (empty($notice)) {
// XXX: import from listed URL or something // XXX: import from listed URL or something
// TRANS: Client exception thrown when trying favorite a notice without content.
throw new ClientException(_('Unknown note.')); throw new ClientException(_('Unknown note.'));
} }
@ -260,6 +263,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
'notice_id' => $notice->id)); 'notice_id' => $notice->id));
if (!empty($old)) { if (!empty($old)) {
// TRANS: Client exception thrown when trying favorite an already favorited notice.
throw new ClientException(_('Already a favorite.')); throw new ClientException(_('Already a favorite.'));
} }
@ -296,7 +300,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -328,7 +331,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
return null; return null;
@ -339,7 +341,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -359,7 +360,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function notify($fave, $notice, $user) function notify($fave, $notice, $user)
{ {
$other = User::staticGet('id', $notice->profile_id); $other = User::staticGet('id', $notice->profile_id);

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Feed of group memberships for a user, in ActivityStreams format * Feed of group memberships for a user, in ActivityStreams format
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubmembershipfeedAction extends ApiAuthAction class AtompubmembershipfeedAction extends ApiAuthAction
{ {
private $_profile = null; private $_profile = null;
@ -59,7 +58,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -67,8 +65,9 @@ class AtompubmembershipfeedAction extends ApiAuthAction
$profileId = $this->trimmed('profile'); $profileId = $this->trimmed('profile');
$this->_profile = Profile::staticGet('id', $profileId); $this->_profile = Profile::staticGet('id', $profileId);
if (empty($this->_profile)) { if (empty($this->_profile)) {
// TRANS: Client exception.
throw new ClientException(_('No such profile.'), 404); throw new ClientException(_('No such profile.'), 404);
} }
@ -78,7 +77,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
$this->_memberships = Group_member::byMember($this->_profile->id, $this->_memberships = Group_member::byMember($this->_profile->id,
$offset, $offset,
$limit); $limit);
return true; return true;
} }
@ -89,7 +88,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -103,6 +101,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
$this->addMembership(); $this->addMembership();
break; break;
default: default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
throw new ClientException(_('HTTP method not supported.'), 405); throw new ClientException(_('HTTP method not supported.'), 405);
return; return;
} }
@ -115,7 +114,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function showFeed() function showFeed()
{ {
header('Content-Type: application/atom+xml; charset=utf-8'); header('Content-Type: application/atom+xml; charset=utf-8');
@ -141,21 +139,25 @@ class AtompubmembershipfeedAction extends ApiAuthAction
$feed->addAuthor($this->_profile->getBestName(), $feed->addAuthor($this->_profile->getBestName(),
$this->_profile->getURI()); $this->_profile->getURI());
// TRANS: Title for group membership feed.
// TRANS: %s is a username.
$feed->setTitle(sprintf(_("%s group memberships"), $feed->setTitle(sprintf(_("%s group memberships"),
$this->_profile->getBestName())); $this->_profile->getBestName()));
$feed->setSubtitle(sprintf(_("Groups %s is a member of on %s"), // TRANS: Subtitle for group membership feed.
// TRANS: %1$s is a username, %2$s is the StatusNet sitename.
$feed->setSubtitle(sprintf(_("Groups %1$s is a member of on %2$s"),
$this->_profile->getBestName(), $this->_profile->getBestName(),
common_config('site', 'name'))); common_config('site', 'name')));
$feed->addLink(common_local_url('usergroups', $feed->addLink(common_local_url('usergroups',
array('nickname' => array('nickname' =>
$this->_profile->nickname))); $this->_profile->nickname)));
$feed->addLink($url, $feed->addLink($url,
array('rel' => 'self', array('rel' => 'self',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
// If there's more... // If there's more...
if ($this->page > 1) { if ($this->page > 1) {
@ -164,9 +166,9 @@ class AtompubmembershipfeedAction extends ApiAuthAction
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
$feed->addLink(common_local_url('AtomPubMembershipFeed', $feed->addLink(common_local_url('AtomPubMembershipFeed',
array('profile' => array('profile' =>
$this->_profile->id), $this->_profile->id),
array('page' => array('page' =>
$this->page - 1)), $this->page - 1)),
array('rel' => 'prev', array('rel' => 'prev',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
@ -207,17 +209,17 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function addMembership() function addMembership()
{ {
// XXX: Refactor this; all the same for atompub // XXX: Refactor this; all the same for atompub
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) { $this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't add someone else's". // TRANS: Client exception thrown when trying subscribe someone else to a group.
throw new ClientException(_("Cannot add someone else's".
" membership"), 403); " membership"), 403);
} }
$xml = file_get_contents('php://input'); $xml = file_get_contents('php://input');
$dom = DOMDocument::loadXML($xml); $dom = DOMDocument::loadXML($xml);
@ -234,25 +236,26 @@ class AtompubmembershipfeedAction extends ApiAuthAction
$membership = null; $membership = null;
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) { if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
if ($activity->verb != ActivityVerb::JOIN) { if ($activity->verb != ActivityVerb::JOIN) {
// TRANS: Client error displayed when not using the POST verb. // TRANS: Client error displayed when not using the POST verb.
// TRANS: Do not translate POST. // TRANS: Do not translate POST.
throw new ClientException(_('Can only handle Join activities.')); throw new ClientException(_('Can only handle join activities.'));
return; return;
} }
$groupObj = $activity->objects[0]; $groupObj = $activity->objects[0];
if ($groupObj->type != ActivityObject::GROUP) { if ($groupObj->type != ActivityObject::GROUP) {
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
throw new ClientException(_('Can only fave notices.')); throw new ClientException(_('Can only fave notices.'));
return; return;
} }
$group = User_group::staticGet('uri', $groupObj->id); $group = User_group::staticGet('uri', $groupObj->id);
if (empty($group)) { if (empty($group)) {
// XXX: import from listed URL or something // XXX: import from listed URL or something
// TRANS: Client exception thrown when trying to subscribe to a non-existing group.
throw new ClientException(_('Unknown group.')); throw new ClientException(_('Unknown group.'));
} }
@ -260,6 +263,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
'group_id' => $group->id)); 'group_id' => $group->id));
if (!empty($old)) { if (!empty($old)) {
// TRANS: Client exception thrown when trying to subscribe to an already subscribed group.
throw new ClientException(_('Already a member.')); throw new ClientException(_('Already a member.'));
} }
@ -267,6 +271,7 @@ class AtompubmembershipfeedAction extends ApiAuthAction
if (Group_block::isBlocked($group, $profile)) { if (Group_block::isBlocked($group, $profile)) {
// XXX: import from listed URL or something // XXX: import from listed URL or something
// TRANS: Client exception thrown when trying to subscribe to group while blocked from that group.
throw new ClientException(_('Blocked by admin.')); throw new ClientException(_('Blocked by admin.'));
} }
@ -299,7 +304,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -331,7 +335,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
return null; return null;
@ -342,7 +345,6 @@ class AtompubmembershipfeedAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Show a single favorite in Atom Activity Streams format * Show a single favorite in Atom Activity Streams format
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubshowfavoriteAction extends ApiAuthAction class AtompubshowfavoriteAction extends ApiAuthAction
{ {
private $_profile = null; private $_profile = null;
@ -62,7 +61,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -73,12 +71,14 @@ class AtompubshowfavoriteAction extends ApiAuthAction
$this->_profile = Profile::staticGet('id', $profileId); $this->_profile = Profile::staticGet('id', $profileId);
if (empty($this->_profile)) { if (empty($this->_profile)) {
// TRANS: Client exception.
throw new ClientException(_('No such profile.'), 404); throw new ClientException(_('No such profile.'), 404);
} }
$this->_notice = Notice::staticGet('id', $noticeId); $this->_notice = Notice::staticGet('id', $noticeId);
if (empty($this->_notice)) { if (empty($this->_notice)) {
// TRANS: Client exception thrown when referencing a non-existing notice.
throw new ClientException(_('No such notice.'), 404); throw new ClientException(_('No such notice.'), 404);
} }
@ -86,6 +86,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
'notice_id' => $noticeId)); 'notice_id' => $noticeId));
if (empty($this->_fave)) { if (empty($this->_fave)) {
// TRANS: Client exception thrown when referencing a non-existing favorite.
throw new ClientException(_('No such favorite.'), 404); throw new ClientException(_('No such favorite.'), 404);
} }
@ -99,7 +100,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -113,6 +113,7 @@ class AtompubshowfavoriteAction extends ApiAuthAction
$this->deleteFave(); $this->deleteFave();
break; break;
default: default:
// TRANS: Client exception thrown using an unsupported HTTP method.
throw new ClientException(_('HTTP method not supported.'), throw new ClientException(_('HTTP method not supported.'),
405); 405);
} }
@ -121,10 +122,9 @@ class AtompubshowfavoriteAction extends ApiAuthAction
/** /**
* Show a single favorite, in ActivityStreams format * Show a single favorite, in ActivityStreams format
* *
* @return void * @return void
*/ */
function showFave() function showFave()
{ {
$activity = $this->_fave->asActivity(); $activity = $this->_fave->asActivity();
@ -140,15 +140,15 @@ class AtompubshowfavoriteAction extends ApiAuthAction
/** /**
* Delete the favorite * Delete the favorite
* *
* @return void * @return void
*/ */
function deleteFave() function deleteFave()
{ {
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) { $this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't delete someone else's". // TRANS: Client exception thrown when trying to remove a favorite notice of another user.
throw new ClientException(_("Cannot delete someone else's".
" favorite"), 403); " favorite"), 403);
} }
@ -166,7 +166,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -184,7 +183,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return string last modified http header * @return string last modified http header
*/ */
function lastModified() function lastModified()
{ {
return max(strtotime($this->_profile->modified), return max(strtotime($this->_profile->modified),
@ -199,7 +197,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
$mtime = strtotime($this->_fave->modified); $mtime = strtotime($this->_fave->modified);
@ -215,7 +212,6 @@ class AtompubshowfavoriteAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Show a single membership as an Activity Streams entry * Show a single membership as an Activity Streams entry
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubshowmembershipAction extends ApiAuthAction class AtompubshowmembershipAction extends ApiAuthAction
{ {
private $_profile = null; private $_profile = null;
@ -60,7 +59,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -68,8 +66,9 @@ class AtompubshowmembershipAction extends ApiAuthAction
$profileId = $this->trimmed('profile'); $profileId = $this->trimmed('profile');
$this->_profile = Profile::staticGet('id', $profileId); $this->_profile = Profile::staticGet('id', $profileId);
if (empty($this->_profile)) { if (empty($this->_profile)) {
// TRANS: Client exception.
throw new ClientException(_('No such profile.'), 404); throw new ClientException(_('No such profile.'), 404);
} }
@ -78,6 +77,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->_group = User_group::staticGet('id', $groupId); $this->_group = User_group::staticGet('id', $groupId);
if (empty($this->_group)) { if (empty($this->_group)) {
// TRANS: Client exception thrown when referencing a non-existing group.
throw new ClientException(_('No such group'), 404); throw new ClientException(_('No such group'), 404);
} }
@ -87,6 +87,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->_membership = Group_member::pkeyGet($kv); $this->_membership = Group_member::pkeyGet($kv);
if (empty($this->_membership)) { if (empty($this->_membership)) {
// TRANS: Client exception thrown when trying to show membership of a non-subscribed group
throw new ClientException(_('Not a member'), 404); throw new ClientException(_('Not a member'), 404);
} }
@ -100,7 +101,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
switch ($_SERVER['REQUEST_METHOD']) { switch ($_SERVER['REQUEST_METHOD']) {
@ -112,7 +112,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->deleteMembership(); $this->deleteMembership();
break; break;
default: default:
throw new ClientException(_('Method not supported'), 405); // TRANS: Client exception thrown when using an unsupported HTTP method.
throw new ClientException(_('HTTP method not supported'), 405);
break; break;
} }
return; return;
@ -123,7 +124,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function showMembership() function showMembership()
{ {
$activity = $this->_membership->asActivity(); $activity = $this->_membership->asActivity();
@ -147,7 +147,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
{ {
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) { $this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't delete someone else's". // TRANS: Client exception thrown when deleting someone else's membership.
throw new ClientException(_("Cannot delete someone else's".
" membership"), 403); " membership"), 403);
} }
@ -168,7 +169,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -203,7 +203,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
$ctime = strtotime($this->_membership->created); $ctime = strtotime($this->_membership->created);
@ -222,7 +221,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Single subscription * Single subscription
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -46,21 +46,19 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubshowsubscriptionAction extends ApiAuthAction class AtompubshowsubscriptionAction extends ApiAuthAction
{ {
private $_subscriber = null; private $_subscriber = null;
private $_subscribed = null; private $_subscribed = null;
private $_subscription = null; private $_subscription = null;
/** /**
* For initializing members of the class. * For initializing members of the class.
* *
* @param array $argarray misc. arguments * @param array $argarray misc. arguments
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -69,7 +67,9 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
$this->_subscriber = Profile::staticGet('id', $subscriberId); $this->_subscriber = Profile::staticGet('id', $subscriberId);
if (empty($this->_subscriber)) { if (empty($this->_subscriber)) {
throw new ClientException(sprintf(_('No such profile id: %d'), // TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
// TRANS: %d is the non-existing profile ID number.
throw new ClientException(sprintf(_('No such profile id: %d.'),
$subscriberId), 404); $subscriberId), 404);
} }
@ -78,16 +78,20 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
$this->_subscribed = Profile::staticGet('id', $subscribedId); $this->_subscribed = Profile::staticGet('id', $subscribedId);
if (empty($this->_subscribed)) { if (empty($this->_subscribed)) {
throw new ClientException(sprintf(_('No such profile id: %d'), // TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
// TRANS: %d is the non-existing profile ID number.
throw new ClientException(sprintf(_('No such profile id: %d.'),
$subscribedId), 404); $subscribedId), 404);
} }
$this->_subscription = $this->_subscription =
Subscription::pkeyGet(array('subscriber' => $subscriberId, Subscription::pkeyGet(array('subscriber' => $subscriberId,
'subscribed' => $subscribedId)); 'subscribed' => $subscribedId));
if (empty($this->_subscription)) { if (empty($this->_subscription)) {
$msg = sprintf(_('Profile %d not subscribed to profile %d'), // TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
// TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d.'),
$subscriberId, $subscribedId); $subscriberId, $subscribedId);
throw new ClientException($msg, 404); throw new ClientException($msg, 404);
} }
@ -102,7 +106,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -115,6 +118,7 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
$this->deleteSubscription(); $this->deleteSubscription();
break; break;
default: default:
// TRANS: Client error shown when using a non-supported HTTP method.
$this->clientError(_('HTTP method not supported.'), 405); $this->clientError(_('HTTP method not supported.'), 405);
return; return;
} }
@ -127,7 +131,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function showSubscription() function showSubscription()
{ {
$activity = $this->_subscription->asActivity(); $activity = $this->_subscription->asActivity();
@ -146,13 +149,13 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function deleteSubscription() function deleteSubscription()
{ {
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_subscriber->id) { $this->auth_user->id != $this->_subscriber->id) {
throw new ClientException(_("Can't delete someone else's". // TRANS: Client exception thrown when trying to delete a subscription of another user.
" subscription"), 403); throw new ClientException(_("Cannot delete someone else's ".
"subscription."), 403);
} }
Subscription::cancel($this->_subscriber, Subscription::cancel($this->_subscriber,
@ -168,7 +171,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'DELETE') { if ($_SERVER['REQUEST_METHOD'] == 'DELETE') {
@ -183,7 +185,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return string last modified http header * @return string last modified http header
*/ */
function lastModified() function lastModified()
{ {
return max(strtotime($this->_subscriber->modified), return max(strtotime($this->_subscriber->modified),
@ -196,7 +197,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
$mtime = strtotime($this->_subscription->modified); $mtime = strtotime($this->_subscription->modified);
@ -212,7 +212,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'DELETE') { if ($_SERVER['REQUEST_METHOD'] == 'DELETE') {

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* AtomPub subscription feed * AtomPub subscription feed
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -40,7 +40,7 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* Subscription feed class for AtomPub * Subscription feed class for AtomPub
* *
* Generates a list of the user's subscriptions * Generates a list of the user's subscriptions
* *
* @category AtomPub * @category AtomPub
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.php';
* @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 AtompubsubscriptionfeedAction extends ApiAuthAction class AtompubsubscriptionfeedAction extends ApiAuthAction
{ {
private $_profile = null; private $_profile = null;
@ -61,17 +60,18 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
$subscriber = $this->trimmed('subscriber'); $subscriber = $this->trimmed('subscriber');
$this->_profile = Profile::staticGet('id', $subscriber); $this->_profile = Profile::staticGet('id', $subscriber);
if (empty($this->_profile)) { if (empty($this->_profile)) {
throw new ClientException(sprintf(_('No such profile id: %d'), // TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
// TRANS: %d is the non-existing profile ID number.
throw new ClientException(sprintf(_('No such profile id: %d.'),
$subscriber), 404); $subscriber), 404);
} }
@ -93,7 +93,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -106,6 +105,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$this->addSubscription(); $this->addSubscription();
break; break;
default: default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
$this->clientError(_('HTTP method not supported.'), 405); $this->clientError(_('HTTP method not supported.'), 405);
return; return;
} }
@ -118,7 +118,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function showFeed() function showFeed()
{ {
header('Content-Type: application/atom+xml; charset=utf-8'); header('Content-Type: application/atom+xml; charset=utf-8');
@ -144,21 +143,25 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$feed->addAuthor($this->_profile->getBestName(), $feed->addAuthor($this->_profile->getBestName(),
$this->_profile->getURI()); $this->_profile->getURI());
// TRANS: Title for Atom subscription feed.
// TRANS: %s is a user nickname.
$feed->setTitle(sprintf(_("%s subscriptions"), $feed->setTitle(sprintf(_("%s subscriptions"),
$this->_profile->getBestName())); $this->_profile->getBestName()));
$feed->setSubtitle(sprintf(_("People %s has subscribed to on %s"), // TRANS: Subtitle for Atom subscription feed.
// TRANS: %1$s is a user nickname, %s$s is the StatusNet sitename.
$feed->setSubtitle(sprintf(_("People %1$s has subscribed to on %2$s"),
$this->_profile->getBestName(), $this->_profile->getBestName(),
common_config('site', 'name'))); common_config('site', 'name')));
$feed->addLink(common_local_url('subscriptions', $feed->addLink(common_local_url('subscriptions',
array('nickname' => array('nickname' =>
$this->_profile->nickname))); $this->_profile->nickname)));
$feed->addLink($url, $feed->addLink($url,
array('rel' => 'self', array('rel' => 'self',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
// If there's more... // If there's more...
if ($this->page > 1) { if ($this->page > 1) {
@ -167,9 +170,9 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
$feed->addLink(common_local_url('AtomPubSubscriptionFeed', $feed->addLink(common_local_url('AtomPubSubscriptionFeed',
array('subscriber' => array('subscriber' =>
$this->_profile->id), $this->_profile->id),
array('page' => array('page' =>
$this->page - 1)), $this->page - 1)),
array('rel' => 'prev', array('rel' => 'prev',
'type' => 'application/atom+xml')); 'type' => 'application/atom+xml'));
@ -214,15 +217,15 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return void * @return void
*/ */
function addSubscription() function addSubscription()
{ {
if (empty($this->auth_user) || if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) { $this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't add someone else's". // TRANS: Client exception thrown when trying to subscribe another user.
" subscription"), 403); throw new ClientException(_("Cannot add someone else's".
" subscription."), 403);
} }
$xml = file_get_contents('php://input'); $xml = file_get_contents('php://input');
$dom = DOMDocument::loadXML($xml); $dom = DOMDocument::loadXML($xml);
@ -250,6 +253,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$person = $activity->objects[0]; $person = $activity->objects[0];
if ($person->type != ActivityObject::PERSON) { if ($person->type != ActivityObject::PERSON) {
// TRANS: Client exception thrown when subscribing to an object that is not a person.
$this->clientError(_('Can only follow people.')); $this->clientError(_('Can only follow people.'));
return; return;
} }
@ -259,7 +263,16 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$profile = Profile::fromURI($person->id); $profile = Profile::fromURI($person->id);
if (empty($profile)) { if (empty($profile)) {
$this->clientError(sprintf(_('Unknown profile %s'), $person->id)); // TRANS: Client exception thrown when subscribing to a non-existing profile.
$this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
return;
}
if (Subscription::exists($this->_profile, $profile)) {
// 409 Conflict
$this->clientError(sprintf(_('Already subscribed to %s'),
$person->id),
409);
return; return;
} }
@ -290,7 +303,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return $_SERVER['REQUEST_METHOD'] != 'POST'; return $_SERVER['REQUEST_METHOD'] != 'POST';
@ -301,7 +313,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return string last modified http header * @return string last modified http header
*/ */
function lastModified() function lastModified()
{ {
return null; return null;
@ -312,7 +323,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
return null; return null;
@ -323,7 +333,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
* *
* @return boolean true if delete, else false * @return boolean true if delete, else false
*/ */
function requiresAuth() function requiresAuth()
{ {
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {

View File

@ -115,7 +115,7 @@ class ConfirmaddressAction extends Action
if (!$result) { if (!$result) {
common_log_db_error($cur, 'UPDATE', __FILE__); common_log_db_error($cur, 'UPDATE', __FILE__);
// TRANS: Server error displayed when a user update to the database fails in the contact address confirmation action. // TRANS: Server error displayed when a user update to the database fails in the contact address confirmation action.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Delete your own account * Delete your own account
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -36,7 +36,7 @@ if (!defined('STATUSNET')) {
/** /**
* Action to delete your own account * Action to delete your own account
* *
* Note that this is distinct from DeleteuserAction, which see. I thought * Note that this is distinct from DeleteuserAction, which see. I thought
* that making that action do both things (delete another user and delete the * that making that action do both things (delete another user and delete the
* current user) would open a lot of holes. I'm open to refactoring, however. * current user) would open a lot of holes. I'm open to refactoring, however.
@ -48,7 +48,6 @@ if (!defined('STATUSNET')) {
* @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 DeleteaccountAction extends Action class DeleteaccountAction extends Action
{ {
private $_complete = false; private $_complete = false;
@ -61,19 +60,20 @@ class DeleteaccountAction extends Action
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
$cur = common_current_user(); $cur = common_current_user();
if (empty($cur)) { if (empty($cur)) {
// TRANS: Client exception displayed trying to delete a user account while not logged in.
throw new ClientException(_("Only logged-in users ". throw new ClientException(_("Only logged-in users ".
"can delete their account."), 403); "can delete their account."), 403);
} }
if (!$cur->hasRight(Right::DELETEACCOUNT)) { if (!$cur->hasRight(Right::DELETEACCOUNT)) {
// TRANS: Client exception displayed trying to delete a user account without have the rights to do that.
throw new ClientException(_("You cannot delete your account."), 403); throw new ClientException(_("You cannot delete your account."), 403);
} }
@ -87,7 +87,6 @@ class DeleteaccountAction extends Action
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -109,7 +108,6 @@ class DeleteaccountAction extends Action
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return false; return false;
@ -122,7 +120,6 @@ class DeleteaccountAction extends Action
* *
* @return string last modified http header * @return string last modified http header
*/ */
function lastModified() function lastModified()
{ {
// For comparison with If-Last-Modified // For comparison with If-Last-Modified
@ -137,7 +134,6 @@ class DeleteaccountAction extends Action
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
return null; return null;
@ -145,7 +141,7 @@ class DeleteaccountAction extends Action
/** /**
* Delete the current user's account * Delete the current user's account
* *
* Checks for the "I am sure." string to make sure the user really * Checks for the "I am sure." string to make sure the user really
* wants to delete their account. * wants to delete their account.
* *
@ -156,13 +152,16 @@ class DeleteaccountAction extends Action
* *
* @return void * @return void
*/ */
function deleteAccount() function deleteAccount()
{ {
$this->checkSessionToken(); $this->checkSessionToken();
// !!! If this string is changed, it also needs to be changed in DeleteAccountForm::formData()
if ($this->trimmed('iamsure') != _('I am sure.')) { // TRANS: Confirmation text for user deletion. The user has to type this exactly the same, including punctuation.
$this->_error = _('You must write "I am sure." exactly in the box.'); $iamsure = _('I am sure.');
if ($this->trimmed('iamsure') != $iamsure ) {
// TRANS: Notification for user about the text that must be input to be able to delete a user account.
// TRANS: %s is the text that needs to be input.
$this->_error = sprintf(_('You must write "%s" exactly in the box.'), $iamsure);
$this->showPage(); $this->showPage();
return; return;
} }
@ -191,7 +190,7 @@ class DeleteaccountAction extends Action
/** /**
* Shows the page content. * Shows the page content.
* *
* If the deletion is complete, just shows a completion message. * If the deletion is complete, just shows a completion message.
* *
* Otherwise, shows the deletion form. * Otherwise, shows the deletion form.
@ -199,11 +198,11 @@ class DeleteaccountAction extends Action
* @return void * @return void
* *
*/ */
function showContent() function showContent()
{ {
if ($this->_complete) { if ($this->_complete) {
$this->element('p', 'confirmation', $this->element('p', 'confirmation',
// TRANS: Confirmation that a user account has been deleted.
_('Account deleted.')); _('Account deleted.'));
return; return;
} }
@ -216,7 +215,7 @@ class DeleteaccountAction extends Action
$form = new DeleteAccountForm($this); $form = new DeleteAccountForm($this);
$form->show(); $form->show();
} }
/** /**
* Show the title of the page * Show the title of the page
* *
@ -225,13 +224,14 @@ class DeleteaccountAction extends Action
function title() function title()
{ {
// TRANS: Page title for page on which a user account can be deleted.
return _('Delete account'); return _('Delete account');
} }
} }
/** /**
* Form for deleting your account * Form for deleting your account
* *
* Note that this mostly is here to keep you from accidentally deleting your * Note that this mostly is here to keep you from accidentally deleting your
* account. * account.
* *
@ -242,7 +242,6 @@ class DeleteaccountAction extends Action
* @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 DeleteAccountForm extends Form class DeleteAccountForm extends Form
{ {
/** /**
@ -250,7 +249,6 @@ class DeleteAccountForm extends Form
* *
* @return string the form's class * @return string the form's class
*/ */
function formClass() function formClass()
{ {
return 'form_profile_delete'; return 'form_profile_delete';
@ -261,7 +259,6 @@ class DeleteAccountForm extends Form
* *
* @return string the form's action URL * @return string the form's action URL
*/ */
function action() function action()
{ {
return common_local_url('deleteaccount'); return common_local_url('deleteaccount');
@ -269,51 +266,60 @@ class DeleteAccountForm extends Form
/** /**
* Output form data * Output form data
* *
* Instructions plus an 'i am sure' entry box. * Instructions plus an 'i am sure' entry box.
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$cur = common_current_user(); $cur = common_current_user();
$msg = _('<p>This will <strong>permanently delete</strong> '. // TRANS: Form text for user deletion form.
'your account data from this server. </p>'); $msg = '<p>' . _('This will <strong>permanently delete</strong> '.
'your account data from this server.') . '</p>';
if ($cur->hasRight(Right::BACKUPACCOUNT)) { if ($cur->hasRight(Right::BACKUPACCOUNT)) {
$msg .= sprintf(_('<p>You are strongly advised to '. // TRANS: Additional form text for user deletion form shown if a user has account backup rights.
// TRANS: %s is a URL to the backup page.
$msg .= '<p>' . sprintf(_('You are strongly advised to '.
'<a href="%s">back up your data</a>'. '<a href="%s">back up your data</a>'.
' before deletion.</p>'), ' before deletion.'),
common_local_url('backupaccount')); common_local_url('backupaccount')) . '</p>';
} }
$this->out->elementStart('p'); $this->out->elementStart('p');
$this->out->raw($msg); $this->out->raw($msg);
$this->out->elementEnd('p'); $this->out->elementEnd('p');
// !!! If this string is changed, it also needs to be changed in class DeleteaccountAction.
// TRANS: Confirmation text for user deletion. The user has to type this exactly the same, including punctuation.
$iamsure = _("I am sure.");
$this->out->input('iamsure', $this->out->input('iamsure',
// TRANS: Field label for delete account confirmation entry.
_('Confirm'), _('Confirm'),
null, null,
_('Enter "I am sure." to confirm that '. // TRANS: Input title for the delete account field.
'you want to delete your account.')); // TRANS: %s is the text that needs to be input.
sprintf(_('Enter "%s" to confirm that '.
'you want to delete your account.'),$iamsure ));
} }
/** /**
* Buttons for the form * Buttons for the form
* *
* In this case, a single submit button * In this case, a single submit button
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', $this->out->submit('submit',
// TRANS: Button text for user account deletion.
_m('BUTTON', 'Delete'), _m('BUTTON', 'Delete'),
'submit', 'submit',
null, null,
_('Permanently your account')); // TRANS: Button title for user account deletion.
_('Permanently delete your account'));
} }
} }

View File

@ -75,7 +75,7 @@ class DeletenoticeAction extends Action
if ($this->notice->profile_id != $this->user_profile->id && if ($this->notice->profile_id != $this->user_profile->id &&
!$this->user->hasRight(Right::DELETEOTHERSNOTICE)) { !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
// TRANS: Error message displayed trying to delete a notice that was not made by the current user. // TRANS: Error message displayed trying to delete a notice that was not made by the current user.
common_user_error(_('Can\'t delete this notice.')); common_user_error(_('Cannot delete this notice.'));
exit; exit;
} }
// XXX: Ajax! // XXX: Ajax!

View File

@ -356,7 +356,7 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating e-mail preferences. // TRANS: Server error thrown on database error updating e-mail preferences.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
@ -423,7 +423,7 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__); common_log_db_error($confirm, 'INSERT', __FILE__);
// TRANS: Server error thrown on database error adding e-mail confirmation code. // TRANS: Server error thrown on database error adding e-mail confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.')); $this->serverError(_('Could not insert confirmation code.'));
return; return;
} }
@ -465,7 +465,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__); common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling e-mail address confirmation. // TRANS: Server error thrown on database error canceling e-mail address confirmation.
$this->serverError(_('Couldn\'t delete email confirmation.')); $this->serverError(_('Could not delete email confirmation.'));
return; return;
} }
@ -505,7 +505,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered e-mail address. // TRANS: Server error thrown on database error removing a registered e-mail address.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
$user->query('COMMIT'); $user->query('COMMIT');
@ -537,7 +537,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) { if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing incoming e-mail address. // TRANS: Server error thrown on database error removing incoming e-mail address.
$this->serverError(_("Couldn't update user record.")); $this->serverError(_("Could not update user record."));
} }
// TRANS: Message given after successfully removing an incoming e-mail address. // TRANS: Message given after successfully removing an incoming e-mail address.
@ -562,7 +562,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) { if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error adding incoming e-mail address. // TRANS: Server error thrown on database error adding incoming e-mail address.
$this->serverError(_("Couldn't update user record.")); $this->serverError(_("Could not update user record."));
} }
// TRANS: Message given after successfully adding an incoming e-mail address. // TRANS: Message given after successfully adding an incoming e-mail address.

View File

@ -263,7 +263,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__); common_log_db_error($design, 'UPDATE', __FILE__);
$this->showForm(_('Couldn\'t update your design.')); $this->showForm(_('Could not update your design.'));
return; return;
} }

View File

@ -49,7 +49,6 @@ define('MAX_ORIGINAL', 480);
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class GrouplogoAction extends GroupDesignAction class GrouplogoAction extends GroupDesignAction
{ {
var $mode = null; var $mode = null;
@ -67,6 +66,7 @@ class GrouplogoAction extends GroupDesignAction
parent::prepare($args); parent::prepare($args);
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed when trying to create a group while not logged in.
$this->clientError(_('You must be logged in to create a group.')); $this->clientError(_('You must be logged in to create a group.'));
return false; return false;
} }
@ -83,6 +83,7 @@ class GrouplogoAction extends GroupDesignAction
} }
if (!$nickname) { if (!$nickname) {
// TRANS: Client error displayed when trying to change group logo settings without having a nickname.
$this->clientError(_('No nickname.'), 404); $this->clientError(_('No nickname.'), 404);
return false; return false;
} }
@ -99,6 +100,7 @@ class GrouplogoAction extends GroupDesignAction
} }
if (!$this->group) { if (!$this->group) {
// TRANS: Client error displayed when trying to update logo settings for a non-existing group.
$this->clientError(_('No such group.'), 404); $this->clientError(_('No such group.'), 404);
return false; return false;
} }
@ -106,6 +108,7 @@ class GrouplogoAction extends GroupDesignAction
$cur = common_current_user(); $cur = common_current_user();
if (!$cur->isAdmin($this->group)) { if (!$cur->isAdmin($this->group)) {
// TRANS: Client error displayed when trying to change group logo settings while not being a group admin.
$this->clientError(_('You must be an admin to edit the group.'), 403); $this->clientError(_('You must be an admin to edit the group.'), 403);
return false; return false;
} }
@ -136,9 +139,9 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
// TRANS: Title for group logo settings page.
return _('Group logo'); return _('Group logo');
} }
@ -147,9 +150,10 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
// TRANS: Instructions for group logo page.
// TRANS: %s is the maximum file size for that site.
return sprintf(_('You can upload a logo image for your group. The maximum file size is %s.'), ImageFile::maxFileSize()); return sprintf(_('You can upload a logo image for your group. The maximum file size is %s.'), ImageFile::maxFileSize());
} }
@ -160,7 +164,6 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if ($this->mode == 'crop') { if ($this->mode == 'crop') {
@ -178,6 +181,7 @@ class GrouplogoAction extends GroupDesignAction
if (!$profile) { if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__); common_log_db_error($user, 'SELECT', __FILE__);
// TRANS: Server error displayed coming across a request from a user without a profile.
$this->serverError(_('User without matching profile.')); $this->serverError(_('User without matching profile.'));
return; return;
} }
@ -192,6 +196,7 @@ class GrouplogoAction extends GroupDesignAction
common_local_url('grouplogo', common_local_url('grouplogo',
array('nickname' => $this->group->nickname)))); array('nickname' => $this->group->nickname))));
$this->elementStart('fieldset'); $this->elementStart('fieldset');
// TRANS: Group logo form legend.
$this->element('legend', null, _('Group logo')); $this->element('legend', null, _('Group logo'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
@ -199,6 +204,7 @@ class GrouplogoAction extends GroupDesignAction
if ($original) { if ($original) {
$this->elementStart('li', array('id' => 'avatar_original', $this->elementStart('li', array('id' => 'avatar_original',
'class' => 'avatar_view')); 'class' => 'avatar_view'));
// TRANS: Uploaded original file in group logo form.
$this->element('h2', null, _("Original")); $this->element('h2', null, _("Original"));
$this->elementStart('div', array('id'=>'avatar_original_view')); $this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => $this->group->original_logo, $this->element('img', array('src' => $this->group->original_logo,
@ -210,6 +216,7 @@ class GrouplogoAction extends GroupDesignAction
if ($this->group->homepage_logo) { if ($this->group->homepage_logo) {
$this->elementStart('li', array('id' => 'avatar_preview', $this->elementStart('li', array('id' => 'avatar_preview',
'class' => 'avatar_view')); 'class' => 'avatar_view'));
// TRANS: Header for preview of to be displayed group logo.
$this->element('h2', null, _("Preview")); $this->element('h2', null, _("Preview"));
$this->elementStart('div', array('id'=>'avatar_preview_view')); $this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => $this->group->homepage_logo, $this->element('img', array('src' => $this->group->homepage_logo,
@ -233,6 +240,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('ul', 'form_actions'); $this->elementStart('ul', 'form_actions');
$this->elementStart('li'); $this->elementStart('li');
// TRANS: Submit button for uploading a group logo.
$this->submit('upload', _('Upload')); $this->submit('upload', _('Upload'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
@ -251,6 +259,7 @@ class GrouplogoAction extends GroupDesignAction
common_local_url('grouplogo', common_local_url('grouplogo',
array('nickname' => $this->group->nickname)))); array('nickname' => $this->group->nickname))));
$this->elementStart('fieldset'); $this->elementStart('fieldset');
// TRANS: Legend for group logo settings fieldset.
$this->element('legend', null, _('Avatar settings')); $this->element('legend', null, _('Avatar settings'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
@ -259,6 +268,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('li', $this->elementStart('li',
array('id' => 'avatar_original', array('id' => 'avatar_original',
'class' => 'avatar_view')); 'class' => 'avatar_view'));
// TRANS: Header for originally uploaded file before a crop on the group logo page.
$this->element('h2', null, _("Original")); $this->element('h2', null, _("Original"));
$this->elementStart('div', array('id'=>'avatar_original_view')); $this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']), $this->element('img', array('src' => Avatar::url($this->filedata['filename']),
@ -271,6 +281,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('li', $this->elementStart('li',
array('id' => 'avatar_preview', array('id' => 'avatar_preview',
'class' => 'avatar_view')); 'class' => 'avatar_view'));
// TRANS: Header for the cropped group logo on the group logo page.
$this->element('h2', null, _("Preview")); $this->element('h2', null, _("Preview"));
$this->elementStart('div', array('id'=>'avatar_preview_view')); $this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']), $this->element('img', array('src' => Avatar::url($this->filedata['filename']),
@ -286,6 +297,7 @@ class GrouplogoAction extends GroupDesignAction
'id' => $crop_info)); 'id' => $crop_info));
} }
// TRANS: Button text for cropping an uploaded group logo.
$this->submit('crop', _('Crop')); $this->submit('crop', _('Crop'));
$this->elementEnd('li'); $this->elementEnd('li');
@ -302,13 +314,13 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return void * @return void
*/ */
function handlePost() function handlePost()
{ {
// CSRF protection // CSRF protection
$token = $this->trimmed('token'); $token = $this->trimmed('token');
if (!$token || $token != common_session_token()) { if (!$token || $token != common_session_token()) {
// TRANS: Form validation error message.
$this->show_form(_('There was a problem with your session token. '. $this->show_form(_('There was a problem with your session token. '.
'Try again, please.')); 'Try again, please.'));
return; return;
@ -319,6 +331,7 @@ class GrouplogoAction extends GroupDesignAction
} else if ($this->arg('crop')) { } else if ($this->arg('crop')) {
$this->cropLogo(); $this->cropLogo();
} else { } else {
// TRANS: Form validation error message when an unsupported argument is used.
$this->showForm(_('Unexpected form submission.')); $this->showForm(_('Unexpected form submission.'));
} }
} }
@ -331,7 +344,6 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return void * @return void
*/ */
function uploadLogo() function uploadLogo()
{ {
try { try {
@ -362,6 +374,7 @@ class GrouplogoAction extends GroupDesignAction
$this->mode = 'crop'; $this->mode = 'crop';
// TRANS: Form instructions on the group logo page.
$this->showForm(_('Pick a square area of the image to be the logo.'), $this->showForm(_('Pick a square area of the image to be the logo.'),
true); true);
} }
@ -371,12 +384,12 @@ class GrouplogoAction extends GroupDesignAction
* *
* @return void * @return void
*/ */
function cropLogo() function cropLogo()
{ {
$filedata = $_SESSION['FILEDATA']; $filedata = $_SESSION['FILEDATA'];
if (!$filedata) { if (!$filedata) {
// TRANS: Server error displayed trying to crop an uploaded group logo that is no longer present.
$this->serverError(_('Lost our file data.')); $this->serverError(_('Lost our file data.'));
return; return;
} }
@ -396,8 +409,10 @@ class GrouplogoAction extends GroupDesignAction
@unlink($filedata['filepath']); @unlink($filedata['filepath']);
unset($_SESSION['FILEDATA']); unset($_SESSION['FILEDATA']);
$this->mode = 'upload'; $this->mode = 'upload';
// TRANS: Form success message after updating a group logo.
$this->showForm(_('Logo updated.'), true); $this->showForm(_('Logo updated.'), true);
} else { } else {
// TRANS: Form failure message after failing to update a group logo.
$this->showForm(_('Failed updating logo.')); $this->showForm(_('Failed updating logo.'));
} }
} }

View File

@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/jabber.php';
* *
* @see SettingsAction * @see SettingsAction
*/ */
class ImsettingsAction extends ConnectSettingsAction class ImsettingsAction extends ConnectSettingsAction
{ {
/** /**
@ -53,7 +52,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
// TRANS: Title for instance messaging settings. // TRANS: Title for instance messaging settings.
@ -65,7 +63,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
// TRANS: Instant messaging settings page instructions. // TRANS: Instant messaging settings page instructions.
@ -85,7 +82,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if (!common_config('xmpp', 'enabled')) { if (!common_config('xmpp', 'enabled')) {
@ -152,7 +148,7 @@ class ImsettingsAction extends ConnectSettingsAction
} }
} }
$this->elementEnd('fieldset'); $this->elementEnd('fieldset');
$this->elementStart('fieldset', array('id' => 'settings_im_preferences')); $this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
// TRANS: Form legend for IM preferences form. // TRANS: Form legend for IM preferences form.
$this->element('legend', null, _('IM preferences')); $this->element('legend', null, _('IM preferences'));
@ -194,7 +190,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return Confirm_address address object for this user * @return Confirm_address address object for this user
*/ */
function getConfirmation() function getConfirmation()
{ {
$user = common_current_user(); $user = common_current_user();
@ -221,7 +216,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function handlePost() function handlePost()
{ {
// CSRF protection // CSRF protection
@ -254,7 +248,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function savePreferences() function savePreferences()
{ {
$jabbernotify = $this->boolean('jabbernotify'); $jabbernotify = $this->boolean('jabbernotify');
@ -280,7 +273,7 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating IM preferences. // TRANS: Server error thrown on database error updating IM preferences.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
@ -298,7 +291,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function addAddress() function addAddress()
{ {
$user = common_current_user(); $user = common_current_user();
@ -348,7 +340,7 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__); common_log_db_error($confirm, 'INSERT', __FILE__);
// TRANS: Server error thrown on database error adding IM confirmation code. // TRANS: Server error thrown on database error adding IM confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.')); $this->serverError(_('Could not insert confirmation code.'));
return; return;
} }
@ -374,7 +366,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function cancelConfirmation() function cancelConfirmation()
{ {
$jabber = $this->arg('jabber'); $jabber = $this->arg('jabber');
@ -397,7 +388,7 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__); common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling IM address confirmation. // TRANS: Server error thrown on database error canceling IM address confirmation.
$this->serverError(_('Couldn\'t delete IM confirmation.')); $this->serverError(_('Could not delete IM confirmation.'));
return; return;
} }
@ -412,7 +403,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function removeAddress() function removeAddress()
{ {
$user = common_current_user(); $user = common_current_user();
@ -439,7 +429,7 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered IM address. // TRANS: Server error thrown on database error removing a registered IM address.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
$user->query('COMMIT'); $user->query('COMMIT');
@ -459,7 +449,6 @@ class ImsettingsAction extends ConnectSettingsAction
* *
* @return boolean whether the Jabber ID exists * @return boolean whether the Jabber ID exists
*/ */
function jabberExists($jabber) function jabberExists($jabber)
{ {
$user = common_current_user(); $user = common_current_user();

View File

@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class LicenseadminpanelAction extends AdminPanelAction class LicenseadminpanelAction extends AdminPanelAction
{ {
@ -61,7 +60,6 @@ class LicenseadminpanelAction extends AdminPanelAction
* *
* @return string instructions * @return string instructions
*/ */
function getInstructions() function getInstructions()
{ {
return _('License for this StatusNet site'); return _('License for this StatusNet site');
@ -72,7 +70,6 @@ class LicenseadminpanelAction extends AdminPanelAction
* *
* @return void * @return void
*/ */
function showForm() function showForm()
{ {
$form = new LicenseAdminPanelForm($this); $form = new LicenseAdminPanelForm($this);
@ -85,7 +82,6 @@ class LicenseadminpanelAction extends AdminPanelAction
* *
* @return void * @return void
*/ */
function saveSettings() function saveSettings()
{ {
static $settings = array( static $settings = array(
@ -128,7 +124,6 @@ class LicenseadminpanelAction extends AdminPanelAction
* *
* @return nothing * @return nothing
*/ */
function validate(&$values) function validate(&$values)
{ {
// Validate license type (shouldn't have to do it, but just in case) // Validate license type (shouldn't have to do it, but just in case)
@ -197,7 +192,6 @@ class LicenseAdminPanelForm extends AdminForm
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'licenseadminpanel'; return 'licenseadminpanel';
@ -208,7 +202,6 @@ class LicenseAdminPanelForm extends AdminForm
* *
* @return string class of the form * @return string class of the form
*/ */
function formClass() function formClass()
{ {
return 'form_settings'; return 'form_settings';
@ -312,7 +305,6 @@ class LicenseAdminPanelForm extends AdminForm
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit( $this->out->submit(

View File

@ -181,7 +181,7 @@ class OthersettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error displayed when "Other" settings in user profile could not be updated on the server. // TRANS: Server error displayed when "Other" settings in user profile could not be updated on the server.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }

View File

@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class ProfilesettingsAction extends AccountSettingsAction class ProfilesettingsAction extends AccountSettingsAction
{ {
/** /**
@ -54,7 +53,6 @@ class ProfilesettingsAction extends AccountSettingsAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
// TRANS: Page title for profile settings. // TRANS: Page title for profile settings.
@ -66,7 +64,6 @@ class ProfilesettingsAction extends AccountSettingsAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
// TRANS: Usage instructions for profile settings. // TRANS: Usage instructions for profile settings.
@ -87,7 +84,6 @@ class ProfilesettingsAction extends AccountSettingsAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
$user = common_current_user(); $user = common_current_user();
@ -212,7 +208,6 @@ class ProfilesettingsAction extends AccountSettingsAction
* *
* @return void * @return void
*/ */
function handlePost() function handlePost()
{ {
// CSRF protection // CSRF protection
@ -323,7 +318,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be updated. // TRANS: Server error thrown when user profile settings could not be updated.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} else { } else {
// Re-initialize language environment if it changed // Re-initialize language environment if it changed
@ -348,7 +343,7 @@ class ProfilesettingsAction extends AccountSettingsAction
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be updated to // TRANS: Server error thrown when user profile settings could not be updated to
// TRANS: automatically subscribe to any subscriber. // TRANS: automatically subscribe to any subscriber.
$this->serverError(_('Couldn\'t update user for autosubscribe.')); $this->serverError(_('Could not update user for autosubscribe.'));
return; return;
} }
} }
@ -406,7 +401,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__); common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
// TRANS: Server error thrown when user profile location preference settings could not be updated. // TRANS: Server error thrown when user profile location preference settings could not be updated.
$this->serverError(_('Couldn\'t save location prefs.')); $this->serverError(_('Could not save location prefs.'));
return; return;
} }
} }
@ -419,7 +414,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($profile, 'UPDATE', __FILE__); common_log_db_error($profile, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be saved. // TRANS: Server error thrown when user profile settings could not be saved.
$this->serverError(_('Couldn\'t save profile.')); $this->serverError(_('Could not save profile.'));
return; return;
} }
@ -428,7 +423,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if (!$result) { if (!$result) {
// TRANS: Server error thrown when user profile settings tags could not be saved. // TRANS: Server error thrown when user profile settings tags could not be saved.
$this->serverError(_('Couldn\'t save tags.')); $this->serverError(_('Could not save tags.'));
return; return;
} }

View File

@ -44,7 +44,6 @@ require_once INSTALLDIR.'/extlib/libomb/profile.php';
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/ * @link http://status.net/
*/ */
class RemotesubscribeAction extends Action class RemotesubscribeAction extends Action
{ {
var $nickname; var $nickname;
@ -173,14 +172,14 @@ class RemotesubscribeAction extends Action
if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) == if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) ==
common_local_url('requesttoken') || common_local_url('requesttoken') ||
User::staticGet('uri', $service->getRemoteUserURI())) { User::staticGet('uri', $service->getRemoteUserURI())) {
$this->showForm(_('Thats a local profile! Login to subscribe.')); $this->showForm(_('That is a local profile! Login to subscribe.'));
return; return;
} }
try { try {
$service->requestToken(); $service->requestToken();
} catch (OMB_RemoteServiceException $e) { } catch (OMB_RemoteServiceException $e) {
$this->showForm(_('Couldnt get a request token.')); $this->showForm(_('Could not get a request token.'));
return; return;
} }
@ -204,4 +203,3 @@ class RemotesubscribeAction extends Action
common_redirect($target_url, 303); common_redirect($target_url, 303);
} }
} }
?>

View File

@ -41,7 +41,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/ * @link http://status.net/
*/ */
class RepeatAction extends Action class RepeatAction extends Action
{ {
var $user = null; var $user = null;
@ -73,7 +72,7 @@ class RepeatAction extends Action
} }
if ($this->user->id == $this->notice->profile_id) { if ($this->user->id == $this->notice->profile_id) {
$this->clientError(_("You can't repeat your own notice.")); $this->clientError(_("You cannot repeat your own notice."));
return false; return false;
} }
@ -101,7 +100,6 @@ class RepeatAction extends Action
* *
* @return void * @return void
*/ */
function handle($args) function handle($args)
{ {
$repeat = $this->notice->repeat($this->user->id, 'web'); $repeat = $this->notice->repeat($this->user->id, 'web');

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* Restore a backup of your own account from the browser * Restore a backup of your own account from the browser
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @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 RestoreaccountAction extends Action class RestoreaccountAction extends Action
{ {
private $success = false; private $success = false;
@ -52,12 +51,12 @@ class RestoreaccountAction extends Action
/** /**
* Returns the title of the page * Returns the title of the page
* *
* @return string page title * @return string page title
*/ */
function title() function title()
{ {
// TRANS: Page title for page where a user account can be restored from backup.
return _("Restore account"); return _("Restore account");
} }
@ -68,7 +67,6 @@ class RestoreaccountAction extends Action
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -76,10 +74,12 @@ class RestoreaccountAction extends Action
$cur = common_current_user(); $cur = common_current_user();
if (empty($cur)) { if (empty($cur)) {
// TRANS: Client exception displayed when trying to restore an account while not logged in.
throw new ClientException(_('Only logged-in users can restore their account.'), 403); throw new ClientException(_('Only logged-in users can restore their account.'), 403);
} }
if (!$cur->hasRight(Right::RESTOREACCOUNT)) { if (!$cur->hasRight(Right::RESTOREACCOUNT)) {
// TRANS: Client exception displayed when trying to restore an account without having restore rights.
throw new ClientException(_('You may not restore your account.'), 403); throw new ClientException(_('You may not restore your account.'), 403);
} }
@ -93,7 +93,6 @@ class RestoreaccountAction extends Action
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -108,17 +107,17 @@ class RestoreaccountAction extends Action
/** /**
* Queue a file for restoration * Queue a file for restoration
* *
* Uses the UserActivityStream class; may take a long time! * Uses the UserActivityStream class; may take a long time!
* *
* @return void * @return void
*/ */
function restoreAccount() function restoreAccount()
{ {
$this->checkSessionToken(); $this->checkSessionToken();
if (!isset($_FILES['restorefile']['error'])) { if (!isset($_FILES['restorefile']['error'])) {
// TRANS: Client exception displayed trying to restore an account while something went wrong uploading a file.
throw new ClientException(_('No uploaded file.')); throw new ClientException(_('No uploaded file.'));
} }
@ -143,7 +142,7 @@ class RestoreaccountAction extends Action
' partially uploaded.')); ' partially uploaded.'));
return; return;
case UPLOAD_ERR_NO_FILE: case UPLOAD_ERR_NO_FILE:
// No file; probably just a non-AJAX submission. // TRANS: Client exception. No file; probably just a non-AJAX submission.
throw new ClientException(_('No uploaded file.')); throw new ClientException(_('No uploaded file.'));
return; return;
case UPLOAD_ERR_NO_TMP_DIR: case UPLOAD_ERR_NO_TMP_DIR:
@ -170,18 +169,21 @@ class RestoreaccountAction extends Action
try { try {
if (!file_exists($filename)) { if (!file_exists($filename)) {
throw new ServerException("No such file '$filename'."); // TRANS: Server exception thrown when an expected file upload could not be found.
throw new ServerException(_("No such file '$filename'."));
} }
if (!is_file($filename)) { if (!is_file($filename)) {
throw new ServerException("Not a regular file: '$filename'."); // TRANS: Server exception thrown when an expected file upload is not an actual file.
throw new ServerException(_("Not a regular file: '$filename'."));
} }
if (!is_readable($filename)) { if (!is_readable($filename)) {
throw new ServerException("File '$filename' not readable."); // TRANS: Server exception thrown when an expected file upload could not be read.
throw new ServerException(_("File '$filename' not readable."));
} }
common_debug(sprintf(_("Getting backup from file '%s'."), $filename)); common_debug(sprintf("Getting backup from file '%s'.", $filename));
$xml = file_get_contents($filename); $xml = file_get_contents($filename);
@ -201,7 +203,8 @@ class RestoreaccountAction extends Action
if (!$feed || if (!$feed ||
$feed->namespaceURI != Activity::ATOM || $feed->namespaceURI != Activity::ATOM ||
$feed->localName != 'feed') { $feed->localName != 'feed') {
throw new ClientException(_("Not an atom feed.")); // TRANS: Client exception thrown when a feed is not an Atom feed.
throw new ClientException(_("Not an Atom feed."));
} }
// Enqueue for processing. // Enqueue for processing.
@ -230,21 +233,22 @@ class RestoreaccountAction extends Action
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if ($this->success) { if ($this->success) {
$this->element('p', null, $this->element('p', null,
// TRANS: Success message when a feed has been restored.
_('Feed has been restored. Your old posts should now appear in search and your profile page.')); _('Feed has been restored. Your old posts should now appear in search and your profile page.'));
} else if ($this->inprogress) { } else if ($this->inprogress) {
$this->element('p', null, $this->element('p', null,
// TRANS: Message when a feed restore is in progress.
_('Feed will be restored. Please wait a few minutes for results.')); _('Feed will be restored. Please wait a few minutes for results.'));
} else { } else {
$form = new RestoreAccountForm($this); $form = new RestoreAccountForm($this);
$form->show(); $form->show();
} }
} }
/** /**
* Return true if read only. * Return true if read only.
* *
@ -254,7 +258,6 @@ class RestoreaccountAction extends Action
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return false; return false;
@ -267,7 +270,6 @@ class RestoreaccountAction extends Action
* *
* @return string last modified http header * @return string last modified http header
*/ */
function lastModified() function lastModified()
{ {
// For comparison with If-Last-Modified // For comparison with If-Last-Modified
@ -282,7 +284,6 @@ class RestoreaccountAction extends Action
* *
* @return string etag http header * @return string etag http header
*/ */
function etag() function etag()
{ {
return null; return null;
@ -299,7 +300,6 @@ class RestoreaccountAction extends Action
* @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 RestoreAccountForm extends Form class RestoreAccountForm extends Form
{ {
function __construct($out=null) { function __construct($out=null) {
@ -312,7 +312,6 @@ class RestoreAccountForm extends Form
* *
* @return string the form's class * @return string the form's class
*/ */
function formClass() function formClass()
{ {
return 'form_profile_restore'; return 'form_profile_restore';
@ -323,7 +322,6 @@ class RestoreAccountForm extends Form
* *
* @return string the form's action URL * @return string the form's action URL
*/ */
function action() function action()
{ {
return common_local_url('restoreaccount'); return common_local_url('restoreaccount');
@ -331,19 +329,19 @@ class RestoreAccountForm extends Form
/** /**
* Output form data * Output form data
* *
* Really, just instructions for doing a backup. * Really, just instructions for doing a backup.
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$this->out->elementStart('p', 'instructions'); $this->out->elementStart('p', 'instructions');
// TRANS: Form instructions for feed restore.
$this->out->raw(_('You can upload a backed-up stream in '. $this->out->raw(_('You can upload a backed-up stream in '.
'<a href="http://activitystrea.ms/">Activity Streams</a> format.')); '<a href="http://activitystrea.ms/">Activity Streams</a> format.'));
$this->out->elementEnd('p'); $this->out->elementEnd('p');
$this->out->elementStart('ul', 'form_data'); $this->out->elementStart('ul', 'form_data');
@ -359,18 +357,19 @@ class RestoreAccountForm extends Form
/** /**
* Buttons for the form * Buttons for the form
* *
* In this case, a single submit button * In this case, a single submit button
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', $this->out->submit('submit',
// TRANS: Submit button to confirm upload of a user backup file for account restore.
_m('BUTTON', 'Upload'), _m('BUTTON', 'Upload'),
'submit', 'submit',
null, null,
// TRANS: Title for submit button to confirm upload of a user backup file for account restore.
_('Upload the file')); _('Upload the file'));
} }
} }

View File

@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
* *
* @see SettingsAction * @see SettingsAction
*/ */
class SmssettingsAction extends ConnectSettingsAction class SmssettingsAction extends ConnectSettingsAction
{ {
/** /**
@ -52,7 +51,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
// TRANS: Title for SMS settings. // TRANS: Title for SMS settings.
@ -64,7 +62,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
// XXX: For consistency of parameters in messages, this should be a // XXX: For consistency of parameters in messages, this should be a
@ -88,7 +85,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if (!common_config('sms', 'enabled')) { if (!common_config('sms', 'enabled')) {
@ -219,7 +215,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @todo very similar to EmailsettingsAction::getConfirmation(); refactor? * @todo very similar to EmailsettingsAction::getConfirmation(); refactor?
*/ */
function getConfirmation() function getConfirmation()
{ {
$user = common_current_user(); $user = common_current_user();
@ -246,7 +241,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function handlePost() function handlePost()
{ {
// CSRF protection // CSRF protection
@ -285,7 +279,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function savePreferences() function savePreferences()
{ {
$smsnotify = $this->boolean('smsnotify'); $smsnotify = $this->boolean('smsnotify');
@ -305,7 +298,7 @@ class SmssettingsAction extends ConnectSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating SMS preferences. // TRANS: Server error thrown on database error updating SMS preferences.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
@ -323,7 +316,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function addAddress() function addAddress()
{ {
$user = common_current_user(); $user = common_current_user();
@ -370,7 +362,7 @@ class SmssettingsAction extends ConnectSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__); common_log_db_error($confirm, 'INSERT', __FILE__);
// TRANS: Server error thrown on database error adding SMS confirmation code. // TRANS: Server error thrown on database error adding SMS confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.')); $this->serverError(_('Could not insert confirmation code.'));
return; return;
} }
@ -395,7 +387,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function cancelConfirmation() function cancelConfirmation()
{ {
$sms = $this->trimmed('sms'); $sms = $this->trimmed('sms');
@ -419,7 +410,7 @@ class SmssettingsAction extends ConnectSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__); common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling SMS phone number confirmation. // TRANS: Server error thrown on database error canceling SMS phone number confirmation.
$this->serverError(_('Couldn\'t delete email confirmation.')); $this->serverError(_('Could not delete email confirmation.'));
return; return;
} }
@ -432,7 +423,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function removeAddress() function removeAddress()
{ {
$user = common_current_user(); $user = common_current_user();
@ -461,7 +451,7 @@ class SmssettingsAction extends ConnectSettingsAction
if (!$result) { if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered SMS phone number. // TRANS: Server error thrown on database error removing a registered SMS phone number.
$this->serverError(_('Couldn\'t update user.')); $this->serverError(_('Could not update user.'));
return; return;
} }
$user->query('COMMIT'); $user->query('COMMIT');
@ -479,7 +469,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return boolean does the number exist * @return boolean does the number exist
*/ */
function smsExists($sms) function smsExists($sms)
{ {
$user = common_current_user(); $user = common_current_user();
@ -498,7 +487,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function carrierSelect() function carrierSelect()
{ {
$carrier = new Sms_carrier(); $carrier = new Sms_carrier();
@ -538,7 +526,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function confirmCode() function confirmCode()
{ {
$code = $this->trimmed('code'); $code = $this->trimmed('code');
@ -559,7 +546,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @return void * @return void
*/ */
function removeIncoming() function removeIncoming()
{ {
$user = common_current_user(); $user = common_current_user();
@ -575,7 +561,7 @@ class SmssettingsAction extends ConnectSettingsAction
if (!$user->updateKeys($orig)) { if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
$this->serverError(_("Couldn't update user record.")); $this->serverError(_("Could not update user record."));
} }
$this->showForm(_('Incoming email address removed.'), true); $this->showForm(_('Incoming email address removed.'), true);
@ -588,7 +574,6 @@ class SmssettingsAction extends ConnectSettingsAction
* *
* @see Emailsettings::newIncoming * @see Emailsettings::newIncoming
*/ */
function newIncoming() function newIncoming()
{ {
$user = common_current_user(); $user = common_current_user();
@ -599,7 +584,7 @@ class SmssettingsAction extends ConnectSettingsAction
if (!$user->updateKeys($orig)) { if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__); common_log_db_error($user, 'UPDATE', __FILE__);
$this->serverError(_("Couldn't update user record.")); $this->serverError(_("Could not update user record."));
} }
$this->showForm(_('New incoming email address added.'), true); $this->showForm(_('New incoming email address added.'), true);

View File

@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/designsettings.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class UserDesignSettingsAction extends DesignSettingsAction class UserDesignSettingsAction extends DesignSettingsAction
{ {
/** /**
@ -70,7 +69,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
return _('Profile design'); return _('Profile design');
@ -81,7 +79,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
return _('Customize the way your profile looks ' . return _('Customize the way your profile looks ' .
@ -93,7 +90,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return Design * @return Design
*/ */
function getWorkingDesign() function getWorkingDesign()
{ {
$user = common_current_user(); $user = common_current_user();
@ -108,7 +104,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
$design = $this->getWorkingDesign(); $design = $this->getWorkingDesign();
@ -125,7 +120,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return void * @return void
*/ */
function saveDesign() function saveDesign()
{ {
foreach ($this->args as $key => $val) { foreach ($this->args as $key => $val) {
@ -168,7 +162,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
$design = $user->getDesign(); $design = $user->getDesign();
if (!empty($design)) { if (!empty($design)) {
$original = clone($design); $original = clone($design);
$design->backgroundcolor = $bgcolor->intValue(); $design->backgroundcolor = $bgcolor->intValue();
@ -183,13 +176,11 @@ class UserDesignSettingsAction extends DesignSettingsAction
if ($result === false) { if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__); common_log_db_error($design, 'UPDATE', __FILE__);
$this->showForm(_('Couldn\'t update your design.')); $this->showForm(_('Could not update your design.'));
return; return;
} }
// update design // update design
} else { } else {
$user->query('BEGIN'); $user->query('BEGIN');
// save new design // save new design
@ -236,7 +227,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
* *
* @return nothing * @return nothing
*/ */
function sethd() function sethd()
{ {
@ -281,5 +271,4 @@ class UserDesignSettingsAction extends DesignSettingsAction
$this->showForm(_('Enjoy your hotdog!'), true); $this->showForm(_('Enjoy your hotdog!'), true);
} }
} }

View File

@ -975,7 +975,7 @@ class User extends Memcached_DataObject
} }
/* /*
* Get a list of OAuth client application that have access to this * Get a list of OAuth client applications that have access to this
* user's account. * user's account.
*/ */
function getConnectedApps($offset = 0, $limit = null) function getConnectedApps($offset = 0, $limit = null)

View File

@ -77,4 +77,5 @@ VALUES
('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()), ('twitvim','TwitVim','http://vim.sourceforge.net/scripts/script.php?script_id=2204', now()),
('Updating.Me','Updating.Me','http://updating.me/', now()), ('Updating.Me','Updating.Me','http://updating.me/', now()),
('urfastr','urfastr','http://urfastr.net/', now()), ('urfastr','urfastr','http://urfastr.net/', now()),
('yatca','Yatca','http://www.yatca.com/', now()); ('yatca','Yatca','http://www.yatca.com/', now()),
('rss.me', 'rss.me', 'http://rss.me/', now());

View File

@ -62,4 +62,5 @@ VALUES
(100114, 'Vodafone Germany', '%s@vodafone-sms.de', now()), (100114, 'Vodafone Germany', '%s@vodafone-sms.de', now()),
(100115, 'E-Plus', '%s@smsmail.eplus.de', now()), (100115, 'E-Plus', '%s@smsmail.eplus.de', now()),
(100116, 'Cellular South', '%s@csouth1.com', now()), (100116, 'Cellular South', '%s@csouth1.com', now()),
(100117, 'ChinaMobile (139)', '%s@139.com', now()); (100117, 'ChinaMobile (139)', '%s@139.com', now()),
(100118, 'Dialog Axiata', '%s@dialog.lk', now());

147
lib/accountmover.php Normal file
View File

@ -0,0 +1,147 @@
<?php
/**
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc.
*
* A class for moving an account to a new server
*
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Account
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
// This check helps protect against security problems;
// your code file can't be executed directly from the web.
exit(1);
}
/**
* Moves an account from this server to another
*
* @category Account
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class AccountMover extends QueueHandler
{
function transport()
{
return 'acctmove';
}
function handle($object)
{
list($user, $remote, $password) = $object;
$remote = Discovery::normalize($remote);
$oprofile = Ostatus_profile::ensureProfileURI($remote);
if (empty($oprofile)) {
throw new Exception("Can't locate account {$remote}");
}
list($svcDocUrl, $username) = self::getServiceDocument($remote);
$sink = new ActivitySink($svcDocUrl, $username, $password);
$this->log(LOG_INFO,
"Moving user {$user->nickname} ".
"to {$remote}.");
$stream = new UserActivityStream($user);
// Reverse activities to run in correct chron order
$acts = array_reverse($stream->activities);
$this->log(LOG_INFO,
"Got ".count($acts)." activities ".
"for {$user->nickname}.");
$qm = QueueManager::get();
foreach ($acts as $act) {
$qm->enqueue(array($act, $sink, $user->uri, $remote), 'actmove');
}
$this->log(LOG_INFO,
"Finished moving user {$user->nickname} ".
"to {$remote}.");
}
static function getServiceDocument($remote)
{
$discovery = new Discovery();
$xrd = $discovery->lookup($remote);
if (empty($xrd)) {
throw new Exception("Can't find XRD for $remote");
}
$svcDocUrl = null;
$username = null;
foreach ($xrd->links as $link) {
if ($link['rel'] == 'http://apinamespace.org/atom' &&
$link['type'] == 'application/atomsvc+xml') {
$svcDocUrl = $link['href'];
if (!empty($link['property'])) {
foreach ($link['property'] as $property) {
if ($property['type'] == 'http://apinamespace.org/atom/username') {
$username = $property['value'];
break;
}
}
}
break;
}
}
if (empty($svcDocUrl)) {
throw new Exception("No AtomPub API service for $remote.");
}
return array($svcDocUrl, $username);
}
/**
* Log some data
*
* Add a header for our class so we know who did it.
*
* @param int $level Log level, like LOG_ERR or LOG_INFO
* @param string $message Message to log
*
* @return void
*/
protected function log($level, $message)
{
common_log($level, "AccountMover: " . $message);
}
}

View File

@ -96,7 +96,7 @@ class AccountSettingsNav extends Widget
$action_name = $this->action->trimmed('action'); $action_name = $this->action->trimmed('action');
$this->action->elementStart('ul', array('class' => 'nav')); $this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartAccountSettingsNav', array(&$this->action))) { if (Event::handle('StartAccountSettingsNav', array($this->action))) {
$user = common_current_user(); $user = common_current_user();
if(Event::handle('StartAccountSettingsProfileMenuItem', array($this, &$menu))){ if(Event::handle('StartAccountSettingsProfileMenuItem', array($this, &$menu))){
@ -142,7 +142,7 @@ class AccountSettingsNav extends Widget
Event::handle('EndAccountSettingsOtherMenuItem', array($this, &$menu)); Event::handle('EndAccountSettingsOtherMenuItem', array($this, &$menu));
} }
Event::handle('EndAccountSettingsNav', array(&$this->action)); Event::handle('EndAccountSettingsNav', array($this->action));
} }
$this->action->elementEnd('ul'); $this->action->elementEnd('ul');

View File

@ -330,6 +330,7 @@ class Activity
* *
* @return DOMElement Atom entry * @return DOMElement Atom entry
*/ */
function toAtomEntry() function toAtomEntry()
{ {
return null; return null;
@ -338,7 +339,12 @@ class Activity
function asString($namespace=false, $author=true, $source=false) function asString($namespace=false, $author=true, $source=false)
{ {
$xs = new XMLStringer(true); $xs = new XMLStringer(true);
$this->outputTo($xs, $namespace, $author, $source);
return $xs->getString();
}
function outputTo($xs, $namespace=false, $author=true, $source=false)
{
if ($namespace) { if ($namespace) {
$attrs = array('xmlns' => 'http://www.w3.org/2005/Atom', $attrs = array('xmlns' => 'http://www.w3.org/2005/Atom',
'xmlns:thr' => 'http://purl.org/syndication/thread/1.0', 'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
@ -526,9 +532,7 @@ class Activity
$xs->elementEnd('entry'); $xs->elementEnd('entry');
$str = $xs->getString(); return;
return $str;
} }
private function _child($element, $tag, $namespace=self::SPEC) private function _child($element, $tag, $namespace=self::SPEC)

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* class to import activities as part of a user's timeline * class to import activities as part of a user's timeline
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @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 ActivityImporter extends QueueHandler class ActivityImporter extends QueueHandler
{ {
private $trusted = false; private $trusted = false;
@ -56,7 +55,6 @@ class ActivityImporter extends QueueHandler
* *
* @return * @return
*/ */
function handle($data) function handle($data)
{ {
list($user, $author, $activity, $trusted) = $data; list($user, $author, $activity, $trusted) = $data;
@ -65,9 +63,8 @@ class ActivityImporter extends QueueHandler
$done = null; $done = null;
if (Event::handle('StartImportActivity', if (Event::handle('StartImportActivity',
array($user, $author, $activity, $trusted, &$done))) { array($user, $author, $activity, $trusted, &$done))) {
try { try {
switch ($activity->verb) { switch ($activity->verb) {
case ActivityVerb::FOLLOW: case ActivityVerb::FOLLOW:
@ -80,9 +77,10 @@ class ActivityImporter extends QueueHandler
$this->postNote($user, $author, $activity); $this->postNote($user, $author, $activity);
break; break;
default: default:
throw new ClientException("Unknown verb: {$activity->verb}"); // TRANS: Client exception thrown when using an unknown verb for the activity importer.
throw new ClientException(sprintf(_("Unknown verb: \"%s\"."),$activity->verb));
} }
Event::handle('EndImportActivity', Event::handle('EndImportActivity',
array($user, $author, $activity, $trusted)); array($user, $author, $activity, $trusted));
$done = true; $done = true;
} catch (ClientException $ce) { } catch (ClientException $ce) {
@ -98,31 +96,31 @@ class ActivityImporter extends QueueHandler
} }
return $done; return $done;
} }
function subscribeProfile($user, $author, $activity) function subscribeProfile($user, $author, $activity)
{ {
$profile = $user->getProfile(); $profile = $user->getProfile();
if ($activity->objects[0]->id == $author->id) { if ($activity->objects[0]->id == $author->id) {
if (!$this->trusted) { if (!$this->trusted) {
throw new ClientException(_("Can't force subscription for untrusted user.")); // TRANS: Client exception thrown when trying to force a subscription for an untrusted user.
throw new ClientException(_("Cannot force subscription for untrusted user."));
} }
$other = $activity->actor; $other = $activity->actor;
$otherUser = User::staticGet('uri', $other->id); $otherUser = User::staticGet('uri', $other->id);
if (!empty($otherUser)) { if (!empty($otherUser)) {
$otherProfile = $otherUser->getProfile(); $otherProfile = $otherUser->getProfile();
} else { } else {
throw new Exception("Can't force remote user to subscribe."); // TRANS: Client exception thrown when trying to for a remote user to subscribe.
throw new Exception(_("Cannot force remote user to subscribe."));
} }
// XXX: don't do this for untrusted input! // XXX: don't do this for untrusted input!
Subscription::start($otherProfile, $profile); Subscription::start($otherProfile, $profile);
} else if (empty($activity->actor)
} else if (empty($activity->actor)
|| $activity->actor->id == $author->id) { || $activity->actor->id == $author->id) {
$other = $activity->objects[0]; $other = $activity->objects[0];
@ -130,12 +128,14 @@ class ActivityImporter extends QueueHandler
$otherProfile = Profile::fromUri($other->id); $otherProfile = Profile::fromUri($other->id);
if (empty($otherProfile)) { if (empty($otherProfile)) {
// TRANS: Client exception thrown when trying to subscribe to an unknown profile.
throw new ClientException(_("Unknown profile.")); throw new ClientException(_("Unknown profile."));
} }
Subscription::start($profile, $otherProfile); Subscription::start($profile, $otherProfile);
} else { } else {
throw new Exception("This activity seems unrelated to our user."); // TRANS: Client exception thrown when trying to import an event not related to the importing user.
throw new Exception(_("This activity seems unrelated to our user."));
} }
} }
@ -150,7 +150,8 @@ class ActivityImporter extends QueueHandler
if (empty($group)) { if (empty($group)) {
$oprofile = Ostatus_profile::ensureActivityObjectProfile($activity->objects[0]); $oprofile = Ostatus_profile::ensureActivityObjectProfile($activity->objects[0]);
if (!$oprofile->isGroup()) { if (!$oprofile->isGroup()) {
throw new ClientException("Remote profile is not a group!"); // TRANS: Client exception thrown when trying to join a remote group that is not a group.
throw new ClientException(_("Remote profile is not a group!"));
} }
$group = $oprofile->localGroup(); $group = $oprofile->localGroup();
} }
@ -158,7 +159,8 @@ class ActivityImporter extends QueueHandler
assert(!empty($group)); assert(!empty($group));
if ($user->isMember($group)) { if ($user->isMember($group)) {
throw new ClientException("User is already a member of this group."); // TRANS: Client exception thrown when trying to join a group the importing user is already a member of.
throw new ClientException(_("User is already a member of this group."));
} }
if (Event::handle('StartJoinGroup', array($group, $user))) { if (Event::handle('StartJoinGroup', array($group, $user))) {
@ -178,7 +180,7 @@ class ActivityImporter extends QueueHandler
$notice = Notice::staticGet('uri', $sourceUri); $notice = Notice::staticGet('uri', $sourceUri);
if (!empty($notice)) { if (!empty($notice)) {
common_log(LOG_INFO, "Notice {$sourceUri} already exists."); common_log(LOG_INFO, "Notice {$sourceUri} already exists.");
if ($this->trusted) { if ($this->trusted) {
@ -194,12 +196,15 @@ class ActivityImporter extends QueueHandler
$notice->update($orig); $notice->update($orig);
return; return;
} else { } else {
throw new ClientException(sprintf(_("Already know about notice %s and ". // TRANS: Client exception thrown when trying to import a notice by another user.
" it's got a different author %s."), // TRANS: %1$s is the source URI of the notice, %2$s is the URI of the author.
throw new ClientException(sprintf(_("Already know about notice %1$s and ".
" it has a different author %2$s."),
$sourceUri, $uri)); $sourceUri, $uri));
} }
} else { } else {
throw new ClientException("Not overwriting author info for non-trusted user."); // TRANS: Client exception thrown when trying to overwrite the author information for a non-trusted user during import.
throw new ClientException(_("Not overwriting author info for non-trusted user."));
} }
} }
@ -213,8 +218,9 @@ class ActivityImporter extends QueueHandler
$sourceContent = $note->title; $sourceContent = $note->title;
} else { } else {
// @fixme fetch from $sourceUrl? // @fixme fetch from $sourceUrl?
// @todo i18n FIXME: use sprintf and add i18n. // TRANS: Client exception thrown when trying to import a notice without content.
throw new ClientException("No content for notice {$sourceUri}."); // TRANS: %s is the notice URI.
throw new ClientException(sprintf(_("No content for notice %s."),$sourceUri));
} }
// Get (safe!) HTML and text versions of the content // Get (safe!) HTML and text versions of the content
@ -345,7 +351,7 @@ class ActivityImporter extends QueueHandler
return array($groups, $replies); return array($groups, $replies);
} }
function purify($content) function purify($content)
{ {

168
lib/activitymover.php Normal file
View File

@ -0,0 +1,168 @@
<?php
/**
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc.
*
* Title of module
*
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Cache
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
// This check helps protect against security problems;
// your code file can't be executed directly from the web.
exit(1);
}
/**
* Class comment
*
* @category General
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class ActivityMover extends QueueHandler
{
function transport()
{
return 'actmove';
}
function handle($data)
{
list ($act, $sink, $userURI, $remoteURI) = $data;
$user = User::staticGet('uri', $userURI);
$remote = Profile::fromURI($remoteURI);
try {
$this->moveActivity($act, $sink, $user, $remote);
} catch (ClientException $cex) {
$this->log(LOG_WARNING,
$cex->getMessage());
// "don't retry me"
return true;
} catch (ServerException $sex) {
$this->log(LOG_WARNING,
$sex->getMessage());
// "retry me" (because we think the server might handle it next time)
return false;
} catch (Exception $ex) {
$this->log(LOG_WARNING,
$ex->getMessage());
// "don't retry me"
return true;
}
}
function moveActivity($act, $sink, $user, $remote)
{
if (empty($user)) {
throw new Exception("No such user {$act->actor->id}");
}
switch ($act->verb) {
case ActivityVerb::FAVORITE:
$this->log(LOG_INFO,
"Moving favorite of {$act->objects[0]->id} by ".
"{$act->actor->id} to {$remote->nickname}.");
// push it, then delete local
$sink->postActivity($act);
$notice = Notice::staticGet('uri', $act->objects[0]->id);
if (!empty($notice)) {
$fave = Fave::pkeyGet(array('user_id' => $user->id,
'notice_id' => $notice->id));
$fave->delete();
}
break;
case ActivityVerb::POST:
$this->log(LOG_INFO,
"Moving notice {$act->objects[0]->id} by ".
"{$act->actor->id} to {$remote->nickname}.");
// XXX: send a reshare, not a post
$sink->postActivity($act);
$notice = Notice::staticGet('uri', $act->objects[0]->id);
if (!empty($notice)) {
$notice->delete();
}
break;
case ActivityVerb::JOIN:
$this->log(LOG_INFO,
"Moving group join of {$act->objects[0]->id} by ".
"{$act->actor->id} to {$remote->nickname}.");
$sink->postActivity($act);
$group = User_group::staticGet('uri', $act->objects[0]->id);
if (!empty($group)) {
Group_member::leave($group->id, $user->id);
}
break;
case ActivityVerb::FOLLOW:
if ($act->actor->id == $user->uri) {
$this->log(LOG_INFO,
"Moving subscription to {$act->objects[0]->id} by ".
"{$act->actor->id} to {$remote->nickname}.");
$sink->postActivity($act);
$other = Profile::fromURI($act->objects[0]->id);
if (!empty($other)) {
Subscription::cancel($user->getProfile(), $other);
}
} else {
$otherUser = User::staticGet('uri', $act->actor->id);
if (!empty($otherUser)) {
$this->log(LOG_INFO,
"Changing sub to {$act->objects[0]->id}".
"by {$act->actor->id} to {$remote->nickname}.");
$otherProfile = $otherUser->getProfile();
Subscription::start($otherProfile, $remote);
Subscription::cancel($otherProfile, $user->getProfile());
} else {
$this->log(LOG_NOTICE,
"Not changing sub to {$act->objects[0]->id}".
"by remote {$act->actor->id} ".
"to {$remote->nickname}.");
}
}
break;
}
}
/**
* Log some data
*
* Add a header for our class so we know who did it.
*
* @param int $level Log level, like LOG_ERR or LOG_INFO
* @param string $message Message to log
*
* @return void
*/
protected function log($level, $message)
{
common_log($level, "ActivityMover: " . $message);
}
}

169
lib/activitysink.php Normal file
View File

@ -0,0 +1,169 @@
<?php
/**
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc.
*
* A remote, atompub-receiving service
*
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category AtomPub
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
// This check helps protect against security problems;
// your code file can't be executed directly from the web.
exit(1);
}
/**
* A remote service that supports AtomPub
*
* @category AtomPub
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class ActivitySink
{
protected $svcDocUrl = null;
protected $username = null;
protected $password = null;
protected $collections = array();
function __construct($svcDocUrl, $username, $password)
{
$this->svcDocUrl = $svcDocUrl;
$this->username = $username;
$this->password = $password;
$this->_parseSvcDoc();
}
private function _parseSvcDoc()
{
$client = new HTTPClient();
$response = $client->get($this->svcDocUrl);
if ($response->getStatus() != 200) {
throw new Exception("Can't get {$this->svcDocUrl}; response status " . $response->getStatus());
}
$xml = $response->getBody();
$dom = new DOMDocument();
// We don't want to bother with white spaces
$dom->preserveWhiteSpace = false;
// Don't spew XML warnings to output
$old = error_reporting();
error_reporting($old & ~E_WARNING);
$ok = $dom->loadXML($xml);
error_reporting($old);
$path = new DOMXPath($dom);
$path->registerNamespace('atom', 'http://www.w3.org/2005/Atom');
$path->registerNamespace('app', 'http://www.w3.org/2007/app');
$path->registerNamespace('activity', 'http://activitystrea.ms/spec/1.0/');
$collections = $path->query('//app:collection');
for ($i = 0; $i < $collections->length; $i++) {
$collection = $collections->item($i);
$url = $collection->getAttribute('href');
$takesEntries = false;
$accepts = $path->query('app:accept', $collection);
for ($j = 0; $j < $accepts->length; $j++) {
$accept = $accepts->item($j);
$acceptValue = $accept->nodeValue;
if (preg_match('#application/atom\+xml(;\s*type=entry)?#', $acceptValue)) {
$takesEntries = true;
break;
}
}
if (!$takesEntries) {
continue;
}
$verbs = $path->query('activity:verb', $collection);
if ($verbs->length == 0) {
$this->_addCollection(ActivityVerb::POST, $url);
} else {
for ($k = 0; $k < $verbs->length; $k++) {
$verb = $verbs->item($k);
$this->_addCollection($verb->nodeValue, $url);
}
}
}
}
private function _addCollection($verb, $url)
{
if (array_key_exists($verb, $this->collections)) {
$this->collections[$verb][] = $url;
} else {
$this->collections[$verb] = array($url);
}
return;
}
function postActivity($activity)
{
if (!array_key_exists($activity->verb, $this->collections)) {
throw new Exception("No collection for verb {$activity->verb}");
} else {
if (count($this->collections[$activity->verb]) > 1) {
common_log(LOG_NOTICE, "More than one collection for verb {$activity->verb}");
}
$this->postToCollection($this->collections[$activity->verb][0], $activity);
}
}
function postToCollection($url, $activity)
{
$client = new HTTPClient($url);
$client->setMethod('POST');
$client->setAuth($this->username, $this->password);
$client->setHeader('Content-Type', 'application/atom+xml;type=entry');
$client->setBody($activity->asString(true, true, true));
$response = $client->send();
$status = $response->getStatus();
$reason = $response->getReasonPhrase();
if ($status >= 200 && $status < 300) {
return true;
} else if ($status >= 400 && $status < 500) {
throw new ClientException("{$url} {$status} {$reason}");
} else if ($status >= 500 && $status < 600) {
throw new ServerException("{$url} {$status} {$reason}");
} else {
// That's unexpected.
throw new Exception("{$url} {$status} {$reason}");
}
}
}

View File

@ -337,7 +337,7 @@ class ApiAuthAction extends ApiAction
} }
/** /**
* Log an API authentication failer. Collect the proxy and IP * Log an API authentication failure. Collect the proxy and IP
* and log them * and log them
* *
* @param string $logMsg additional log message * @param string $logMsg additional log message

View File

@ -152,8 +152,11 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
); );
} }
// check to see if we have previously issued an access token for this application // Check to see if we have previously issued an access token for
// and profile // this application and profile; if so we can just return the
// existing access token. That seems to be the best practice. It
// makes it so users only have to authorize the app once per
// machine.
$appUser = new Oauth_application_user(); $appUser = new Oauth_application_user();
@ -172,19 +175,40 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
) )
); );
$at = new Token(); $at = null;
// fetch the full access token // Special case: we used to store request tokens in the
$at->consumer_key = $consumer->key; // Oauth_application_user record, and the access_type would
$at->tok = $appUser->token; // always be 0 (no access) as a failsafe until an access
// token was issued and replaced the request token. There could
// be a few old Oauth_application_user records storing request
// tokens still around, and we don't want to accidentally
// return a useless request token instead of a new access
// token. So if we find one, we generate a new access token
// and update the existing Oauth_application_user record before
// returning the new access token. This should be rare.
$result = $at->find(true); if ($appUser->access_type == 0) {
if (!$result) { $at = $this->generateNewAccessToken($consumer, $rt, $verifier);
throw new Exception( $this->updateAppUser($appUser, $app, $at);
// TRANS: Exception thrown when no access token can be issued.
_('Could not issue access token.') } else {
);
$at = new Token();
// fetch the full access token
$at->consumer_key = $consumer->key;
$at->tok = $appUser->token;
$result = $at->find(true);
if (!$result) {
throw new Exception(
// TRANS: Exception thrown when no access token can be issued.
_('Could not issue access token.')
);
}
} }
// Yay, we can re-issue the access token // Yay, we can re-issue the access token
@ -200,48 +224,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
) )
); );
// make a brand new access token $at = $this->generateNewAccessToken($consumer, $rt, $verifier);
$at = new Token(); $this->newAppUser($tokenAssoc, $app, $at);
$at->consumer_key = $consumer->key;
$at->tok = common_good_rand(16);
$at->secret = common_good_rand(16);
$at->type = 1; // access
$at->verifier = $verifier;
$at->verified_callback = $rt->verified_callback; // 1.0a
$at->created = common_sql_now();
if (!$at->insert()) {
$e = $at->_lastError;
common_debug('access token "' . $at->tok . '" not inserted: "' . $e->message . '"', __FILE__);
return null;
} else {
common_debug('access token "' . $at->tok . '" inserted', __FILE__);
// burn the old one
$orig_rt = clone($rt);
$rt->state = 2; // used
if (!$rt->update($orig_rt)) {
return null;
}
common_debug('request token "' . $rt->tok . '" updated', __FILE__);
}
// insert a new Oauth_application_user record w/access token
$appUser = new Oauth_application_user();
$appUser->profile_id = $tokenAssoc->profile_id;;
$appUser->application_id = $app->id;
$appUser->access_type = $app->access_type;
$appUser->token = $at->tok;
$appUser->created = common_sql_now();
$result = $appUser->insert();
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.'));
}
// Okay, good // Okay, good
return new OAuthToken($at->tok, $at->secret); return new OAuthToken($at->tok, $at->secret);
@ -261,6 +245,108 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
} }
} }
/*
* Generate a new access token and save it to the database
*
* @param Consumer $consumer the OAuth consumer
* @param Token $rt the authorized request token
* @param string $verifier the OAuth 1.0a verifier
*
* @access private
*
* @return Token $at the new access token
*/
private function generateNewAccessToken($consumer, $rt, $verifier)
{
$at = new Token();
$at->consumer_key = $consumer->key;
$at->tok = common_good_rand(16);
$at->secret = common_good_rand(16);
$at->type = 1; // access
$at->verifier = $verifier;
$at->verified_callback = $rt->verified_callback; // 1.0a
$at->created = common_sql_now();
if (!$at->insert()) {
$e = $at->_lastError;
common_debug('access token "' . $at->tok . '" not inserted: "' . $e->message . '"', __FILE__);
return null;
} else {
common_debug('access token "' . $at->tok . '" inserted', __FILE__);
// burn the old one
$orig_rt = clone($rt);
$rt->state = 2; // used
if (!$rt->update($orig_rt)) {
return null;
}
common_debug('request token "' . $rt->tok . '" updated', __FILE__);
}
return $at;
}
/*
* Add a new app user (Oauth_application_user) record
*
* @param Oauth_token_association $tokenAssoc token-to-app association
* @param Oauth_application $app the OAuth client app
* @param Token $at the access token
*
* @access private
*
* @return void
*/
private function newAppUser($tokenAssoc, $app, $at)
{
$appUser = new Oauth_application_user();
$appUser->profile_id = $tokenAssoc->profile_id;
$appUser->application_id = $app->id;
$appUser->access_type = $app->access_type;
$appUser->token = $at->tok;
$appUser->created = common_sql_now();
$result = $appUser->insert();
if (!$result) {
common_log_db_error($appUser, 'INSERT', __FILE__);
// TRANS: Server error displayed when a database error occurs.
throw new Exception(
_('Database error inserting OAuth application user.')
);
}
}
/*
* Update an existing app user (Oauth_application_user) record
*
* @param Oauth_application_user $appUser existing app user rec
* @param Oauth_application $app the OAuth client app
* @param Token $at the access token
*
* @access private
*
* @return void
*/
private function updateAppUser($appUser, $app, $at)
{
$original = clone($appUser);
$appUser->access_type = $app->access_type;
$appUser->token = $at->tok;
$result = $appUser->update($original);
if (!$result) {
common_log_db_error($appUser, 'UPDATE', __FILE__);
// TRANS: Server error displayed when a database error occurs.
throw new Exception(
_('Database error updating OAuth application user.')
);
}
}
/** /**
* Revoke specified access token * Revoke specified access token
* *

View File

@ -108,8 +108,9 @@ class Atom10Feed extends XMLStringer
if (!empty($name)) { if (!empty($name)) {
$xs->element('name', null, $name); $xs->element('name', null, $name);
} else { } else {
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
throw new Atom10FeedException( throw new Atom10FeedException(
_('author element must contain a name element.') _('Author element must contain a name element.')
); );
} }
@ -155,7 +156,8 @@ class Atom10Feed extends XMLStringer
function setActivitySubject($xmlSubject) function setActivitySubject($xmlSubject)
{ {
throw new ServerException(_('Don\'t use this method!')); // TRANS: Server exception thrown when using the method setActivitySubject() in the class Atom10Feed.
throw new ServerException(_('Do not use this method!'));
} }
function getNamespaces() function getNamespaces()

View File

@ -63,8 +63,13 @@ if (!function_exists('dl')) {
// Fortunately trying to call the disabled one will only trigger // Fortunately trying to call the disabled one will only trigger
// a warning, not a fatal, so it's safe to leave it for our case. // a warning, not a fatal, so it's safe to leave it for our case.
// Callers will be suppressing warnings anyway. // Callers will be suppressing warnings anyway.
$disabled = array_filter(array_map('trim', explode(',', ini_get('disable_functions')))); try {
if (!in_array('dl', $disabled)) { // Reading the ini setting is hard as we don't know PHP's parsing,
// but we can check if it is disabled through reflection.
$dl = new ReflectionFunction('dl');
// $disabled = $dl->isDisabled(); // don't need to check this now
} catch (ReflectionException $e) {
// Ok, it *really* doesn't exist!
function dl($library) { function dl($library) {
return false; return false;
} }

View File

@ -96,7 +96,7 @@ class ConnectSettingsNav extends Widget
$action_name = $this->action->trimmed('action'); $action_name = $this->action->trimmed('action');
$this->action->elementStart('ul', array('class' => 'nav')); $this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartConnectSettingsNav', array(&$this->action))) { if (Event::handle('StartConnectSettingsNav', array($this->action))) {
# action => array('prompt', 'title') # action => array('prompt', 'title')
$menu = array(); $menu = array();
@ -129,7 +129,7 @@ class ConnectSettingsNav extends Widget
$action_name === $menuaction); $action_name === $menuaction);
} }
Event::handle('EndConnectSettingsNav', array(&$this->action)); Event::handle('EndConnectSettingsNav', array($this->action));
} }
$this->action->elementEnd('ul'); $this->action->elementEnd('ul');

View File

@ -3,7 +3,7 @@
* StatusNet - the distributed open-source microblogging tool * StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* A sample module to show best practices for StatusNet plugins * Use Hammer discovery stack to find out interesting things about an URI
* *
* PHP version 5 * PHP version 5
* *
@ -20,6 +20,7 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @category Discovery
* @package StatusNet * @package StatusNet
* @author James Walker <james@status.net> * @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc. * @copyright 2010 StatusNet, Inc.
@ -27,22 +28,41 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET')) {
exit(1);
}
/** /**
* This class implements LRDD-based service discovery based on the "Hammer Draft" * This class implements LRDD-based service discovery based on the "Hammer Draft"
* (including webfinger) * (including webfinger)
* *
* @see http://groups.google.com/group/webfinger/browse_thread/thread/9f3d93a479e91bbf * @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*
* @see http://groups.google.com/group/webfinger/browse_thread/thread/9f3d93a479e91bbf
*/ */
class Discovery class Discovery
{ {
const LRDD_REL = 'lrdd';
const LRDD_REL = 'lrdd';
const PROFILEPAGE = 'http://webfinger.net/rel/profile-page'; const PROFILEPAGE = 'http://webfinger.net/rel/profile-page';
const UPDATESFROM = 'http://schemas.google.com/g/2010#updates-from'; const UPDATESFROM = 'http://schemas.google.com/g/2010#updates-from';
const HCARD = 'http://microformats.org/profile/hcard'; const HCARD = 'http://microformats.org/profile/hcard';
public $methods = array(); public $methods = array();
/**
* Constructor for a discovery object
*
* Registers different discovery methods.
*
* @return Discovery this
*/
public function __construct() public function __construct()
{ {
$this->registerMethod('Discovery_LRDD_Host_Meta'); $this->registerMethod('Discovery_LRDD_Host_Meta');
@ -50,6 +70,14 @@ class Discovery
$this->registerMethod('Discovery_LRDD_Link_HTML'); $this->registerMethod('Discovery_LRDD_Link_HTML');
} }
/**
* Register a discovery class
*
* @param string $class Class name
*
* @return void
*/
public function registerMethod($class) public function registerMethod($class)
{ {
$this->methods[] = $class; $this->methods[] = $class;
@ -58,7 +86,12 @@ class Discovery
/** /**
* Given a "user id" make sure it's normalized to either a webfinger * Given a "user id" make sure it's normalized to either a webfinger
* acct: uri or a profile HTTP URL. * acct: uri or a profile HTTP URL.
*
* @param string $user_id User ID to normalize
*
* @return string normalized acct: or http(s)?: URI
*/ */
public static function normalize($user_id) public static function normalize($user_id)
{ {
if (substr($user_id, 0, 5) == 'http:' || if (substr($user_id, 0, 5) == 'http:' ||
@ -67,13 +100,23 @@ class Discovery
return $user_id; return $user_id;
} }
if (strpos($user_id, '@') !== FALSE) { if (strpos($user_id, '@') !== false) {
return 'acct:' . $user_id; return 'acct:' . $user_id;
} }
return 'http://' . $user_id; return 'http://' . $user_id;
} }
/**
* Determine if a string is a Webfinger ID
*
* Webfinger IDs look like foo@example.com or acct:foo@example.com
*
* @param string $user_id ID to check
*
* @return boolean true if $user_id is a Webfinger, else false
*/
public static function isWebfinger($user_id) public static function isWebfinger($user_id)
{ {
$uri = Discovery::normalize($user_id); $uri = Discovery::normalize($user_id);
@ -82,8 +125,13 @@ class Discovery
} }
/** /**
* This implements the actual lookup procedure * Given a user ID, return the first available XRD
*
* @param string $id User ID URI
*
* @return XRD XRD object for the user
*/ */
public function lookup($id) public function lookup($id)
{ {
// Normalize the incoming $id to make sure we have a uri // Normalize the incoming $id to make sure we have a uri
@ -107,10 +155,20 @@ class Discovery
} }
// TRANS: Exception. // TRANS: Exception.
throw new Exception(sprintf(_m('Unable to find services for %s.'),$id)); throw new Exception(sprintf(_('Unable to find services for %s.'), $id));
} }
public static function getService($links, $service) { /**
* Given an array of links, returns the matching service
*
* @param array $links Links to check
* @param string $service Service to find
*
* @return array $link assoc array representing the link
*/
public static function getService($links, $service)
{
if (!is_array($links)) { if (!is_array($links)) {
return false; return false;
} }
@ -122,6 +180,17 @@ class Discovery
} }
} }
/**
* Apply a template using an ID
*
* Replaces {uri} in template string with the ID given.
*
* @param string $template Template to match
* @param string $id User ID to replace with
*
* @return string replaced values
*/
public static function applyTemplate($template, $id) public static function applyTemplate($template, $id)
{ {
$template = str_replace('{uri}', urlencode($id), $template); $template = str_replace('{uri}', urlencode($id), $template);
@ -129,10 +198,18 @@ class Discovery
return $template; return $template;
} }
/**
* Fetch an XRD file and parse
*
* @param string $url URL of the XRD
*
* @return XRD object representing the XRD file
*/
public static function fetchXrd($url) public static function fetchXrd($url)
{ {
try { try {
$client = new HTTPClient(); $client = new HTTPClient();
$response = $client->get($url); $response = $client->get($url);
} catch (HTTP_Request2_Exception $e) { } catch (HTTP_Request2_Exception $e) {
return false; return false;
@ -146,13 +223,60 @@ class Discovery
} }
} }
/**
* Abstract interface for discovery
*
* Objects that implement this interface can retrieve an array of
* XRD links for the URI.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
interface Discovery_LRDD interface Discovery_LRDD
{ {
/**
* Discover interesting info about the URI
*
* @param string $uri URI to inquire about
*
* @return array Links in the XRD file
*/
public function discover($uri); public function discover($uri);
} }
/**
* Implementation of discovery using host-meta file
*
* Discovers XRD file for a user by going to the organization's
* host-meta file and trying to find a template for LRDD.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class Discovery_LRDD_Host_Meta implements Discovery_LRDD class Discovery_LRDD_Host_Meta implements Discovery_LRDD
{ {
/**
* Discovery core method
*
* For Webfinger and HTTP URIs, fetch the host-meta file
* and look for LRDD templates
*
* @param string $uri URI to inquire about
*
* @return array Links in the XRD file
*/
public function discover($uri) public function discover($uri)
{ {
if (Discovery::isWebfinger($uri)) { if (Discovery::isWebfinger($uri)) {
@ -176,12 +300,38 @@ class Discovery_LRDD_Host_Meta implements Discovery_LRDD
} }
} }
/**
* Implementation of discovery using HTTP Link header
*
* Discovers XRD file for a user by fetching the URL and reading any
* Link: headers in the HTTP response.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class Discovery_LRDD_Link_Header implements Discovery_LRDD class Discovery_LRDD_Link_Header implements Discovery_LRDD
{ {
/**
* Discovery core method
*
* For HTTP IDs fetch the URL and look for Link headers.
*
* @param string $uri URI to inquire about
*
* @return array Links in the XRD file
*
* @todo fail out of Webfinger URIs faster
*/
public function discover($uri) public function discover($uri)
{ {
try { try {
$client = new HTTPClient(); $client = new HTTPClient();
$response = $client->get($uri); $response = $client->get($uri);
} catch (HTTP_Request2_Exception $e) { } catch (HTTP_Request2_Exception $e) {
return false; return false;
@ -199,6 +349,14 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
return array(Discovery_LRDD_Link_Header::parseHeader($link_header)); return array(Discovery_LRDD_Link_Header::parseHeader($link_header));
} }
/**
* Given a string or array of headers, returns XRD-like assoc array
*
* @param string|array $header string or array of strings for headers
*
* @return array Link header in XRD-like format
*/
protected static function parseHeader($header) protected static function parseHeader($header)
{ {
$lh = new LinkHeader($header); $lh = new LinkHeader($header);
@ -209,12 +367,39 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
} }
} }
/**
* Implementation of discovery using HTML <link> element
*
* Discovers XRD file for a user by fetching the URL and reading any
* <link> elements in the HTML response.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class Discovery_LRDD_Link_HTML implements Discovery_LRDD class Discovery_LRDD_Link_HTML implements Discovery_LRDD
{ {
/**
* Discovery core method
*
* For HTTP IDs, fetch the URL and look for <link> elements
* in the HTML response.
*
* @param string $uri URI to inquire about
*
* @return array Links in XRD-ish assoc array
*
* @todo fail out of Webfinger URIs faster
*/
public function discover($uri) public function discover($uri)
{ {
try { try {
$client = new HTTPClient(); $client = new HTTPClient();
$response = $client->get($uri); $response = $client->get($uri);
} catch (HTTP_Request2_Exception $e) { } catch (HTTP_Request2_Exception $e) {
return false; return false;
@ -227,6 +412,16 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
return Discovery_LRDD_Link_HTML::parse($response->getBody()); return Discovery_LRDD_Link_HTML::parse($response->getBody());
} }
/**
* Parse HTML and return <link> elements
*
* Given an HTML string, scans the string for <link> elements
*
* @param string $html HTML to scan
*
* @return array array of associative arrays in XRD-ish format
*/
public function parse($html) public function parse($html)
{ {
$links = array(); $links = array();
@ -237,8 +432,8 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
preg_match_all('/<link\s[^>]*>/i', $head_html, $link_matches); preg_match_all('/<link\s[^>]*>/i', $head_html, $link_matches);
foreach ($link_matches[0] as $link_html) { foreach ($link_matches[0] as $link_html) {
$link_url = null; $link_url = null;
$link_rel = null; $link_rel = null;
$link_type = null; $link_type = null;
preg_match('/\srel=(("|\')([^\\2]*?)\\2|[^"\'\s]+)/i', $link_html, $rel_matches); preg_match('/\srel=(("|\')([^\\2]*?)\\2|[^"\'\s]+)/i', $link_html, $rel_matches);

132
lib/linkheader.php Normal file
View File

@ -0,0 +1,132 @@
<?php
/**
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2010, StatusNet, Inc.
*
* Parse HTTP response for interesting Link: headers
*
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
exit(1);
}
/**
* Class to represent Link: headers in an HTTP response
*
* Since these are a fairly important part of Hammer-stack discovery, they're
* reified and implemented here.
*
* @category Discovery
* @package StatusNet
* @author James Walker <james@status.net>
* @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*
* @see Discovery
*/
class LinkHeader
{
var $href;
var $rel;
var $type;
/**
* Initialize from a string
*
* @param string $str Link: header value
*
* @return LinkHeader self
*/
function __construct($str)
{
preg_match('/^<[^>]+>/', $str, $uri_reference);
//if (empty($uri_reference)) return;
$this->href = trim($uri_reference[0], '<>');
$this->rel = array();
$this->type = null;
// remove uri-reference from header
$str = substr($str, strlen($uri_reference[0]));
// parse link-params
$params = explode(';', $str);
foreach ($params as $param) {
if (empty($param)) {
continue;
}
list($param_name, $param_value) = explode('=', $param, 2);
$param_name = trim($param_name);
$param_value = preg_replace('(^"|"$)', '', trim($param_value));
// for now we only care about 'rel' and 'type' link params
// TODO do something with the other links-params
switch ($param_name) {
case 'rel':
$this->rel = trim($param_value);
break;
case 'type':
$this->type = trim($param_value);
}
}
}
/**
* Given an HTTP response, return the requested Link: header
*
* @param HTTP_Request2_Response $response response to check
* @param string $rel relationship to look for
* @param string $type media type to look for
*
* @return LinkHeader discovered header, or null on failure
*/
static function getLink($response, $rel=null, $type=null)
{
$headers = $response->getHeader('Link');
if ($headers) {
// Can get an array or string, so try to simplify the path
if (!is_array($headers)) {
$headers = array($headers);
}
foreach ($headers as $header) {
$lh = new LinkHeader($header);
if ((is_null($rel) || $lh->rel == $rel) &&
(is_null($type) || $lh->type == $type)) {
return $lh->href;
}
}
}
return null;
}
}

View File

@ -73,7 +73,7 @@ class LoginGroupNav extends Widget
$this->action->elementStart('ul', array('class' => 'nav')); $this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartLoginGroupNav', array(&$this->action))) { if (Event::handle('StartLoginGroupNav', array($this->action))) {
$this->action->menuItem(common_local_url('login'), $this->action->menuItem(common_local_url('login'),
_('Login'), _('Login'),
@ -87,7 +87,7 @@ class LoginGroupNav extends Widget
$action_name === 'register'); $action_name === 'register');
} }
Event::handle('EndLoginGroupNav', array(&$this->action)); Event::handle('EndLoginGroupNav', array($this->action));
} }
$this->action->elementEnd('ul'); $this->action->elementEnd('ul');

View File

@ -99,6 +99,21 @@ class ProfileAction extends OwnerDesignAction
$this->showStatistics(); $this->showStatistics();
} }
/**
* Convenience function for common pattern of links to subscription/groups sections.
*
* @param string $actionClass
* @param string $title
* @param string $cssClass
*/
private function statsSectionLink($actionClass, $title, $cssClass='')
{
$this->element('a', array('href' => common_local_url($actionClass,
array('nickname' => $this->profile->nickname)),
'class' => $cssClass),
$title);
}
function showSubscriptions() function showSubscriptions()
{ {
$profile = $this->profile->getSubscriptions(0, PROFILES_PER_MINILIST + 1); $profile = $this->profile->getSubscriptions(0, PROFILES_PER_MINILIST + 1);
@ -106,7 +121,9 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_subscriptions', $this->elementStart('div', array('id' => 'entity_subscriptions',
'class' => 'section')); 'class' => 'section'));
if (Event::handle('StartShowSubscriptionsMiniList', array($this))) { if (Event::handle('StartShowSubscriptionsMiniList', array($this))) {
$this->element('h2', null, _('Subscriptions')); $this->elementStart('h2');
$this->statsSectionLink('subscriptions', _('Subscriptions'));
$this->elementEnd('h2');
$cnt = 0; $cnt = 0;
@ -120,10 +137,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > PROFILES_PER_MINILIST) { if ($cnt > PROFILES_PER_MINILIST) {
$this->elementStart('p'); $this->elementStart('p');
$this->element('a', array('href' => common_local_url('subscriptions', $this->statsSectionLink('subscriptions', _('All subscriptions'), 'more');
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All subscriptions'));
$this->elementEnd('p'); $this->elementEnd('p');
} }
@ -141,7 +155,9 @@ class ProfileAction extends OwnerDesignAction
if (Event::handle('StartShowSubscribersMiniList', array($this))) { if (Event::handle('StartShowSubscribersMiniList', array($this))) {
$this->element('h2', null, _('Subscribers')); $this->elementStart('h2');
$this->statsSectionLink('subscribers', _('Subscribers'));
$this->elementEnd('h2');
$cnt = 0; $cnt = 0;
@ -155,10 +171,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > PROFILES_PER_MINILIST) { if ($cnt > PROFILES_PER_MINILIST) {
$this->elementStart('p'); $this->elementStart('p');
$this->element('a', array('href' => common_local_url('subscribers', $this->statsSectionLink('subscribers', _('All subscribers'), 'more');
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All subscribers'));
$this->elementEnd('p'); $this->elementEnd('p');
} }
@ -170,10 +183,7 @@ class ProfileAction extends OwnerDesignAction
function showStatistics() function showStatistics()
{ {
$subs_count = $this->profile->subscriptionCount();
$subbed_count = $this->profile->subscriberCount();
$notice_count = $this->profile->noticeCount(); $notice_count = $this->profile->noticeCount();
$group_count = $this->profile->getGroups()->N;
$age_days = (time() - strtotime($this->profile->created)) / 86400; $age_days = (time() - strtotime($this->profile->created)) / 86400;
if ($age_days < 1) { if ($age_days < 1) {
// Rather than extrapolating out to a bajillion... // Rather than extrapolating out to a bajillion...
@ -186,59 +196,73 @@ class ProfileAction extends OwnerDesignAction
$this->element('h2', null, _('Statistics')); $this->element('h2', null, _('Statistics'));
// Other stats...? $profile = $this->profile;
$this->elementStart('dl', 'entity_user-id'); $actionParams = array('nickname' => $profile->nickname);
$this->element('dt', null, _('User ID')); $stats = array(
$this->element('dd', null, $this->profile->id); array(
$this->elementEnd('dl'); 'id' => 'user-id',
'label' => _('User ID'),
'value' => $profile->id,
),
array(
'id' => 'member-since',
'label' => _('Member since'),
'value' => date('j M Y', strtotime($profile->created))
),
array(
'id' => 'subscriptions',
'label' => _('Subscriptions'),
'link' => common_local_url('subscriptions', $actionParams),
'value' => $profile->subscriptionCount(),
),
array(
'id' => 'subscribers',
'label' => _('Subscribers'),
'link' => common_local_url('subscribers', $actionParams),
'value' => $profile->subscriberCount(),
),
array(
'id' => 'groups',
'label' => _('Groups'),
'link' => common_local_url('usergroups', $actionParams),
'value' => $profile->getGroups()->N,
),
array(
'id' => 'notices',
'label' => _('Notices'),
'value' => $notice_count,
),
array(
'id' => 'daily_notices',
// TRANS: Average count of posts made per day since account registration
'label' => _('Daily average'),
'value' => $daily_count
)
);
$this->elementStart('dl', 'entity_member-since'); // Give plugins a chance to add stats entries
$this->element('dt', null, _('Member since')); Event::handle('ProfileStats', array($profile, &$stats));
$this->element('dd', null, date('j M Y',
strtotime($this->profile->created)));
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_subscriptions');
$this->elementStart('dt');
$this->element('a', array('href' => common_local_url('subscriptions',
array('nickname' => $this->profile->nickname))),
_('Subscriptions'));
$this->elementEnd('dt');
$this->element('dd', null, $subs_count);
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_subscribers');
$this->elementStart('dt');
$this->element('a', array('href' => common_local_url('subscribers',
array('nickname' => $this->profile->nickname))),
_('Subscribers'));
$this->elementEnd('dt');
$this->element('dd', 'subscribers', $subbed_count);
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_groups');
$this->elementStart('dt');
$this->element('a', array('href' => common_local_url('usergroups',
array('nickname' => $this->profile->nickname))),
_('Groups'));
$this->elementEnd('dt');
$this->element('dd', 'groups', $group_count);
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_notices');
$this->element('dt', null, _('Notices'));
$this->element('dd', null, $notice_count);
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_daily_notices');
// TRANS: Average count of posts made per day since account registration
$this->element('dt', null, _('Daily average'));
$this->element('dd', null, $daily_count);
$this->elementEnd('dl');
foreach ($stats as $row) {
$this->showStatsRow($row);
}
$this->elementEnd('div'); $this->elementEnd('div');
} }
private function showStatsRow($row)
{
$this->elementStart('dl', 'entity_' . $row['id']);
$this->elementStart('dt');
if (!empty($row['link'])) {
$this->element('a', array('href' => $row['link']), $row['label']);
} else {
$this->text($row['label']);
}
$this->elementEnd('dt');
$this->element('dd', null, $row['value']);
$this->elementEnd('dl');
}
function showGroups() function showGroups()
{ {
$groups = $this->profile->getGroups(0, GROUPS_PER_MINILIST + 1); $groups = $this->profile->getGroups(0, GROUPS_PER_MINILIST + 1);
@ -246,7 +270,9 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_groups', $this->elementStart('div', array('id' => 'entity_groups',
'class' => 'section')); 'class' => 'section'));
if (Event::handle('StartShowGroupsMiniList', array($this))) { if (Event::handle('StartShowGroupsMiniList', array($this))) {
$this->element('h2', null, _('Groups')); $this->elementStart('h2');
$this->statsSectionLink('usergroups', _('Groups'));
$this->elementEnd('h2');
if ($groups) { if ($groups) {
$gml = new GroupMiniList($groups, $this->profile, $this); $gml = new GroupMiniList($groups, $this->profile, $this);
@ -258,10 +284,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > GROUPS_PER_MINILIST) { if ($cnt > GROUPS_PER_MINILIST) {
$this->elementStart('p'); $this->elementStart('p');
$this->element('a', array('href' => common_local_url('usergroups', $this->statsSectionLink('usergroups', _('All groups'), 'more');
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All groups'));
$this->elementEnd('p'); $this->elementEnd('p');
} }

View File

@ -268,6 +268,8 @@ abstract class QueueManager extends IoManager
$this->connect('deluser', 'DelUserQueueHandler'); $this->connect('deluser', 'DelUserQueueHandler');
$this->connect('feedimp', 'FeedImporter'); $this->connect('feedimp', 'FeedImporter');
$this->connect('actimp', 'ActivityImporter'); $this->connect('actimp', 'ActivityImporter');
$this->connect('acctmove', 'AccountMover');
$this->connect('actmove', 'ActivityMover');
// Broadcasting profile updates to OMB remote subscribers // Broadcasting profile updates to OMB remote subscribers
$this->connect('profile', 'ProfileQueueHandler'); $this->connect('profile', 'ProfileQueueHandler');

View File

@ -28,6 +28,8 @@
class UserActivityStream extends AtomUserNoticeFeed class UserActivityStream extends AtomUserNoticeFeed
{ {
public $activities = array();
function __construct($user, $indent = true) function __construct($user, $indent = true)
{ {
parent::__construct($user, null, $indent); parent::__construct($user, null, $indent);
@ -45,10 +47,15 @@ class UserActivityStream extends AtomUserNoticeFeed
usort($objs, 'UserActivityStream::compareObject'); usort($objs, 'UserActivityStream::compareObject');
foreach ($objs as $obj) { foreach ($objs as $obj) {
$act = $obj->asActivity(); $this->activities[] = $obj->asActivity();
}
}
function renderEntries()
{
foreach ($this->activities as $act) {
// Only show the author sub-element if it's different from default user // Only show the author sub-element if it's different from default user
$str = $act->asString(false, ($act->actor->id != $this->user->uri)); $act->outputTo($this, false, ($act->actor->id != $this->user->uri));
$this->addEntryRaw($str);
} }
} }

View File

@ -242,7 +242,7 @@ class UserProfile extends Widget
$this->out->elementEnd('div'); $this->out->elementEnd('div');
return; return;
} }
if (Event::handle('StartProfilePageActionsSection', array(&$this->out, $this->profile))) { if (Event::handle('StartProfilePageActionsSection', array($this->out, $this->profile))) {
$cur = common_current_user(); $cur = common_current_user();
@ -250,13 +250,13 @@ class UserProfile extends Widget
$this->out->element('h2', null, _('User actions')); $this->out->element('h2', null, _('User actions'));
$this->out->elementStart('ul'); $this->out->elementStart('ul');
if (Event::handle('StartProfilePageActionsElements', array(&$this->out, $this->profile))) { if (Event::handle('StartProfilePageActionsElements', array($this->out, $this->profile))) {
if (empty($cur)) { // not logged in if (empty($cur)) { // not logged in
if (Event::handle('StartProfileRemoteSubscribe', array(&$this->out, $this->profile))) { if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
$this->out->elementStart('li', 'entity_subscribe'); $this->out->elementStart('li', 'entity_subscribe');
$this->showRemoteSubscribeLink(); $this->showRemoteSubscribeLink();
$this->out->elementEnd('li'); $this->out->elementEnd('li');
Event::handle('EndProfileRemoteSubscribe', array(&$this->out, $this->profile)); Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
} }
} else { } else {
if ($cur->id == $this->profile->id) { // your own page if ($cur->id == $this->profile->id) { // your own page
@ -376,13 +376,13 @@ class UserProfile extends Widget
} }
} }
Event::handle('EndProfilePageActionsElements', array(&$this->out, $this->profile)); Event::handle('EndProfilePageActionsElements', array($this->out, $this->profile));
} }
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
$this->out->elementEnd('div'); $this->out->elementEnd('div');
Event::handle('EndProfilePageActionsSection', array(&$this->out, $this->profile)); Event::handle('EndProfilePageActionsSection', array($this->out, $this->profile));
} }
} }

View File

@ -173,6 +173,13 @@ class XRD
switch($node->tagName) { switch($node->tagName) {
case 'Title': case 'Title':
$link['title'][] = $node->nodeValue; $link['title'][] = $node->nodeValue;
break;
case 'Property':
$link['property'][] = array('type' => $node->getAttribute('type'),
'value' => $node->nodeValue);
break;
default:
common_log(LOG_NOTICE, "Unexpected tag name {$node->tagName} found in XRD file.");
} }
} }
} }

View File

@ -99,7 +99,9 @@ class XrdAction extends Action
$xrd->links[] = array('rel' => 'http://apinamespace.org/atom', $xrd->links[] = array('rel' => 'http://apinamespace.org/atom',
'type' => 'application/atomsvc+xml', 'type' => 'application/atomsvc+xml',
'href' => common_local_url('ApiAtomService', array('id' => $nick))); 'href' => common_local_url('ApiAtomService', array('id' => $nick)),
'property' => array(array('type' => 'http://apinamespace.org/atom/username',
'value' => $nick)));
if (common_config('site', 'fancy')) { if (common_config('site', 'fancy')) {
$apiRoot = common_path('api/', true); $apiRoot = common_path('api/', true);

View File

@ -9,17 +9,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - Core\n" "Project-Id-Version: StatusNet - Core\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 23:32+0000\n"
"PO-Revision-Date: 2010-12-16 15:10:21+0000\n" "PO-Revision-Date: 2011-01-14 23:34:31+0000\n"
"Language-Team: Afrikaans <http://translatewiki.net/wiki/Portal:af>\n" "Language-Team: Afrikaans <http://translatewiki.net/wiki/Portal:af>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80343); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: af\n" "X-Language-Code: af\n"
"X-Message-Group: #out-statusnet-core\n" "X-Message-Group: #out-statusnet-core\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-POT-Import-Date: 2010-11-30 20:43:14+0000\n" "X-POT-Import-Date: 2011-01-14 13:22:39+0000\n"
#. TRANS: Page title for Access admin panel that allows configuring site access. #. TRANS: Page title for Access admin panel that allows configuring site access.
#. TRANS: Menu item for site administration #. TRANS: Menu item for site administration
@ -271,7 +271,7 @@ msgstr "Opdaterings van %1$s en vriende op %2$s."
#: actions/apistatusesshow.php:105 actions/apistatusnetconfig.php:138 #: actions/apistatusesshow.php:105 actions/apistatusnetconfig.php:138
#: actions/apistatusnetversion.php:91 actions/apisubscriptions.php:109 #: actions/apistatusnetversion.php:91 actions/apisubscriptions.php:109
#: actions/apitimelinefavorites.php:174 actions/apitimelinefriends.php:268 #: actions/apitimelinefavorites.php:174 actions/apitimelinefriends.php:268
#: actions/apitimelinegroup.php:151 actions/apitimelinehome.php:173 #: actions/apitimelinegroup.php:147 actions/apitimelinehome.php:173
#: actions/apitimelinementions.php:174 actions/apitimelinepublic.php:239 #: actions/apitimelinementions.php:174 actions/apitimelinepublic.php:239
#: actions/apitimelineretweetedtome.php:118 #: actions/apitimelineretweetedtome.php:118
#: actions/apitimelineretweetsofme.php:150 actions/apitimelinetag.php:159 #: actions/apitimelineretweetsofme.php:150 actions/apitimelinetag.php:159
@ -316,7 +316,8 @@ msgstr "Kon nie die gebruiker opdateer nie."
#: actions/apiaccountupdateprofile.php:111 #: actions/apiaccountupdateprofile.php:111
#: actions/apiaccountupdateprofilebackgroundimage.php:199 #: actions/apiaccountupdateprofilebackgroundimage.php:199
#: actions/apiaccountupdateprofilecolors.php:183 #: actions/apiaccountupdateprofilecolors.php:183
#: actions/apiaccountupdateprofileimage.php:130 actions/apiusershow.php:108 #: actions/apiaccountupdateprofileimage.php:130
#: actions/apiuserprofileimage.php:88 actions/apiusershow.php:108
#: actions/avatarbynickname.php:85 actions/foaf.php:65 actions/hcard.php:74 #: actions/avatarbynickname.php:85 actions/foaf.php:65 actions/hcard.php:74
#: actions/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66 #: actions/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66
#: lib/profileaction.php:84 #: lib/profileaction.php:84
@ -549,7 +550,7 @@ msgstr "Kon nie die gebruiker opdateer nie."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:156 actions/editgroup.php:189 #: actions/apigroupcreate.php:156 actions/editgroup.php:189
#: actions/newgroup.php:129 actions/profilesettings.php:277 #: actions/newgroup.php:136 actions/profilesettings.php:277
#: actions/register.php:214 #: actions/register.php:214
msgid "Nickname already in use. Try another one." msgid "Nickname already in use. Try another one."
msgstr "Die gebruikersnaam is reeds in gebruik. Kies 'n ander een." msgstr "Die gebruikersnaam is reeds in gebruik. Kies 'n ander een."
@ -559,7 +560,7 @@ msgstr "Die gebruikersnaam is reeds in gebruik. Kies 'n ander een."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:164 actions/editgroup.php:193 #: actions/apigroupcreate.php:164 actions/editgroup.php:193
#: actions/newgroup.php:133 actions/profilesettings.php:247 #: actions/newgroup.php:140 actions/profilesettings.php:247
#: actions/register.php:216 #: actions/register.php:216
msgid "Not a valid nickname." msgid "Not a valid nickname."
msgstr "Nie 'n geldige gebruikersnaam nie." msgstr "Nie 'n geldige gebruikersnaam nie."
@ -571,7 +572,7 @@ msgstr "Nie 'n geldige gebruikersnaam nie."
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:181 actions/editapplication.php:233 #: actions/apigroupcreate.php:181 actions/editapplication.php:233
#: actions/editgroup.php:200 actions/newapplication.php:211 #: actions/editgroup.php:200 actions/newapplication.php:211
#: actions/newgroup.php:140 actions/profilesettings.php:252 #: actions/newgroup.php:147 actions/profilesettings.php:252
#: actions/register.php:223 #: actions/register.php:223
msgid "Homepage is not a valid URL." msgid "Homepage is not a valid URL."
msgstr "Tuisblad is nie 'n geldige URL nie." msgstr "Tuisblad is nie 'n geldige URL nie."
@ -581,7 +582,7 @@ msgstr "Tuisblad is nie 'n geldige URL nie."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:191 actions/editgroup.php:204 #: actions/apigroupcreate.php:191 actions/editgroup.php:204
#: actions/newgroup.php:144 actions/profilesettings.php:256 #: actions/newgroup.php:151 actions/profilesettings.php:256
#: actions/register.php:226 #: actions/register.php:226
#, fuzzy #, fuzzy
msgid "Full name is too long (maximum 255 characters)." msgid "Full name is too long (maximum 255 characters)."
@ -597,7 +598,7 @@ msgstr "Volledige naam is te lang (maksimum 255 karakters)."
#. TRANS: %d is the maximum number of allowed characters. #. TRANS: %d is the maximum number of allowed characters.
#: actions/apigroupcreate.php:201 actions/editapplication.php:201 #: actions/apigroupcreate.php:201 actions/editapplication.php:201
#: actions/editgroup.php:209 actions/newapplication.php:178 #: actions/editgroup.php:209 actions/newapplication.php:178
#: actions/newgroup.php:149 #: actions/newgroup.php:156
#, fuzzy, php-format #, fuzzy, php-format
msgid "Description is too long (maximum %d character)." msgid "Description is too long (maximum %d character)."
msgid_plural "Description is too long (maximum %d characters)." msgid_plural "Description is too long (maximum %d characters)."
@ -609,7 +610,7 @@ msgstr[1] "Die beskrywing is te lank (die maksimum is %d karakters)."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:215 actions/editgroup.php:216 #: actions/apigroupcreate.php:215 actions/editgroup.php:216
#: actions/newgroup.php:156 actions/profilesettings.php:269 #: actions/newgroup.php:163 actions/profilesettings.php:269
#: actions/register.php:235 #: actions/register.php:235
#, fuzzy #, fuzzy
msgid "Location is too long (maximum 255 characters)." msgid "Location is too long (maximum 255 characters)."
@ -622,7 +623,7 @@ msgstr "Ligging is te lank is (maksimum 255 karakters)."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: %d is the maximum number of allowed aliases. #. TRANS: %d is the maximum number of allowed aliases.
#: actions/apigroupcreate.php:236 actions/editgroup.php:229 #: actions/apigroupcreate.php:236 actions/editgroup.php:229
#: actions/newgroup.php:169 #: actions/newgroup.php:176
#, fuzzy, php-format #, fuzzy, php-format
msgid "Too many aliases! Maximum %d allowed." msgid "Too many aliases! Maximum %d allowed."
msgid_plural "Too many aliases! Maximum %d allowed." msgid_plural "Too many aliases! Maximum %d allowed."
@ -641,7 +642,7 @@ msgstr "Ongeldige alias: \"%s\""
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/apigroupcreate.php:264 actions/editgroup.php:244 #: actions/apigroupcreate.php:264 actions/editgroup.php:244
#: actions/newgroup.php:184 #: actions/newgroup.php:191
#, php-format #, php-format
msgid "Alias \"%s\" already in use. Try another one." msgid "Alias \"%s\" already in use. Try another one."
msgstr "Die alias \"%s\" word al reeds gebruik. Probeer 'n ander een." msgstr "Die alias \"%s\" word al reeds gebruik. Probeer 'n ander een."
@ -650,7 +651,7 @@ msgstr "Die alias \"%s\" word al reeds gebruik. Probeer 'n ander een."
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/apigroupcreate.php:278 actions/editgroup.php:251 #: actions/apigroupcreate.php:278 actions/editgroup.php:251
#: actions/newgroup.php:191 #: actions/newgroup.php:198
msgid "Alias can't be the same as nickname." msgid "Alias can't be the same as nickname."
msgstr "Die alias kan nie dieselfde as die gebruikersnaam wees nie." msgstr "Die alias kan nie dieselfde as die gebruikersnaam wees nie."
@ -957,9 +958,10 @@ msgstr "U kan nie u eie kennisgewings herhaal nie."
msgid "Already repeated that notice." msgid "Already repeated that notice."
msgstr "U het reeds die kennisgewing herhaal." msgstr "U het reeds die kennisgewing herhaal."
#. TRANS: Client error shown when using a non-supported HTTP method.
#: actions/apistatusesshow.php:117 actions/atompubfavoritefeed.php:104 #: actions/apistatusesshow.php:117 actions/atompubfavoritefeed.php:104
#: actions/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116 #: actions/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116
#: actions/atompubshowsubscription.php:118 #: actions/atompubshowsubscription.php:122
#: actions/atompubsubscriptionfeed.php:109 #: actions/atompubsubscriptionfeed.php:109
#, fuzzy #, fuzzy
msgid "HTTP method not supported." msgid "HTTP method not supported."
@ -1047,7 +1049,7 @@ msgstr "%1$s / Gunstelinge van %2$s"
#. TRANS: Server error displayed when generating an Atom feed fails. #. TRANS: Server error displayed when generating an Atom feed fails.
#. TRANS: %s is the error. #. TRANS: %s is the error.
#: actions/apitimelinegroup.php:138 #: actions/apitimelinegroup.php:134
#, fuzzy, php-format #, fuzzy, php-format
msgid "Could not generate feed for group - %s" msgid "Could not generate feed for group - %s"
msgstr "Dit was nie moontlik om die groep by te werk nie." msgstr "Dit was nie moontlik om die groep by te werk nie."
@ -1139,30 +1141,30 @@ msgstr ""
#. TRANS: Client error displayed when not using the POST verb. #. TRANS: Client error displayed when not using the POST verb.
#. TRANS: Do not translate POST. #. TRANS: Do not translate POST.
#: actions/apitimelineuser.php:332 #: actions/apitimelineuser.php:334
msgid "Can only handle POST activities." msgid "Can only handle POST activities."
msgstr "" msgstr ""
#. TRANS: Client error displayed when using an unsupported activity object type. #. TRANS: Client error displayed when using an unsupported activity object type.
#. TRANS: %s is the unsupported activity object type. #. TRANS: %s is the unsupported activity object type.
#: actions/apitimelineuser.php:343 #: actions/apitimelineuser.php:345
#, php-format #, php-format
msgid "Cannot handle activity object type \"%s\"." msgid "Cannot handle activity object type \"%s\"."
msgstr "" msgstr ""
#. TRANS: Client error displayed when posting a notice without content through the API. #. TRANS: Client error displayed when posting a notice without content through the API.
#: actions/apitimelineuser.php:376 #: actions/apitimelineuser.php:378
#, fuzzy, php-format #, fuzzy, php-format
msgid "No content for notice %d." msgid "No content for notice %d."
msgstr "U kan nie u eie kennisgewings herhaal nie." msgstr "U kan nie u eie kennisgewings herhaal nie."
#. TRANS: Client error displayed when using another format than AtomPub. #. TRANS: Client error displayed when using another format than AtomPub.
#: actions/apitimelineuser.php:404 #: actions/apitimelineuser.php:406
#, php-format #, php-format
msgid "Notice with URI \"%s\" already exists." msgid "Notice with URI \"%s\" already exists."
msgstr "" msgstr ""
#: actions/apitimelineuser.php:435 #: actions/apitimelineuser.php:437
#, php-format #, php-format
msgid "AtomPub post with unknown attention URI %s" msgid "AtomPub post with unknown attention URI %s"
msgstr "" msgstr ""
@ -1174,7 +1176,7 @@ msgid "API method under construction."
msgstr "Die API-funksie is nie gevind nie." msgstr "Die API-funksie is nie gevind nie."
#. TRANS: Client error displayed when requesting user information for a non-existing user. #. TRANS: Client error displayed when requesting user information for a non-existing user.
#: actions/apiusershow.php:94 #: actions/apiuserprofileimage.php:80 actions/apiusershow.php:94
#, fuzzy #, fuzzy
msgid "User not found." msgid "User not found."
msgstr "Die API-funksie is nie gevind nie." msgstr "Die API-funksie is nie gevind nie."
@ -1267,9 +1269,8 @@ msgstr ""
"Dit was nie moontlik om die boodskap van u gunstelinge te verwyder nie." "Dit was nie moontlik om die boodskap van u gunstelinge te verwyder nie."
#: actions/atompubshowmembership.php:81 #: actions/atompubshowmembership.php:81
#, fuzzy
msgid "No such group" msgid "No such group"
msgstr "Die groep bestaan nie." msgstr "Hierdie groep bestaat nie"
#: actions/atompubshowmembership.php:90 #: actions/atompubshowmembership.php:90
#, fuzzy #, fuzzy
@ -1285,21 +1286,26 @@ msgstr "Die API-funksie is nie gevind nie."
msgid "Can't delete someone else's membership" msgid "Can't delete someone else's membership"
msgstr "" msgstr ""
#. TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
#. TRANS: %d is the non-existing profile ID number.
#: actions/atompubshowsubscription.php:72 #: actions/atompubshowsubscription.php:72
#: actions/atompubshowsubscription.php:81 #: actions/atompubshowsubscription.php:83
#: actions/atompubsubscriptionfeed.php:74 #: actions/atompubsubscriptionfeed.php:74
#, fuzzy, php-format #, fuzzy, php-format
msgid "No such profile id: %d" msgid "No such profile id: %d"
msgstr "Die lêer bestaan nie." msgstr "Die lêer bestaan nie."
#: actions/atompubshowsubscription.php:90 #. TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
#. TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
#: actions/atompubshowsubscription.php:94
#, fuzzy, php-format #, fuzzy, php-format
msgid "Profile %d not subscribed to profile %d" msgid "Profile %1$d not subscribed to profile %2$d"
msgstr "U volg hierdie gebruiker:" msgstr "U volg hierdie gebruiker:"
#: actions/atompubshowsubscription.php:154 #. TRANS: Client exception thrown when trying to delete a subscription of another user.
#: actions/atompubshowsubscription.php:157
#, fuzzy #, fuzzy
msgid "Can't delete someone else's subscription" msgid "Cannot delete someone else's subscription"
msgstr "" msgstr ""
"Dit was nie moontlik om die boodskap van u gunstelinge te verwyder nie." "Dit was nie moontlik om die boodskap van u gunstelinge te verwyder nie."
@ -1394,14 +1400,16 @@ msgid "Preview"
msgstr "Voorskou" msgstr "Voorskou"
#. TRANS: Button on avatar upload page to delete current avatar. #. TRANS: Button on avatar upload page to delete current avatar.
#: actions/avatarsettings.php:155 #. TRANS: Button text for user account deletion.
#: actions/avatarsettings.php:155 actions/deleteaccount.php:319
#, fuzzy #, fuzzy
msgctxt "BUTTON" msgctxt "BUTTON"
msgid "Delete" msgid "Delete"
msgstr "Skrap" msgstr "Skrap"
#. TRANS: Button on avatar upload page to upload an avatar. #. TRANS: Button on avatar upload page to upload an avatar.
#: actions/avatarsettings.php:173 #. TRANS: Submit button to confirm upload of a user backup file for account restore.
#: actions/avatarsettings.php:173 actions/restoreaccount.php:369
#, fuzzy #, fuzzy
msgctxt "BUTTON" msgctxt "BUTTON"
msgid "Upload" msgid "Upload"
@ -1444,6 +1452,37 @@ msgstr "Die opdatering van die avatar het gefaal."
msgid "Avatar deleted." msgid "Avatar deleted."
msgstr "Die avatar is verwyder." msgstr "Die avatar is verwyder."
#: actions/backupaccount.php:62 actions/profilesettings.php:467
msgid "Backup account"
msgstr ""
#: actions/backupaccount.php:80
msgid "Only logged-in users can backup their account."
msgstr ""
#: actions/backupaccount.php:84
msgid "You may not backup your account."
msgstr ""
#: actions/backupaccount.php:232
msgid ""
"You can backup your account data in <a href=\"http://activitystrea.ms/"
"\">Activity Streams</a> format. This is an experimental feature and "
"provides an incomplete backup; private account information like email and IM "
"addresses is not backed up. Additionally, uploaded files and direct messages "
"are not backed up."
msgstr ""
#: actions/backupaccount.php:255
#, fuzzy
msgctxt "BUTTON"
msgid "Backup"
msgstr "Agtergrond"
#: actions/backupaccount.php:258
msgid "Backup your account"
msgstr ""
#. TRANS: Client error displayed when blocking a user that has already been blocked. #. TRANS: Client error displayed when blocking a user that has already been blocked.
#: actions/block.php:68 #: actions/block.php:68
msgid "You already blocked that user." msgid "You already blocked that user."
@ -1652,6 +1691,76 @@ msgstr "Gesprek"
msgid "Notices" msgid "Notices"
msgstr "Kennisgewings" msgstr "Kennisgewings"
#. TRANS: Client exception displayed trying to delete a user account while not logged in.
#: actions/deleteaccount.php:71
msgid "Only logged-in users can delete their account."
msgstr ""
#. TRANS: Client exception displayed trying to delete a user account without have the rights to do that.
#: actions/deleteaccount.php:77
#, fuzzy
msgid "You cannot delete your account."
msgstr "U kan nie gebruikers verwyder nie."
#. TRANS: Confirmation text for user deletion. The user has to type this exactly the same, including punctuation.
#: actions/deleteaccount.php:160 actions/deleteaccount.php:297
msgid "I am sure."
msgstr ""
#. TRANS: Notification for user about the text that must be input to be able to delete a user account.
#. TRANS: %s is the text that needs to be input.
#: actions/deleteaccount.php:164
#, php-format
msgid "You must write \"%s\" exactly in the box."
msgstr ""
#. TRANS: Confirmation that a user account has been deleted.
#: actions/deleteaccount.php:206
#, fuzzy
msgid "Account deleted."
msgstr "Die avatar is verwyder."
#. TRANS: Page title for page on which a user account can be deleted.
#: actions/deleteaccount.php:228 actions/profilesettings.php:474
#, fuzzy
msgid "Delete account"
msgstr "Skep 'n gebruiker"
#. TRANS: Form text for user deletion form.
#: actions/deleteaccount.php:279
msgid ""
"This will <strong>permanently delete</strong> your account data from this "
"server."
msgstr ""
#. TRANS: Additional form text for user deletion form shown if a user has account backup rights.
#. TRANS: %s is a URL to the backup page.
#: actions/deleteaccount.php:285
#, php-format
msgid ""
"You are strongly advised to <a href=\"%s\">back up your data</a> before "
"deletion."
msgstr ""
#. TRANS: Field label for delete account confirmation entry.
#: actions/deleteaccount.php:300 actions/passwordsettings.php:112
#: actions/recoverpassword.php:239 actions/register.php:441
msgid "Confirm"
msgstr "Bevestig"
#. TRANS: Input title for the delete account field.
#. TRANS: %s is the text that needs to be input.
#: actions/deleteaccount.php:304
#, fuzzy, php-format
msgid "Enter \"%s\" to confirm that you want to delete your account."
msgstr "U kan nie gebruikers verwyder nie."
#. TRANS: Button title for user account deletion.
#: actions/deleteaccount.php:323
#, fuzzy
msgid "Permanently delete your account"
msgstr "U kan nie gebruikers verwyder nie."
#. TRANS: Client error displayed trying to delete an application while not logged in. #. TRANS: Client error displayed trying to delete an application while not logged in.
#: actions/deleteapplication.php:62 #: actions/deleteapplication.php:62
msgid "You must be logged in to delete an application." msgid "You must be logged in to delete an application."
@ -1797,7 +1906,7 @@ msgid "Do not delete this notice"
msgstr "Moenie hierdie kennisgewing verwyder nie" msgstr "Moenie hierdie kennisgewing verwyder nie"
#. TRANS: Submit button title for 'Yes' when deleting a notice. #. TRANS: Submit button title for 'Yes' when deleting a notice.
#: actions/deletenotice.php:166 lib/noticelist.php:672 #: actions/deletenotice.php:166 lib/noticelist.php:673
msgid "Delete this notice" msgid "Delete this notice"
msgstr "Verwyder hierdie kennisgewing" msgstr "Verwyder hierdie kennisgewing"
@ -2106,7 +2215,7 @@ msgstr "Gebruik hierdie vorm om die groep te wysig."
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/editgroup.php:239 actions/newgroup.php:179 #: actions/editgroup.php:239 actions/newgroup.php:186
#, php-format #, php-format
msgid "Invalid alias: \"%s\"" msgid "Invalid alias: \"%s\""
msgstr "Ongeldige alias: \"%s\"" msgstr "Ongeldige alias: \"%s\""
@ -2118,7 +2227,7 @@ msgstr "Dit was nie moontlik om die groep by te werk nie."
#. TRANS: Server error displayed when group aliases could not be added. #. TRANS: Server error displayed when group aliases could not be added.
#. TRANS: Server exception thrown when creating group aliases failed. #. TRANS: Server exception thrown when creating group aliases failed.
#: actions/editgroup.php:279 classes/User_group.php:529 #: actions/editgroup.php:279 classes/User_group.php:534
msgid "Could not create aliases." msgid "Could not create aliases."
msgstr "Dit was nie moontlik om die aliasse te skep nie." msgstr "Dit was nie moontlik om die aliasse te skep nie."
@ -3303,8 +3412,14 @@ msgstr "Dit was nie moontlik om die applikasie te skep nie."
msgid "New group" msgid "New group"
msgstr "Nuwe groep" msgstr "Nuwe groep"
#. TRANS: Client exception thrown when a user tries to create a group while banned.
#: actions/newgroup.php:73 classes/User_group.php:485
#, fuzzy
msgid "You are not allowed to create groups on this site."
msgstr "U is nie 'n lid van die groep nie."
#. TRANS: Form instructions for group create form. #. TRANS: Form instructions for group create form.
#: actions/newgroup.php:110 #: actions/newgroup.php:117
#, fuzzy #, fuzzy
msgid "Use this form to create a new group." msgid "Use this form to create a new group."
msgstr "Gebruik hierdie vorm om die groep te wysig." msgstr "Gebruik hierdie vorm om die groep te wysig."
@ -3629,11 +3744,6 @@ msgstr "Nuwe wagwoord"
msgid "6 or more characters" msgid "6 or more characters"
msgstr "6 of meer karakters" msgstr "6 of meer karakters"
#: actions/passwordsettings.php:112 actions/recoverpassword.php:239
#: actions/register.php:441
msgid "Confirm"
msgstr "Bevestig"
#: actions/passwordsettings.php:113 actions/recoverpassword.php:240 #: actions/passwordsettings.php:113 actions/recoverpassword.php:240
msgid "Same as password above" msgid "Same as password above"
msgstr "Dieselfde as wagwoord hierbo" msgstr "Dieselfde as wagwoord hierbo"
@ -4163,6 +4273,12 @@ msgstr "Kon nie gebruiker opdateer nie."
msgid "Settings saved." msgid "Settings saved."
msgstr "Voorkeure is gestoor." msgstr "Voorkeure is gestoor."
#. TRANS: Page title for page where a user account can be restored from backup.
#: actions/profilesettings.php:481 actions/restoreaccount.php:60
#, fuzzy
msgid "Restore account"
msgstr "Skep 'n gebruiker"
#: actions/public.php:83 #: actions/public.php:83
#, php-format #, php-format
msgid "Beyond the page limit (%s)." msgid "Beyond the page limit (%s)."
@ -4608,7 +4724,7 @@ msgstr "U kan nie u eie kennisgewings herhaal nie."
msgid "You already repeated that notice." msgid "You already repeated that notice."
msgstr "U het reeds die kennisgewing herhaal." msgstr "U het reeds die kennisgewing herhaal."
#: actions/repeat.php:114 lib/noticelist.php:691 #: actions/repeat.php:114 lib/noticelist.php:692
msgid "Repeated" msgid "Repeated"
msgstr "Herhalend" msgstr "Herhalend"
@ -4670,6 +4786,92 @@ msgstr ""
msgid "Replies to %1$s on %2$s!" msgid "Replies to %1$s on %2$s!"
msgstr "Opdaterings van %1$s op %2$s." msgstr "Opdaterings van %1$s op %2$s."
#. TRANS: Client exception displayed when trying to restore an account while not logged in.
#: actions/restoreaccount.php:78
msgid "Only logged-in users can restore their account."
msgstr ""
#. TRANS: Client exception displayed when trying to restore an account without having restore rights.
#: actions/restoreaccount.php:83
#, fuzzy
msgid "You may not restore your account."
msgstr "Dit was nie moontlik om die applikasie te skep nie."
#. TRANS: Client exception displayed trying to restore an account while something went wrong uploading a file.
#. TRANS: Client exception. No file; probably just a non-AJAX submission.
#: actions/restoreaccount.php:121 actions/restoreaccount.php:146
#, fuzzy
msgid "No uploaded file."
msgstr "Oplaai"
#. TRANS: Client exception thrown when an uploaded file is larger than set in php.ini.
#: actions/restoreaccount.php:129 lib/mediafile.php:194
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
msgstr ""
#. TRANS: Client exception.
#: actions/restoreaccount.php:135 lib/mediafile.php:200
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form."
msgstr ""
#. TRANS: Client exception.
#: actions/restoreaccount.php:141 lib/mediafile.php:206
msgid "The uploaded file was only partially uploaded."
msgstr ""
#. TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
#: actions/restoreaccount.php:150 lib/mediafile.php:214
msgid "Missing a temporary folder."
msgstr ""
#. TRANS: Client exception thrown when writing to disk is not possible during a file upload operation.
#: actions/restoreaccount.php:154 lib/mediafile.php:218
msgid "Failed to write file to disk."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has been stopped by an extension.
#: actions/restoreaccount.php:158 lib/mediafile.php:222
msgid "File upload stopped by extension."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has failed with an unknown reason.
#: actions/restoreaccount.php:164 lib/imagefile.php:103 lib/mediafile.php:228
msgid "System error uploading file."
msgstr ""
#. TRANS: Client exception thrown when a feed is not an Atom feed.
#: actions/restoreaccount.php:207
#, fuzzy
msgid "Not an Atom feed."
msgstr "Alle lede"
#. TRANS: Success message when a feed has been restored.
#: actions/restoreaccount.php:241
msgid ""
"Feed has been restored. Your old posts should now appear in search and your "
"profile page."
msgstr ""
#. TRANS: Message when a feed restore is in progress.
#: actions/restoreaccount.php:245
msgid "Feed will be restored. Please wait a few minutes for results."
msgstr ""
#. TRANS: Form instructions for feed restore.
#: actions/restoreaccount.php:342
msgid ""
"You can upload a backed-up stream in <a href=\"http://activitystrea.ms/"
"\">Activity Streams</a> format."
msgstr ""
#. TRANS: Title for submit button to confirm upload of a user backup file for account restore.
#: actions/restoreaccount.php:373
#, fuzzy
msgid "Upload the file"
msgstr "Oplaai"
#: actions/revokerole.php:75 #: actions/revokerole.php:75
#, fuzzy #, fuzzy
msgid "You cannot revoke user roles on this site." msgid "You cannot revoke user roles on this site."
@ -4778,7 +4980,7 @@ msgid "Reset key & secret"
msgstr "" msgstr ""
#: actions/showapplication.php:252 lib/deletegroupform.php:121 #: actions/showapplication.php:252 lib/deletegroupform.php:121
#: lib/deleteuserform.php:66 lib/noticelist.php:672 #: lib/deleteuserform.php:66 lib/noticelist.php:673
msgid "Delete" msgid "Delete"
msgstr "Skrap" msgstr "Skrap"
@ -6022,14 +6224,14 @@ msgid "Author(s)"
msgstr "Outeur(s)" msgstr "Outeur(s)"
#. TRANS: Activity title when marking a notice as favorite. #. TRANS: Activity title when marking a notice as favorite.
#: classes/Fave.php:151 lib/favorform.php:143 #: classes/Fave.php:164 lib/favorform.php:143
#, fuzzy #, fuzzy
msgid "Favor" msgid "Favor"
msgstr "Gunstelinge" msgstr "Gunstelinge"
#. TRANS: Ntofication given when a user marks a notice as favorite. #. TRANS: Ntofication given when a user marks a notice as favorite.
#. TRANS: %1$s is a user nickname or full name, %2$s is a notice URI. #. TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
#: classes/Fave.php:154 #: classes/Fave.php:167
#, fuzzy, php-format #, fuzzy, php-format
msgid "%1$s marked notice %2$s as a favorite." msgid "%1$s marked notice %2$s as a favorite."
msgstr "Hierdie kennisgewing is nie 'n gunsteling nie!" msgstr "Hierdie kennisgewing is nie 'n gunsteling nie!"
@ -6140,7 +6342,7 @@ msgid "Could not create login token for %s"
msgstr "Dit was nie moontlik om die aliasse te skep nie." msgstr "Dit was nie moontlik om die aliasse te skep nie."
#. TRANS: Exception thrown when database name or Data Source Name could not be found. #. TRANS: Exception thrown when database name or Data Source Name could not be found.
#: classes/Memcached_DataObject.php:533 #: classes/Memcached_DataObject.php:537
msgid "No database name or DSN found anywhere." msgid "No database name or DSN found anywhere."
msgstr "" msgstr ""
@ -6170,72 +6372,72 @@ msgid "No such profile (%1$d) for notice (%2$d)."
msgstr "" msgstr ""
#. TRANS: Server exception. %s are the error details. #. TRANS: Server exception. %s are the error details.
#: classes/Notice.php:193 #: classes/Notice.php:199
#, php-format #, php-format
msgid "Database error inserting hashtag: %s" msgid "Database error inserting hashtag: %s"
msgstr "" msgstr ""
#. TRANS: Client exception thrown if a notice contains too many characters. #. TRANS: Client exception thrown if a notice contains too many characters.
#: classes/Notice.php:270 #: classes/Notice.php:279
msgid "Problem saving notice. Too long." msgid "Problem saving notice. Too long."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when trying to save a notice for an unknown user. #. TRANS: Client exception thrown when trying to save a notice for an unknown user.
#: classes/Notice.php:275 #: classes/Notice.php:284
msgid "Problem saving notice. Unknown user." msgid "Problem saving notice. Unknown user."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when a user tries to post too many notices in a given time frame. #. TRANS: Client exception thrown when a user tries to post too many notices in a given time frame.
#: classes/Notice.php:281 #: classes/Notice.php:290
msgid "" msgid ""
"Too many notices too fast; take a breather and post again in a few minutes." "Too many notices too fast; take a breather and post again in a few minutes."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when a user tries to post too many duplicate notices in a given time frame. #. TRANS: Client exception thrown when a user tries to post too many duplicate notices in a given time frame.
#: classes/Notice.php:288 #: classes/Notice.php:297
msgid "" msgid ""
"Too many duplicate messages too quickly; take a breather and post again in a " "Too many duplicate messages too quickly; take a breather and post again in a "
"few minutes." "few minutes."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when a user tries to post while being banned. #. TRANS: Client exception thrown when a user tries to post while being banned.
#: classes/Notice.php:296 #: classes/Notice.php:305
#, fuzzy #, fuzzy
msgid "You are banned from posting notices on this site." msgid "You are banned from posting notices on this site."
msgstr "Jy kan nie gebruikers op hierdie webwerf stilmaak nie." msgstr "Jy kan nie gebruikers op hierdie webwerf stilmaak nie."
#. TRANS: Server exception thrown when a notice cannot be saved. #. TRANS: Server exception thrown when a notice cannot be saved.
#. TRANS: Server exception thrown when a notice cannot be updated. #. TRANS: Server exception thrown when a notice cannot be updated.
#: classes/Notice.php:363 classes/Notice.php:390 #: classes/Notice.php:372 classes/Notice.php:399
msgid "Problem saving notice." msgid "Problem saving notice."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when no array is provided to the method saveKnownGroups(). #. TRANS: Server exception thrown when no array is provided to the method saveKnownGroups().
#: classes/Notice.php:913 #: classes/Notice.php:914
msgid "Bad type provided to saveKnownGroups." msgid "Bad type provided to saveKnownGroups."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when an update for a group inbox fails. #. TRANS: Server exception thrown when an update for a group inbox fails.
#: classes/Notice.php:1012 #: classes/Notice.php:1013
msgid "Problem saving group inbox." msgid "Problem saving group inbox."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when a reply cannot be saved. #. TRANS: Server exception thrown when a reply cannot be saved.
#. TRANS: %1$d is a notice ID, %2$d is the ID of the mentioned user. #. TRANS: %1$d is a notice ID, %2$d is the ID of the mentioned user.
#: classes/Notice.php:1126 #: classes/Notice.php:1127
#, fuzzy, php-format #, fuzzy, php-format
msgid "Could not save reply for %1$d, %2$d." msgid "Could not save reply for %1$d, %2$d."
msgstr "Kon nie die profiel stoor nie." msgstr "Kon nie die profiel stoor nie."
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'. #. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice. #. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
#: classes/Notice.php:1645 #: classes/Notice.php:1646
#, php-format #, php-format
msgid "RT @%1$s %2$s" msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s" msgstr "RT @%1$s %2$s"
#. TRANS: Full name of a profile or group followed by nickname in parens #. TRANS: Full name of a profile or group followed by nickname in parens
#: classes/Profile.php:172 classes/User_group.php:247 #: classes/Profile.php:172 classes/User_group.php:242
#, fuzzy, php-format #, fuzzy, php-format
msgctxt "FANCYNAME" msgctxt "FANCYNAME"
msgid "%1$s (%2$s)" msgid "%1$s (%2$s)"
@ -6243,14 +6445,14 @@ msgstr "%1$s (%2$s)"
#. TRANS: Exception thrown when trying to revoke an existing role for a user that does not exist. #. TRANS: Exception thrown when trying to revoke an existing role for a user that does not exist.
#. TRANS: %1$s is the role name, %2$s is the user ID (number). #. TRANS: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:798 #: classes/Profile.php:765
#, php-format #, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist." msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist."
msgstr "" msgstr ""
#. TRANS: Exception thrown when trying to revoke a role for a user with a failing database query. #. TRANS: Exception thrown when trying to revoke a role for a user with a failing database query.
#. TRANS: %1$s is the role name, %2$s is the user ID (number). #. TRANS: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:807 #: classes/Profile.php:774
#, php-format #, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error." msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error."
msgstr "" msgstr ""
@ -6329,34 +6531,34 @@ msgid "Welcome to %1$s, @%2$s!"
msgstr "Welkom by %1$s, @%2$s!" msgstr "Welkom by %1$s, @%2$s!"
#. TRANS: Server exception. #. TRANS: Server exception.
#: classes/User.php:923 #: classes/User.php:918
msgid "No single user defined for single-user mode." msgid "No single user defined for single-user mode."
msgstr "" msgstr ""
#. TRANS: Server exception. #. TRANS: Server exception.
#: classes/User.php:927 #: classes/User.php:922
msgid "Single-user mode code called when not enabled." msgid "Single-user mode code called when not enabled."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when creating a group failed. #. TRANS: Server exception thrown when creating a group failed.
#: classes/User_group.php:511 #: classes/User_group.php:516
msgid "Could not create group." msgid "Could not create group."
msgstr "Kon nie die groep skep nie." msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when updating a group URI failed. #. TRANS: Server exception thrown when updating a group URI failed.
#: classes/User_group.php:521 #: classes/User_group.php:526
#, fuzzy #, fuzzy
msgid "Could not set group URI." msgid "Could not set group URI."
msgstr "Kon nie die groep skep nie." msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when setting group membership failed. #. TRANS: Server exception thrown when setting group membership failed.
#: classes/User_group.php:544 #: classes/User_group.php:549
#, fuzzy #, fuzzy
msgid "Could not set group membership." msgid "Could not set group membership."
msgstr "Kon nie die groep skep nie." msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when saving local group information failed. #. TRANS: Server exception thrown when saving local group information failed.
#: classes/User_group.php:559 #: classes/User_group.php:564
#, fuzzy #, fuzzy
msgid "Could not save local group info." msgid "Could not save local group info."
msgstr "Kon nie die profiel stoor nie." msgstr "Kon nie die profiel stoor nie."
@ -6695,10 +6897,56 @@ msgstr "Voor"
msgid "Expecting a root feed element but got a whole XML document." msgid "Expecting a root feed element but got a whole XML document."
msgstr "" msgstr ""
#: lib/activity.php:360 #. TRANS: Client exception thrown when using an unknown verb for the activity importer.
#: lib/activityimporter.php:81
#, fuzzy, php-format
msgid "Unknown verb: \"%s\"."
msgstr "Onbekende taal \"%s\"."
#. TRANS: Client exception thrown when trying to force a subscription for an untrusted user.
#: lib/activityimporter.php:107
msgid "Cannot force subscription for untrusted user."
msgstr ""
#. TRANS: Client exception thrown when trying to for a remote user to subscribe.
#: lib/activityimporter.php:117
#, fuzzy #, fuzzy
msgid "Post" msgid "Cannot force remote user to subscribe."
msgstr "Foto" msgstr "Kon nie gebruikersdata opdateer nie."
#. TRANS: Client exception thrown when trying to subscribe to an unknown profile.
#: lib/activityimporter.php:132
#, fuzzy
msgid "Unknown profile."
msgstr "Onbekende lêertipe"
#. TRANS: Client exception thrown when trying to import an event not related to the importing user.
#: lib/activityimporter.php:138
msgid "This activity seems unrelated to our user."
msgstr ""
#. TRANS: Client exception thrown when trying to join a remote group that is not a group.
#: lib/activityimporter.php:154
msgid "Remote profile is not a group!"
msgstr ""
#. TRANS: Client exception thrown when trying to join a group the importing user is already a member of.
#: lib/activityimporter.php:163
#, fuzzy
msgid "User is already a member of this group."
msgstr "U is reeds 'n lid van die groep."
#. TRANS: Client exception thrown when trying to overwrite the author information for a non-trusted user during import.
#: lib/activityimporter.php:207
msgid "Not overwriting author info for non-trusted user."
msgstr ""
#. TRANS: Client exception thrown when trying to import a notice without content.
#. TRANS: %s is the notice URI.
#: lib/activityimporter.php:223
#, fuzzy, php-format
msgid "No content for notice %s."
msgstr "U kan nie u eie kennisgewings herhaal nie."
#. TRANS: Client exception thrown when there is no source attribute. #. TRANS: Client exception thrown when there is no source attribute.
#: lib/activityutils.php:200 #: lib/activityutils.php:200
@ -6999,10 +7247,16 @@ msgctxt "BUTTON"
msgid "Revoke" msgid "Revoke"
msgstr "Verwyder" msgstr "Verwyder"
#: lib/atom10feed.php:112 #: lib/atom10feed.php:113
msgid "author element must contain a name element." msgid "Author element must contain a name element."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when using the method setActivitySubject() in the class Atom10Feed.
#: lib/atom10feed.php:160
#, fuzzy
msgid "Do not use this method!"
msgstr "Moenie hierdie kennisgewing verwyder nie"
#. TRANS: DT element label in attachment list item. #. TRANS: DT element label in attachment list item.
#: lib/attachmentlist.php:294 #: lib/attachmentlist.php:294
msgid "Author" msgid "Author"
@ -7407,25 +7661,25 @@ msgid ""
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#: lib/common.php:147 #: lib/common.php:150
#, fuzzy #, fuzzy
msgid "No configuration file found." msgid "No configuration file found."
msgstr "Geen bevestigingskode." msgstr "Geen bevestigingskode."
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#. TRANS: Is followed by a list of directories (separated by HTML breaks). #. TRANS: Is followed by a list of directories (separated by HTML breaks).
#: lib/common.php:150 #: lib/common.php:153
msgid "I looked for configuration files in the following places:" msgid "I looked for configuration files in the following places:"
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#: lib/common.php:153 #: lib/common.php:156
msgid "You may wish to run the installer to fix this." msgid "You may wish to run the installer to fix this."
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#. TRANS: The text is link text that leads to the installer page. #. TRANS: The text is link text that leads to the installer page.
#: lib/common.php:157 #: lib/common.php:160
msgid "Go to the installer." msgid "Go to the installer."
msgstr "Gaan na die installeerder." msgstr "Gaan na die installeerder."
@ -7535,6 +7789,19 @@ msgstr "Atom"
msgid "FOAF" msgid "FOAF"
msgstr "Vriende van vriende (FOAF)" msgstr "Vriende van vriende (FOAF)"
#: lib/feedimporter.php:75
#, fuzzy
msgid "Not an atom feed."
msgstr "Alle lede"
#: lib/feedimporter.php:82
msgid "No author in the feed."
msgstr ""
#: lib/feedimporter.php:89
msgid "Can't import without a user."
msgstr ""
#. TRANS: Header for feed links (h2). #. TRANS: Header for feed links (h2).
#: lib/feedlist.php:66 #: lib/feedlist.php:66
msgid "Feeds" msgid "Feeds"
@ -7720,11 +7987,6 @@ msgstr "Die kennisgewing is te lank. Gebruik maksimum %d karakters."
msgid "Partial upload." msgid "Partial upload."
msgstr "Geen lêer opgelaai nie." msgstr "Geen lêer opgelaai nie."
#. TRANS: Client exception thrown when a file upload operation has failed with an unknown reason.
#: lib/imagefile.php:103 lib/mediafile.php:228
msgid "System error uploading file."
msgstr ""
#: lib/imagefile.php:111 #: lib/imagefile.php:111
msgid "Not an image or corrupt file." msgid "Not an image or corrupt file."
msgstr "" msgstr ""
@ -8044,7 +8306,7 @@ msgid ""
"users in conversation. People can send you messages for your eyes only." "users in conversation. People can send you messages for your eyes only."
msgstr "" msgstr ""
#: lib/mailbox.php:228 lib/noticelist.php:521 #: lib/mailbox.php:228 lib/noticelist.php:522
msgid "from" msgid "from"
msgstr "van" msgstr "van"
@ -8074,38 +8336,6 @@ msgstr "Nie-ondersteunde formaat."
msgid "There was a database error while saving your file. Please try again." msgid "There was a database error while saving your file. Please try again."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when an uploaded file is larger than set in php.ini.
#: lib/mediafile.php:194
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
msgstr ""
#. TRANS: Client exception.
#: lib/mediafile.php:200
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form."
msgstr ""
#. TRANS: Client exception.
#: lib/mediafile.php:206
msgid "The uploaded file was only partially uploaded."
msgstr ""
#. TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
#: lib/mediafile.php:214
msgid "Missing a temporary folder."
msgstr ""
#. TRANS: Client exception thrown when writing to disk is not possible during a file upload operation.
#: lib/mediafile.php:218
msgid "Failed to write file to disk."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has been stopped by an extension.
#: lib/mediafile.php:222
msgid "File upload stopped by extension."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota. #. TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota.
#: lib/mediafile.php:238 lib/mediafile.php:281 #: lib/mediafile.php:238 lib/mediafile.php:281
msgid "File exceeds user's quota." msgid "File exceeds user's quota."
@ -8128,7 +8358,7 @@ msgstr ""
#. TRANS: Client exception thrown trying to upload a forbidden MIME type. #. TRANS: Client exception thrown trying to upload a forbidden MIME type.
#. TRANS: %1$s is the file type that was denied, %2$s is the application part of #. TRANS: %1$s is the file type that was denied, %2$s is the application part of
#. TRANS: the MIME type that was denied. #. TRANS: the MIME type that was denied.
#: lib/mediafile.php:394 #: lib/mediafile.php:396
#, php-format #, php-format
msgid "" msgid ""
"\"%1$s\" is not a supported file type on this server. Try using another %2$s " "\"%1$s\" is not a supported file type on this server. Try using another %2$s "
@ -8137,7 +8367,7 @@ msgstr ""
#. TRANS: Client exception thrown trying to upload a forbidden MIME type. #. TRANS: Client exception thrown trying to upload a forbidden MIME type.
#. TRANS: %s is the file type that was denied. #. TRANS: %s is the file type that was denied.
#: lib/mediafile.php:399 #: lib/mediafile.php:401
#, php-format #, php-format
msgid "\"%s\" is not a supported file type on this server." msgid "\"%s\" is not a supported file type on this server."
msgstr "" msgstr ""
@ -8172,19 +8402,19 @@ msgid "Send"
msgstr "Stuur" msgstr "Stuur"
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:163 #: lib/nickname.php:165
msgid "Nickname must have only lowercase letters and numbers and no spaces." msgid "Nickname must have only lowercase letters and numbers and no spaces."
msgstr "" msgstr ""
"Die gebruikersnaam mag slegs uit kleinletters en syfers bestaan en mag geen " "Die gebruikersnaam mag slegs uit kleinletters en syfers bestaan en mag geen "
"spasies bevat nie." "spasies bevat nie."
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:176 #: lib/nickname.php:178
msgid "Nickname cannot be empty." msgid "Nickname cannot be empty."
msgstr "" msgstr ""
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:189 #: lib/nickname.php:191
#, php-format #, php-format
msgid "Nickname cannot be more than %d character long." msgid "Nickname cannot be more than %d character long."
msgid_plural "Nickname cannot be more than %d characters long." msgid_plural "Nickname cannot be more than %d characters long."
@ -8225,56 +8455,56 @@ msgid ""
msgstr "" msgstr ""
#. TRANS: Used in coordinates as abbreviation of north #. TRANS: Used in coordinates as abbreviation of north
#: lib/noticelist.php:451 #: lib/noticelist.php:452
msgid "N" msgid "N"
msgstr "N" msgstr "N"
#. TRANS: Used in coordinates as abbreviation of south #. TRANS: Used in coordinates as abbreviation of south
#: lib/noticelist.php:453 #: lib/noticelist.php:454
msgid "S" msgid "S"
msgstr "S" msgstr "S"
#. TRANS: Used in coordinates as abbreviation of east #. TRANS: Used in coordinates as abbreviation of east
#: lib/noticelist.php:455 #: lib/noticelist.php:456
msgid "E" msgid "E"
msgstr "O" msgstr "O"
#. TRANS: Used in coordinates as abbreviation of west #. TRANS: Used in coordinates as abbreviation of west
#: lib/noticelist.php:457 #: lib/noticelist.php:458
msgid "W" msgid "W"
msgstr "W" msgstr "W"
#: lib/noticelist.php:459 #: lib/noticelist.php:460
#, php-format #, php-format
msgid "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s" msgid "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s" msgstr "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
#: lib/noticelist.php:468 #: lib/noticelist.php:469
msgid "at" msgid "at"
msgstr "op" msgstr "op"
#: lib/noticelist.php:517 #: lib/noticelist.php:518
msgid "web" msgid "web"
msgstr "" msgstr ""
#: lib/noticelist.php:583 #: lib/noticelist.php:584
msgid "in context" msgid "in context"
msgstr "in konteks" msgstr "in konteks"
#: lib/noticelist.php:618 #: lib/noticelist.php:619
msgid "Repeated by" msgid "Repeated by"
msgstr "Herhaal deur" msgstr "Herhaal deur"
#: lib/noticelist.php:645 #: lib/noticelist.php:646
#, fuzzy #, fuzzy
msgid "Reply to this notice" msgid "Reply to this notice"
msgstr "Verwyder hierdie kennisgewing" msgstr "Verwyder hierdie kennisgewing"
#: lib/noticelist.php:646 #: lib/noticelist.php:647
msgid "Reply" msgid "Reply"
msgstr "Antwoord" msgstr "Antwoord"
#: lib/noticelist.php:690 #: lib/noticelist.php:691
#, fuzzy #, fuzzy
msgid "Notice repeated" msgid "Notice repeated"
msgstr "Hierdie kennisgewing is verwyder." msgstr "Hierdie kennisgewing is verwyder."
@ -8439,7 +8669,7 @@ msgid "Revoke the \"%s\" role from this user"
msgstr "Blok hierdie gebruiker van hierdie groep" msgstr "Blok hierdie gebruiker van hierdie groep"
#. TRANS: Client error on action trying to visit a non-existing page. #. TRANS: Client error on action trying to visit a non-existing page.
#: lib/router.php:957 #: lib/router.php:974
#, fuzzy #, fuzzy
msgid "Page not found." msgid "Page not found."
msgstr "Die API-funksie is nie gevind nie." msgstr "Die API-funksie is nie gevind nie."
@ -8803,21 +9033,7 @@ msgid "Invalid XML, missing XRD root."
msgstr "" msgstr ""
#. TRANS: Commandline script output. %s is the filename that contains a backup for a user. #. TRANS: Commandline script output. %s is the filename that contains a backup for a user.
#: scripts/restoreuser.php:61 #: scripts/restoreuser.php:62
#, php-format #, php-format
msgid "Getting backup from file '%s'." msgid "Getting backup from file '%s'."
msgstr "" msgstr ""
#. TRANS: Commandline script output.
#: scripts/restoreuser.php:91
#, fuzzy
msgid "No user specified; using backup user."
msgstr "Geen groep verskaf nie."
#. TRANS: Commandline script output. %d is the number of entries in the activity stream in backup; used for plural.
#: scripts/restoreuser.php:98
#, php-format
msgid "%d entry in backup."
msgid_plural "%d entries in backup."
msgstr[0] ""
msgstr[1] ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,17 +9,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - Core\n" "Project-Id-Version: StatusNet - Core\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 23:32+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:20+0000\n" "PO-Revision-Date: 2011-01-14 23:35:26+0000\n"
"Language-Team: Vietnamese <http://translatewiki.net/wiki/Portal:vi>\n" "Language-Team: Vietnamese <http://translatewiki.net/wiki/Portal:vi>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80343); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: vi\n" "X-Language-Code: vi\n"
"X-Message-Group: #out-statusnet-core\n" "X-Message-Group: #out-statusnet-core\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-POT-Import-Date: 2010-11-30 20:43:14+0000\n" "X-POT-Import-Date: 2011-01-14 13:22:39+0000\n"
#. TRANS: Page title for Access admin panel that allows configuring site access. #. TRANS: Page title for Access admin panel that allows configuring site access.
#. TRANS: Menu item for site administration #. TRANS: Menu item for site administration
@ -273,7 +273,7 @@ msgstr "Dòng tin nhắn cho %s"
#: actions/apistatusesshow.php:105 actions/apistatusnetconfig.php:138 #: actions/apistatusesshow.php:105 actions/apistatusnetconfig.php:138
#: actions/apistatusnetversion.php:91 actions/apisubscriptions.php:109 #: actions/apistatusnetversion.php:91 actions/apisubscriptions.php:109
#: actions/apitimelinefavorites.php:174 actions/apitimelinefriends.php:268 #: actions/apitimelinefavorites.php:174 actions/apitimelinefriends.php:268
#: actions/apitimelinegroup.php:151 actions/apitimelinehome.php:173 #: actions/apitimelinegroup.php:147 actions/apitimelinehome.php:173
#: actions/apitimelinementions.php:174 actions/apitimelinepublic.php:239 #: actions/apitimelinementions.php:174 actions/apitimelinepublic.php:239
#: actions/apitimelineretweetedtome.php:118 #: actions/apitimelineretweetedtome.php:118
#: actions/apitimelineretweetsofme.php:150 actions/apitimelinetag.php:159 #: actions/apitimelineretweetsofme.php:150 actions/apitimelinetag.php:159
@ -320,7 +320,8 @@ msgstr "Không thể cập nhật thành viên."
#: actions/apiaccountupdateprofile.php:111 #: actions/apiaccountupdateprofile.php:111
#: actions/apiaccountupdateprofilebackgroundimage.php:199 #: actions/apiaccountupdateprofilebackgroundimage.php:199
#: actions/apiaccountupdateprofilecolors.php:183 #: actions/apiaccountupdateprofilecolors.php:183
#: actions/apiaccountupdateprofileimage.php:130 actions/apiusershow.php:108 #: actions/apiaccountupdateprofileimage.php:130
#: actions/apiuserprofileimage.php:88 actions/apiusershow.php:108
#: actions/avatarbynickname.php:85 actions/foaf.php:65 actions/hcard.php:74 #: actions/avatarbynickname.php:85 actions/foaf.php:65 actions/hcard.php:74
#: actions/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66 #: actions/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66
#: lib/profileaction.php:84 #: lib/profileaction.php:84
@ -556,7 +557,7 @@ msgstr "Không thể cập nhật thành viên."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:156 actions/editgroup.php:189 #: actions/apigroupcreate.php:156 actions/editgroup.php:189
#: actions/newgroup.php:129 actions/profilesettings.php:277 #: actions/newgroup.php:136 actions/profilesettings.php:277
#: actions/register.php:214 #: actions/register.php:214
msgid "Nickname already in use. Try another one." msgid "Nickname already in use. Try another one."
msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác." msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác."
@ -566,7 +567,7 @@ msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác."
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:164 actions/editgroup.php:193 #: actions/apigroupcreate.php:164 actions/editgroup.php:193
#: actions/newgroup.php:133 actions/profilesettings.php:247 #: actions/newgroup.php:140 actions/profilesettings.php:247
#: actions/register.php:216 #: actions/register.php:216
msgid "Not a valid nickname." msgid "Not a valid nickname."
msgstr "Biệt hiệu không hợp lệ." msgstr "Biệt hiệu không hợp lệ."
@ -578,7 +579,7 @@ msgstr "Biệt hiệu không hợp lệ."
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:181 actions/editapplication.php:233 #: actions/apigroupcreate.php:181 actions/editapplication.php:233
#: actions/editgroup.php:200 actions/newapplication.php:211 #: actions/editgroup.php:200 actions/newapplication.php:211
#: actions/newgroup.php:140 actions/profilesettings.php:252 #: actions/newgroup.php:147 actions/profilesettings.php:252
#: actions/register.php:223 #: actions/register.php:223
msgid "Homepage is not a valid URL." msgid "Homepage is not a valid URL."
msgstr "Trang chủ không phải là URL" msgstr "Trang chủ không phải là URL"
@ -588,7 +589,7 @@ msgstr "Trang chủ không phải là URL"
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:191 actions/editgroup.php:204 #: actions/apigroupcreate.php:191 actions/editgroup.php:204
#: actions/newgroup.php:144 actions/profilesettings.php:256 #: actions/newgroup.php:151 actions/profilesettings.php:256
#: actions/register.php:226 #: actions/register.php:226
msgid "Full name is too long (maximum 255 characters)." msgid "Full name is too long (maximum 255 characters)."
msgstr "" msgstr ""
@ -603,7 +604,7 @@ msgstr ""
#. TRANS: %d is the maximum number of allowed characters. #. TRANS: %d is the maximum number of allowed characters.
#: actions/apigroupcreate.php:201 actions/editapplication.php:201 #: actions/apigroupcreate.php:201 actions/editapplication.php:201
#: actions/editgroup.php:209 actions/newapplication.php:178 #: actions/editgroup.php:209 actions/newapplication.php:178
#: actions/newgroup.php:149 #: actions/newgroup.php:156
#, php-format #, php-format
msgid "Description is too long (maximum %d character)." msgid "Description is too long (maximum %d character)."
msgid_plural "Description is too long (maximum %d characters)." msgid_plural "Description is too long (maximum %d characters)."
@ -614,7 +615,7 @@ msgstr[0] ""
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings. #. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:215 actions/editgroup.php:216 #: actions/apigroupcreate.php:215 actions/editgroup.php:216
#: actions/newgroup.php:156 actions/profilesettings.php:269 #: actions/newgroup.php:163 actions/profilesettings.php:269
#: actions/register.php:235 #: actions/register.php:235
msgid "Location is too long (maximum 255 characters)." msgid "Location is too long (maximum 255 characters)."
msgstr "" msgstr ""
@ -626,7 +627,7 @@ msgstr ""
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#. TRANS: %d is the maximum number of allowed aliases. #. TRANS: %d is the maximum number of allowed aliases.
#: actions/apigroupcreate.php:236 actions/editgroup.php:229 #: actions/apigroupcreate.php:236 actions/editgroup.php:229
#: actions/newgroup.php:169 #: actions/newgroup.php:176
#, php-format #, php-format
msgid "Too many aliases! Maximum %d allowed." msgid "Too many aliases! Maximum %d allowed."
msgid_plural "Too many aliases! Maximum %d allowed." msgid_plural "Too many aliases! Maximum %d allowed."
@ -644,7 +645,7 @@ msgstr "Địa chỉ email không đúng:%s"
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/apigroupcreate.php:264 actions/editgroup.php:244 #: actions/apigroupcreate.php:264 actions/editgroup.php:244
#: actions/newgroup.php:184 #: actions/newgroup.php:191
#, fuzzy, php-format #, fuzzy, php-format
msgid "Alias \"%s\" already in use. Try another one." msgid "Alias \"%s\" already in use. Try another one."
msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác." msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác."
@ -653,7 +654,7 @@ msgstr "Biệt hiệu này đã dùng rồi. Hãy nhập biệt hiệu khác."
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/apigroupcreate.php:278 actions/editgroup.php:251 #: actions/apigroupcreate.php:278 actions/editgroup.php:251
#: actions/newgroup.php:191 #: actions/newgroup.php:198
msgid "Alias can't be the same as nickname." msgid "Alias can't be the same as nickname."
msgstr "" msgstr ""
@ -956,9 +957,10 @@ msgstr "Không thể xóa tin nhắn này."
msgid "Already repeated that notice." msgid "Already repeated that notice."
msgstr "Không thể xóa tin nhắn này." msgstr "Không thể xóa tin nhắn này."
#. TRANS: Client error shown when using a non-supported HTTP method.
#: actions/apistatusesshow.php:117 actions/atompubfavoritefeed.php:104 #: actions/apistatusesshow.php:117 actions/atompubfavoritefeed.php:104
#: actions/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116 #: actions/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116
#: actions/atompubshowsubscription.php:118 #: actions/atompubshowsubscription.php:122
#: actions/atompubsubscriptionfeed.php:109 #: actions/atompubsubscriptionfeed.php:109
msgid "HTTP method not supported." msgid "HTTP method not supported."
msgstr "" msgstr ""
@ -1044,7 +1046,7 @@ msgstr ""
#. TRANS: Server error displayed when generating an Atom feed fails. #. TRANS: Server error displayed when generating an Atom feed fails.
#. TRANS: %s is the error. #. TRANS: %s is the error.
#: actions/apitimelinegroup.php:138 #: actions/apitimelinegroup.php:134
#, php-format #, php-format
msgid "Could not generate feed for group - %s" msgid "Could not generate feed for group - %s"
msgstr "" msgstr ""
@ -1135,30 +1137,30 @@ msgstr ""
#. TRANS: Client error displayed when not using the POST verb. #. TRANS: Client error displayed when not using the POST verb.
#. TRANS: Do not translate POST. #. TRANS: Do not translate POST.
#: actions/apitimelineuser.php:332 #: actions/apitimelineuser.php:334
msgid "Can only handle POST activities." msgid "Can only handle POST activities."
msgstr "" msgstr ""
#. TRANS: Client error displayed when using an unsupported activity object type. #. TRANS: Client error displayed when using an unsupported activity object type.
#. TRANS: %s is the unsupported activity object type. #. TRANS: %s is the unsupported activity object type.
#: actions/apitimelineuser.php:343 #: actions/apitimelineuser.php:345
#, php-format #, php-format
msgid "Cannot handle activity object type \"%s\"." msgid "Cannot handle activity object type \"%s\"."
msgstr "" msgstr ""
#. TRANS: Client error displayed when posting a notice without content through the API. #. TRANS: Client error displayed when posting a notice without content through the API.
#: actions/apitimelineuser.php:376 #: actions/apitimelineuser.php:378
#, fuzzy, php-format #, fuzzy, php-format
msgid "No content for notice %d." msgid "No content for notice %d."
msgstr "Tìm theo nội dung của tin nhắn" msgstr "Tìm theo nội dung của tin nhắn"
#. TRANS: Client error displayed when using another format than AtomPub. #. TRANS: Client error displayed when using another format than AtomPub.
#: actions/apitimelineuser.php:404 #: actions/apitimelineuser.php:406
#, php-format #, php-format
msgid "Notice with URI \"%s\" already exists." msgid "Notice with URI \"%s\" already exists."
msgstr "" msgstr ""
#: actions/apitimelineuser.php:435 #: actions/apitimelineuser.php:437
#, php-format #, php-format
msgid "AtomPub post with unknown attention URI %s" msgid "AtomPub post with unknown attention URI %s"
msgstr "" msgstr ""
@ -1169,7 +1171,7 @@ msgid "API method under construction."
msgstr "Phương thức API dưới cấu trúc có sẵn." msgstr "Phương thức API dưới cấu trúc có sẵn."
#. TRANS: Client error displayed when requesting user information for a non-existing user. #. TRANS: Client error displayed when requesting user information for a non-existing user.
#: actions/apiusershow.php:94 #: actions/apiuserprofileimage.php:80 actions/apiusershow.php:94
msgid "User not found." msgid "User not found."
msgstr "Không tìm thấy user." msgstr "Không tìm thấy user."
@ -1278,21 +1280,26 @@ msgstr "Kết nối"
msgid "Can't delete someone else's membership" msgid "Can't delete someone else's membership"
msgstr "" msgstr ""
#. TRANS: Client exception thrown when trying to display a subscription for a non-existing profile ID.
#. TRANS: %d is the non-existing profile ID number.
#: actions/atompubshowsubscription.php:72 #: actions/atompubshowsubscription.php:72
#: actions/atompubshowsubscription.php:81 #: actions/atompubshowsubscription.php:83
#: actions/atompubsubscriptionfeed.php:74 #: actions/atompubsubscriptionfeed.php:74
#, fuzzy, php-format #, fuzzy, php-format
msgid "No such profile id: %d" msgid "No such profile id: %d"
msgstr "Không có tin nhắn nào." msgstr "Không có tin nhắn nào."
#: actions/atompubshowsubscription.php:90 #. TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
#. TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
#: actions/atompubshowsubscription.php:94
#, fuzzy, php-format #, fuzzy, php-format
msgid "Profile %d not subscribed to profile %d" msgid "Profile %1$d not subscribed to profile %2$d"
msgstr "Bạn đã theo những người này:" msgstr "Bạn đã theo những người này:"
#: actions/atompubshowsubscription.php:154 #. TRANS: Client exception thrown when trying to delete a subscription of another user.
#: actions/atompubshowsubscription.php:157
#, fuzzy #, fuzzy
msgid "Can't delete someone else's subscription" msgid "Cannot delete someone else's subscription"
msgstr "Không thể chèn thêm vào đăng nhận." msgstr "Không thể chèn thêm vào đăng nhận."
#: actions/atompubsubscriptionfeed.php:150 #: actions/atompubsubscriptionfeed.php:150
@ -1387,13 +1394,15 @@ msgid "Preview"
msgstr "Xem trước" msgstr "Xem trước"
#. TRANS: Button on avatar upload page to delete current avatar. #. TRANS: Button on avatar upload page to delete current avatar.
#: actions/avatarsettings.php:155 #. TRANS: Button text for user account deletion.
#: actions/avatarsettings.php:155 actions/deleteaccount.php:319
msgctxt "BUTTON" msgctxt "BUTTON"
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
#. TRANS: Button on avatar upload page to upload an avatar. #. TRANS: Button on avatar upload page to upload an avatar.
#: actions/avatarsettings.php:173 #. TRANS: Submit button to confirm upload of a user backup file for account restore.
#: actions/avatarsettings.php:173 actions/restoreaccount.php:369
msgctxt "BUTTON" msgctxt "BUTTON"
msgid "Upload" msgid "Upload"
msgstr "" msgstr ""
@ -1436,6 +1445,37 @@ msgstr "Cập nhật hình đại diện không thành công."
msgid "Avatar deleted." msgid "Avatar deleted."
msgstr "Hình đại diện đã được cập nhật." msgstr "Hình đại diện đã được cập nhật."
#: actions/backupaccount.php:62 actions/profilesettings.php:467
msgid "Backup account"
msgstr ""
#: actions/backupaccount.php:80
msgid "Only logged-in users can backup their account."
msgstr ""
#: actions/backupaccount.php:84
msgid "You may not backup your account."
msgstr ""
#: actions/backupaccount.php:232
msgid ""
"You can backup your account data in <a href=\"http://activitystrea.ms/"
"\">Activity Streams</a> format. This is an experimental feature and "
"provides an incomplete backup; private account information like email and IM "
"addresses is not backed up. Additionally, uploaded files and direct messages "
"are not backed up."
msgstr ""
#: actions/backupaccount.php:255
#, fuzzy
msgctxt "BUTTON"
msgid "Backup"
msgstr "Background Theme:"
#: actions/backupaccount.php:258
msgid "Backup your account"
msgstr ""
#. TRANS: Client error displayed when blocking a user that has already been blocked. #. TRANS: Client error displayed when blocking a user that has already been blocked.
#: actions/block.php:68 #: actions/block.php:68
#, fuzzy #, fuzzy
@ -1643,6 +1683,76 @@ msgstr "Thành phố"
msgid "Notices" msgid "Notices"
msgstr "Tin nhắn" msgstr "Tin nhắn"
#. TRANS: Client exception displayed trying to delete a user account while not logged in.
#: actions/deleteaccount.php:71
msgid "Only logged-in users can delete their account."
msgstr ""
#. TRANS: Client exception displayed trying to delete a user account without have the rights to do that.
#: actions/deleteaccount.php:77
#, fuzzy
msgid "You cannot delete your account."
msgstr "Không thể cập nhật thành viên."
#. TRANS: Confirmation text for user deletion. The user has to type this exactly the same, including punctuation.
#: actions/deleteaccount.php:160 actions/deleteaccount.php:297
msgid "I am sure."
msgstr ""
#. TRANS: Notification for user about the text that must be input to be able to delete a user account.
#. TRANS: %s is the text that needs to be input.
#: actions/deleteaccount.php:164
#, php-format
msgid "You must write \"%s\" exactly in the box."
msgstr ""
#. TRANS: Confirmation that a user account has been deleted.
#: actions/deleteaccount.php:206
#, fuzzy
msgid "Account deleted."
msgstr "Hình đại diện đã được cập nhật."
#. TRANS: Page title for page on which a user account can be deleted.
#: actions/deleteaccount.php:228 actions/profilesettings.php:474
#, fuzzy
msgid "Delete account"
msgstr "Mở tài khoản mới"
#. TRANS: Form text for user deletion form.
#: actions/deleteaccount.php:279
msgid ""
"This will <strong>permanently delete</strong> your account data from this "
"server."
msgstr ""
#. TRANS: Additional form text for user deletion form shown if a user has account backup rights.
#. TRANS: %s is a URL to the backup page.
#: actions/deleteaccount.php:285
#, php-format
msgid ""
"You are strongly advised to <a href=\"%s\">back up your data</a> before "
"deletion."
msgstr ""
#. TRANS: Field label for delete account confirmation entry.
#: actions/deleteaccount.php:300 actions/passwordsettings.php:112
#: actions/recoverpassword.php:239 actions/register.php:441
msgid "Confirm"
msgstr "Xác nhận"
#. TRANS: Input title for the delete account field.
#. TRANS: %s is the text that needs to be input.
#: actions/deleteaccount.php:304
#, fuzzy, php-format
msgid "Enter \"%s\" to confirm that you want to delete your account."
msgstr "Không thể cập nhật thành viên."
#. TRANS: Button title for user account deletion.
#: actions/deleteaccount.php:323
#, fuzzy
msgid "Permanently delete your account"
msgstr "Không thể cập nhật thành viên."
#. TRANS: Client error displayed trying to delete an application while not logged in. #. TRANS: Client error displayed trying to delete an application while not logged in.
#: actions/deleteapplication.php:62 #: actions/deleteapplication.php:62
#, fuzzy #, fuzzy
@ -1792,7 +1902,7 @@ msgid "Do not delete this notice"
msgstr "Không thể xóa tin nhắn này." msgstr "Không thể xóa tin nhắn này."
#. TRANS: Submit button title for 'Yes' when deleting a notice. #. TRANS: Submit button title for 'Yes' when deleting a notice.
#: actions/deletenotice.php:166 lib/noticelist.php:672 #: actions/deletenotice.php:166 lib/noticelist.php:673
#, fuzzy #, fuzzy
msgid "Delete this notice" msgid "Delete this notice"
msgstr "Xóa tin nhắn" msgstr "Xóa tin nhắn"
@ -2121,7 +2231,7 @@ msgstr ""
#. TRANS: Group edit form validation error. #. TRANS: Group edit form validation error.
#. TRANS: Group create form validation error. #. TRANS: Group create form validation error.
#: actions/editgroup.php:239 actions/newgroup.php:179 #: actions/editgroup.php:239 actions/newgroup.php:186
#, php-format #, php-format
msgid "Invalid alias: \"%s\"" msgid "Invalid alias: \"%s\""
msgstr "Địa chỉ email không đúng:%s" msgstr "Địa chỉ email không đúng:%s"
@ -2134,7 +2244,7 @@ msgstr "Không thể cập nhật thành viên."
#. TRANS: Server error displayed when group aliases could not be added. #. TRANS: Server error displayed when group aliases could not be added.
#. TRANS: Server exception thrown when creating group aliases failed. #. TRANS: Server exception thrown when creating group aliases failed.
#: actions/editgroup.php:279 classes/User_group.php:529 #: actions/editgroup.php:279 classes/User_group.php:534
#, fuzzy #, fuzzy
msgid "Could not create aliases." msgid "Could not create aliases."
msgstr "Không thể tạo favorite." msgstr "Không thể tạo favorite."
@ -3395,8 +3505,14 @@ msgstr "Không thể tạo favorite."
msgid "New group" msgid "New group"
msgstr "Tạo nhóm" msgstr "Tạo nhóm"
#. TRANS: Client exception thrown when a user tries to create a group while banned.
#: actions/newgroup.php:73 classes/User_group.php:485
#, fuzzy
msgid "You are not allowed to create groups on this site."
msgstr "Bạn đã theo những người này:"
#. TRANS: Form instructions for group create form. #. TRANS: Form instructions for group create form.
#: actions/newgroup.php:110 #: actions/newgroup.php:117
msgid "Use this form to create a new group." msgid "Use this form to create a new group."
msgstr "" msgstr ""
@ -3721,11 +3837,6 @@ msgstr "Mật khẩu mới"
msgid "6 or more characters" msgid "6 or more characters"
msgstr "Nhiều hơn 6 ký tự" msgstr "Nhiều hơn 6 ký tự"
#: actions/passwordsettings.php:112 actions/recoverpassword.php:239
#: actions/register.php:441
msgid "Confirm"
msgstr "Xác nhận"
#: actions/passwordsettings.php:113 actions/recoverpassword.php:240 #: actions/passwordsettings.php:113 actions/recoverpassword.php:240
msgid "Same as password above" msgid "Same as password above"
msgstr "Cùng mật khẩu ở trên" msgstr "Cùng mật khẩu ở trên"
@ -4251,6 +4362,12 @@ msgstr "Không thể lưu hồ sơ cá nhân."
msgid "Settings saved." msgid "Settings saved."
msgstr "Đã lưu các điều chỉnh." msgstr "Đã lưu các điều chỉnh."
#. TRANS: Page title for page where a user account can be restored from backup.
#: actions/profilesettings.php:481 actions/restoreaccount.php:60
#, fuzzy
msgid "Restore account"
msgstr "Mở tài khoản mới"
#: actions/public.php:83 #: actions/public.php:83
#, php-format #, php-format
msgid "Beyond the page limit (%s)." msgid "Beyond the page limit (%s)."
@ -4707,7 +4824,7 @@ msgstr "Bạn không thể đăng ký nếu không đồng ý các điều kho
msgid "You already repeated that notice." msgid "You already repeated that notice."
msgstr "Bạn đã theo những người này:" msgstr "Bạn đã theo những người này:"
#: actions/repeat.php:114 lib/noticelist.php:691 #: actions/repeat.php:114 lib/noticelist.php:692
msgid "Repeated" msgid "Repeated"
msgstr "Khởi tạo" msgstr "Khởi tạo"
@ -4768,6 +4885,92 @@ msgstr ""
msgid "Replies to %1$s on %2$s!" msgid "Replies to %1$s on %2$s!"
msgstr "%s chào mừng bạn " msgstr "%s chào mừng bạn "
#. TRANS: Client exception displayed when trying to restore an account while not logged in.
#: actions/restoreaccount.php:78
msgid "Only logged-in users can restore their account."
msgstr ""
#. TRANS: Client exception displayed when trying to restore an account without having restore rights.
#: actions/restoreaccount.php:83
#, fuzzy
msgid "You may not restore your account."
msgstr "Bạn không thể đăng ký nếu không đồng ý các điều khoản."
#. TRANS: Client exception displayed trying to restore an account while something went wrong uploading a file.
#. TRANS: Client exception. No file; probably just a non-AJAX submission.
#: actions/restoreaccount.php:121 actions/restoreaccount.php:146
#, fuzzy
msgid "No uploaded file."
msgstr "Tải tập tin lên"
#. TRANS: Client exception thrown when an uploaded file is larger than set in php.ini.
#: actions/restoreaccount.php:129 lib/mediafile.php:194
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
msgstr ""
#. TRANS: Client exception.
#: actions/restoreaccount.php:135 lib/mediafile.php:200
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form."
msgstr ""
#. TRANS: Client exception.
#: actions/restoreaccount.php:141 lib/mediafile.php:206
msgid "The uploaded file was only partially uploaded."
msgstr ""
#. TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
#: actions/restoreaccount.php:150 lib/mediafile.php:214
msgid "Missing a temporary folder."
msgstr ""
#. TRANS: Client exception thrown when writing to disk is not possible during a file upload operation.
#: actions/restoreaccount.php:154 lib/mediafile.php:218
msgid "Failed to write file to disk."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has been stopped by an extension.
#: actions/restoreaccount.php:158 lib/mediafile.php:222
msgid "File upload stopped by extension."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has failed with an unknown reason.
#: actions/restoreaccount.php:164 lib/imagefile.php:103 lib/mediafile.php:228
msgid "System error uploading file."
msgstr "Hệ thống xảy ra lỗi trong khi tải file."
#. TRANS: Client exception thrown when a feed is not an Atom feed.
#: actions/restoreaccount.php:207
#, fuzzy
msgid "Not an Atom feed."
msgstr "Thành viên"
#. TRANS: Success message when a feed has been restored.
#: actions/restoreaccount.php:241
msgid ""
"Feed has been restored. Your old posts should now appear in search and your "
"profile page."
msgstr ""
#. TRANS: Message when a feed restore is in progress.
#: actions/restoreaccount.php:245
msgid "Feed will be restored. Please wait a few minutes for results."
msgstr ""
#. TRANS: Form instructions for feed restore.
#: actions/restoreaccount.php:342
msgid ""
"You can upload a backed-up stream in <a href=\"http://activitystrea.ms/"
"\">Activity Streams</a> format."
msgstr ""
#. TRANS: Title for submit button to confirm upload of a user backup file for account restore.
#: actions/restoreaccount.php:373
#, fuzzy
msgid "Upload the file"
msgstr "Tải tập tin lên"
#: actions/revokerole.php:75 #: actions/revokerole.php:75
#, fuzzy #, fuzzy
msgid "You cannot revoke user roles on this site." msgid "You cannot revoke user roles on this site."
@ -4877,7 +5080,7 @@ msgid "Reset key & secret"
msgstr "" msgstr ""
#: actions/showapplication.php:252 lib/deletegroupform.php:121 #: actions/showapplication.php:252 lib/deletegroupform.php:121
#: lib/deleteuserform.php:66 lib/noticelist.php:672 #: lib/deleteuserform.php:66 lib/noticelist.php:673
msgid "Delete" msgid "Delete"
msgstr "Xóa" msgstr "Xóa"
@ -6133,14 +6336,14 @@ msgid "Author(s)"
msgstr "" msgstr ""
#. TRANS: Activity title when marking a notice as favorite. #. TRANS: Activity title when marking a notice as favorite.
#: classes/Fave.php:151 lib/favorform.php:143 #: classes/Fave.php:164 lib/favorform.php:143
#, fuzzy #, fuzzy
msgid "Favor" msgid "Favor"
msgstr "Ưa thích" msgstr "Ưa thích"
#. TRANS: Ntofication given when a user marks a notice as favorite. #. TRANS: Ntofication given when a user marks a notice as favorite.
#. TRANS: %1$s is a user nickname or full name, %2$s is a notice URI. #. TRANS: %1$s is a user nickname or full name, %2$s is a notice URI.
#: classes/Fave.php:154 #: classes/Fave.php:167
#, php-format #, php-format
msgid "%1$s marked notice %2$s as a favorite." msgid "%1$s marked notice %2$s as a favorite."
msgstr "" msgstr ""
@ -6249,7 +6452,7 @@ msgid "Could not create login token for %s"
msgstr "Không thể tạo favorite." msgstr "Không thể tạo favorite."
#. TRANS: Exception thrown when database name or Data Source Name could not be found. #. TRANS: Exception thrown when database name or Data Source Name could not be found.
#: classes/Memcached_DataObject.php:533 #: classes/Memcached_DataObject.php:537
msgid "No database name or DSN found anywhere." msgid "No database name or DSN found anywhere."
msgstr "" msgstr ""
@ -6277,74 +6480,74 @@ msgid "No such profile (%1$d) for notice (%2$d)."
msgstr "" msgstr ""
#. TRANS: Server exception. %s are the error details. #. TRANS: Server exception. %s are the error details.
#: classes/Notice.php:193 #: classes/Notice.php:199
#, php-format #, php-format
msgid "Database error inserting hashtag: %s" msgid "Database error inserting hashtag: %s"
msgstr "Lỗi xảy ra khi thêm mới hình đại diện" msgstr "Lỗi xảy ra khi thêm mới hình đại diện"
#. TRANS: Client exception thrown if a notice contains too many characters. #. TRANS: Client exception thrown if a notice contains too many characters.
#: classes/Notice.php:270 #: classes/Notice.php:279
#, fuzzy #, fuzzy
msgid "Problem saving notice. Too long." msgid "Problem saving notice. Too long."
msgstr "Có lỗi xảy ra khi lưu tin nhắn." msgstr "Có lỗi xảy ra khi lưu tin nhắn."
#. TRANS: Client exception thrown when trying to save a notice for an unknown user. #. TRANS: Client exception thrown when trying to save a notice for an unknown user.
#: classes/Notice.php:275 #: classes/Notice.php:284
#, fuzzy #, fuzzy
msgid "Problem saving notice. Unknown user." msgid "Problem saving notice. Unknown user."
msgstr "Có lỗi xảy ra khi lưu tin nhắn." msgstr "Có lỗi xảy ra khi lưu tin nhắn."
#. TRANS: Client exception thrown when a user tries to post too many notices in a given time frame. #. TRANS: Client exception thrown when a user tries to post too many notices in a given time frame.
#: classes/Notice.php:281 #: classes/Notice.php:290
msgid "" msgid ""
"Too many notices too fast; take a breather and post again in a few minutes." "Too many notices too fast; take a breather and post again in a few minutes."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when a user tries to post too many duplicate notices in a given time frame. #. TRANS: Client exception thrown when a user tries to post too many duplicate notices in a given time frame.
#: classes/Notice.php:288 #: classes/Notice.php:297
msgid "" msgid ""
"Too many duplicate messages too quickly; take a breather and post again in a " "Too many duplicate messages too quickly; take a breather and post again in a "
"few minutes." "few minutes."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when a user tries to post while being banned. #. TRANS: Client exception thrown when a user tries to post while being banned.
#: classes/Notice.php:296 #: classes/Notice.php:305
msgid "You are banned from posting notices on this site." msgid "You are banned from posting notices on this site."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when a notice cannot be saved. #. TRANS: Server exception thrown when a notice cannot be saved.
#. TRANS: Server exception thrown when a notice cannot be updated. #. TRANS: Server exception thrown when a notice cannot be updated.
#: classes/Notice.php:363 classes/Notice.php:390 #: classes/Notice.php:372 classes/Notice.php:399
msgid "Problem saving notice." msgid "Problem saving notice."
msgstr "Có lỗi xảy ra khi lưu tin nhắn." msgstr "Có lỗi xảy ra khi lưu tin nhắn."
#. TRANS: Server exception thrown when no array is provided to the method saveKnownGroups(). #. TRANS: Server exception thrown when no array is provided to the method saveKnownGroups().
#: classes/Notice.php:913 #: classes/Notice.php:914
msgid "Bad type provided to saveKnownGroups." msgid "Bad type provided to saveKnownGroups."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when an update for a group inbox fails. #. TRANS: Server exception thrown when an update for a group inbox fails.
#: classes/Notice.php:1012 #: classes/Notice.php:1013
#, fuzzy #, fuzzy
msgid "Problem saving group inbox." msgid "Problem saving group inbox."
msgstr "Có lỗi xảy ra khi lưu tin nhắn." msgstr "Có lỗi xảy ra khi lưu tin nhắn."
#. TRANS: Server exception thrown when a reply cannot be saved. #. TRANS: Server exception thrown when a reply cannot be saved.
#. TRANS: %1$d is a notice ID, %2$d is the ID of the mentioned user. #. TRANS: %1$d is a notice ID, %2$d is the ID of the mentioned user.
#: classes/Notice.php:1126 #: classes/Notice.php:1127
#, php-format #, php-format
msgid "Could not save reply for %1$d, %2$d." msgid "Could not save reply for %1$d, %2$d."
msgstr "" msgstr ""
#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'. #. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice. #. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
#: classes/Notice.php:1645 #: classes/Notice.php:1646
#, php-format #, php-format
msgid "RT @%1$s %2$s" msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s" msgstr "RT @%1$s %2$s"
#. TRANS: Full name of a profile or group followed by nickname in parens #. TRANS: Full name of a profile or group followed by nickname in parens
#: classes/Profile.php:172 classes/User_group.php:247 #: classes/Profile.php:172 classes/User_group.php:242
#, php-format #, php-format
msgctxt "FANCYNAME" msgctxt "FANCYNAME"
msgid "%1$s (%2$s)" msgid "%1$s (%2$s)"
@ -6352,14 +6555,14 @@ msgstr ""
#. TRANS: Exception thrown when trying to revoke an existing role for a user that does not exist. #. TRANS: Exception thrown when trying to revoke an existing role for a user that does not exist.
#. TRANS: %1$s is the role name, %2$s is the user ID (number). #. TRANS: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:798 #: classes/Profile.php:765
#, php-format #, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist." msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist."
msgstr "" msgstr ""
#. TRANS: Exception thrown when trying to revoke a role for a user with a failing database query. #. TRANS: Exception thrown when trying to revoke a role for a user with a failing database query.
#. TRANS: %1$s is the role name, %2$s is the user ID (number). #. TRANS: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:807 #: classes/Profile.php:774
#, php-format #, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error." msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error."
msgstr "" msgstr ""
@ -6434,33 +6637,33 @@ msgid "Welcome to %1$s, @%2$s!"
msgstr "%s chào mừng bạn " msgstr "%s chào mừng bạn "
#. TRANS: Server exception. #. TRANS: Server exception.
#: classes/User.php:923 #: classes/User.php:918
msgid "No single user defined for single-user mode." msgid "No single user defined for single-user mode."
msgstr "" msgstr ""
#. TRANS: Server exception. #. TRANS: Server exception.
#: classes/User.php:927 #: classes/User.php:922
msgid "Single-user mode code called when not enabled." msgid "Single-user mode code called when not enabled."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when creating a group failed. #. TRANS: Server exception thrown when creating a group failed.
#: classes/User_group.php:511 #: classes/User_group.php:516
#, fuzzy #, fuzzy
msgid "Could not create group." msgid "Could not create group."
msgstr "Không thể tạo favorite." msgstr "Không thể tạo favorite."
#. TRANS: Server exception thrown when updating a group URI failed. #. TRANS: Server exception thrown when updating a group URI failed.
#: classes/User_group.php:521 #: classes/User_group.php:526
msgid "Could not set group URI." msgid "Could not set group URI."
msgstr "Không thể lưu hồ sơ cá nhân." msgstr "Không thể lưu hồ sơ cá nhân."
#. TRANS: Server exception thrown when setting group membership failed. #. TRANS: Server exception thrown when setting group membership failed.
#: classes/User_group.php:544 #: classes/User_group.php:549
msgid "Could not set group membership." msgid "Could not set group membership."
msgstr "Không thể cập nhật thành viên." msgstr "Không thể cập nhật thành viên."
#. TRANS: Server exception thrown when saving local group information failed. #. TRANS: Server exception thrown when saving local group information failed.
#: classes/User_group.php:559 #: classes/User_group.php:564
msgid "Could not save local group info." msgid "Could not save local group info."
msgstr "Không thể lưu hồ sơ cá nhân." msgstr "Không thể lưu hồ sơ cá nhân."
@ -6604,10 +6807,9 @@ msgstr "Thoát"
#. TRANS: Tooltip for main menu option "Register" #. TRANS: Tooltip for main menu option "Register"
#: lib/action.php:577 #: lib/action.php:577
#, fuzzy
msgctxt "TOOLTIP" msgctxt "TOOLTIP"
msgid "Create an account" msgid "Create an account"
msgstr "Tạo tài khoản mới" msgstr "Mở tài khoản mới"
#. TRANS: Main menu option when not logged in to register a new account #. TRANS: Main menu option when not logged in to register a new account
#: lib/action.php:580 #: lib/action.php:580
@ -6816,10 +7018,57 @@ msgstr "Trước"
msgid "Expecting a root feed element but got a whole XML document." msgid "Expecting a root feed element but got a whole XML document."
msgstr "" msgstr ""
#: lib/activity.php:360 #. TRANS: Client exception thrown when using an unknown verb for the activity importer.
msgid "Post" #: lib/activityimporter.php:81
#, fuzzy, php-format
msgid "Unknown verb: \"%s\"."
msgstr "Không hỗ trợ kiểu file ảnh này."
#. TRANS: Client exception thrown when trying to force a subscription for an untrusted user.
#: lib/activityimporter.php:107
msgid "Cannot force subscription for untrusted user."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when trying to for a remote user to subscribe.
#: lib/activityimporter.php:117
#, fuzzy
msgid "Cannot force remote user to subscribe."
msgstr "Không thể cập nhật thành viên."
#. TRANS: Client exception thrown when trying to subscribe to an unknown profile.
#: lib/activityimporter.php:132
#, fuzzy
msgid "Unknown profile."
msgstr "Không hỗ trợ kiểu file ảnh này."
#. TRANS: Client exception thrown when trying to import an event not related to the importing user.
#: lib/activityimporter.php:138
msgid "This activity seems unrelated to our user."
msgstr ""
#. TRANS: Client exception thrown when trying to join a remote group that is not a group.
#: lib/activityimporter.php:154
msgid "Remote profile is not a group!"
msgstr ""
#. TRANS: Client exception thrown when trying to join a group the importing user is already a member of.
#: lib/activityimporter.php:163
#, fuzzy
msgid "User is already a member of this group."
msgstr "Bạn chưa cập nhật thông tin riêng"
#. TRANS: Client exception thrown when trying to overwrite the author information for a non-trusted user during import.
#: lib/activityimporter.php:207
msgid "Not overwriting author info for non-trusted user."
msgstr ""
#. TRANS: Client exception thrown when trying to import a notice without content.
#. TRANS: %s is the notice URI.
#: lib/activityimporter.php:223
#, fuzzy, php-format
msgid "No content for notice %s."
msgstr "Tìm theo nội dung của tin nhắn"
#. TRANS: Client exception thrown when there is no source attribute. #. TRANS: Client exception thrown when there is no source attribute.
#: lib/activityutils.php:200 #: lib/activityutils.php:200
msgid "Can't handle remote content yet." msgid "Can't handle remote content yet."
@ -7113,10 +7362,16 @@ msgctxt "BUTTON"
msgid "Revoke" msgid "Revoke"
msgstr "Khôi phục" msgstr "Khôi phục"
#: lib/atom10feed.php:112 #: lib/atom10feed.php:113
msgid "author element must contain a name element." msgid "Author element must contain a name element."
msgstr "" msgstr ""
#. TRANS: Server exception thrown when using the method setActivitySubject() in the class Atom10Feed.
#: lib/atom10feed.php:160
#, fuzzy
msgid "Do not use this method!"
msgstr "Không thể xóa tin nhắn này."
#. TRANS: DT element label in attachment list item. #. TRANS: DT element label in attachment list item.
#: lib/attachmentlist.php:294 #: lib/attachmentlist.php:294
msgid "Author" msgid "Author"
@ -7507,24 +7762,24 @@ msgid ""
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#: lib/common.php:147 #: lib/common.php:150
msgid "No configuration file found." msgid "No configuration file found."
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#. TRANS: Is followed by a list of directories (separated by HTML breaks). #. TRANS: Is followed by a list of directories (separated by HTML breaks).
#: lib/common.php:150 #: lib/common.php:153
msgid "I looked for configuration files in the following places:" msgid "I looked for configuration files in the following places:"
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#: lib/common.php:153 #: lib/common.php:156
msgid "You may wish to run the installer to fix this." msgid "You may wish to run the installer to fix this."
msgstr "" msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation. #. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#. TRANS: The text is link text that leads to the installer page. #. TRANS: The text is link text that leads to the installer page.
#: lib/common.php:157 #: lib/common.php:160
msgid "Go to the installer." msgid "Go to the installer."
msgstr "" msgstr ""
@ -7627,6 +7882,19 @@ msgstr ""
msgid "FOAF" msgid "FOAF"
msgstr "" msgstr ""
#: lib/feedimporter.php:75
#, fuzzy
msgid "Not an atom feed."
msgstr "Thành viên"
#: lib/feedimporter.php:82
msgid "No author in the feed."
msgstr ""
#: lib/feedimporter.php:89
msgid "Can't import without a user."
msgstr ""
#. TRANS: Header for feed links (h2). #. TRANS: Header for feed links (h2).
#: lib/feedlist.php:66 #: lib/feedlist.php:66
msgid "Feeds" msgid "Feeds"
@ -7809,11 +8077,6 @@ msgstr ""
msgid "Partial upload." msgid "Partial upload."
msgstr "Upload từng phần." msgstr "Upload từng phần."
#. TRANS: Client exception thrown when a file upload operation has failed with an unknown reason.
#: lib/imagefile.php:103 lib/mediafile.php:228
msgid "System error uploading file."
msgstr "Hệ thống xảy ra lỗi trong khi tải file."
#: lib/imagefile.php:111 #: lib/imagefile.php:111
msgid "Not an image or corrupt file." msgid "Not an image or corrupt file."
msgstr "File hỏng hoặc không phải là file ảnh." msgstr "File hỏng hoặc không phải là file ảnh."
@ -8158,7 +8421,7 @@ msgid ""
"users in conversation. People can send you messages for your eyes only." "users in conversation. People can send you messages for your eyes only."
msgstr "" msgstr ""
#: lib/mailbox.php:228 lib/noticelist.php:521 #: lib/mailbox.php:228 lib/noticelist.php:522
#, fuzzy #, fuzzy
msgid "from" msgid "from"
msgstr " từ " msgstr " từ "
@ -8190,38 +8453,6 @@ msgstr "Không hỗ trợ kiểu file ảnh này."
msgid "There was a database error while saving your file. Please try again." msgid "There was a database error while saving your file. Please try again."
msgstr "" msgstr ""
#. TRANS: Client exception thrown when an uploaded file is larger than set in php.ini.
#: lib/mediafile.php:194
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
msgstr ""
#. TRANS: Client exception.
#: lib/mediafile.php:200
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form."
msgstr ""
#. TRANS: Client exception.
#: lib/mediafile.php:206
msgid "The uploaded file was only partially uploaded."
msgstr ""
#. TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
#: lib/mediafile.php:214
msgid "Missing a temporary folder."
msgstr ""
#. TRANS: Client exception thrown when writing to disk is not possible during a file upload operation.
#: lib/mediafile.php:218
msgid "Failed to write file to disk."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation has been stopped by an extension.
#: lib/mediafile.php:222
msgid "File upload stopped by extension."
msgstr ""
#. TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota. #. TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota.
#: lib/mediafile.php:238 lib/mediafile.php:281 #: lib/mediafile.php:238 lib/mediafile.php:281
msgid "File exceeds user's quota." msgid "File exceeds user's quota."
@ -8243,7 +8474,7 @@ msgstr "Không thể lấy lại các tin nhắn ưa thích"
#. TRANS: Client exception thrown trying to upload a forbidden MIME type. #. TRANS: Client exception thrown trying to upload a forbidden MIME type.
#. TRANS: %1$s is the file type that was denied, %2$s is the application part of #. TRANS: %1$s is the file type that was denied, %2$s is the application part of
#. TRANS: the MIME type that was denied. #. TRANS: the MIME type that was denied.
#: lib/mediafile.php:394 #: lib/mediafile.php:396
#, php-format #, php-format
msgid "" msgid ""
"\"%1$s\" is not a supported file type on this server. Try using another %2$s " "\"%1$s\" is not a supported file type on this server. Try using another %2$s "
@ -8252,7 +8483,7 @@ msgstr ""
#. TRANS: Client exception thrown trying to upload a forbidden MIME type. #. TRANS: Client exception thrown trying to upload a forbidden MIME type.
#. TRANS: %s is the file type that was denied. #. TRANS: %s is the file type that was denied.
#: lib/mediafile.php:399 #: lib/mediafile.php:401
#, php-format #, php-format
msgid "\"%s\" is not a supported file type on this server." msgid "\"%s\" is not a supported file type on this server."
msgstr "" msgstr ""
@ -8288,17 +8519,17 @@ msgid "Send"
msgstr "Gửi" msgstr "Gửi"
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:163 #: lib/nickname.php:165
msgid "Nickname must have only lowercase letters and numbers and no spaces." msgid "Nickname must have only lowercase letters and numbers and no spaces."
msgstr "Biệt hiệu phải là chữ viết thường hoặc số và không có khoảng trắng." msgstr "Biệt hiệu phải là chữ viết thường hoặc số và không có khoảng trắng."
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:176 #: lib/nickname.php:178
msgid "Nickname cannot be empty." msgid "Nickname cannot be empty."
msgstr "" msgstr ""
#. TRANS: Validation error in form for registration, profile and group settings, etc. #. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:189 #: lib/nickname.php:191
#, php-format #, php-format
msgid "Nickname cannot be more than %d character long." msgid "Nickname cannot be more than %d character long."
msgid_plural "Nickname cannot be more than %d characters long." msgid_plural "Nickname cannot be more than %d characters long."
@ -8339,58 +8570,58 @@ msgid ""
msgstr "" msgstr ""
#. TRANS: Used in coordinates as abbreviation of north #. TRANS: Used in coordinates as abbreviation of north
#: lib/noticelist.php:451 #: lib/noticelist.php:452
#, fuzzy #, fuzzy
msgid "N" msgid "N"
msgstr "Không" msgstr "Không"
#. TRANS: Used in coordinates as abbreviation of south #. TRANS: Used in coordinates as abbreviation of south
#: lib/noticelist.php:453 #: lib/noticelist.php:454
msgid "S" msgid "S"
msgstr "" msgstr ""
#. TRANS: Used in coordinates as abbreviation of east #. TRANS: Used in coordinates as abbreviation of east
#: lib/noticelist.php:455 #: lib/noticelist.php:456
msgid "E" msgid "E"
msgstr "" msgstr ""
#. TRANS: Used in coordinates as abbreviation of west #. TRANS: Used in coordinates as abbreviation of west
#: lib/noticelist.php:457 #: lib/noticelist.php:458
msgid "W" msgid "W"
msgstr "" msgstr ""
#: lib/noticelist.php:459 #: lib/noticelist.php:460
#, php-format #, php-format
msgid "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s" msgid "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
msgstr "" msgstr ""
#: lib/noticelist.php:468 #: lib/noticelist.php:469
msgid "at" msgid "at"
msgstr "" msgstr ""
#: lib/noticelist.php:517 #: lib/noticelist.php:518
msgid "web" msgid "web"
msgstr "" msgstr ""
#: lib/noticelist.php:583 #: lib/noticelist.php:584
#, fuzzy #, fuzzy
msgid "in context" msgid "in context"
msgstr "Không có nội dung!" msgstr "Không có nội dung!"
#: lib/noticelist.php:618 #: lib/noticelist.php:619
#, fuzzy #, fuzzy
msgid "Repeated by" msgid "Repeated by"
msgstr "Tạo" msgstr "Tạo"
#: lib/noticelist.php:645 #: lib/noticelist.php:646
msgid "Reply to this notice" msgid "Reply to this notice"
msgstr "Không thể xóa tin nhắn này." msgstr "Không thể xóa tin nhắn này."
#: lib/noticelist.php:646 #: lib/noticelist.php:647
msgid "Reply" msgid "Reply"
msgstr "Trả lời" msgstr "Trả lời"
#: lib/noticelist.php:690 #: lib/noticelist.php:691
msgid "Notice repeated" msgid "Notice repeated"
msgstr "Tìm kiếm thông báo" msgstr "Tìm kiếm thông báo"
@ -8553,7 +8784,7 @@ msgid "Revoke the \"%s\" role from this user"
msgstr "Ban user" msgstr "Ban user"
#. TRANS: Client error on action trying to visit a non-existing page. #. TRANS: Client error on action trying to visit a non-existing page.
#: lib/router.php:957 #: lib/router.php:974
msgid "Page not found." msgid "Page not found."
msgstr "" msgstr ""
@ -8911,19 +9142,7 @@ msgid "Invalid XML, missing XRD root."
msgstr "" msgstr ""
#. TRANS: Commandline script output. %s is the filename that contains a backup for a user. #. TRANS: Commandline script output. %s is the filename that contains a backup for a user.
#: scripts/restoreuser.php:61 #: scripts/restoreuser.php:62
#, php-format #, php-format
msgid "Getting backup from file '%s'." msgid "Getting backup from file '%s'."
msgstr "" msgstr ""
#. TRANS: Commandline script output.
#: scripts/restoreuser.php:91
msgid "No user specified; using backup user."
msgstr ""
#. TRANS: Commandline script output. %d is the number of entries in the activity stream in backup; used for plural.
#: scripts/restoreuser.php:98
#, php-format
msgid "%d entry in backup."
msgid_plural "%d entries in backup."
msgstr[0] ""

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# Translation of StatusNet - APC to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) # Translation of StatusNet - APC to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
# Expored from translatewiki.net # Expored from translatewiki.net
# #
# Author: EugeneZelenko # Author: EugeneZelenko
@ -9,14 +9,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - APC\n" "Project-Id-Version: StatusNet - APC\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n" "PO-Revision-Date: 2011-01-14 10:32:43+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki." "Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n" "net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n" "X-POT-Import-Date: 2011-01-10 18:25:57+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: be-tarask\n" "X-Language-Code: be-tarask\n"
"X-Message-Group: #out-statusnet-plugin-apc\n" "X-Message-Group: #out-statusnet-plugin-apc\n"

View File

@ -1,4 +1,4 @@
# Translation of StatusNet - Adsense to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) # Translation of StatusNet - Adsense to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
# Expored from translatewiki.net # Expored from translatewiki.net
# #
# Author: EugeneZelenko # Author: EugeneZelenko
@ -10,14 +10,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - Adsense\n" "Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:23+0000\n" "PO-Revision-Date: 2011-01-14 10:32:40+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki." "Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n" "net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-30 20:40:24+0000\n" "X-POT-Import-Date: 2011-01-10 18:25:56+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: be-tarask\n" "X-Language-Code: be-tarask\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n" "X-Message-Group: #out-statusnet-plugin-adsense\n"

View File

@ -9,13 +9,13 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - Adsense\n" "Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:26+0000\n" "PO-Revision-Date: 2011-01-14 10:32:40+0000\n"
"Language-Team: Galician <http://translatewiki.net/wiki/Portal:gl>\n" "Language-Team: Galician <http://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-30 20:40:24+0000\n" "X-POT-Import-Date: 2011-01-10 18:25:56+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: gl\n" "X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n" "X-Message-Group: #out-statusnet-plugin-adsense\n"
@ -78,7 +78,7 @@ msgstr ""
#: adsenseadminpanel.php:188 #: adsenseadminpanel.php:188
msgid "Leaderboard" msgid "Leaderboard"
msgstr "" msgstr "Taboleiro de logros"
#: adsenseadminpanel.php:189 #: adsenseadminpanel.php:189
msgid "Leaderboard slot code" msgid "Leaderboard slot code"

View File

@ -0,0 +1,101 @@
# Translation of StatusNet - Adsense to Hebrew (עברית)
# Expored from translatewiki.net
#
# Author: YaronSh
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-01-15 00:20+0000\n"
"PO-Revision-Date: 2011-01-15 00:23:05+0000\n"
"Language-Team: Hebrew <http://translatewiki.net/wiki/Portal:he>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-01-14 13:18:25+0000\n"
"X-Generator: MediaWiki 1.18alpha (r80364); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: he\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. TRANS: Menu item title/tooltip
#: AdsensePlugin.php:194
msgid "AdSense configuration"
msgstr "תצורת AdSense"
#. TRANS: Menu item for site administration
#: AdsensePlugin.php:196
msgid "AdSense"
msgstr ""
#: AdsensePlugin.php:209
msgid "Plugin to add Google AdSense to StatusNet sites."
msgstr ""
#: adsenseadminpanel.php:52
msgctxt "TITLE"
msgid "AdSense"
msgstr ""
#: adsenseadminpanel.php:62
msgid "AdSense settings for this StatusNet site"
msgstr ""
#: adsenseadminpanel.php:164
msgid "Client ID"
msgstr ""
#: adsenseadminpanel.php:165
msgid "Google client ID"
msgstr ""
#: adsenseadminpanel.php:170
msgid "Ad script URL"
msgstr ""
#: adsenseadminpanel.php:171
msgid "Script URL (advanced)"
msgstr ""
#: adsenseadminpanel.php:176
msgid "Medium rectangle"
msgstr ""
#: adsenseadminpanel.php:177
msgid "Medium rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:182
msgid "Rectangle"
msgstr ""
#: adsenseadminpanel.php:183
msgid "Rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:188
msgid "Leaderboard"
msgstr ""
#: adsenseadminpanel.php:189
msgid "Leaderboard slot code"
msgstr ""
#: adsenseadminpanel.php:194
msgid "Skyscraper"
msgstr "גורד שחקים"
#: adsenseadminpanel.php:195
msgid "Wide skyscraper slot code"
msgstr ""
#: adsenseadminpanel.php:208
msgid "Save"
msgstr "שמירה"
#: adsenseadminpanel.php:208
msgid "Save AdSense settings"
msgstr ""

View File

@ -0,0 +1,101 @@
# Translation of StatusNet - Adsense to Luxembourgish (Lëtzebuergesch)
# Expored from translatewiki.net
#
# Author: Robby
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:40+0000\n"
"Language-Team: Luxembourgish <http://translatewiki.net/wiki/Portal:lb>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-01-10 18:25:56+0000\n"
"X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: lb\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. TRANS: Menu item title/tooltip
#: AdsensePlugin.php:194
msgid "AdSense configuration"
msgstr "AdSense Astellungen"
#. TRANS: Menu item for site administration
#: AdsensePlugin.php:196
msgid "AdSense"
msgstr ""
#: AdsensePlugin.php:209
msgid "Plugin to add Google AdSense to StatusNet sites."
msgstr ""
#: adsenseadminpanel.php:52
msgctxt "TITLE"
msgid "AdSense"
msgstr ""
#: adsenseadminpanel.php:62
msgid "AdSense settings for this StatusNet site"
msgstr ""
#: adsenseadminpanel.php:164
msgid "Client ID"
msgstr ""
#: adsenseadminpanel.php:165
msgid "Google client ID"
msgstr ""
#: adsenseadminpanel.php:170
msgid "Ad script URL"
msgstr ""
#: adsenseadminpanel.php:171
msgid "Script URL (advanced)"
msgstr ""
#: adsenseadminpanel.php:176
msgid "Medium rectangle"
msgstr ""
#: adsenseadminpanel.php:177
msgid "Medium rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:182
msgid "Rectangle"
msgstr "Rechteck"
#: adsenseadminpanel.php:183
msgid "Rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:188
msgid "Leaderboard"
msgstr ""
#: adsenseadminpanel.php:189
msgid "Leaderboard slot code"
msgstr ""
#: adsenseadminpanel.php:194
msgid "Skyscraper"
msgstr "Vertikale Banner"
#: adsenseadminpanel.php:195
msgid "Wide skyscraper slot code"
msgstr ""
#: adsenseadminpanel.php:208
msgid "Save"
msgstr "Späicheren"
#: adsenseadminpanel.php:208
msgid "Save AdSense settings"
msgstr "AdSense-Astellunge späicheren"

View File

@ -0,0 +1,102 @@
# Translation of StatusNet - Adsense to Polish (Polski)
# Expored from translatewiki.net
#
# Author: Raven
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-01-15 00:20+0000\n"
"PO-Revision-Date: 2011-01-15 00:23:05+0000\n"
"Language-Team: Polish <http://translatewiki.net/wiki/Portal:pl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-01-14 13:18:25+0000\n"
"X-Generator: MediaWiki 1.18alpha (r80364); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pl\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n"
"Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ( (n%10 >= 2 && n%10 <= 4 && "
"(n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
#. TRANS: Menu item title/tooltip
#: AdsensePlugin.php:194
msgid "AdSense configuration"
msgstr ""
#. TRANS: Menu item for site administration
#: AdsensePlugin.php:196
msgid "AdSense"
msgstr "AdSense"
#: AdsensePlugin.php:209
msgid "Plugin to add Google AdSense to StatusNet sites."
msgstr ""
#: adsenseadminpanel.php:52
msgctxt "TITLE"
msgid "AdSense"
msgstr "AdSense"
#: adsenseadminpanel.php:62
msgid "AdSense settings for this StatusNet site"
msgstr ""
#: adsenseadminpanel.php:164
msgid "Client ID"
msgstr ""
#: adsenseadminpanel.php:165
msgid "Google client ID"
msgstr ""
#: adsenseadminpanel.php:170
msgid "Ad script URL"
msgstr ""
#: adsenseadminpanel.php:171
msgid "Script URL (advanced)"
msgstr ""
#: adsenseadminpanel.php:176
msgid "Medium rectangle"
msgstr ""
#: adsenseadminpanel.php:177
msgid "Medium rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:182
msgid "Rectangle"
msgstr ""
#: adsenseadminpanel.php:183
msgid "Rectangle slot code"
msgstr ""
#: adsenseadminpanel.php:188
msgid "Leaderboard"
msgstr ""
#: adsenseadminpanel.php:189
msgid "Leaderboard slot code"
msgstr ""
#: adsenseadminpanel.php:194
msgid "Skyscraper"
msgstr "Skyscraper"
#: adsenseadminpanel.php:195
msgid "Wide skyscraper slot code"
msgstr ""
#: adsenseadminpanel.php:208
msgid "Save"
msgstr ""
#: adsenseadminpanel.php:208
msgid "Save AdSense settings"
msgstr ""

View File

@ -1,4 +1,4 @@
# Translation of StatusNet - AnonymousFave to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) # Translation of StatusNet - AnonymousFave to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
# Expored from translatewiki.net # Expored from translatewiki.net
# #
# Author: EugeneZelenko # Author: EugeneZelenko
@ -10,14 +10,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - AnonymousFave\n" "Project-Id-Version: StatusNet - AnonymousFave\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:28+0000\n" "PO-Revision-Date: 2011-01-14 10:32:42+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki." "Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n" "net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:21+0000\n" "X-POT-Import-Date: 2011-01-10 18:25:56+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: be-tarask\n" "X-Language-Code: be-tarask\n"
"X-Message-Group: #out-statusnet-plugin-anonymousfave\n" "X-Message-Group: #out-statusnet-plugin-anonymousfave\n"

View File

@ -1,4 +1,4 @@
# Translation of StatusNet - AutoSandbox to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) # Translation of StatusNet - AutoSandbox to Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
# Expored from translatewiki.net # Expored from translatewiki.net
# #
# Author: EugeneZelenko # Author: EugeneZelenko
@ -9,14 +9,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: StatusNet - AutoSandbox\n" "Project-Id-Version: StatusNet - AutoSandbox\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n" "POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:30+0000\n" "PO-Revision-Date: 2011-01-14 10:32:44+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki." "Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n" "net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:24+0000\n" "X-POT-Import-Date: 2011-01-10 18:25:57+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n" "X-Generator: MediaWiki 1.18alpha (r80246); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n" "X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: be-tarask\n" "X-Language-Code: be-tarask\n"
"X-Message-Group: #out-statusnet-plugin-autosandbox\n" "X-Message-Group: #out-statusnet-plugin-autosandbox\n"

Some files were not shown because too many files have changed in this diff Show More