Update translator documentation.

Whitespace updates.
i18n/L10n updates.
This commit is contained in:
Siebrand Mazeland 2011-06-05 20:42:11 +02:00
parent 8807705bb4
commit 49eb66c57e
6 changed files with 32 additions and 28 deletions

View File

@ -181,7 +181,7 @@ class SearchSubPlugin extends Plugin
* or Sphinx search backends. * or Sphinx search backends.
* *
* @param Notice $notice * @param Notice $notice
* @param string $search * @param string $search
* @return boolean * @return boolean
*/ */
function matchSearch(Notice $notice, $search) function matchSearch(Notice $notice, $search)
@ -226,7 +226,6 @@ class SearchSubPlugin extends Plugin
* *
* @return boolean hook return * @return boolean hook return
*/ */
function onEndSubGroupNav($widget) function onEndSubGroupNav($widget)
{ {
$action = $widget->out; $action = $widget->out;
@ -296,11 +295,11 @@ class SearchSubPlugin extends Plugin
if (!empty($searches) && count($searches) > 0) { if (!empty($searches) && count($searches) > 0) {
$searchSubMenu = new SearchSubMenu($menu->out, $user, $searches); $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; return true;
} }
} }

View File

@ -46,13 +46,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* *
* @see UnsubscribeForm * @see UnsubscribeForm
*/ */
class SearchSubForm extends Form class SearchSubForm extends Form
{ {
/** /**
* Name of search to subscribe to * Name of search to subscribe to
*/ */
var $search = ''; var $search = '';
/** /**
@ -61,7 +59,6 @@ class SearchSubForm extends Form
* @param HTMLOutputter $out output channel * @param HTMLOutputter $out output channel
* @param string $search name of search to subscribe to * @param string $search name of search to subscribe to
*/ */
function __construct($out=null, $search=null) function __construct($out=null, $search=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -74,7 +71,6 @@ class SearchSubForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'search-subscribe-' . $this->search; return 'search-subscribe-' . $this->search;
@ -86,7 +82,6 @@ class SearchSubForm extends Form
* *
* @return string of the form class * @return string of the form class
*/ */
function formClass() function formClass()
{ {
// class to match existing styles... // class to match existing styles...
@ -99,13 +94,11 @@ class SearchSubForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('searchsub', array('search' => $this->search)); return common_local_url('searchsub', array('search' => $this->search));
} }
/** /**
* Legend of the Form * Legend of the Form
* *
@ -113,6 +106,7 @@ class SearchSubForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form legend.
$this->out->element('legend', null, _m('Subscribe to this search')); $this->out->element('legend', null, _m('Subscribe to this search'));
} }
@ -121,7 +115,6 @@ class SearchSubForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$this->out->hidden('subscribeto-' . $this->search, $this->out->hidden('subscribeto-' . $this->search,
@ -134,9 +127,14 @@ class SearchSubForm extends Form
* *
* @return void * @return void
*/ */
function formActions() 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.'));
} }
} }

View File

@ -20,8 +20,12 @@ class SearchSubTrackingCommand extends Command
$list[] = $all->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'. // TRANS: Message given having disabled all search subscriptions with 'track off'.
$channel->output($cur, sprintf(_m('You are tracking searches for: %s'), // TRANS: %s is a list of searches. Separator default is '", "'.
'"' . implode('", "', $list) . '"')); $channel->output($cur, sprintf(_m('You are tracking searches for: "%s".'),
implode($separator, $list)));
} }
} }

View File

@ -21,6 +21,7 @@ class SearchSubTrackoffCommand extends Command
SearchSub::cancel($profile, $all->search); SearchSub::cancel($profile, $all->search);
} catch (Exception $e) { } catch (Exception $e) {
// TRANS: Message given having failed to cancel one of the search subs with 'track off' command. // 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".'), $channel->error($cur, sprintf(_m('Error disabling search subscription for query "%s".'),
$all->search)); $all->search));
return; return;
@ -30,4 +31,4 @@ class SearchSubTrackoffCommand extends Command
// TRANS: Message given having disabled all search subscriptions with 'track off'. // TRANS: Message given having disabled all search subscriptions with 'track off'.
$channel->output($cur, _m('Disabled all your search subscriptions.')); $channel->output($cur, _m('Disabled all your search subscriptions.'));
} }
} }

View File

@ -18,6 +18,7 @@ class SearchSubUntrackCommand extends Command
if (!$searchsub) { if (!$searchsub) {
// TRANS: Error text shown a user tries to untrack a search query they're not subscribed to. // 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)); $channel->error($cur, sprintf(_m('You are not tracking the search "%s".'), $this->keyword));
return; return;
} }
@ -26,13 +27,15 @@ class SearchSubUntrackCommand extends Command
SearchSub::cancel($cur->getProfile(), $this->keyword); SearchSub::cancel($cur->getProfile(), $this->keyword);
} catch (Exception $e) { } catch (Exception $e) {
// TRANS: Message given having failed to cancel a search subscription by untrack command. // 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".'), $channel->error($cur, sprintf(_m('Could not end a search subscription for query "%s".'),
$this->keyword)); $this->keyword));
return; return;
} }
// TRANS: Message given having removed a search subscription by untrack command. // 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".'), $channel->output($cur, sprintf(_m('You are no longer subscribed to the search "%s".'),
$this->keyword)); $this->keyword));
} }
} }

View File

@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* *
* @see UnsubscribeForm * @see UnsubscribeForm
*/ */
class SearchUnsubForm extends SearchSubForm class SearchUnsubForm extends SearchSubForm
{ {
/** /**
@ -54,38 +53,32 @@ class SearchUnsubForm extends SearchSubForm
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'search-unsubscribe-' . $this->search; return 'search-unsubscribe-' . $this->search;
} }
/** /**
* class of the form * class of the form
* *
* @return string of the form class * @return string of the form class
*/ */
function formClass() function formClass()
{ {
// class to match existing styles... // class to match existing styles...
return 'form_user_unsubscribe ajax'; return 'form_user_unsubscribe ajax';
} }
/** /**
* Action of the form * Action of the form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('searchunsub', array('search' => $this->search)); return common_local_url('searchunsub', array('search' => $this->search));
} }
/** /**
* Legend of the Form * Legend of the Form
* *
@ -93,6 +86,7 @@ class SearchUnsubForm extends SearchSubForm
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form legend.
$this->out->element('legend', null, _m('Unsubscribe from this search')); $this->out->element('legend', null, _m('Unsubscribe from this search'));
} }
@ -101,9 +95,14 @@ class SearchUnsubForm extends SearchSubForm
* *
* @return void * @return void
*/ */
function formActions() 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.'));
} }
} }