diff --git a/actions/replies.php b/actions/replies.php index fd178175d2..54109b7b9f 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/feedlist.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 RepliesAction extends OwnerDesignAction { var $page = null; @@ -60,7 +59,6 @@ class RepliesAction extends OwnerDesignAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -70,6 +68,7 @@ class RepliesAction extends OwnerDesignAction $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; } @@ -77,6 +76,7 @@ class RepliesAction extends OwnerDesignAction $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; } @@ -105,7 +105,6 @@ class RepliesAction extends OwnerDesignAction * * @return void */ - function handle($args) { parent::handle($args); @@ -119,12 +118,15 @@ class RepliesAction extends OwnerDesignAction * * @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); @@ -136,12 +138,13 @@ class RepliesAction extends OwnerDesignAction * * @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, @@ -149,6 +152,8 @@ class RepliesAction extends OwnerDesignAction 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, @@ -156,6 +161,8 @@ class RepliesAction extends OwnerDesignAction 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))); } @@ -167,7 +174,6 @@ class RepliesAction extends OwnerDesignAction * * @return void */ - function showContent() { $nl = new NoticeList($this->notice, $this); @@ -184,17 +190,27 @@ class RepliesAction extends OwnerDesignAction 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); } diff --git a/actions/revokerole.php b/actions/revokerole.php index c67b70fdaf..1218c9e923 100644 --- a/actions/revokerole.php +++ b/actions/revokerole.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class RevokeRoleAction extends ProfileFormAction { /** @@ -50,19 +49,20 @@ 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; } @@ -72,6 +72,7 @@ class RevokeRoleAction extends ProfileFormAction 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; } @@ -79,7 +80,8 @@ class RevokeRoleAction extends ProfileFormAction 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; } @@ -91,7 +93,6 @@ class RevokeRoleAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->revokeRole($this->role); diff --git a/actions/rsd.php b/actions/rsd.php index 0a70117498..f99b86e1a4 100644 --- a/actions/rsd.php +++ b/actions/rsd.php @@ -110,6 +110,7 @@ class RsdAction extends Action $this->user = User::staticGet('nickname', $nickname); if (empty($this->user)) { + // TRANS: Client error. $this->clientError(_('No such user.'), 404); return false; } @@ -139,6 +140,7 @@ class RsdAction extends Action $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'); diff --git a/actions/userauthorization.php b/actions/userauthorization.php index c86f4cdaa1..d9cdc660fd 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -142,6 +142,7 @@ class UserauthorizationAction extends Action 'alt' => $nickname)); } + // TRANS: Label for nickname on user authorisation page. $this->element('div', 'entity_nickname', _('Nickname')); $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname'; @@ -196,12 +197,14 @@ class UserauthorizationAction extends Action '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'); diff --git a/actions/usergroups.php b/actions/usergroups.php index b0514bec4b..f9063d8867 100644 --- a/actions/usergroups.php +++ b/actions/usergroups.php @@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/grouplist.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 UsergroupsAction extends OwnerDesignAction { var $page = null; @@ -59,10 +58,12 @@ class UsergroupsAction extends OwnerDesignAction 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); @@ -90,6 +91,7 @@ class UsergroupsAction extends OwnerDesignAction $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; } @@ -97,6 +99,7 @@ class UsergroupsAction extends OwnerDesignAction $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; } @@ -123,12 +126,14 @@ class UsergroupsAction extends OwnerDesignAction $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'); @@ -156,11 +161,15 @@ class UsergroupsAction extends OwnerDesignAction 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.'); } }