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
* @link http://status.net/
*/
class ApiAtomServiceAction extends ApiBareAuthAction
{
/**
@ -50,13 +49,13 @@ class ApiAtomServiceAction extends ApiBareAuthAction
* @return boolean success flag
*
*/
function prepare($args)
{
parent::prepare($args);
$this->user = $this->getTargetUser($this->arg('id'));
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);
return;
}
@ -71,7 +70,6 @@ class ApiAtomServiceAction extends ApiBareAuthAction
*
* @return void
*/
function handle($args)
{
parent::handle($args);
@ -83,13 +81,15 @@ class ApiAtomServiceAction extends ApiBareAuthAction
'xmlns:atom' => 'http://www.w3.org/2005/Atom',
'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'));
$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',
array('href' => common_local_url('ApiTimelineUser',
array('id' => $this->user->id,
'format' => 'atom'))));
$this->element('atom:title',
null,
// TRANS: Title for Atom feed. %s is a user nickname.
sprintf(_("%s timeline"),
$this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry');
@ -100,6 +100,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('subscriber' => $this->user->id))));
$this->element('atom:title',
null,
// TRANS: Title for Atom feed with a user's subscriptions. %s is a user nickname.
sprintf(_("%s subscriptions"),
$this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry');
@ -110,6 +111,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('profile' => $this->user->id))));
$this->element('atom:title',
null,
// TRANS: Title for Atom feed with a user's favorite notices. %s is a user nickname.
sprintf(_("%s favorites"),
$this->user->nickname));
$this->element('accept', null, 'application/atom+xml;type=entry');
@ -120,6 +122,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction
array('profile' => $this->user->id))));
$this->element('atom:title',
null,
// TRANS: Title for Atom feed with a user's memberships. %s is a user nickname.
sprintf(_("%s memberships"),
$this->user->nickname));
$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)) {
// 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);
return;
}

View File

@ -84,6 +84,7 @@ class ApiOauthAccessTokenAction extends ApiOauthAction
common_debug(var_export($req, true));
$code = $e->getCode();
$this->clientError($e->getMessage(), empty($code) ? 401 : $code, 'text');
return;
}
if (empty($atok)) {
@ -98,7 +99,7 @@ class ApiOauthAccessTokenAction extends ApiOauthAction
common_log(LOG_WARNING, $msg);
// 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 {
common_log(
LOG_INFO,

View File

@ -114,6 +114,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
$this->deleteNotice();
break;
default:
// TRANS: Client error displayed calling an unsupported HTTP error in API status show.
$this->clientError(_('HTTP method not supported.'), 405);
return;
}
@ -138,6 +139,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
$this->showSingleAtomStatus($this->notice);
break;
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));
}
} else {
@ -171,7 +174,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
*
* @return boolean true
*/
function isReadOnly($args)
{
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
@ -220,6 +223,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
function deleteNotice()
{
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."));
return;
}
@ -227,7 +231,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
if (empty($this->auth_user) ||
($this->notice->profile_id != $this->auth_user->id &&
!$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;
}
@ -240,6 +245,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
header('HTTP/1.1 200 OK');
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("\n");
}

View File

@ -241,7 +241,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
*
* @return boolean true
*/
function isReadOnly($args)
{
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
@ -307,11 +307,13 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$xml = trim(file_get_contents('php://input'));
if (empty($xml)) {
// TRANS: Client error displayed attempting to post an empty API notice.
$this->clientError(_('Atom post must not be empty.'));
}
$dom = DOMDocument::loadXML($xml);
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.'));
}
@ -375,6 +377,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
} else {
// @fixme fetch from $sourceUrl?
// 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.'),
$note->id));
return;
@ -427,14 +430,14 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$profile = Profile::fromURI($uri);
if (!empty($profile)) {
$options['replies'] = $uri;
$options['replies'][] = $uri;
} else {
$group = User_group::staticGet('uri', $uri);
if (!empty($group)) {
$options['groups'] = $uri;
$options['groups'][] = $uri;
} else {
// @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.
*
* Feed of ActivityStreams 'favorite' actions
*
*
* PHP version 5
*
* 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
* @link http://status.net/
*/
class AtompubfavoritefeedAction extends ApiAuthAction
{
private $_profile = null;
@ -59,7 +58,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
@ -67,7 +65,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->_profile = Profile::staticGet('id', $this->trimmed('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;
@ -76,7 +75,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->_faves = Fave::byProfile($this->_profile->id,
$offset,
$limit);
return true;
}
@ -87,7 +86,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return void
*/
function handle($argarray=null)
{
parent::handle($argarray);
@ -101,6 +99,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$this->addFavorite();
break;
default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
throw new ClientException(_('HTTP method not supported.'), 405);
return;
}
@ -113,7 +112,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return void
*/
function showFeed()
{
header('Content-Type: application/atom+xml; charset=utf-8');
@ -139,21 +137,25 @@ class AtompubfavoritefeedAction extends ApiAuthAction
$feed->addAuthor($this->_profile->getBestName(),
$this->_profile->getURI());
// TRANS: Title for Atom favorites feed.
// TRANS: %s is a user nickname.
$feed->setTitle(sprintf(_("%s favorites"),
$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(),
common_config('site', 'name')));
$feed->addLink(common_local_url('showfavorites',
array('nickname' =>
array('nickname' =>
$this->_profile->nickname)));
$feed->addLink($url,
array('rel' => 'self',
'type' => 'application/atom+xml'));
// If there's more...
if ($this->page > 1) {
@ -162,9 +164,9 @@ class AtompubfavoritefeedAction extends ApiAuthAction
'type' => 'application/atom+xml'));
$feed->addLink(common_local_url('AtomPubFavoriteFeed',
array('profile' =>
array('profile' =>
$this->_profile->id),
array('page' =>
array('page' =>
$this->page - 1)),
array('rel' => 'prev',
'type' => 'application/atom+xml'));
@ -205,17 +207,17 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return void
*/
function addFavorite()
{
// XXX: Refactor this; all the same for atompub
if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't add someone else's".
" subscription"), 403);
// TRANS: Client exception thrown when trying to set a favorite for another user.
throw new ClientException(_("Cannot add someone else's".
" subscription."), 403);
}
$xml = file_get_contents('php://input');
$dom = DOMDocument::loadXML($xml);
@ -234,9 +236,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
if ($activity->verb != ActivityVerb::FAVORITE) {
// TRANS: Client error displayed when not using the POST verb.
// TRANS: Do not translate POST.
throw new ClientException(_('Can only handle Favorite activities.'));
// TRANS: Client exception thrown when trying use an incorrect activity verb for the Atom pub method.
throw new ClientException(_('Can only handle favorite activities.'));
return;
}
@ -245,6 +246,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (!in_array($note->type, array(ActivityObject::NOTE,
ActivityObject::BLOGENTRY,
ActivityObject::STATUS))) {
// TRANS: Client exception thrown when trying favorite an object that is not a notice.
throw new ClientException(_('Can only fave notices.'));
return;
}
@ -253,6 +255,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
if (empty($notice)) {
// XXX: import from listed URL or something
// TRANS: Client exception thrown when trying favorite a notice without content.
throw new ClientException(_('Unknown note.'));
}
@ -260,6 +263,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction
'notice_id' => $notice->id));
if (!empty($old)) {
// TRANS: Client exception thrown when trying favorite an already favorited notice.
throw new ClientException(_('Already a favorite.'));
}
@ -296,7 +300,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -328,7 +331,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return string etag http header
*/
function etag()
{
return null;
@ -339,7 +341,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return boolean true if delete, else false
*/
function requiresAuth()
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -359,7 +360,6 @@ class AtompubfavoritefeedAction extends ApiAuthAction
*
* @return void
*/
function notify($fave, $notice, $user)
{
$other = User::staticGet('id', $notice->profile_id);

View File

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

View File

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

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc.
*
* Show a single membership as an Activity Streams entry
*
*
* PHP version 5
*
* 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
* @link http://status.net/
*/
class AtompubshowmembershipAction extends ApiAuthAction
{
private $_profile = null;
@ -60,7 +59,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
@ -68,8 +66,9 @@ class AtompubshowmembershipAction extends ApiAuthAction
$profileId = $this->trimmed('profile');
$this->_profile = Profile::staticGet('id', $profileId);
if (empty($this->_profile)) {
// TRANS: Client exception.
throw new ClientException(_('No such profile.'), 404);
}
@ -78,6 +77,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->_group = User_group::staticGet('id', $groupId);
if (empty($this->_group)) {
// TRANS: Client exception thrown when referencing a non-existing group.
throw new ClientException(_('No such group'), 404);
}
@ -87,6 +87,7 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->_membership = Group_member::pkeyGet($kv);
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);
}
@ -100,7 +101,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return void
*/
function handle($argarray=null)
{
switch ($_SERVER['REQUEST_METHOD']) {
@ -112,7 +112,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
$this->deleteMembership();
break;
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;
}
return;
@ -123,7 +124,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return void
*/
function showMembership()
{
$activity = $this->_membership->asActivity();
@ -147,7 +147,8 @@ class AtompubshowmembershipAction extends ApiAuthAction
{
if (empty($this->auth_user) ||
$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);
}
@ -168,7 +169,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
@ -203,7 +203,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return string etag http header
*/
function etag()
{
$ctime = strtotime($this->_membership->created);
@ -222,7 +221,6 @@ class AtompubshowmembershipAction extends ApiAuthAction
*
* @return boolean true if delete, else false
*/
function requiresAuth()
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

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

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc.
*
* AtomPub subscription feed
*
*
* PHP version 5
*
* 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
*
* Generates a list of the user's subscriptions
*
*
* @category AtomPub
* @package StatusNet
* @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
* @link http://status.net/
*/
class AtompubsubscriptionfeedAction extends ApiAuthAction
{
private $_profile = null;
@ -61,17 +60,18 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
$subscriber = $this->trimmed('subscriber');
$this->_profile = Profile::staticGet('id', $subscriber);
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);
}
@ -93,7 +93,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return void
*/
function handle($argarray=null)
{
parent::handle($argarray);
@ -106,6 +105,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$this->addSubscription();
break;
default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
$this->clientError(_('HTTP method not supported.'), 405);
return;
}
@ -118,7 +118,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return void
*/
function showFeed()
{
header('Content-Type: application/atom+xml; charset=utf-8');
@ -144,21 +143,25 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$feed->addAuthor($this->_profile->getBestName(),
$this->_profile->getURI());
// TRANS: Title for Atom subscription feed.
// TRANS: %s is a user nickname.
$feed->setTitle(sprintf(_("%s subscriptions"),
$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(),
common_config('site', 'name')));
$feed->addLink(common_local_url('subscriptions',
array('nickname' =>
array('nickname' =>
$this->_profile->nickname)));
$feed->addLink($url,
array('rel' => 'self',
'type' => 'application/atom+xml'));
// If there's more...
if ($this->page > 1) {
@ -167,9 +170,9 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
'type' => 'application/atom+xml'));
$feed->addLink(common_local_url('AtomPubSubscriptionFeed',
array('subscriber' =>
array('subscriber' =>
$this->_profile->id),
array('page' =>
array('page' =>
$this->page - 1)),
array('rel' => 'prev',
'type' => 'application/atom+xml'));
@ -214,15 +217,15 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return void
*/
function addSubscription()
{
if (empty($this->auth_user) ||
$this->auth_user->id != $this->_profile->id) {
throw new ClientException(_("Can't add someone else's".
" subscription"), 403);
// TRANS: Client exception thrown when trying to subscribe another user.
throw new ClientException(_("Cannot add someone else's".
" subscription."), 403);
}
$xml = file_get_contents('php://input');
$dom = DOMDocument::loadXML($xml);
@ -250,6 +253,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$person = $activity->objects[0];
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.'));
return;
}
@ -259,7 +263,16 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$profile = Profile::fromURI($person->id);
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;
}
@ -290,7 +303,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
return $_SERVER['REQUEST_METHOD'] != 'POST';
@ -301,7 +313,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return string last modified http header
*/
function lastModified()
{
return null;
@ -312,7 +323,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return string etag http header
*/
function etag()
{
return null;
@ -323,7 +333,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
*
* @return boolean true if delete, else false
*/
function requiresAuth()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {

View File

@ -115,7 +115,7 @@ class ConfirmaddressAction extends Action
if (!$result) {
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.
$this->serverError(_('Couldn\'t update user.'));
$this->serverError(_('Could not update user.'));
return;
}

View File

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

View File

@ -356,7 +356,7 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating e-mail preferences.
$this->serverError(_('Couldn\'t update user.'));
$this->serverError(_('Could not update user.'));
return;
}
@ -423,7 +423,7 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__);
// 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;
}
@ -465,7 +465,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// 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;
}
@ -505,7 +505,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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;
}
$user->query('COMMIT');
@ -537,7 +537,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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.
@ -562,7 +562,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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.

View File

@ -263,7 +263,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
$this->showForm(_('Couldn\'t update your design.'));
$this->showForm(_('Could not update your design.'));
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
* @link http://status.net/
*/
class GrouplogoAction extends GroupDesignAction
{
var $mode = null;
@ -67,6 +66,7 @@ class GrouplogoAction extends GroupDesignAction
parent::prepare($args);
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.'));
return false;
}
@ -83,6 +83,7 @@ class GrouplogoAction extends GroupDesignAction
}
if (!$nickname) {
// TRANS: Client error displayed when trying to change group logo settings without having a nickname.
$this->clientError(_('No nickname.'), 404);
return false;
}
@ -99,6 +100,7 @@ class GrouplogoAction extends GroupDesignAction
}
if (!$this->group) {
// TRANS: Client error displayed when trying to update logo settings for a non-existing group.
$this->clientError(_('No such group.'), 404);
return false;
}
@ -106,6 +108,7 @@ class GrouplogoAction extends GroupDesignAction
$cur = common_current_user();
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);
return false;
}
@ -136,9 +139,9 @@ class GrouplogoAction extends GroupDesignAction
*
* @return string Title of the page
*/
function title()
{
// TRANS: Title for group logo settings page.
return _('Group logo');
}
@ -147,9 +150,10 @@ class GrouplogoAction extends GroupDesignAction
*
* @return instructions for use
*/
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());
}
@ -160,7 +164,6 @@ class GrouplogoAction extends GroupDesignAction
*
* @return void
*/
function showContent()
{
if ($this->mode == 'crop') {
@ -178,6 +181,7 @@ class GrouplogoAction extends GroupDesignAction
if (!$profile) {
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.'));
return;
}
@ -192,6 +196,7 @@ class GrouplogoAction extends GroupDesignAction
common_local_url('grouplogo',
array('nickname' => $this->group->nickname))));
$this->elementStart('fieldset');
// TRANS: Group logo form legend.
$this->element('legend', null, _('Group logo'));
$this->hidden('token', common_session_token());
@ -199,6 +204,7 @@ class GrouplogoAction extends GroupDesignAction
if ($original) {
$this->elementStart('li', array('id' => 'avatar_original',
'class' => 'avatar_view'));
// TRANS: Uploaded original file in group logo form.
$this->element('h2', null, _("Original"));
$this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => $this->group->original_logo,
@ -210,6 +216,7 @@ class GrouplogoAction extends GroupDesignAction
if ($this->group->homepage_logo) {
$this->elementStart('li', array('id' => 'avatar_preview',
'class' => 'avatar_view'));
// TRANS: Header for preview of to be displayed group logo.
$this->element('h2', null, _("Preview"));
$this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => $this->group->homepage_logo,
@ -233,6 +240,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('ul', 'form_actions');
$this->elementStart('li');
// TRANS: Submit button for uploading a group logo.
$this->submit('upload', _('Upload'));
$this->elementEnd('li');
$this->elementEnd('ul');
@ -251,6 +259,7 @@ class GrouplogoAction extends GroupDesignAction
common_local_url('grouplogo',
array('nickname' => $this->group->nickname))));
$this->elementStart('fieldset');
// TRANS: Legend for group logo settings fieldset.
$this->element('legend', null, _('Avatar settings'));
$this->hidden('token', common_session_token());
@ -259,6 +268,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('li',
array('id' => 'avatar_original',
'class' => 'avatar_view'));
// TRANS: Header for originally uploaded file before a crop on the group logo page.
$this->element('h2', null, _("Original"));
$this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
@ -271,6 +281,7 @@ class GrouplogoAction extends GroupDesignAction
$this->elementStart('li',
array('id' => 'avatar_preview',
'class' => 'avatar_view'));
// TRANS: Header for the cropped group logo on the group logo page.
$this->element('h2', null, _("Preview"));
$this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
@ -286,6 +297,7 @@ class GrouplogoAction extends GroupDesignAction
'id' => $crop_info));
}
// TRANS: Button text for cropping an uploaded group logo.
$this->submit('crop', _('Crop'));
$this->elementEnd('li');
@ -302,13 +314,13 @@ class GrouplogoAction extends GroupDesignAction
*
* @return void
*/
function handlePost()
{
// CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
// TRANS: Form validation error message.
$this->show_form(_('There was a problem with your session token. '.
'Try again, please.'));
return;
@ -319,6 +331,7 @@ class GrouplogoAction extends GroupDesignAction
} else if ($this->arg('crop')) {
$this->cropLogo();
} else {
// TRANS: Form validation error message when an unsupported argument is used.
$this->showForm(_('Unexpected form submission.'));
}
}
@ -331,7 +344,6 @@ class GrouplogoAction extends GroupDesignAction
*
* @return void
*/
function uploadLogo()
{
try {
@ -362,6 +374,7 @@ class GrouplogoAction extends GroupDesignAction
$this->mode = 'crop';
// TRANS: Form instructions on the group logo page.
$this->showForm(_('Pick a square area of the image to be the logo.'),
true);
}
@ -371,12 +384,12 @@ class GrouplogoAction extends GroupDesignAction
*
* @return void
*/
function cropLogo()
{
$filedata = $_SESSION['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.'));
return;
}
@ -396,8 +409,10 @@ class GrouplogoAction extends GroupDesignAction
@unlink($filedata['filepath']);
unset($_SESSION['FILEDATA']);
$this->mode = 'upload';
// TRANS: Form success message after updating a group logo.
$this->showForm(_('Logo updated.'), true);
} else {
// TRANS: Form failure message after failing to update a group logo.
$this->showForm(_('Failed updating logo.'));
}
}

View File

@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/jabber.php';
*
* @see SettingsAction
*/
class ImsettingsAction extends ConnectSettingsAction
{
/**
@ -53,7 +52,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return string Title of the page
*/
function title()
{
// TRANS: Title for instance messaging settings.
@ -65,7 +63,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return instructions for use
*/
function getInstructions()
{
// TRANS: Instant messaging settings page instructions.
@ -85,7 +82,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function showContent()
{
if (!common_config('xmpp', 'enabled')) {
@ -152,7 +148,7 @@ class ImsettingsAction extends ConnectSettingsAction
}
}
$this->elementEnd('fieldset');
$this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
// TRANS: Form legend for IM preferences form.
$this->element('legend', null, _('IM preferences'));
@ -194,7 +190,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return Confirm_address address object for this user
*/
function getConfirmation()
{
$user = common_current_user();
@ -221,7 +216,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function handlePost()
{
// CSRF protection
@ -254,7 +248,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function savePreferences()
{
$jabbernotify = $this->boolean('jabbernotify');
@ -280,7 +273,7 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating IM preferences.
$this->serverError(_('Couldn\'t update user.'));
$this->serverError(_('Could not update user.'));
return;
}
@ -298,7 +291,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function addAddress()
{
$user = common_current_user();
@ -348,7 +340,7 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__);
// 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;
}
@ -374,7 +366,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function cancelConfirmation()
{
$jabber = $this->arg('jabber');
@ -397,7 +388,7 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// 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;
}
@ -412,7 +403,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return void
*/
function removeAddress()
{
$user = common_current_user();
@ -439,7 +429,7 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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;
}
$user->query('COMMIT');
@ -459,7 +449,6 @@ class ImsettingsAction extends ConnectSettingsAction
*
* @return boolean whether the Jabber ID exists
*/
function jabberExists($jabber)
{
$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
* @link http://status.net/
*/
class LicenseadminpanelAction extends AdminPanelAction
{
@ -61,7 +60,6 @@ class LicenseadminpanelAction extends AdminPanelAction
*
* @return string instructions
*/
function getInstructions()
{
return _('License for this StatusNet site');
@ -72,7 +70,6 @@ class LicenseadminpanelAction extends AdminPanelAction
*
* @return void
*/
function showForm()
{
$form = new LicenseAdminPanelForm($this);
@ -85,7 +82,6 @@ class LicenseadminpanelAction extends AdminPanelAction
*
* @return void
*/
function saveSettings()
{
static $settings = array(
@ -128,7 +124,6 @@ class LicenseadminpanelAction extends AdminPanelAction
*
* @return nothing
*/
function validate(&$values)
{
// 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
*/
function id()
{
return 'licenseadminpanel';
@ -208,7 +202,6 @@ class LicenseAdminPanelForm extends AdminForm
*
* @return string class of the form
*/
function formClass()
{
return 'form_settings';
@ -312,7 +305,6 @@ class LicenseAdminPanelForm extends AdminForm
*
* @return void
*/
function formActions()
{
$this->out->submit(

View File

@ -181,7 +181,7 @@ class OthersettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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;
}

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
* @link http://status.net/
*/
class ProfilesettingsAction extends AccountSettingsAction
{
/**
@ -54,7 +53,6 @@ class ProfilesettingsAction extends AccountSettingsAction
*
* @return string Title of the page
*/
function title()
{
// TRANS: Page title for profile settings.
@ -66,7 +64,6 @@ class ProfilesettingsAction extends AccountSettingsAction
*
* @return instructions for use
*/
function getInstructions()
{
// TRANS: Usage instructions for profile settings.
@ -87,7 +84,6 @@ class ProfilesettingsAction extends AccountSettingsAction
*
* @return void
*/
function showContent()
{
$user = common_current_user();
@ -212,7 +208,6 @@ class ProfilesettingsAction extends AccountSettingsAction
*
* @return void
*/
function handlePost()
{
// CSRF protection
@ -323,7 +318,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// 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;
} else {
// Re-initialize language environment if it changed
@ -348,7 +343,7 @@ class ProfilesettingsAction extends AccountSettingsAction
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be updated to
// TRANS: automatically subscribe to any subscriber.
$this->serverError(_('Couldn\'t update user for autosubscribe.'));
$this->serverError(_('Could not update user for autosubscribe.'));
return;
}
}
@ -406,7 +401,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
// 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;
}
}
@ -419,7 +414,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($profile, 'UPDATE', __FILE__);
// 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;
}
@ -428,7 +423,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if (!$result) {
// 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;
}

View File

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

View File

@ -41,7 +41,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
class RepeatAction extends Action
{
var $user = null;
@ -73,7 +72,7 @@ class RepeatAction extends Action
}
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;
}
@ -101,7 +100,6 @@ class RepeatAction extends Action
*
* @return void
*/
function handle($args)
{
$repeat = $this->notice->repeat($this->user->id, 'web');

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc.
*
* Restore a backup of your own account from the browser
*
*
* PHP version 5
*
* 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
* @link http://status.net/
*/
class RestoreaccountAction extends Action
{
private $success = false;
@ -52,12 +51,12 @@ class RestoreaccountAction extends Action
/**
* Returns the title of the page
*
*
* @return string page title
*/
function title()
{
// TRANS: Page title for page where a user account can be restored from backup.
return _("Restore account");
}
@ -68,7 +67,6 @@ class RestoreaccountAction extends Action
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
@ -76,10 +74,12 @@ class RestoreaccountAction extends Action
$cur = common_current_user();
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);
}
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);
}
@ -93,7 +93,6 @@ class RestoreaccountAction extends Action
*
* @return void
*/
function handle($argarray=null)
{
parent::handle($argarray);
@ -108,17 +107,17 @@ class RestoreaccountAction extends Action
/**
* Queue a file for restoration
*
*
* Uses the UserActivityStream class; may take a long time!
*
* @return void
*/
function restoreAccount()
{
$this->checkSessionToken();
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.'));
}
@ -143,7 +142,7 @@ class RestoreaccountAction extends Action
' partially uploaded.'));
return;
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.'));
return;
case UPLOAD_ERR_NO_TMP_DIR:
@ -170,18 +169,21 @@ class RestoreaccountAction extends Action
try {
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)) {
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)) {
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);
@ -201,7 +203,8 @@ class RestoreaccountAction extends Action
if (!$feed ||
$feed->namespaceURI != Activity::ATOM ||
$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.
@ -230,21 +233,22 @@ class RestoreaccountAction extends Action
*
* @return void
*/
function showContent()
{
if ($this->success) {
$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.'));
} else if ($this->inprogress) {
$this->element('p', null,
// TRANS: Message when a feed restore is in progress.
_('Feed will be restored. Please wait a few minutes for results.'));
} else {
$form = new RestoreAccountForm($this);
$form->show();
}
}
/**
* Return true if read only.
*
@ -254,7 +258,6 @@ class RestoreaccountAction extends Action
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
return false;
@ -267,7 +270,6 @@ class RestoreaccountAction extends Action
*
* @return string last modified http header
*/
function lastModified()
{
// For comparison with If-Last-Modified
@ -282,7 +284,6 @@ class RestoreaccountAction extends Action
*
* @return string etag http header
*/
function etag()
{
return null;
@ -299,7 +300,6 @@ class RestoreaccountAction extends Action
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class RestoreAccountForm extends Form
{
function __construct($out=null) {
@ -312,7 +312,6 @@ class RestoreAccountForm extends Form
*
* @return string the form's class
*/
function formClass()
{
return 'form_profile_restore';
@ -323,7 +322,6 @@ class RestoreAccountForm extends Form
*
* @return string the form's action URL
*/
function action()
{
return common_local_url('restoreaccount');
@ -331,19 +329,19 @@ class RestoreAccountForm extends Form
/**
* Output form data
*
*
* Really, just instructions for doing a backup.
*
* @return void
*/
function formData()
{
$this->out->elementStart('p', 'instructions');
// TRANS: Form instructions for feed restore.
$this->out->raw(_('You can upload a backed-up stream in '.
'<a href="http://activitystrea.ms/">Activity Streams</a> format.'));
$this->out->elementEnd('p');
$this->out->elementStart('ul', 'form_data');
@ -359,18 +357,19 @@ class RestoreAccountForm extends Form
/**
* Buttons for the form
*
*
* In this case, a single submit button
*
* @return void
*/
function formActions()
{
$this->out->submit('submit',
// TRANS: Submit button to confirm upload of a user backup file for account restore.
_m('BUTTON', 'Upload'),
'submit',
null,
// TRANS: Title for submit button to confirm upload of a user backup file for account restore.
_('Upload the file'));
}
}

View File

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

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
* @link http://status.net/
*/
class UserDesignSettingsAction extends DesignSettingsAction
{
/**
@ -70,7 +69,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return string Title of the page
*/
function title()
{
return _('Profile design');
@ -81,7 +79,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return instructions for use
*/
function getInstructions()
{
return _('Customize the way your profile looks ' .
@ -93,7 +90,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return Design
*/
function getWorkingDesign()
{
$user = common_current_user();
@ -108,7 +104,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return void
*/
function showContent()
{
$design = $this->getWorkingDesign();
@ -125,7 +120,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return void
*/
function saveDesign()
{
foreach ($this->args as $key => $val) {
@ -168,7 +162,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
$design = $user->getDesign();
if (!empty($design)) {
$original = clone($design);
$design->backgroundcolor = $bgcolor->intValue();
@ -183,13 +176,11 @@ class UserDesignSettingsAction extends DesignSettingsAction
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
$this->showForm(_('Couldn\'t update your design.'));
$this->showForm(_('Could not update your design.'));
return;
}
// update design
} else {
$user->query('BEGIN');
// save new design
@ -236,7 +227,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*
* @return nothing
*/
function sethd()
{
@ -281,5 +271,4 @@ class UserDesignSettingsAction extends DesignSettingsAction
$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.
*/
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()),
('Updating.Me','Updating.Me','http://updating.me/', 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()),
(100115, 'E-Plus', '%s@smsmail.eplus.de', 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');
$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();
if(Event::handle('StartAccountSettingsProfileMenuItem', array($this, &$menu))){
@ -142,7 +142,7 @@ class AccountSettingsNav extends Widget
Event::handle('EndAccountSettingsOtherMenuItem', array($this, &$menu));
}
Event::handle('EndAccountSettingsNav', array(&$this->action));
Event::handle('EndAccountSettingsNav', array($this->action));
}
$this->action->elementEnd('ul');

View File

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

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc.
*
* class to import activities as part of a user's timeline
*
*
* PHP version 5
*
* 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
* @link http://status.net/
*/
class ActivityImporter extends QueueHandler
{
private $trusted = false;
@ -56,7 +55,6 @@ class ActivityImporter extends QueueHandler
*
* @return
*/
function handle($data)
{
list($user, $author, $activity, $trusted) = $data;
@ -65,9 +63,8 @@ class ActivityImporter extends QueueHandler
$done = null;
if (Event::handle('StartImportActivity',
if (Event::handle('StartImportActivity',
array($user, $author, $activity, $trusted, &$done))) {
try {
switch ($activity->verb) {
case ActivityVerb::FOLLOW:
@ -80,9 +77,10 @@ class ActivityImporter extends QueueHandler
$this->postNote($user, $author, $activity);
break;
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));
$done = true;
} catch (ClientException $ce) {
@ -98,31 +96,31 @@ class ActivityImporter extends QueueHandler
}
return $done;
}
function subscribeProfile($user, $author, $activity)
{
$profile = $user->getProfile();
if ($activity->objects[0]->id == $author->id) {
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;
$otherUser = User::staticGet('uri', $other->id);
if (!empty($otherUser)) {
$otherProfile = $otherUser->getProfile();
} 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!
Subscription::start($otherProfile, $profile);
} else if (empty($activity->actor)
} else if (empty($activity->actor)
|| $activity->actor->id == $author->id) {
$other = $activity->objects[0];
@ -130,12 +128,14 @@ class ActivityImporter extends QueueHandler
$otherProfile = Profile::fromUri($other->id);
if (empty($otherProfile)) {
// TRANS: Client exception thrown when trying to subscribe to an unknown profile.
throw new ClientException(_("Unknown profile."));
}
Subscription::start($profile, $otherProfile);
} 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)) {
$oprofile = Ostatus_profile::ensureActivityObjectProfile($activity->objects[0]);
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();
}
@ -158,7 +159,8 @@ class ActivityImporter extends QueueHandler
assert(!empty($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))) {
@ -178,7 +180,7 @@ class ActivityImporter extends QueueHandler
$notice = Notice::staticGet('uri', $sourceUri);
if (!empty($notice)) {
common_log(LOG_INFO, "Notice {$sourceUri} already exists.");
if ($this->trusted) {
@ -194,12 +196,15 @@ class ActivityImporter extends QueueHandler
$notice->update($orig);
return;
} else {
throw new ClientException(sprintf(_("Already know about notice %s and ".
" it's got a different author %s."),
// TRANS: Client exception thrown when trying to import a notice by another user.
// 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));
}
} 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;
} else {
// @fixme fetch from $sourceUrl?
// @todo i18n FIXME: use sprintf and add i18n.
throw new ClientException("No content for notice {$sourceUri}.");
// TRANS: Client exception thrown when trying to import a notice without content.
// 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
@ -345,7 +351,7 @@ class ActivityImporter extends QueueHandler
return array($groups, $replies);
}
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
*
* @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
// and profile
// Check to see if we have previously issued an access token for
// 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();
@ -172,19 +175,40 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
)
);
$at = new Token();
$at = null;
// fetch the full access token
$at->consumer_key = $consumer->key;
$at->tok = $appUser->token;
// Special case: we used to store request tokens in the
// Oauth_application_user record, and the access_type would
// 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) {
throw new Exception(
// TRANS: Exception thrown when no access token can be issued.
_('Could not issue access token.')
);
$at = $this->generateNewAccessToken($consumer, $rt, $verifier);
$this->updateAppUser($appUser, $app, $at);
} 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
@ -200,48 +224,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
)
);
// make a brand new access token
$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__);
}
// 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.'));
}
$at = $this->generateNewAccessToken($consumer, $rt, $verifier);
$this->newAppUser($tokenAssoc, $app, $at);
// Okay, good
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
*

View File

@ -108,8 +108,9 @@ class Atom10Feed extends XMLStringer
if (!empty($name)) {
$xs->element('name', null, $name);
} else {
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
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)
{
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()

View File

@ -63,8 +63,13 @@ if (!function_exists('dl')) {
// 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.
// Callers will be suppressing warnings anyway.
$disabled = array_filter(array_map('trim', explode(',', ini_get('disable_functions'))));
if (!in_array('dl', $disabled)) {
try {
// 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) {
return false;
}

View File

@ -96,7 +96,7 @@ class ConnectSettingsNav extends Widget
$action_name = $this->action->trimmed('action');
$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')
$menu = array();
@ -129,7 +129,7 @@ class ConnectSettingsNav extends Widget
$action_name === $menuaction);
}
Event::handle('EndConnectSettingsNav', array(&$this->action));
Event::handle('EndConnectSettingsNav', array($this->action));
}
$this->action->elementEnd('ul');

View File

@ -3,7 +3,7 @@
* StatusNet - the distributed open-source microblogging tool
* 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
*
@ -20,6 +20,7 @@
* 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.
@ -27,22 +28,41 @@
* @link http://status.net/
*/
if (!defined('STATUSNET')) {
exit(1);
}
/**
* This class implements LRDD-based service discovery based on the "Hammer Draft"
* (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
{
const LRDD_REL = 'lrdd';
const LRDD_REL = 'lrdd';
const PROFILEPAGE = 'http://webfinger.net/rel/profile-page';
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();
/**
* Constructor for a discovery object
*
* Registers different discovery methods.
*
* @return Discovery this
*/
public function __construct()
{
$this->registerMethod('Discovery_LRDD_Host_Meta');
@ -50,6 +70,14 @@ class Discovery
$this->registerMethod('Discovery_LRDD_Link_HTML');
}
/**
* Register a discovery class
*
* @param string $class Class name
*
* @return void
*/
public function registerMethod($class)
{
$this->methods[] = $class;
@ -58,7 +86,12 @@ class Discovery
/**
* Given a "user id" make sure it's normalized to either a webfinger
* 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)
{
if (substr($user_id, 0, 5) == 'http:' ||
@ -67,13 +100,23 @@ class Discovery
return $user_id;
}
if (strpos($user_id, '@') !== FALSE) {
if (strpos($user_id, '@') !== false) {
return 'acct:' . $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)
{
$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)
{
// Normalize the incoming $id to make sure we have a uri
@ -107,10 +155,20 @@ class Discovery
}
// 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)) {
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)
{
$template = str_replace('{uri}', urlencode($id), $template);
@ -129,10 +198,18 @@ class Discovery
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)
{
try {
$client = new HTTPClient();
$client = new HTTPClient();
$response = $client->get($url);
} catch (HTTP_Request2_Exception $e) {
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
{
/**
* Discover interesting info about the URI
*
* @param string $uri URI to inquire about
*
* @return array Links in the XRD file
*/
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
{
/**
* 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)
{
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
{
/**
* 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)
{
try {
$client = new HTTPClient();
$client = new HTTPClient();
$response = $client->get($uri);
} catch (HTTP_Request2_Exception $e) {
return false;
@ -199,6 +349,14 @@ class Discovery_LRDD_Link_Header implements Discovery_LRDD
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)
{
$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
{
/**
* 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)
{
try {
$client = new HTTPClient();
$client = new HTTPClient();
$response = $client->get($uri);
} catch (HTTP_Request2_Exception $e) {
return false;
@ -227,6 +412,16 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
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)
{
$links = array();
@ -237,8 +432,8 @@ class Discovery_LRDD_Link_HTML implements Discovery_LRDD
preg_match_all('/<link\s[^>]*>/i', $head_html, $link_matches);
foreach ($link_matches[0] as $link_html) {
$link_url = null;
$link_rel = null;
$link_url = null;
$link_rel = null;
$link_type = null;
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'));
if (Event::handle('StartLoginGroupNav', array(&$this->action))) {
if (Event::handle('StartLoginGroupNav', array($this->action))) {
$this->action->menuItem(common_local_url('login'),
_('Login'),
@ -87,7 +87,7 @@ class LoginGroupNav extends Widget
$action_name === 'register');
}
Event::handle('EndLoginGroupNav', array(&$this->action));
Event::handle('EndLoginGroupNav', array($this->action));
}
$this->action->elementEnd('ul');

View File

@ -99,6 +99,21 @@ class ProfileAction extends OwnerDesignAction
$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()
{
$profile = $this->profile->getSubscriptions(0, PROFILES_PER_MINILIST + 1);
@ -106,7 +121,9 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_subscriptions',
'class' => 'section'));
if (Event::handle('StartShowSubscriptionsMiniList', array($this))) {
$this->element('h2', null, _('Subscriptions'));
$this->elementStart('h2');
$this->statsSectionLink('subscriptions', _('Subscriptions'));
$this->elementEnd('h2');
$cnt = 0;
@ -120,10 +137,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > PROFILES_PER_MINILIST) {
$this->elementStart('p');
$this->element('a', array('href' => common_local_url('subscriptions',
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All subscriptions'));
$this->statsSectionLink('subscriptions', _('All subscriptions'), 'more');
$this->elementEnd('p');
}
@ -141,7 +155,9 @@ class ProfileAction extends OwnerDesignAction
if (Event::handle('StartShowSubscribersMiniList', array($this))) {
$this->element('h2', null, _('Subscribers'));
$this->elementStart('h2');
$this->statsSectionLink('subscribers', _('Subscribers'));
$this->elementEnd('h2');
$cnt = 0;
@ -155,10 +171,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > PROFILES_PER_MINILIST) {
$this->elementStart('p');
$this->element('a', array('href' => common_local_url('subscribers',
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All subscribers'));
$this->statsSectionLink('subscribers', _('All subscribers'), 'more');
$this->elementEnd('p');
}
@ -170,10 +183,7 @@ class ProfileAction extends OwnerDesignAction
function showStatistics()
{
$subs_count = $this->profile->subscriptionCount();
$subbed_count = $this->profile->subscriberCount();
$notice_count = $this->profile->noticeCount();
$group_count = $this->profile->getGroups()->N;
$age_days = (time() - strtotime($this->profile->created)) / 86400;
if ($age_days < 1) {
// Rather than extrapolating out to a bajillion...
@ -186,59 +196,73 @@ class ProfileAction extends OwnerDesignAction
$this->element('h2', null, _('Statistics'));
// Other stats...?
$this->elementStart('dl', 'entity_user-id');
$this->element('dt', null, _('User ID'));
$this->element('dd', null, $this->profile->id);
$this->elementEnd('dl');
$profile = $this->profile;
$actionParams = array('nickname' => $profile->nickname);
$stats = array(
array(
'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');
$this->element('dt', null, _('Member since'));
$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');
// Give plugins a chance to add stats entries
Event::handle('ProfileStats', array($profile, &$stats));
foreach ($stats as $row) {
$this->showStatsRow($row);
}
$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()
{
$groups = $this->profile->getGroups(0, GROUPS_PER_MINILIST + 1);
@ -246,7 +270,9 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_groups',
'class' => 'section'));
if (Event::handle('StartShowGroupsMiniList', array($this))) {
$this->element('h2', null, _('Groups'));
$this->elementStart('h2');
$this->statsSectionLink('usergroups', _('Groups'));
$this->elementEnd('h2');
if ($groups) {
$gml = new GroupMiniList($groups, $this->profile, $this);
@ -258,10 +284,7 @@ class ProfileAction extends OwnerDesignAction
if ($cnt > GROUPS_PER_MINILIST) {
$this->elementStart('p');
$this->element('a', array('href' => common_local_url('usergroups',
array('nickname' => $this->profile->nickname)),
'class' => 'more'),
_('All groups'));
$this->statsSectionLink('usergroups', _('All groups'), 'more');
$this->elementEnd('p');
}

View File

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

View File

@ -28,6 +28,8 @@
class UserActivityStream extends AtomUserNoticeFeed
{
public $activities = array();
function __construct($user, $indent = true)
{
parent::__construct($user, null, $indent);
@ -45,10 +47,15 @@ class UserActivityStream extends AtomUserNoticeFeed
usort($objs, 'UserActivityStream::compareObject');
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
$str = $act->asString(false, ($act->actor->id != $this->user->uri));
$this->addEntryRaw($str);
$act->outputTo($this, false, ($act->actor->id != $this->user->uri));
}
}

View File

@ -242,7 +242,7 @@ class UserProfile extends Widget
$this->out->elementEnd('div');
return;
}
if (Event::handle('StartProfilePageActionsSection', array(&$this->out, $this->profile))) {
if (Event::handle('StartProfilePageActionsSection', array($this->out, $this->profile))) {
$cur = common_current_user();
@ -250,13 +250,13 @@ class UserProfile extends Widget
$this->out->element('h2', null, _('User actions'));
$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 (Event::handle('StartProfileRemoteSubscribe', array(&$this->out, $this->profile))) {
if (Event::handle('StartProfileRemoteSubscribe', array($this->out, $this->profile))) {
$this->out->elementStart('li', 'entity_subscribe');
$this->showRemoteSubscribeLink();
$this->out->elementEnd('li');
Event::handle('EndProfileRemoteSubscribe', array(&$this->out, $this->profile));
Event::handle('EndProfileRemoteSubscribe', array($this->out, $this->profile));
}
} else {
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('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) {
case 'Title':
$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',
'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')) {
$apiRoot = common_path('api/', true);

View File

@ -9,17 +9,17 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Core\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:10:21+0000\n"
"POT-Creation-Date: 2011-01-14 23:32+0000\n"
"PO-Revision-Date: 2011-01-14 23:34:31+0000\n"
"Language-Team: Afrikaans <http://translatewiki.net/wiki/Portal:af>\n"
"Content-Type: text/plain; charset=UTF-8\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-Language-Code: af\n"
"X-Message-Group: #out-statusnet-core\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: 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/apistatusnetversion.php:91 actions/apisubscriptions.php:109
#: 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/apitimelineretweetedtome.php:118
#: actions/apitimelineretweetsofme.php:150 actions/apitimelinetag.php:159
@ -316,7 +316,8 @@ msgstr "Kon nie die gebruiker opdateer nie."
#: actions/apiaccountupdateprofile.php:111
#: actions/apiaccountupdateprofilebackgroundimage.php:199
#: 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/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66
#: lib/profileaction.php:84
@ -549,7 +550,7 @@ msgstr "Kon nie die gebruiker opdateer nie."
#. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings.
#: 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
msgid "Nickname already in use. Try another one."
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: Validation error in form for profile settings.
#: 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
msgid "Not a valid nickname."
msgstr "Nie 'n geldige gebruikersnaam nie."
@ -571,7 +572,7 @@ msgstr "Nie 'n geldige gebruikersnaam nie."
#. TRANS: Validation error in form for profile settings.
#: actions/apigroupcreate.php:181 actions/editapplication.php:233
#: 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
msgid "Homepage is not a valid URL."
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: Validation error in form for profile settings.
#: 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
#, fuzzy
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.
#: actions/apigroupcreate.php:201 actions/editapplication.php:201
#: actions/editgroup.php:209 actions/newapplication.php:178
#: actions/newgroup.php:149
#: actions/newgroup.php:156
#, fuzzy, php-format
msgid "Description is too long (maximum %d character)."
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: Validation error in form for profile settings.
#: 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
#, fuzzy
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: %d is the maximum number of allowed aliases.
#: actions/apigroupcreate.php:236 actions/editgroup.php:229
#: actions/newgroup.php:169
#: actions/newgroup.php:176
#, fuzzy, php-format
msgid "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 create form validation error.
#: actions/apigroupcreate.php:264 actions/editgroup.php:244
#: actions/newgroup.php:184
#: actions/newgroup.php:191
#, php-format
msgid "Alias \"%s\" already in use. Try another one."
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 create form validation error.
#: 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."
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."
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/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116
#: actions/atompubshowsubscription.php:118
#: actions/atompubshowsubscription.php:122
#: actions/atompubsubscriptionfeed.php:109
#, fuzzy
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: %s is the error.
#: actions/apitimelinegroup.php:138
#: actions/apitimelinegroup.php:134
#, fuzzy, php-format
msgid "Could not generate feed for group - %s"
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: Do not translate POST.
#: actions/apitimelineuser.php:332
#: actions/apitimelineuser.php:334
msgid "Can only handle POST activities."
msgstr ""
#. TRANS: Client error displayed when using an unsupported activity object type.
#. TRANS: %s is the unsupported activity object type.
#: actions/apitimelineuser.php:343
#: actions/apitimelineuser.php:345
#, php-format
msgid "Cannot handle activity object type \"%s\"."
msgstr ""
#. TRANS: Client error displayed when posting a notice without content through the API.
#: actions/apitimelineuser.php:376
#: actions/apitimelineuser.php:378
#, fuzzy, php-format
msgid "No content for notice %d."
msgstr "U kan nie u eie kennisgewings herhaal nie."
#. TRANS: Client error displayed when using another format than AtomPub.
#: actions/apitimelineuser.php:404
#: actions/apitimelineuser.php:406
#, php-format
msgid "Notice with URI \"%s\" already exists."
msgstr ""
#: actions/apitimelineuser.php:435
#: actions/apitimelineuser.php:437
#, php-format
msgid "AtomPub post with unknown attention URI %s"
msgstr ""
@ -1174,7 +1176,7 @@ msgid "API method under construction."
msgstr "Die API-funksie is nie gevind nie."
#. 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
msgid "User not found."
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."
#: actions/atompubshowmembership.php:81
#, fuzzy
msgid "No such group"
msgstr "Die groep bestaan nie."
msgstr "Hierdie groep bestaat nie"
#: actions/atompubshowmembership.php:90
#, fuzzy
@ -1285,21 +1286,26 @@ msgstr "Die API-funksie is nie gevind nie."
msgid "Can't delete someone else's membership"
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:81
#: actions/atompubshowsubscription.php:83
#: actions/atompubsubscriptionfeed.php:74
#, fuzzy, php-format
msgid "No such profile id: %d"
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
msgid "Profile %d not subscribed to profile %d"
msgid "Profile %1$d not subscribed to profile %2$d"
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
msgid "Can't delete someone else's subscription"
msgid "Cannot delete someone else's subscription"
msgstr ""
"Dit was nie moontlik om die boodskap van u gunstelinge te verwyder nie."
@ -1394,14 +1400,16 @@ msgid "Preview"
msgstr "Voorskou"
#. 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
msgctxt "BUTTON"
msgid "Delete"
msgstr "Skrap"
#. 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
msgctxt "BUTTON"
msgid "Upload"
@ -1444,6 +1452,37 @@ msgstr "Die opdatering van die avatar het gefaal."
msgid "Avatar deleted."
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.
#: actions/block.php:68
msgid "You already blocked that user."
@ -1652,6 +1691,76 @@ msgstr "Gesprek"
msgid "Notices"
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.
#: actions/deleteapplication.php:62
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"
#. 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"
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 create form validation error.
#: actions/editgroup.php:239 actions/newgroup.php:179
#: actions/editgroup.php:239 actions/newgroup.php:186
#, php-format
msgid "Invalid 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 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."
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"
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.
#: actions/newgroup.php:110
#: actions/newgroup.php:117
#, fuzzy
msgid "Use this form to create a new group."
msgstr "Gebruik hierdie vorm om die groep te wysig."
@ -3629,11 +3744,6 @@ msgstr "Nuwe wagwoord"
msgid "6 or more characters"
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
msgid "Same as password above"
msgstr "Dieselfde as wagwoord hierbo"
@ -4163,6 +4273,12 @@ msgstr "Kon nie gebruiker opdateer nie."
msgid "Settings saved."
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
#, php-format
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."
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"
msgstr "Herhalend"
@ -4670,6 +4786,92 @@ msgstr ""
msgid "Replies to %1$s on %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
#, fuzzy
msgid "You cannot revoke user roles on this site."
@ -4778,7 +4980,7 @@ msgid "Reset key & secret"
msgstr ""
#: 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"
msgstr "Skrap"
@ -6022,14 +6224,14 @@ msgid "Author(s)"
msgstr "Outeur(s)"
#. 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
msgid "Favor"
msgstr "Gunstelinge"
#. 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.
#: classes/Fave.php:154
#: classes/Fave.php:167
#, fuzzy, php-format
msgid "%1$s marked notice %2$s as a favorite."
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."
#. 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."
msgstr ""
@ -6170,72 +6372,72 @@ msgid "No such profile (%1$d) for notice (%2$d)."
msgstr ""
#. TRANS: Server exception. %s are the error details.
#: classes/Notice.php:193
#: classes/Notice.php:199
#, php-format
msgid "Database error inserting hashtag: %s"
msgstr ""
#. 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."
msgstr ""
#. 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."
msgstr ""
#. 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 ""
"Too many notices too fast; take a breather and post again in a few minutes."
msgstr ""
#. 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 ""
"Too many duplicate messages too quickly; take a breather and post again in a "
"few minutes."
msgstr ""
#. TRANS: Client exception thrown when a user tries to post while being banned.
#: classes/Notice.php:296
#: classes/Notice.php:305
#, fuzzy
msgid "You are banned from posting notices on this site."
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 updated.
#: classes/Notice.php:363 classes/Notice.php:390
#: classes/Notice.php:372 classes/Notice.php:399
msgid "Problem saving notice."
msgstr ""
#. 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."
msgstr ""
#. 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."
msgstr ""
#. 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.
#: classes/Notice.php:1126
#: classes/Notice.php:1127
#, fuzzy, php-format
msgid "Could not save reply for %1$d, %2$d."
msgstr "Kon nie die profiel stoor nie."
#. 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.
#: classes/Notice.php:1645
#: classes/Notice.php:1646
#, php-format
msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s"
#. 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
msgctxt "FANCYNAME"
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: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:798
#: classes/Profile.php:765
#, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist."
msgstr ""
#. 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).
#: classes/Profile.php:807
#: classes/Profile.php:774
#, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error."
msgstr ""
@ -6329,34 +6531,34 @@ msgid "Welcome to %1$s, @%2$s!"
msgstr "Welkom by %1$s, @%2$s!"
#. TRANS: Server exception.
#: classes/User.php:923
#: classes/User.php:918
msgid "No single user defined for single-user mode."
msgstr ""
#. TRANS: Server exception.
#: classes/User.php:927
#: classes/User.php:922
msgid "Single-user mode code called when not enabled."
msgstr ""
#. TRANS: Server exception thrown when creating a group failed.
#: classes/User_group.php:511
#: classes/User_group.php:516
msgid "Could not create group."
msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when updating a group URI failed.
#: classes/User_group.php:521
#: classes/User_group.php:526
#, fuzzy
msgid "Could not set group URI."
msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when setting group membership failed.
#: classes/User_group.php:544
#: classes/User_group.php:549
#, fuzzy
msgid "Could not set group membership."
msgstr "Kon nie die groep skep nie."
#. TRANS: Server exception thrown when saving local group information failed.
#: classes/User_group.php:559
#: classes/User_group.php:564
#, fuzzy
msgid "Could not save local group info."
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."
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
msgid "Post"
msgstr "Foto"
msgid "Cannot force remote user to subscribe."
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.
#: lib/activityutils.php:200
@ -6999,10 +7247,16 @@ msgctxt "BUTTON"
msgid "Revoke"
msgstr "Verwyder"
#: lib/atom10feed.php:112
msgid "author element must contain a name element."
#: lib/atom10feed.php:113
msgid "Author element must contain a name element."
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.
#: lib/attachmentlist.php:294
msgid "Author"
@ -7407,25 +7661,25 @@ msgid ""
msgstr ""
#. TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
#: lib/common.php:147
#: lib/common.php:150
#, fuzzy
msgid "No configuration file found."
msgstr "Geen bevestigingskode."
#. 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).
#: lib/common.php:150
#: lib/common.php:153
msgid "I looked for configuration files in the following places:"
msgstr ""
#. 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."
msgstr ""
#. 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.
#: lib/common.php:157
#: lib/common.php:160
msgid "Go to the installer."
msgstr "Gaan na die installeerder."
@ -7535,6 +7789,19 @@ msgstr "Atom"
msgid "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).
#: lib/feedlist.php:66
msgid "Feeds"
@ -7720,11 +7987,6 @@ msgstr "Die kennisgewing is te lank. Gebruik maksimum %d karakters."
msgid "Partial upload."
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
msgid "Not an image or corrupt file."
msgstr ""
@ -8044,7 +8306,7 @@ msgid ""
"users in conversation. People can send you messages for your eyes only."
msgstr ""
#: lib/mailbox.php:228 lib/noticelist.php:521
#: lib/mailbox.php:228 lib/noticelist.php:522
msgid "from"
msgstr "van"
@ -8074,38 +8336,6 @@ msgstr "Nie-ondersteunde formaat."
msgid "There was a database error while saving your file. Please try again."
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.
#: lib/mediafile.php:238 lib/mediafile.php:281
msgid "File exceeds user's quota."
@ -8128,7 +8358,7 @@ msgstr ""
#. 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: the MIME type that was denied.
#: lib/mediafile.php:394
#: lib/mediafile.php:396
#, php-format
msgid ""
"\"%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: %s is the file type that was denied.
#: lib/mediafile.php:399
#: lib/mediafile.php:401
#, php-format
msgid "\"%s\" is not a supported file type on this server."
msgstr ""
@ -8172,19 +8402,19 @@ msgid "Send"
msgstr "Stuur"
#. 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."
msgstr ""
"Die gebruikersnaam mag slegs uit kleinletters en syfers bestaan en mag geen "
"spasies bevat nie."
#. 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."
msgstr ""
#. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:189
#: lib/nickname.php:191
#, php-format
msgid "Nickname cannot be more than %d character long."
msgid_plural "Nickname cannot be more than %d characters long."
@ -8225,56 +8455,56 @@ msgid ""
msgstr ""
#. TRANS: Used in coordinates as abbreviation of north
#: lib/noticelist.php:451
#: lib/noticelist.php:452
msgid "N"
msgstr "N"
#. TRANS: Used in coordinates as abbreviation of south
#: lib/noticelist.php:453
#: lib/noticelist.php:454
msgid "S"
msgstr "S"
#. TRANS: Used in coordinates as abbreviation of east
#: lib/noticelist.php:455
#: lib/noticelist.php:456
msgid "E"
msgstr "O"
#. TRANS: Used in coordinates as abbreviation of west
#: lib/noticelist.php:457
#: lib/noticelist.php:458
msgid "W"
msgstr "W"
#: lib/noticelist.php:459
#: lib/noticelist.php:460
#, php-format
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"
#: lib/noticelist.php:468
#: lib/noticelist.php:469
msgid "at"
msgstr "op"
#: lib/noticelist.php:517
#: lib/noticelist.php:518
msgid "web"
msgstr ""
#: lib/noticelist.php:583
#: lib/noticelist.php:584
msgid "in context"
msgstr "in konteks"
#: lib/noticelist.php:618
#: lib/noticelist.php:619
msgid "Repeated by"
msgstr "Herhaal deur"
#: lib/noticelist.php:645
#: lib/noticelist.php:646
#, fuzzy
msgid "Reply to this notice"
msgstr "Verwyder hierdie kennisgewing"
#: lib/noticelist.php:646
#: lib/noticelist.php:647
msgid "Reply"
msgstr "Antwoord"
#: lib/noticelist.php:690
#: lib/noticelist.php:691
#, fuzzy
msgid "Notice repeated"
msgstr "Hierdie kennisgewing is verwyder."
@ -8439,7 +8669,7 @@ msgid "Revoke the \"%s\" role from this user"
msgstr "Blok hierdie gebruiker van hierdie groep"
#. TRANS: Client error on action trying to visit a non-existing page.
#: lib/router.php:957
#: lib/router.php:974
#, fuzzy
msgid "Page not found."
msgstr "Die API-funksie is nie gevind nie."
@ -8803,21 +9033,7 @@ msgid "Invalid XML, missing XRD root."
msgstr ""
#. 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
msgid "Getting backup from file '%s'."
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 ""
"Project-Id-Version: StatusNet - Core\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:20+0000\n"
"POT-Creation-Date: 2011-01-14 23:32+0000\n"
"PO-Revision-Date: 2011-01-14 23:35:26+0000\n"
"Language-Team: Vietnamese <http://translatewiki.net/wiki/Portal:vi>\n"
"Content-Type: text/plain; charset=UTF-8\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-Language-Code: vi\n"
"X-Message-Group: #out-statusnet-core\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: 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/apistatusnetversion.php:91 actions/apisubscriptions.php:109
#: 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/apitimelineretweetedtome.php:118
#: 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/apiaccountupdateprofilebackgroundimage.php:199
#: 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/replies.php:80 actions/usergroups.php:100 lib/galleryaction.php:66
#: 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: Validation error in form for profile settings.
#: 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
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."
@ -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: Validation error in form for profile settings.
#: 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
msgid "Not a valid nickname."
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.
#: actions/apigroupcreate.php:181 actions/editapplication.php:233
#: 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
msgid "Homepage is not a valid 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: Validation error in form for profile settings.
#: 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
msgid "Full name is too long (maximum 255 characters)."
msgstr ""
@ -603,7 +604,7 @@ msgstr ""
#. TRANS: %d is the maximum number of allowed characters.
#: actions/apigroupcreate.php:201 actions/editapplication.php:201
#: actions/editgroup.php:209 actions/newapplication.php:178
#: actions/newgroup.php:149
#: actions/newgroup.php:156
#, php-format
msgid "Description is too long (maximum %d character)."
msgid_plural "Description is too long (maximum %d characters)."
@ -614,7 +615,7 @@ msgstr[0] ""
#. TRANS: Group create form validation error.
#. TRANS: Validation error in form for profile settings.
#: 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
msgid "Location is too long (maximum 255 characters)."
msgstr ""
@ -626,7 +627,7 @@ msgstr ""
#. TRANS: Group create form validation error.
#. TRANS: %d is the maximum number of allowed aliases.
#: actions/apigroupcreate.php:236 actions/editgroup.php:229
#: actions/newgroup.php:169
#: actions/newgroup.php:176
#, php-format
msgid "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 create form validation error.
#: actions/apigroupcreate.php:264 actions/editgroup.php:244
#: actions/newgroup.php:184
#: actions/newgroup.php:191
#, fuzzy, php-format
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."
@ -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 create form validation error.
#: 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."
msgstr ""
@ -956,9 +957,10 @@ msgstr "Không thể xóa tin nhắn này."
msgid "Already repeated that notice."
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/atompubmembershipfeed.php:106 actions/atompubshowfavorite.php:116
#: actions/atompubshowsubscription.php:118
#: actions/atompubshowsubscription.php:122
#: actions/atompubsubscriptionfeed.php:109
msgid "HTTP method not supported."
msgstr ""
@ -1044,7 +1046,7 @@ msgstr ""
#. TRANS: Server error displayed when generating an Atom feed fails.
#. TRANS: %s is the error.
#: actions/apitimelinegroup.php:138
#: actions/apitimelinegroup.php:134
#, php-format
msgid "Could not generate feed for group - %s"
msgstr ""
@ -1135,30 +1137,30 @@ msgstr ""
#. TRANS: Client error displayed when not using the POST verb.
#. TRANS: Do not translate POST.
#: actions/apitimelineuser.php:332
#: actions/apitimelineuser.php:334
msgid "Can only handle POST activities."
msgstr ""
#. TRANS: Client error displayed when using an unsupported activity object type.
#. TRANS: %s is the unsupported activity object type.
#: actions/apitimelineuser.php:343
#: actions/apitimelineuser.php:345
#, php-format
msgid "Cannot handle activity object type \"%s\"."
msgstr ""
#. TRANS: Client error displayed when posting a notice without content through the API.
#: actions/apitimelineuser.php:376
#: actions/apitimelineuser.php:378
#, fuzzy, php-format
msgid "No content for notice %d."
msgstr "Tìm theo nội dung của tin nhắn"
#. TRANS: Client error displayed when using another format than AtomPub.
#: actions/apitimelineuser.php:404
#: actions/apitimelineuser.php:406
#, php-format
msgid "Notice with URI \"%s\" already exists."
msgstr ""
#: actions/apitimelineuser.php:435
#: actions/apitimelineuser.php:437
#, php-format
msgid "AtomPub post with unknown attention URI %s"
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."
#. 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."
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"
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:81
#: actions/atompubshowsubscription.php:83
#: actions/atompubsubscriptionfeed.php:74
#, fuzzy, php-format
msgid "No such profile id: %d"
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
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:"
#: actions/atompubshowsubscription.php:154
#. TRANS: Client exception thrown when trying to delete a subscription of another user.
#: actions/atompubshowsubscription.php:157
#, 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."
#: actions/atompubsubscriptionfeed.php:150
@ -1387,13 +1394,15 @@ msgid "Preview"
msgstr "Xem trước"
#. 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"
msgid "Delete"
msgstr ""
#. 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"
msgid "Upload"
msgstr ""
@ -1436,6 +1445,37 @@ msgstr "Cập nhật hình đại diện không thành công."
msgid "Avatar deleted."
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.
#: actions/block.php:68
#, fuzzy
@ -1643,6 +1683,76 @@ msgstr "Thành phố"
msgid "Notices"
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.
#: actions/deleteapplication.php:62
#, fuzzy
@ -1792,7 +1902,7 @@ msgid "Do not delete this notice"
msgstr "Không thể xóa tin nhắn này."
#. 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
msgid "Delete this notice"
msgstr "Xóa tin nhắn"
@ -2121,7 +2231,7 @@ msgstr ""
#. TRANS: Group edit 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
msgid "Invalid alias: \"%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 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
msgid "Could not create aliases."
msgstr "Không thể tạo favorite."
@ -3395,8 +3505,14 @@ msgstr "Không thể tạo favorite."
msgid "New group"
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.
#: actions/newgroup.php:110
#: actions/newgroup.php:117
msgid "Use this form to create a new group."
msgstr ""
@ -3721,11 +3837,6 @@ msgstr "Mật khẩu mới"
msgid "6 or more characters"
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
msgid "Same as password above"
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."
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
#, php-format
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."
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"
msgstr "Khởi tạo"
@ -4768,6 +4885,92 @@ msgstr ""
msgid "Replies to %1$s on %2$s!"
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
#, fuzzy
msgid "You cannot revoke user roles on this site."
@ -4877,7 +5080,7 @@ msgid "Reset key & secret"
msgstr ""
#: 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"
msgstr "Xóa"
@ -6133,14 +6336,14 @@ msgid "Author(s)"
msgstr ""
#. 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
msgid "Favor"
msgstr "Ưa thích"
#. 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.
#: classes/Fave.php:154
#: classes/Fave.php:167
#, php-format
msgid "%1$s marked notice %2$s as a favorite."
msgstr ""
@ -6249,7 +6452,7 @@ msgid "Could not create login token for %s"
msgstr "Không thể tạo favorite."
#. 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."
msgstr ""
@ -6277,74 +6480,74 @@ msgid "No such profile (%1$d) for notice (%2$d)."
msgstr ""
#. TRANS: Server exception. %s are the error details.
#: classes/Notice.php:193
#: classes/Notice.php:199
#, php-format
msgid "Database error inserting hashtag: %s"
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.
#: classes/Notice.php:270
#: classes/Notice.php:279
#, fuzzy
msgid "Problem saving notice. Too long."
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.
#: classes/Notice.php:275
#: classes/Notice.php:284
#, fuzzy
msgid "Problem saving notice. Unknown user."
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.
#: classes/Notice.php:281
#: classes/Notice.php:290
msgid ""
"Too many notices too fast; take a breather and post again in a few minutes."
msgstr ""
#. 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 ""
"Too many duplicate messages too quickly; take a breather and post again in a "
"few minutes."
msgstr ""
#. 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."
msgstr ""
#. TRANS: Server exception thrown when a notice cannot be saved.
#. 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."
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().
#: classes/Notice.php:913
#: classes/Notice.php:914
msgid "Bad type provided to saveKnownGroups."
msgstr ""
#. TRANS: Server exception thrown when an update for a group inbox fails.
#: classes/Notice.php:1012
#: classes/Notice.php:1013
#, fuzzy
msgid "Problem saving group inbox."
msgstr "Có lỗi xảy ra khi lưu tin nhắn."
#. 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.
#: classes/Notice.php:1126
#: classes/Notice.php:1127
#, php-format
msgid "Could not save reply for %1$d, %2$d."
msgstr ""
#. 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.
#: classes/Notice.php:1645
#: classes/Notice.php:1646
#, php-format
msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s"
#. 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
msgctxt "FANCYNAME"
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: %1$s is the role name, %2$s is the user ID (number).
#: classes/Profile.php:798
#: classes/Profile.php:765
#, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; does not exist."
msgstr ""
#. 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).
#: classes/Profile.php:807
#: classes/Profile.php:774
#, php-format
msgid "Cannot revoke role \"%1$s\" for user #%2$d; database error."
msgstr ""
@ -6434,33 +6637,33 @@ msgid "Welcome to %1$s, @%2$s!"
msgstr "%s chào mừng bạn "
#. TRANS: Server exception.
#: classes/User.php:923
#: classes/User.php:918
msgid "No single user defined for single-user mode."
msgstr ""
#. TRANS: Server exception.
#: classes/User.php:927
#: classes/User.php:922
msgid "Single-user mode code called when not enabled."
msgstr ""
#. TRANS: Server exception thrown when creating a group failed.
#: classes/User_group.php:511
#: classes/User_group.php:516
#, fuzzy
msgid "Could not create group."
msgstr "Không thể tạo favorite."
#. 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."
msgstr "Không thể lưu hồ sơ cá nhân."
#. 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."
msgstr "Không thể cập nhật thành viên."
#. 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."
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"
#: lib/action.php:577
#, fuzzy
msgctxt "TOOLTIP"
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
#: lib/action.php:580
@ -6816,10 +7018,57 @@ msgstr "Trước"
msgid "Expecting a root feed element but got a whole XML document."
msgstr ""
#: lib/activity.php:360
msgid "Post"
#. 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 "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 ""
#. 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.
#: lib/activityutils.php:200
msgid "Can't handle remote content yet."
@ -7113,10 +7362,16 @@ msgctxt "BUTTON"
msgid "Revoke"
msgstr "Khôi phục"
#: lib/atom10feed.php:112
msgid "author element must contain a name element."
#: lib/atom10feed.php:113
msgid "Author element must contain a name element."
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.
#: lib/attachmentlist.php:294
msgid "Author"
@ -7507,24 +7762,24 @@ msgid ""
msgstr ""
#. 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."
msgstr ""
#. 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).
#: lib/common.php:150
#: lib/common.php:153
msgid "I looked for configuration files in the following places:"
msgstr ""
#. 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."
msgstr ""
#. 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.
#: lib/common.php:157
#: lib/common.php:160
msgid "Go to the installer."
msgstr ""
@ -7627,6 +7882,19 @@ msgstr ""
msgid "FOAF"
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).
#: lib/feedlist.php:66
msgid "Feeds"
@ -7809,11 +8077,6 @@ msgstr ""
msgid "Partial upload."
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
msgid "Not an image or corrupt file."
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."
msgstr ""
#: lib/mailbox.php:228 lib/noticelist.php:521
#: lib/mailbox.php:228 lib/noticelist.php:522
#, fuzzy
msgid "from"
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."
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.
#: lib/mediafile.php:238 lib/mediafile.php:281
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: %1$s is the file type that was denied, %2$s is the application part of
#. TRANS: the MIME type that was denied.
#: lib/mediafile.php:394
#: lib/mediafile.php:396
#, php-format
msgid ""
"\"%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: %s is the file type that was denied.
#: lib/mediafile.php:399
#: lib/mediafile.php:401
#, php-format
msgid "\"%s\" is not a supported file type on this server."
msgstr ""
@ -8288,17 +8519,17 @@ msgid "Send"
msgstr "Gửi"
#. 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."
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.
#: lib/nickname.php:176
#: lib/nickname.php:178
msgid "Nickname cannot be empty."
msgstr ""
#. TRANS: Validation error in form for registration, profile and group settings, etc.
#: lib/nickname.php:189
#: lib/nickname.php:191
#, php-format
msgid "Nickname cannot be more than %d character long."
msgid_plural "Nickname cannot be more than %d characters long."
@ -8339,58 +8570,58 @@ msgid ""
msgstr ""
#. TRANS: Used in coordinates as abbreviation of north
#: lib/noticelist.php:451
#: lib/noticelist.php:452
#, fuzzy
msgid "N"
msgstr "Không"
#. TRANS: Used in coordinates as abbreviation of south
#: lib/noticelist.php:453
#: lib/noticelist.php:454
msgid "S"
msgstr ""
#. TRANS: Used in coordinates as abbreviation of east
#: lib/noticelist.php:455
#: lib/noticelist.php:456
msgid "E"
msgstr ""
#. TRANS: Used in coordinates as abbreviation of west
#: lib/noticelist.php:457
#: lib/noticelist.php:458
msgid "W"
msgstr ""
#: lib/noticelist.php:459
#: lib/noticelist.php:460
#, php-format
msgid "%1$u°%2$u'%3$u\"%4$s %5$u°%6$u'%7$u\"%8$s"
msgstr ""
#: lib/noticelist.php:468
#: lib/noticelist.php:469
msgid "at"
msgstr ""
#: lib/noticelist.php:517
#: lib/noticelist.php:518
msgid "web"
msgstr ""
#: lib/noticelist.php:583
#: lib/noticelist.php:584
#, fuzzy
msgid "in context"
msgstr "Không có nội dung!"
#: lib/noticelist.php:618
#: lib/noticelist.php:619
#, fuzzy
msgid "Repeated by"
msgstr "Tạo"
#: lib/noticelist.php:645
#: lib/noticelist.php:646
msgid "Reply to this notice"
msgstr "Không thể xóa tin nhắn này."
#: lib/noticelist.php:646
#: lib/noticelist.php:647
msgid "Reply"
msgstr "Trả lời"
#: lib/noticelist.php:690
#: lib/noticelist.php:691
msgid "Notice repeated"
msgstr "Tìm kiếm thông báo"
@ -8553,7 +8784,7 @@ msgid "Revoke the \"%s\" role from this user"
msgstr "Ban user"
#. TRANS: Client error on action trying to visit a non-existing page.
#: lib/router.php:957
#: lib/router.php:974
msgid "Page not found."
msgstr ""
@ -8911,19 +9142,7 @@ msgid "Invalid XML, missing XRD root."
msgstr ""
#. 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
msgid "Getting backup from file '%s'."
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
#
# Author: EugeneZelenko
@ -9,14 +9,14 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - APC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:29+0000\n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:43+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:22+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
"X-POT-Import-Date: 2011-01-10 18:25:57+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: be-tarask\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
#
# Author: EugeneZelenko
@ -10,14 +10,14 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:23+0000\n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:40+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-30 20:40:24+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\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: be-tarask\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n"

View File

@ -9,13 +9,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Adsense\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:26+0000\n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:40+0000\n"
"Language-Team: Galician <http://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-30 20:40:24+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\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: gl\n"
"X-Message-Group: #out-statusnet-plugin-adsense\n"
@ -78,7 +78,7 @@ msgstr ""
#: adsenseadminpanel.php:188
msgid "Leaderboard"
msgstr ""
msgstr "Taboleiro de logros"
#: adsenseadminpanel.php:189
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
#
# Author: EugeneZelenko
@ -10,14 +10,14 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - AnonymousFave\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:28+0000\n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:42+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:21+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\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: be-tarask\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
#
# Author: EugeneZelenko
@ -9,14 +9,14 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - AutoSandbox\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-16 15:08+0000\n"
"PO-Revision-Date: 2010-12-16 15:11:30+0000\n"
"POT-Creation-Date: 2011-01-14 10:29+0000\n"
"PO-Revision-Date: 2011-01-14 10:32:44+0000\n"
"Language-Team: Belarusian (Taraškievica orthography) <http://translatewiki."
"net/wiki/Portal:be-tarask>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2010-11-29 19:38:24+0000\n"
"X-Generator: MediaWiki 1.18alpha (r78478); Translate extension (2010-09-17)\n"
"X-POT-Import-Date: 2011-01-10 18:25:57+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: be-tarask\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