Whitespace updates.
i18n/L10n updates.
* or Sphinx search backends.
*
* @param Notice $notice
- * @param string $search
+ * @param string $search
* @return boolean
*/
function matchSearch(Notice $notice, $search)
*
* @return boolean hook return
*/
-
function onEndSubGroupNav($widget)
{
$action = $widget->out;
if (!empty($searches) && count($searches) > 0) {
$searchSubMenu = new SearchSubMenu($menu->out, $user, $searches);
- $menu->submenu(_m('Searches'), $searchSubMenu);
+ // TRANS: Sub menu for searches.
+ $menu->submenu(_m('MENU','Searches'), $searchSubMenu);
}
}
return true;
}
-
}
*
* @see UnsubscribeForm
*/
-
class SearchSubForm extends Form
{
/**
* Name of search to subscribe to
*/
-
var $search = '';
/**
* @param HTMLOutputter $out output channel
* @param string $search name of search to subscribe to
*/
-
function __construct($out=null, $search=null)
{
parent::__construct($out);
*
* @return int ID of the form
*/
-
function id()
{
return 'search-subscribe-' . $this->search;
*
* @return string of the form class
*/
-
function formClass()
{
// class to match existing styles...
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('searchsub', array('search' => $this->search));
}
-
/**
* Legend of the Form
*
*/
function formLegend()
{
+ // TRANS: Form legend.
$this->out->element('legend', null, _m('Subscribe to this search'));
}
*
* @return void
*/
-
function formData()
{
$this->out->hidden('subscribeto-' . $this->search,
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this search'));
+ $this->out->submit('submit',
+ // TRANS: Button text for subscribing to a search.
+ _m('BUTTON','Subscribe'),
+ 'submit',
+ null,
+ // TRANS: Button title for subscribing to a search.
+ _m('Subscribe to this search.'));
}
}
$list[] = $all->search;
}
+ // TRANS: Separator for list of tracked searches.
+ $separator = _m('SEPARATOR','", "');
+
// TRANS: Message given having disabled all search subscriptions with 'track off'.
- $channel->output($cur, sprintf(_m('You are tracking searches for: %s'),
- '"' . implode('", "', $list) . '"'));
+ // TRANS: %s is a list of searches. Separator default is '", "'.
+ $channel->output($cur, sprintf(_m('You are tracking searches for: "%s".'),
+ implode($separator, $list)));
}
-}
\ No newline at end of file
+}
SearchSub::cancel($profile, $all->search);
} catch (Exception $e) {
// TRANS: Message given having failed to cancel one of the search subs with 'track off' command.
+ // TRANS: %s is the search for which the subscription removal failed.
$channel->error($cur, sprintf(_m('Error disabling search subscription for query "%s".'),
$all->search));
return;
// TRANS: Message given having disabled all search subscriptions with 'track off'.
$channel->output($cur, _m('Disabled all your search subscriptions.'));
}
-}
\ No newline at end of file
+}
if (!$searchsub) {
// TRANS: Error text shown a user tries to untrack a search query they're not subscribed to.
+ // TRANS: %s is the keyword for the search.
$channel->error($cur, sprintf(_m('You are not tracking the search "%s".'), $this->keyword));
return;
}
SearchSub::cancel($cur->getProfile(), $this->keyword);
} catch (Exception $e) {
// TRANS: Message given having failed to cancel a search subscription by untrack command.
+ // TRANS: %s is the keyword for the query.
$channel->error($cur, sprintf(_m('Could not end a search subscription for query "%s".'),
$this->keyword));
return;
}
// TRANS: Message given having removed a search subscription by untrack command.
+ // TRANS: %s is the keyword for the search.
$channel->output($cur, sprintf(_m('You are no longer subscribed to the search "%s".'),
$this->keyword));
}
-}
\ No newline at end of file
+}
*
* @see UnsubscribeForm
*/
-
class SearchUnsubForm extends SearchSubForm
{
/**
*
* @return int ID of the form
*/
-
function id()
{
return 'search-unsubscribe-' . $this->search;
}
-
/**
* class of the form
*
* @return string of the form class
*/
-
function formClass()
{
// class to match existing styles...
return 'form_user_unsubscribe ajax';
}
-
/**
* Action of the form
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('searchunsub', array('search' => $this->search));
}
-
/**
* Legend of the Form
*
*/
function formLegend()
{
+ // TRANS: Form legend.
$this->out->element('legend', null, _m('Unsubscribe from this search'));
}
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this search'));
+ $this->out->submit('submit',
+ // TRANS: Button text for unsubscribing from a text search.
+ _m('BUTTON','Unsubscribe'),
+ 'submit',
+ null,
+ // TRANS: Button title for unsubscribing from a text search.
+ _m('Unsubscribe from this search.'));
}
}