* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class SitenoticeadminpanelAction extends AdminPanelAction
{
/**
*
* @return string page title
*/
-
function title()
{
+ // TRANS: Page title for site-wide notice tab in admin panel.
return _('Site Notice');
}
*
* @return string instructions
*/
-
function getInstructions()
{
+ // TRANS: Instructions for site-wide notice tab in admin panel.
return _('Edit site-wide message');
}
*
* @return void
*/
-
function showForm()
{
$form = new SiteNoticeAdminPanelForm($this);
*
* @return void
*/
-
function saveSettings()
{
$siteNotice = $this->trimmed('site-notice');
// assert(all values are valid);
// This throws an exception on validation errors
- $this->validate(&$siteNotice);
+ $this->validate($siteNotice);
$config = new Config();
$result = Config::save('site', 'notice', $siteNotice);
if (!$result) {
- $this->ServerError(_("Unable to save site notice."));
+ // TRANS: Server error displayed when saving a site-wide notice was impossible.
+ $this->ServerError(_('Unable to save site notice.'));
}
}
if (mb_strlen($siteNotice) > 255) {
$this->clientError(
- _('Max length for the site-wide notice is 255 chars')
+ // TRANS: Client error displayed when a site-wide notice was longer than allowed.
+ _('Maximum length for the site-wide notice is 255 characters.')
);
}
$this->out->elementStart('li');
$this->out->textarea(
'site-notice',
+ // TRANS: Label for site-wide notice text field in admin panel.
_('Site notice text'),
common_config('site', 'notice'),
- _('Site-wide notice text (255 chars max; HTML okay)')
+ // TRANS: Tooltip for site-wide notice text field in admin panel.
+ _('Site-wide notice text (255 characters maximum; HTML allowed)')
);
$this->out->elementEnd('li');
{
$this->out->submit(
'submit',
- _('Save'),
+ // TRANS: Button text for saving site notice in admin panel.
+ _m('BUTTON','Save'),
'submit',
null,
- _('Save site notice')
+ // TRANS: Button title to save site notice in admin panel.
+ _('Save site notice.')
);
}
}