Superfluous whitespace removed.
L10n update.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class RepliesAction extends OwnerDesignAction
{
var $page = null;
*
* @return boolean success flag
*/
-
function prepare($args)
{
parent::prepare($args);
$this->user = User::staticGet('nickname', $nickname);
if (!$this->user) {
+ // TRANS: Client error displayed when trying to reply to a non-exsting user.
$this->clientError(_('No such user.'));
return false;
}
$profile = $this->user->getProfile();
if (!$profile) {
+ // TRANS: Server error displayed when trying to reply to a user without a profile.
$this->serverError(_('User has no profile.'));
return false;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return string title of page
*/
-
function title()
{
if ($this->page == 1) {
+ // TRANS: Title for first page of replies for a user.
+ // TRANS: %s is a user nickname.
return sprintf(_("Replies to %s"), $this->user->nickname);
} else {
+ // TRANS: Title for all but the first page of replies for a user.
+ // TRANS: %1$s is a user nickname, %2$d is a page number.
return sprintf(_('Replies to %1$s, page %2$d'),
$this->user->nickname,
$this->page);
*
* @return void
*/
-
function getFeeds()
{
return array(new Feed(Feed::RSS1,
common_local_url('repliesrss',
array('nickname' => $this->user->nickname)),
+ // TRANS: Link for feed with replies for a user.
+ // TRANS: %s is a user nickname.
sprintf(_('Replies feed for %s (RSS 1.0)'),
$this->user->nickname)),
new Feed(Feed::RSS2,
array(
'id' => $this->user->nickname,
'format' => 'rss')),
+ // TRANS: Link for feed with replies for a user.
+ // TRANS: %s is a user nickname.
sprintf(_('Replies feed for %s (RSS 2.0)'),
$this->user->nickname)),
new Feed(Feed::ATOM,
array(
'id' => $this->user->nickname,
'format' => 'atom')),
+ // TRANS: Link for feed with replies for a user.
+ // TRANS: %s is a user nickname.
sprintf(_('Replies feed for %s (Atom)'),
$this->user->nickname)));
}
*
* @return void
*/
-
function showContent()
{
$nl = new NoticeList($this->notice, $this);
function showEmptyListMessage()
{
- $message = sprintf(_('This is the timeline showing replies to %1$s but %2$s hasn\'t received a notice to them yet.'), $this->user->nickname, $this->user->nickname) . ' ';
+ // TRANS: Empty list message for page with replies for a user.
+ // TRANS: %1$s and %s$s are the user nickname.
+ $message = sprintf(_('This is the timeline showing replies to %1$s but %2$s hasn\'t received a notice to them yet.'),
+ $this->user->nickname,
+ $this->user->nickname) . ' ';
if (common_logged_in()) {
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
+ // TRANS: Empty list message for page with replies for a user for the logged in user.
+ // TRANS: This message contains a Markdown link in the form [link text](link).
$message .= _('You can engage other users in a conversation, subscribe to more people or [join groups](%%action.groups%%).');
} else {
+ // TRANS: Empty list message for page with replies for a user for all logged in users but the user themselves.
+ // TRANS: %1$s, %2$s and %3$s are a user nickname. This message contains a Markdown link in the form [link text](link).
$message .= sprintf(_('You can try to [nudge %1$s](../%2$s) or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
}
}
else {
+ // TRANS: Empty list message for page with replies for a user for not logged in users.
+ // TRANS: %1$s is a user nickname. This message contains a Markdown link in the form [link text](link).
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to them.'), $this->user->nickname);
}
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class RevokeRoleAction extends ProfileFormAction
{
/**
*
* @return boolean success flag
*/
-
function prepare($args)
{
if (!parent::prepare($args)) {
return false;
}
-
+
$this->role = $this->arg('role');
if (!Profile_role::isValid($this->role)) {
+ // TRANS: Client error displayed when trying to revoke an invalid role.
$this->clientError(_('Invalid role.'));
return false;
}
if (!Profile_role::isSettable($this->role)) {
+ // TRANS: Client error displayed when trying to revoke a reserved role.
$this->clientError(_('This role is reserved and cannot be set.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::REVOKEROLE)) {
+ // TRANS: Client error displayed when trying to revoke a role without having the right to do that.
$this->clientError(_('You cannot revoke user roles on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if (!$this->profile->hasRole($this->role)) {
- $this->clientError(_("User doesn't have this role."));
+ // TRANS: Client error displayed when trying to revoke a role that is not set.
+ $this->clientError(_('User does not have this role.'));
return false;
}
*
* @return void
*/
-
function handlePost()
{
$this->profile->revokeRole($this->role);
$this->user = User::staticGet('nickname', $nickname);
if (empty($this->user)) {
+ // TRANS: Client error.
$this->clientError(_('No such user.'), 404);
return false;
}
$this->elementStart('rsd', array('version' => '1.0',
'xmlns' => $rsdNS));
$this->elementStart('service');
+ // TRANS: Engine name for RSD.
$this->element('engineName', null, _('StatusNet'));
$this->element('engineLink', null, 'http://status.net/');
$this->elementStart('apis');
'alt' => $nickname));
}
+ // TRANS: Label for nickname on user authorisation page.
$this->element('div', 'entity_nickname', _('Nickname'));
$hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname';
'userauthorization')));
$this->hidden('token', common_session_token());
- // TRANS: Button text on Authorise Subscription page.
- $this->submit('accept', _m('BUTTON','Accept'), 'submit accept', null,
+ $this->submit('accept',
+ // TRANS: Button text on Authorise Subscription page.
+ _m('BUTTON','Accept'), 'submit accept', null,
// TRANS: Title for button on Authorise Subscription page.
_('Subscribe to this user.'));
- // TRANS: Button text on Authorise Subscription page.
- $this->submit('reject', _m('BUTTON','Reject'), 'submit reject', null,
+ $this->submit('reject',
+ // TRANS: Button text on Authorise Subscription page.
+ _m('BUTTON','Reject'), 'submit reject', null,
// TRANS: Title for button on Authorise Subscription page.
_('Reject this subscription.'));
$this->elementEnd('form');
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class UsergroupsAction extends OwnerDesignAction
{
var $page = null;
function title()
{
if ($this->page == 1) {
- // TRANS: Message is used as a page title. %s is a nick name.
+ // TRANS: Page title for first page of groups for a user.
+ // TRANS: %s is a nickname.
return sprintf(_('%s groups'), $this->user->nickname);
} else {
- // TRANS: Message is used as a page title. %1$s is a nick name, %2$d is a page number.
+ // TRANS: Page title for all but the first page of groups for a user.
+ // TRANS: %1$s is a nickname, %2$d is a page number.
return sprintf(_('%1$s groups, page %2$d'),
$this->user->nickname,
$this->page);
$this->user = User::staticGet('nickname', $nickname);
if (!$this->user) {
+ // TRANS: Client error displayed requesting groups for a non-existing user.
$this->clientError(_('No such user.'), 404);
return false;
}
$this->profile = $this->user->getProfile();
if (!$this->profile) {
+ // TRANS: Server error displayed requesting groups for a user without a profile.
$this->serverError(_('User has no profile.'));
return false;
}
$this->elementStart('p', array('id' => 'new_group'));
$this->element('a', array('href' => common_local_url('newgroup'),
'class' => 'more'),
+ // TRANS: Link text on group page to create a new group.
_('Create a new group'));
$this->elementEnd('p');
$this->elementStart('p', array('id' => 'group_search'));
$this->element('a', array('href' => common_local_url('groupsearch'),
'class' => 'more'),
+ // TRANS: Link text on group page to search for groups.
_('Search for more groups'));
$this->elementEnd('p');
function showEmptyListMessage()
{
+ // TRANS: Text on group page for a user that is not a member of any group.
+ // TRANS: %s is a user nickname.
$message = sprintf(_('%s is not a member of any group.'), $this->user->nickname) . ' ';
if (common_logged_in()) {
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
+ // TRANS: Text on group page for a user that is not a member of any group. This message contains
+ // TRANS: a Markdown link in the form [link text](link) and a variable that should not be changed.
$message .= _('Try [searching for groups](%%action.groupsearch%%) and joining them.');
}
}