]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groupsearch.php
Don't send multiple error responses in ApiMediaUpload :)
[quix0rs-gnu-social.git] / actions / groupsearch.php
index f0cca715615aa3940b5a145507d2f915467a1a2d..fce5c2b16a7885bb6b07d47bcbbbc0f24bc0f9c3 100644 (file)
@@ -49,12 +49,14 @@ class GroupsearchAction extends SearchAction
 {
     function getInstructions()
     {
+        // TRANS: Instructions for page where groups can be searched. %%site.name%% is the name of the StatusNet site.
         return _('Search for groups on %%site.name%% by their name, location, or description. ' .
                   'Separate the terms by spaces; they must be 3 characters or more.');
     }
 
     function title()
     {
+        // TRANS: Title for page where groups can be searched.
         return _('Group search');
     }
 
@@ -76,12 +78,17 @@ class GroupsearchAction extends SearchAction
             $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
                           $page, 'groupsearch', array('q' => $q));
         } else {
+            // TRANS: Text on page where groups can be searched if no results were found for a query.
             $this->element('p', 'error', _('No results.'));
             $this->searchSuggestions($q);
             if (common_logged_in()) {
-                $message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
+                // TRANS: Additional text on page where groups can be searched if no results were found for a query for a logged in user.
+                // TRANS: This message contains Markdown links in the form [link text](link).
+                $message = _('If you cannot find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
             }
             else {
+                // TRANS: Additional text on page where groups can be searched if no results were found for a query for a not logged in user.
+                // TRANS: This message contains Markdown links in the form [link text](link).
                 $message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
             }
             $this->elementStart('div', 'guide');
@@ -105,7 +112,7 @@ class GroupSearchResults extends GroupList
 
     function __construct($user_group, $terms, $action)
     {
-        parent::__construct($user_group, $terms, $action);
+        parent::__construct($user_group, null, $action);
         $this->terms = array_map('preg_quote',
                                  array_map('htmlspecialchars', $terms));
         $this->pattern = '/('.implode('|',$terms).')/i';
@@ -116,4 +123,3 @@ class GroupSearchResults extends GroupList
         return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
     }
 }
-