* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class NewnoticeAction extends Action
{
/**
* Error message, if any
*/
-
var $msg = null;
/**
*
* @return string page title
*/
-
function title()
{
// TRANS: Page title for sending a new notice.
*
* @return void
*/
-
function saveNewNotice()
{
$user = common_current_user();
*
* @return void
*/
-
function ajaxErrorMsg($msg)
{
$this->startHTML('text/xml;charset=utf-8', true);
*
* @return void
*/
-
function ajaxShowForm()
{
$this->startHTML('text/xml;charset=utf-8', true);
*
* @return void
*/
-
function showForm($msg=null)
{
if ($this->boolean('ajax')) {
*
* @return void
*/
-
function showNoticeForm()
{
$content = $this->trimmed('status_textarea');
*
* @todo maybe show some instructions?
*/
-
function showPageNotice()
{
if ($this->msg) {
*
* @return void
*/
-
function showNotice($notice)
{
$nli = new NoticeListItem($notice, $this);
*
* @see HTMLOutputter
*/
-
class NoticeForm extends Form
{
/**
* Current action, used for returning to this page.
*/
-
var $action = null;
/**
* Pre-filled content of the form
*/
-
var $content = null;
/**
* The current user
*/
-
var $user = null;
/**
* The notice being replied to
*/
-
var $inreplyto = null;
/**
* @param string $action action to return to, if any
* @param string $content content to pre-fill
*/
-
function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null, $lat=null, $lon=null, $location_id=null, $location_ns=null)
{
$this->id_suffix = time();
*/
function formLegend()
{
+ // TRANS: Form legend for notice form.
$this->out->element('legend', null, _('Send a notice'));
}
*
* @return void
*/
-
function formData()
{
if (Event::handle('StartShowNoticeFormData', array($this))) {
$this->out->element('label', array('for' => 'notice_data-text',
'id' => 'notice_data-text-label'),
+ // TRANS: Title for notice label. %s is the user's nickname.
sprintf(_('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text',
$contentLimit = Notice::maxContent();
if ($contentLimit > 0) {
- $this->out->element('span',
+ $this->out->element('span',
array('class' => 'count'),
$contentLimit);
}
if (common_config('attachments', 'uploads')) {
$this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
+ // TRANS: Input label in notice form for adding an attachment.
$this->out->element('label', array('for' => 'notice_data-attach'),_('Attach'));
$this->out->element('input', array('id' => 'notice_data-attach',
'type' => 'file',
'name' => 'attach',
- 'title' => _('Attach a file')));
+ // TRANS: Title for input field to attach a file to a notice.
+ 'title' => _('Attach a file.')));
}
if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');
$this->out->text(' ');
$this->out->element('label', array('class' => 'notice_data-geo',
'for' => $this->id() . '-notice_data-geo'),
+ // TRANS: Field label to add location to a notice.
_('Share my location'));
$this->out->elementEnd('div');
+ // TRANS: Text to not share location for a notice in notice form.
+ $share_disable_text = _('Do not share my location');
+ // TRANS: Timeout error text for location retrieval in notice form.
+ $error_timeout_text = _('Sorry, retrieving your geo location is taking longer than expected, please try again later');
$this->out->inlineScript(' var NoticeDataGeo_text = {'.
- 'ShareDisable: ' .json_encode(_('Do not share my location')).','.
- 'ErrorTimeout: ' .json_encode(_('Sorry, retrieving your geo location is taking longer than expected, please try again later')).
+ 'ShareDisable: ' .json_encode($share_disable_text).','.
+ 'ErrorTimeout: ' .json_encode($error_timeout_text).
'}');
}
'class' => 'submit',
'name' => 'status_submit',
'type' => 'submit',
- 'value' => _m('Send button for sending notice', 'Send')));
+ // TRANS: Button text for sending notice.
+ 'value' => _m('BUTTON', 'Send')));
}
}