X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fstream.php;h=a595958e44e27a8e806a49f205064b8917bdfd8f;hb=905ba4998b6388c5a5c23262beff276441d8c393;hp=58ac6e5d5cda221c082aa8769819c0367d1346cd;hpb=ed4854f52da11527016e20c20eea08d777b416ae;p=quix0rs-gnu-social.git diff --git a/lib/stream.php b/lib/stream.php index 58ac6e5d5c..a595958e44 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -19,8 +19,6 @@ if (!defined('LACONICA')) { exit(1); } -define('NOTICES_PER_PAGE', 20); - class StreamAction extends Action { function handle($args) { @@ -41,23 +39,23 @@ class StreamAction extends Action { common_menu_item(common_local_url('all', array('nickname' => $nickname)), - _t('Personal'), - (($user && $user->fullname) ? $user->fullname : $nickname) . _t(' and friends'), + _('Personal'), + sprintf(_('%s and friends'), (($user && $user->fullname) ? $user->fullname : $nickname)), $action == 'all'); common_menu_item(common_local_url('replies', array('nickname' => $nickname)), - _t('Replies'), - _t('Replies to ') . (($user && $user->fullname) ? $user->fullname : $nickname), + _('Replies'), + sprintf(_('Replies to %s'), (($user && $user->fullname) ? $user->fullname : $nickname)), $action == 'replies'); common_menu_item(common_local_url('showstream', array('nickname' => $nickname)), - _t('Profile'), + _('Profile'), ($user && $user->fullname) ? $user->fullname : $nickname, $action == 'showstream'); common_element_end('ul'); } - function show_notice($notice, $replied_id=NULL) { + function show_notice($notice) { global $config; $profile = $notice->getProfile(); # XXX: RDFa @@ -93,19 +91,19 @@ class StreamAction extends Action { 'href' => $noticeurl, 'title' => common_exact_date($notice->created)), common_date_string($notice->created)); - if ($replied_id) { - $replyurl = common_local_url('shownotice', array('notice' => $replied_id)); - common_text('('); + if ($notice->reply_to) { + $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to)); + common_text(' ('); common_element('a', array('class' => 'inreplyto', 'href' => $replyurl), - _t(' in reply to...')); + _('in reply to...')); common_text(')'); } - common_element_start('a', + common_element_start('a', array('href' => common_local_url('newnotice', array('replyto' => $profile->nickname)), 'onclick' => 'doreply("'.$profile->nickname.'"); return false', - 'title' => _t('reply'), + 'title' => _('reply'), 'class' => 'replybutton')); common_raw('→'); common_element_end('a');