From 49eb66c57ea7a2bd76102b8d498768b794973cb8 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 5 Jun 2011 20:42:11 +0200 Subject: [PATCH] Update translator documentation. Whitespace updates. i18n/L10n updates. --- plugins/SearchSub/SearchSubPlugin.php | 7 +++---- plugins/SearchSub/searchsubform.php | 18 ++++++++---------- plugins/SearchSub/searchsubtrackingcommand.php | 10 +++++++--- plugins/SearchSub/searchsubtrackoffcommand.php | 3 ++- plugins/SearchSub/searchsubuntrackcommand.php | 5 ++++- plugins/SearchSub/searchunsubform.php | 17 ++++++++--------- 6 files changed, 32 insertions(+), 28 deletions(-) diff --git a/plugins/SearchSub/SearchSubPlugin.php b/plugins/SearchSub/SearchSubPlugin.php index de131c2b04..600dae6c16 100644 --- a/plugins/SearchSub/SearchSubPlugin.php +++ b/plugins/SearchSub/SearchSubPlugin.php @@ -181,7 +181,7 @@ class SearchSubPlugin extends Plugin * or Sphinx search backends. * * @param Notice $notice - * @param string $search + * @param string $search * @return boolean */ function matchSearch(Notice $notice, $search) @@ -226,7 +226,6 @@ class SearchSubPlugin extends Plugin * * @return boolean hook return */ - function onEndSubGroupNav($widget) { $action = $widget->out; @@ -296,11 +295,11 @@ class SearchSubPlugin extends Plugin 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; } - } diff --git a/plugins/SearchSub/searchsubform.php b/plugins/SearchSub/searchsubform.php index 7b05377397..4d44910e67 100644 --- a/plugins/SearchSub/searchsubform.php +++ b/plugins/SearchSub/searchsubform.php @@ -46,13 +46,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * * @see UnsubscribeForm */ - class SearchSubForm extends Form { /** * Name of search to subscribe to */ - var $search = ''; /** @@ -61,7 +59,6 @@ class SearchSubForm extends Form * @param HTMLOutputter $out output channel * @param string $search name of search to subscribe to */ - function __construct($out=null, $search=null) { parent::__construct($out); @@ -74,7 +71,6 @@ class SearchSubForm extends Form * * @return int ID of the form */ - function id() { return 'search-subscribe-' . $this->search; @@ -86,7 +82,6 @@ class SearchSubForm extends Form * * @return string of the form class */ - function formClass() { // class to match existing styles... @@ -99,13 +94,11 @@ class SearchSubForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('searchsub', array('search' => $this->search)); } - /** * Legend of the Form * @@ -113,6 +106,7 @@ class SearchSubForm extends Form */ function formLegend() { + // TRANS: Form legend. $this->out->element('legend', null, _m('Subscribe to this search')); } @@ -121,7 +115,6 @@ class SearchSubForm extends Form * * @return void */ - function formData() { $this->out->hidden('subscribeto-' . $this->search, @@ -134,9 +127,14 @@ class SearchSubForm extends Form * * @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.')); } } diff --git a/plugins/SearchSub/searchsubtrackingcommand.php b/plugins/SearchSub/searchsubtrackingcommand.php index 385a22b8ba..a404fd4ccf 100644 --- a/plugins/SearchSub/searchsubtrackingcommand.php +++ b/plugins/SearchSub/searchsubtrackingcommand.php @@ -20,8 +20,12 @@ class SearchSubTrackingCommand extends Command $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 +} diff --git a/plugins/SearchSub/searchsubtrackoffcommand.php b/plugins/SearchSub/searchsubtrackoffcommand.php index 1e5eb97ebc..4ab78a50a9 100644 --- a/plugins/SearchSub/searchsubtrackoffcommand.php +++ b/plugins/SearchSub/searchsubtrackoffcommand.php @@ -21,6 +21,7 @@ class SearchSubTrackoffCommand extends Command 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; @@ -30,4 +31,4 @@ class SearchSubTrackoffCommand extends Command // 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 +} diff --git a/plugins/SearchSub/searchsubuntrackcommand.php b/plugins/SearchSub/searchsubuntrackcommand.php index 9fb84cd130..fb3d78a14e 100644 --- a/plugins/SearchSub/searchsubuntrackcommand.php +++ b/plugins/SearchSub/searchsubuntrackcommand.php @@ -18,6 +18,7 @@ class SearchSubUntrackCommand extends Command 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; } @@ -26,13 +27,15 @@ class SearchSubUntrackCommand extends Command 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 +} diff --git a/plugins/SearchSub/searchunsubform.php b/plugins/SearchSub/searchunsubform.php index f90531f6aa..ae07f8dfa8 100644 --- a/plugins/SearchSub/searchunsubform.php +++ b/plugins/SearchSub/searchunsubform.php @@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * * @see UnsubscribeForm */ - class SearchUnsubForm extends SearchSubForm { /** @@ -54,38 +53,32 @@ 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 * @@ -93,6 +86,7 @@ class SearchUnsubForm extends SearchSubForm */ function formLegend() { + // TRANS: Form legend. $this->out->element('legend', null, _m('Unsubscribe from this search')); } @@ -101,9 +95,14 @@ class SearchUnsubForm extends SearchSubForm * * @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.')); } } -- 2.39.5