diff --git a/lib/disfavorform.php b/lib/disfavorform.php index 6023766d7b..3a1c7d17fb 100644 --- a/lib/disfavorform.php +++ b/lib/disfavorform.php @@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see FavorForm */ - class DisfavorForm extends Form { /** * Notice to disfavor */ - var $notice = null; /** @@ -61,7 +59,6 @@ class DisfavorForm extends Form * @param HTMLOutputter $out output channel * @param Notice $notice notice to disfavor */ - function __construct($out=null, $notice=null) { parent::__construct($out); @@ -74,7 +71,6 @@ class DisfavorForm extends Form * * @return int ID of the form */ - function id() { return 'disfavor-' . $this->notice->id; @@ -85,7 +81,6 @@ class DisfavorForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('disfavor'); @@ -96,14 +91,12 @@ class DisfavorForm extends Form * * @return void */ - function sessionToken() { $this->out->hidden('token-' . $this->notice->id, common_session_token()); } - /** * Legend of the Form * @@ -111,10 +104,10 @@ class DisfavorForm extends Form */ function formLegend() { + // TRANS: Form legend for removing the favourite status for a favourite notice. $this->out->element('legend', null, _('Disfavor this notice')); } - /** * Data elements * @@ -129,7 +122,6 @@ class DisfavorForm extends Form 'notice'); Event::handle('EndDisFavorNoticeForm', array($this, $this->notice)); } - } /** @@ -137,22 +129,24 @@ class DisfavorForm extends Form * * @return void */ - function formActions() { $this->out->submit('disfavor-submit-' . $this->notice->id, - _('Disfavor favorite'), 'submit', null, _('Disfavor this notice')); + // TRANS: Button text for removing the favourite status for a favourite notice. + _m('BUTTON','Disfavor favorite'), + 'submit', + null, + // TRANS: Title for button text for removing the favourite status for a favourite notice. + _('Disfavor this notice')); } - + /** * Class of the form. * * @return string the form's class */ - function formClass() { return 'form_disfavor'; } - } diff --git a/lib/favorform.php b/lib/favorform.php index 4e2891ffd5..956cc896a2 100644 --- a/lib/favorform.php +++ b/lib/favorform.php @@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see DisfavorForm */ - class FavorForm extends Form { /** * Notice to favor */ - var $notice = null; /** @@ -61,7 +59,6 @@ class FavorForm extends Form * @param HTMLOutputter $out output channel * @param Notice $notice notice to favor */ - function __construct($out=null, $notice=null) { parent::__construct($out); @@ -74,7 +71,6 @@ class FavorForm extends Form * * @return int ID of the form */ - function id() { return 'favor-' . $this->notice->id; @@ -85,7 +81,6 @@ class FavorForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('favor'); @@ -96,14 +91,12 @@ class FavorForm extends Form * * @return void */ - function sessionToken() { $this->out->hidden('token-' . $this->notice->id, common_session_token()); } - /** * Legend of the Form * @@ -111,16 +104,15 @@ class FavorForm extends Form */ function formLegend() { + // TRANS: Form legend for adding the favourite status to a notice. $this->out->element('legend', null, _('Favor this notice')); } - /** * Data elements * * @return void */ - function formData() { if (Event::handle('StartFavorNoticeForm', array($this, $this->notice))) { @@ -136,19 +128,22 @@ class FavorForm extends Form * * @return void */ - function formActions() { $this->out->submit('favor-submit-' . $this->notice->id, - _('Favor'), 'submit', null, _('Favor this notice')); + // TRANS: Button text for adding the favourite status to a notice. + _m('BUTTON','Favor'), + 'submit', + null, + // TRANS: Title for button text for adding the favourite status to a notice. + _('Favor this notice')); } - + /** * Class of the form. * * @return string the form's class */ - function formClass() { return 'form_favor'; diff --git a/lib/featureduserssection.php b/lib/featureduserssection.php index f0753a25ed..8dacdc332d 100644 --- a/lib/featureduserssection.php +++ b/lib/featureduserssection.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class FeaturedUsersSection extends ProfileSection { function getProfiles() @@ -84,6 +83,7 @@ class FeaturedUsersSection extends ProfileSection function title() { + // TRANS: Title for featured users section. return _('Featured users'); } diff --git a/lib/personalgroupnav.php b/lib/personalgroupnav.php index 1f543b8974..533e9f43d2 100644 --- a/lib/personalgroupnav.php +++ b/lib/personalgroupnav.php @@ -52,7 +52,6 @@ require_once INSTALLDIR.'/lib/widget.php'; * * @see HTMLOutputter */ - class PersonalGroupNav extends Widget { var $action = null; @@ -62,7 +61,6 @@ class PersonalGroupNav extends Widget * * @param Action $action current action, used for output */ - function __construct($action=null) { parent::__construct($action); @@ -74,7 +72,6 @@ class PersonalGroupNav extends Widget * * @return void */ - function show() { $user = null; @@ -99,22 +96,29 @@ class PersonalGroupNav extends Widget if (Event::handle('StartPersonalGroupNav', array($this))) { $this->out->menuItem(common_local_url('all', array('nickname' => $nickname)), - _('Personal'), + // TRANS: Personal group navigation menu option when logged in for viewing timeline of self and friends. + _m('MENU','Personal'), + // TRANS: Tooltop for personal group navigation menu option when logged in for viewing timeline of self and friends. sprintf(_('%s and friends'), $name), $action == 'all', 'nav_timeline_personal'); $this->out->menuItem(common_local_url('replies', array('nickname' => $nickname)), - _('Replies'), + // TRANS: Personal group navigation menu option when logged in for viewing @-replies. + _m('MENU','Replies'), + // TRANS: Tooltip for personal group navigation menu option when logged in for viewing @-replies. sprintf(_('Replies to %s'), $name), $action == 'replies', 'nav_timeline_replies'); $this->out->menuItem(common_local_url('showstream', array('nickname' => $nickname)), - _('Profile'), + // TRANS: Personal group navigation menu option when logged in for seeing own profile. + _m('MENU','Profile'), $name, $action == 'showstream', 'nav_profile'); $this->out->menuItem(common_local_url('showfavorites', array('nickname' => $nickname)), - _('Favorites'), + // TRANS: Personal group navigation menu option when logged in for viewing own favourited notices. + _m('MENU','Favorites'), + // TRANS: Tooltip for personal group navigation menu option when logged in for viewing own favourited notices. sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')), $action == 'showfavorites', 'nav_timeline_favorites'); @@ -125,12 +129,16 @@ class PersonalGroupNav extends Widget $this->out->menuItem(common_local_url('inbox', array('nickname' => $nickname)), - _('Inbox'), + // TRANS: Personal group navigation menu option when logged in for viewing recieved personal messages. + _m('MENU','Inbox'), + // TRANS: Tooltip for personal group navigation menu option when logged in for viewing recieved personal messages. _('Your incoming messages'), $action == 'inbox'); $this->out->menuItem(common_local_url('outbox', array('nickname' => $nickname)), - _('Outbox'), + // TRANS: Personal group navigation menu option when logged in for viewing senet personal messages. + _m('MENU','Outbox'), + // TRANS: Tooltip for personal group navigation menu option when logged in for viewing senet personal messages. _('Your sent messages'), $action == 'outbox'); } diff --git a/lib/personaltagcloudsection.php b/lib/personaltagcloudsection.php index 5ea3f188db..fd10ba14d6 100644 --- a/lib/personaltagcloudsection.php +++ b/lib/personaltagcloudsection.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PersonalTagCloudSection extends TagCloudSection { var $user = null; @@ -53,6 +52,7 @@ class PersonalTagCloudSection extends TagCloudSection function title() { + // TRANS: Title for personal tag cloud section. %s is a user nickname. return sprintf(_('Tags in %s\'s notices'), $this->user->nickname); } @@ -84,5 +84,4 @@ class PersonalTagCloudSection extends TagCloudSection 3600); return $tag; } - } diff --git a/lib/popularnoticesection.php b/lib/popularnoticesection.php index a4f038b246..f6f27c6878 100644 --- a/lib/popularnoticesection.php +++ b/lib/popularnoticesection.php @@ -43,7 +43,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PopularNoticeSection extends NoticeSection { function getNotices() @@ -59,6 +58,7 @@ class PopularNoticeSection extends NoticeSection function title() { + // TRANS: Title for favourited notices section. return _('Popular notices'); } diff --git a/lib/profileformaction.php b/lib/profileformaction.php index 51c89a922e..5706528223 100644 --- a/lib/profileformaction.php +++ b/lib/profileformaction.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class ProfileFormAction extends RedirectingAction { var $profile = null; @@ -52,7 +51,6 @@ class ProfileFormAction extends RedirectingAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -61,6 +59,7 @@ class ProfileFormAction extends RedirectingAction if (!common_logged_in()) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { + // TRANS: Client error displayed when trying to change user options while not logged in. $this->clientError(_('Not logged in.')); } else { // Redirect to login. @@ -76,6 +75,7 @@ class ProfileFormAction extends RedirectingAction $id = $this->trimmed('profileid'); if (!$id) { + // TRANS: Client error displayed when trying to change user options without specifying a user to work on. $this->clientError(_('No profile specified.')); return false; } @@ -83,6 +83,7 @@ class ProfileFormAction extends RedirectingAction $this->profile = Profile::staticGet('id', $id); if (!$this->profile) { + // TRANS: Client error displayed when trying to change user options without specifying an existing user to work on. $this->clientError(_('No profile with that ID.')); return false; } @@ -99,7 +100,6 @@ class ProfileFormAction extends RedirectingAction * * @return void */ - function handle($args) { parent::handle($args); @@ -117,9 +117,9 @@ class ProfileFormAction extends RedirectingAction * * @return void */ - function handlePost() { + // TRANS: Server error displayed when using an unimplemented method. $this->serverError(_("Unimplemented method.")); } }