diff --git a/actions/logout.php b/actions/logout.php index 1e0adae575..f747371225 100644 --- a/actions/logout.php +++ b/actions/logout.php @@ -66,6 +66,7 @@ class LogoutAction extends Action { parent::handle($args); if (!common_logged_in()) { + // TRANS: Client error displayed trying to log out when not logged in. $this->clientError(_('Not logged in.')); } else { if (Event::handle('StartLogout', array($this))) { @@ -83,5 +84,4 @@ class LogoutAction extends Action common_real_login(false); // not logged in common_forgetme(); // don't log back in! } - } diff --git a/actions/noticesearch.php b/actions/noticesearch.php index d0673420d6..de1e7001f4 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -48,7 +48,6 @@ require_once INSTALLDIR.'/lib/searchaction.php'; */ class NoticesearchAction extends SearchAction { - function prepare($args) { parent::prepare($args); @@ -65,6 +64,8 @@ class NoticesearchAction extends SearchAction */ function getInstructions() { + // TRANS: Instructions for Notice search page. + // TRANS: %%site.name%% is the name of the StatusNet site. return _('Search for notices on %%site.name%% by their contents. Separate search terms by spaces; they must be 3 characters or more.'); } @@ -75,6 +76,7 @@ class NoticesearchAction extends SearchAction */ function title() { + // TRANS: Title of the page where users can search for notices. return _('Text search'); } @@ -88,6 +90,8 @@ class NoticesearchAction extends SearchAction return array(new Feed(Feed::RSS1, common_local_url('noticesearchrss', array('q' => $q)), + // TRANS: Test in RSS notice search. + // TRANS: %1$s is the query, %2$s is the StatusNet site name. sprintf(_('Search results for "%1$s" on %2$s'), $q, common_config('site', 'name')))); } @@ -114,13 +118,18 @@ class NoticesearchAction extends SearchAction $cnt = $notice->find(); } if ($cnt === 0) { + // TRANS: Text for notice search results is the query had no results. $this->element('p', 'error', _('No results.')); $this->searchSuggestions($q); if (common_logged_in()) { + // TRANS: Text for logged in users making a query for notices without results. + // TRANS: This message contains a Markdown link. $message = sprintf(_('Be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q)); } else { + // TRANS: Text for not logged in users making a query for notices without results. + // TRANS: This message contains Markdown links. $message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q)); } @@ -203,4 +212,3 @@ class SearchNoticeListItem extends NoticeListItem { return $result; } } - diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index a59e7b99be..14c280f62c 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -48,12 +48,11 @@ require_once INSTALLDIR.'/lib/rssaction.php'; */ class NoticesearchrssAction extends Rss10Action { - function init() { return true; } - + function prepare($args) { parent::prepare($args); @@ -63,7 +62,6 @@ class NoticesearchrssAction extends Rss10Action function getNotices($limit=0) { - $q = $this->trimmed('q'); $notices = array(); @@ -93,9 +91,12 @@ class NoticesearchrssAction extends Rss10Action { $q = $this->trimmed('q'); $c = array('url' => common_local_url('noticesearchrss', array('q' => $q)), + // TRANS: RSS notice search feed title. %s is the query. 'title' => sprintf(_('Updates with "%s"'), $q), 'link' => common_local_url('noticesearch', array('q' => $q)), - 'description' => sprintf(_('Updates matching search term "%1$s" on %2$s!'), + // TRANS: RSS notice search feed description. + // TRANS: %1$s is the query, %2$s is the StatusNet site name. + 'description' => sprintf(_('Updates matching search term "%1$s" on %2$s.'), $q, common_config('site', 'name'))); return $c; } diff --git a/actions/opensearch.php b/actions/opensearch.php index 861b53d7d8..7bf32277bb 100644 --- a/actions/opensearch.php +++ b/actions/opensearch.php @@ -1,5 +1,4 @@ $q)); } else { + // TRANS: Message on the "People search" page where a query has no results. $this->element('p', 'error', _('No results.')); $this->searchSuggestions($q); $profile->free(); @@ -136,4 +140,3 @@ class PeopleSearchResultItem extends ProfileListItem return preg_replace($this->pattern, '\\1', htmlspecialchars($text)); } } - diff --git a/actions/publicrss.php b/actions/publicrss.php index 0c5d061cb6..11db3b37a4 100644 --- a/actions/publicrss.php +++ b/actions/publicrss.php @@ -1,5 +1,4 @@ common_local_url('publicrss') - , 'title' => sprintf(_('%s public timeline'), common_config('site', 'name')) - , 'link' => common_local_url('public') - , 'description' => sprintf(_('%s updates from everyone!'), common_config('site', 'name'))); + 'url' => common_local_url('publicrss'), + // TRANS: Public RSS feed title. %s is the StatusNet site name. + 'title' => sprintf(_('%s public timeline'), $sitename), + 'link' => common_local_url('public'), + // TRANS: Public RSS feed description. %s is the StatusNet site name. + 'description' => sprintf(_('%s updates from everyone.'), $sitename)); return $c; } @@ -110,7 +111,7 @@ class PublicrssAction extends Rss10Action * Get image. * * @return nothing - */ + */ function getImage() { // nop @@ -121,4 +122,3 @@ class PublicrssAction extends Rss10Action return true; } } - diff --git a/actions/repliesrss.php b/actions/repliesrss.php index 76aae21adb..86cd173d3c 100644 --- a/actions/repliesrss.php +++ b/actions/repliesrss.php @@ -25,7 +25,6 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); class RepliesrssAction extends Rss10Action { - var $user = null; function prepare($args) @@ -35,6 +34,7 @@ class RepliesrssAction extends Rss10Action $this->user = User::staticGet('nickname', $nickname); if (!$this->user) { + // TRANS: Client error displayed when providing a non-existing nickname in a RSS 1.0 action. $this->clientError(_('No such user.')); return false; } else { @@ -45,13 +45,12 @@ class RepliesrssAction extends Rss10Action function getNotices($limit=0) { - $user = $this->user; $notice = $user->getReplies(0, ($limit == 0) ? 48 : $limit); $notices = array(); - + while ($notice->fetch()) { $notices[] = clone($notice); } @@ -65,11 +64,14 @@ class RepliesrssAction extends Rss10Action $c = array('url' => common_local_url('repliesrss', array('nickname' => $user->nickname)), + // TRANS: RSS reply feed title. %s is a user nickname. 'title' => sprintf(_("Replies to %s"), $user->nickname), 'link' => common_local_url('replies', array('nickname' => $user->nickname)), - 'description' => sprintf(_('Replies to %1$s on %2$s!'), + // TRANS: RSS reply feed description. + // TRANS: %1$s is a user nickname, %2$s is the StatusNet site name. + 'description' => sprintf(_('Replies to %1$s on %2$s.'), $user->nickname, common_config('site', 'name'))); return $c; } diff --git a/actions/requesttoken.php b/actions/requesttoken.php index e095161a7d..3c8cea03c0 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -1,5 +1,4 @@ diff --git a/actions/unblock.php b/actions/unblock.php index 0f63e1dae0..1f4d9606b8 100644 --- a/actions/unblock.php +++ b/actions/unblock.php @@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class UnblockAction extends ProfileFormAction { function prepare($args) @@ -56,6 +55,7 @@ class UnblockAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasBlocked($this->profile)) { + // TRANS: Client error displayed when trying to unblock a non-blocked user. $this->clientError(_("You haven't blocked that user.")); return false; } @@ -68,7 +68,6 @@ class UnblockAction extends ProfileFormAction * * @return void */ - function handlePost() { $cur = common_current_user(); @@ -83,6 +82,7 @@ class UnblockAction extends ProfileFormAction } if (!$result) { + // TRANS: Server error displayed when removing a user block. $this->serverError(_('Error removing the block.')); return; } diff --git a/actions/userbyid.php b/actions/userbyid.php index f3e1556f3f..b8ccd0108e 100644 --- a/actions/userbyid.php +++ b/actions/userbyid.php @@ -1,5 +1,4 @@ trimmed('id'); if (!$id) { + // TRANS: Client error displayed trying to find a user by ID without providing an ID. $this->clientError(_('No ID.')); } $user = User::staticGet($id); if (!$user) { + // TRANS: Client error displayed trying to find a user by ID for a non-existing ID. $this->clientError(_('No such user.')); } diff --git a/actions/xrds.php b/actions/xrds.php index 534182e3ed..818cd1032c 100644 --- a/actions/xrds.php +++ b/actions/xrds.php @@ -1,5 +1,4 @@ trimmed('nickname'); $this->user = User::staticGet('nickname', $nickname); if (!$this->user) { + // TRANS: Client error displayed providing a non-existing nickname. $this->clientError(_('No such user.')); return; } @@ -110,7 +110,7 @@ class XrdsAction extends Action null, array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1)); $xrdsOutputter->elementEnd('XRD'); - + //omb $xrdsOutputter->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'xml:id' => 'omb', @@ -122,7 +122,7 @@ class XrdsAction extends Action $xrdsOutputter->showXrdsService(OMB_ENDPOINT_UPDATEPROFILE, common_local_url('updateprofile')); $xrdsOutputter->elementEnd('XRD'); - + Event::handle('EndUserXRDS', array($this,&$xrdsOutputter)); //misc @@ -135,7 +135,5 @@ class XrdsAction extends Action $xrdsOutputter->elementEnd('XRD'); $xrdsOutputter->endXRDS(); - } } -?>