diff --git a/actions/sandbox.php b/actions/sandbox.php index d1ef4c86b2..ddbca40b2d 100644 --- a/actions/sandbox.php +++ b/actions/sandbox.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class SandboxAction extends ProfileFormAction { /** @@ -50,7 +49,6 @@ class SandboxAction extends ProfileFormAction * * @return boolean success flag */ - function prepare($args) { if (!parent::prepare($args)) { @@ -62,6 +60,7 @@ class SandboxAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasRight(Right::SANDBOXUSER)) { + // TRANS: Client error displayed trying to sandbox users on a site where the feature is not enabled. $this->clientError(_('You cannot sandbox users on this site.')); return false; } @@ -69,6 +68,7 @@ class SandboxAction extends ProfileFormAction assert(!empty($this->profile)); // checked by parent if ($this->profile->isSandboxed()) { + // TRANS: Client error displayed trying to sandbox an already sandboxed user. $this->clientError(_('User is already sandboxed.')); return false; } @@ -81,7 +81,6 @@ class SandboxAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->sandbox(); diff --git a/actions/sessionsadminpanel.php b/actions/sessionsadminpanel.php index e9bd1719f2..0d1ead1021 100644 --- a/actions/sessionsadminpanel.php +++ b/actions/sessionsadminpanel.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class SessionsadminpanelAction extends AdminPanelAction { /** @@ -48,10 +47,10 @@ class SessionsadminpanelAction extends AdminPanelAction * * @return string page title */ - function title() { - return _('Sessions'); + // TRANS: Title for the sessions administration panel. + return _m('TITLE','Sessions'); } /** @@ -59,9 +58,9 @@ class SessionsadminpanelAction extends AdminPanelAction * * @return string instructions */ - function getInstructions() { + // TRANS: Instructions for the sessions administration panel. return _('Session settings for this StatusNet site'); } @@ -70,7 +69,6 @@ class SessionsadminpanelAction extends AdminPanelAction * * @return void */ - function showForm() { $form = new SessionsAdminPanelForm($this); @@ -83,7 +81,6 @@ class SessionsadminpanelAction extends AdminPanelAction * * @return void */ - function saveSettings() { static $booleans = array('sessions' => array('handle', 'debug')); @@ -123,6 +120,7 @@ class SessionsadminpanelAction extends AdminPanelAction } } +// @todo FIXME: Class documentation missing. class SessionsAdminPanelForm extends AdminForm { /** @@ -130,7 +128,6 @@ class SessionsAdminPanelForm extends AdminForm * * @return int ID of the form */ - function id() { return 'sessionsadminpanel'; @@ -141,7 +138,6 @@ class SessionsAdminPanelForm extends AdminForm * * @return string class of the form */ - function formClass() { return 'form_settings'; @@ -152,7 +148,6 @@ class SessionsAdminPanelForm extends AdminForm * * @return string URL of the action */ - function action() { return common_local_url('sessionsadminpanel'); @@ -163,24 +158,31 @@ class SessionsAdminPanelForm extends AdminForm * * @return void */ - function formData() { $this->out->elementStart('fieldset', array('id' => 'settings_user_sessions')); - $this->out->element('legend', null, _('Sessions')); + // TRANS: Fieldset legend on the sessions administration panel. + $this->out->element('legend', null, _m('LEGEND','Sessions')); $this->out->elementStart('ul', 'form_data'); $this->li(); + // TRANS: Checkbox title on the sessions administration panel. + // TRANS: Indicates if StatusNet should handle session administration. $this->out->checkbox('handle', _('Handle sessions'), (bool) $this->value('handle', 'sessions'), - _('Whether to handle sessions ourselves.')); + // TRANS: Checkbox title on the sessions administration panel. + // TRANS: Indicates if StatusNet should handle session administration. + _('Handle sessions ourselves.')); $this->unli(); $this->li(); + // TRANS: Checkbox label on the sessions administration panel. + // TRANS: Indicates if StatusNet should write session debugging output. $this->out->checkbox('debug', _('Session debugging'), (bool) $this->value('debug', 'sessions'), - _('Turn on debugging output for sessions.')); + // TRANS: Checkbox title on the sessions administration panel. + _('Enable debugging output for sessions.')); $this->unli(); $this->out->elementEnd('ul'); @@ -193,9 +195,14 @@ class SessionsAdminPanelForm extends AdminForm * * @return void */ - function formActions() { - $this->out->submit('submit', _('Save'), 'submit', null, _('Save site settings')); + $this->out->submit('submit', + // TRANS: Submit button text on the sessions administration panel. + _m('BUTTON','Save'), + 'submit', + null, + // TRANS: Title for submit button on the sessions administration panel. + _('Save session settings')); } } diff --git a/actions/showapplication.php b/actions/showapplication.php index 02a4dc1517..38e6f1953e 100644 --- a/actions/showapplication.php +++ b/actions/showapplication.php @@ -75,11 +75,13 @@ class ShowApplicationAction extends OwnerDesignAction $this->owner = User::staticGet($this->application->owner); if (!common_logged_in()) { + // TRANS: Client error displayed trying to display an OAuth application while not logged in. $this->clientError(_('You must be logged in to view an application.')); return false; } if (empty($this->application)) { + // TRANS: Client error displayed trying to display a non-existing OAuth application. $this->clientError(_('No such application.'), 404); return false; } @@ -87,6 +89,7 @@ class ShowApplicationAction extends OwnerDesignAction $cur = common_current_user(); if ($cur->id != $this->owner->id) { + // TRANS: Client error displayed trying to display an OAuth application for which the logged in user is not the owner. $this->clientError(_('You are not the owner of this application.'), 401); return false; } @@ -148,6 +151,7 @@ class ShowApplicationAction extends OwnerDesignAction $consumer = $this->application->getConsumer(); $this->elementStart('div', 'entity_profile vcard'); + // TRANS: Header on the OAuth application page. $this->element('h2', null, _('Application profile')); if (!empty($this->application->icon)) { $this->element('img', array('src' => $this->application->icon, @@ -176,7 +180,12 @@ class ShowApplicationAction extends OwnerDesignAction $userCnt = $appUsers->count(); $this->raw(sprintf( - _('Created by %1$s - %2$s access by default - %3$d users'), + // TRANS: Information output on an OAuth application page. + // TRANS: %1$s is the application creator, %2$s is "read-only" or "read-write", + // TRANS: %3$d is the number of users using the OAuth application. + _m('Created by %1$s - %2$s access by default - %3$d user', + 'Created by %1$s - %2$s access by default - %3$d users', + $userCnt), $profile->getBestName(), $defaultAccess, $userCnt @@ -186,13 +195,15 @@ class ShowApplicationAction extends OwnerDesignAction $this->elementEnd('div'); $this->elementStart('div', 'entity_actions'); + // TRANS: Header on the OAuth application page. $this->element('h2', null, _('Application actions')); $this->elementStart('ul'); $this->elementStart('li', 'entity_edit'); $this->element('a', array('href' => common_local_url('editapplication', array('id' => $this->application->id))), - 'Edit'); + // TRANS: Link text to edit application on the OAuth application page. + _m('EDITAPP','Edit')); $this->elementEnd('li'); $this->elementStart('li', 'entity_reset_keysecret'); @@ -209,6 +220,8 @@ class ShowApplicationAction extends OwnerDesignAction 'id' => 'reset', 'name' => 'reset', 'class' => 'submit', + // TRANS: Button text on the OAuth application page. + // TRANS: Resets the OAuth consumer key and secret. 'value' => _('Reset key & secret'), 'onClick' => 'return confirmReset()')); $this->elementEnd('fieldset'); @@ -225,7 +238,8 @@ class ShowApplicationAction extends OwnerDesignAction $this->elementStart('fieldset'); $this->hidden('token', common_session_token()); - $this->submit('delete', _('Delete')); + // TRANS: Submit button text the OAuth application page to delete an application. + $this->submit('delete', _m('BUTTON','Delete')); $this->elementEnd('fieldset'); $this->elementEnd('form'); $this->elementEnd('li'); @@ -234,6 +248,7 @@ class ShowApplicationAction extends OwnerDesignAction $this->elementEnd('div'); $this->elementStart('div', 'entity_data'); + // TRANS: Header on the OAuth application page. $this->element('h2', null, _('Application info')); $this->element('div', 'entity_consumer_key', @@ -252,7 +267,8 @@ class ShowApplicationAction extends OwnerDesignAction $this->element('div', 'entity_authorize_url', common_local_url('ApiOauthAuthorize')); $this->element('p', 'note', - _('Note: We support HMAC-SHA1 signatures. We do not support the plaintext signature method.')); + // TRANS: Note on the OAuth application page about signature support. + _('Note: HMAC-SHA1 signatures are supported. The plaintext signature method is not supported.')); $this->elementEnd('div'); $this->elementStart('p', array('id' => 'application_action')); @@ -272,6 +288,7 @@ class ShowApplicationAction extends OwnerDesignAction { parent::showScripts(); + // TRANS: Text in confirmation dialog to reset consumer key and secret for an OAuth application. $msg = _('Are you sure you want to reset your consumer key and secret?'); $js = 'function confirmReset() { '; diff --git a/actions/showgroup.php b/actions/showgroup.php index aa1f620880..d77fbeed71 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -324,6 +324,8 @@ class ShowgroupAction extends GroupDesignAction $this->element('h2', null, _('Statistics')); $this->elementStart('dl'); + + // TRANS: Label for group creation date. $this->element('dt', null, _m('LABEL','Created')); $this->element('dd', 'entity_created', date('j M Y', strtotime($this->group->created))); @@ -382,8 +384,8 @@ class GroupAdminSection extends ProfileSection function title() { - // TRANS: Header for list of group administrators on a group page (h2). - return _('Admins'); + // TRANS: Title for list of group administrators on a group page. + return _m('TITLE','Admins'); } function divId()