X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fprofilecompletion.php;h=045bf68a7fcbf2a01ae669af5c0bc1cdc7e2ad79;hb=0e439117a75698629c5066d0241ab41dc07b5ee1;hp=8208f3bd376614fda740d8a62706e85ef7206889;hpb=31c1177970124cee31823cab3a11542c23b4126d;p=quix0rs-gnu-social.git diff --git a/actions/profilecompletion.php b/actions/profilecompletion.php index 8208f3bd37..045bf68a7f 100644 --- a/actions/profilecompletion.php +++ b/actions/profilecompletion.php @@ -68,7 +68,6 @@ class ProfilecompletionAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -78,6 +77,7 @@ class ProfilecompletionAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -88,6 +88,7 @@ class ProfilecompletionAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -96,13 +97,16 @@ class ProfilecompletionAction extends Action $this->peopletag = Profile_list::staticGet('id', $id); if (empty($this->peopletag)) { - $this->clientError(_('No such peopletag.')); + // TRANS: Client error displayed trying to reference a non-existing list. + $this->clientError(_('No such list.')); return false; } $field = $this->arg('field'); if (!in_array($field, array('fulltext', 'nickname', 'fullname', 'description', 'location', 'uri'))) { - $this->clientError(sprintf(_('Unidentified field %s'), htmlspecialchars($field)), 404); + // TRANS: Client error displayed when trying to add an unindentified field to profile. + // TRANS: %s is a field name. + $this->clientError(sprintf(_('Unidentified field %s.'), htmlspecialchars($field)), 404); return false; } $this->field = $field; @@ -126,7 +130,8 @@ class ProfilecompletionAction extends Action $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Search results')); + // TRANS: Page title. + $this->element('title', null, _m('TITLE','Search results')); $this->elementEnd('head'); $this->elementStart('body'); $profiles = $this->getResults(); @@ -141,6 +146,7 @@ class ProfilecompletionAction extends Action } $this->elementEnd('ul'); } else { + // TRANS: Output when there are no results for a search. $this->element('p', 'error', _('No results.')); } } @@ -154,7 +160,8 @@ class ProfilecompletionAction extends Action $q = $this->arg('q'); $q = strtolower($q); if (strlen($q) < 3) { - $this->msg = _('The search string must be atleast 3 characters long'); + // TRANS: Error message in case a search is shorter than three characters. + $this->msg = _('The search string must be at least 3 characters long.'); } $page = $this->arg('page'); $page = (int) (empty($page) ? 1 : $page); @@ -172,6 +179,7 @@ class ProfilecompletionAction extends Action else { $cnt = $profile->find(); } + // @todo FIXME: Call-time pass-by-reference has been deprecated. Event::handle('EndProfileCompletionSearch', $this, &$profile, $search_engine); }