X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Freplies.php;fp=actions%2Freplies.php;h=54109b7b9f40f731f7e428d8ff1960353248a36a;hb=84e5ca61581829298239a59895602fe637aff134;hp=fd178175d2be107efb344c623f7491e4a2edb526;hpb=902990bb724111b5f25d1e023d4dcf15c45a2d2b;p=quix0rs-gnu-social.git 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); }