Remove superfluous whitespace.
L10n/I18n updates.
FIXMEs added for missing documentation or headers.
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class SandboxAction extends ProfileFormAction
{
/**
*
* @return boolean success flag
*/
-
function prepare($args)
{
if (!parent::prepare($args)) {
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;
}
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;
}
*
* @return void
*/
-
function handlePost()
{
$this->profile->sandbox();
* @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
{
/**
*
* @return string page title
*/
-
function title()
{
- return _('Sessions');
+ // TRANS: Title for the sessions administration panel.
+ return _m('TITLE','Sessions');
}
/**
*
* @return string instructions
*/
-
function getInstructions()
{
+ // TRANS: Instructions for the sessions administration panel.
return _('Session settings for this StatusNet site');
}
*
* @return void
*/
-
function showForm()
{
$form = new SessionsAdminPanelForm($this);
*
* @return void
*/
-
function saveSettings()
{
static $booleans = array('sessions' => array('handle', 'debug'));
}
}
+// @todo FIXME: Class documentation missing.
class SessionsAdminPanelForm extends AdminForm
{
/**
*
* @return int ID of the form
*/
-
function id()
{
return 'sessionsadminpanel';
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_settings';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('sessionsadminpanel');
*
* @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');
*
* @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'));
}
}
$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;
}
$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;
}
$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,
$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
$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');
'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');
$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');
$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',
$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'));
{
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() { ';
$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)));
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()