* L10n tweaks (mostly domain MENU assignments).
* Remove superfluous whitespace.
*
* @see FavorForm
*/
-
class DisfavorForm extends Form
{
/**
* Notice to disfavor
*/
-
var $notice = null;
/**
* @param HTMLOutputter $out output channel
* @param Notice $notice notice to disfavor
*/
-
function __construct($out=null, $notice=null)
{
parent::__construct($out);
*
* @return int ID of the form
*/
-
function id()
{
return 'disfavor-' . $this->notice->id;
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('disfavor');
*
* @return void
*/
-
function sessionToken()
{
$this->out->hidden('token-' . $this->notice->id,
common_session_token());
}
-
/**
* Legend of the 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
*
'notice');
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
}
-
}
/**
*
* @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';
}
-
}
*
* @see DisfavorForm
*/
-
class FavorForm extends Form
{
/**
* Notice to favor
*/
-
var $notice = null;
/**
* @param HTMLOutputter $out output channel
* @param Notice $notice notice to favor
*/
-
function __construct($out=null, $notice=null)
{
parent::__construct($out);
*
* @return int ID of the form
*/
-
function id()
{
return 'favor-' . $this->notice->id;
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('favor');
*
* @return void
*/
-
function sessionToken()
{
$this->out->hidden('token-' . $this->notice->id,
common_session_token());
}
-
/**
* Legend of the 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))) {
*
* @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';
* @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()
function title()
{
+ // TRANS: Title for featured users section.
return _('Featured users');
}
*
* @see HTMLOutputter
*/
-
class PersonalGroupNav extends Widget
{
var $action = null;
*
* @param Action $action current action, used for output
*/
-
function __construct($action=null)
{
parent::__construct($action);
*
* @return void
*/
-
function show()
{
$user = null;
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');
$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');
}
* @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;
function title()
{
+ // TRANS: Title for personal tag cloud section. %s is a user nickname.
return sprintf(_('Tags in %s\'s notices'), $this->user->nickname);
}
3600);
return $tag;
}
-
}
* @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()
function title()
{
+ // TRANS: Title for favourited notices section.
return _('Popular notices');
}
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class ProfileFormAction extends RedirectingAction
{
var $profile = null;
*
* @return boolean success flag
*/
-
function prepare($args)
{
parent::prepare($args);
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.
$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;
}
$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;
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function handlePost()
{
+ // TRANS: Server error displayed when using an unimplemented method.
$this->serverError(_("Unimplemented method."));
}
}