* Add/update translator documentation.
* L10n tweaks (mostly domain MENU assignments). * Remove superfluous whitespace.
This commit is contained in:
parent
691f374a52
commit
9c8b2b567f
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
|||||||
*
|
*
|
||||||
* @see FavorForm
|
* @see FavorForm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DisfavorForm extends Form
|
class DisfavorForm extends Form
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Notice to disfavor
|
* Notice to disfavor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var $notice = null;
|
var $notice = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,7 +59,6 @@ class DisfavorForm extends Form
|
|||||||
* @param HTMLOutputter $out output channel
|
* @param HTMLOutputter $out output channel
|
||||||
* @param Notice $notice notice to disfavor
|
* @param Notice $notice notice to disfavor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function __construct($out=null, $notice=null)
|
function __construct($out=null, $notice=null)
|
||||||
{
|
{
|
||||||
parent::__construct($out);
|
parent::__construct($out);
|
||||||
@ -74,7 +71,6 @@ class DisfavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'disfavor-' . $this->notice->id;
|
return 'disfavor-' . $this->notice->id;
|
||||||
@ -85,7 +81,6 @@ class DisfavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('disfavor');
|
return common_local_url('disfavor');
|
||||||
@ -96,14 +91,12 @@ class DisfavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function sessionToken()
|
function sessionToken()
|
||||||
{
|
{
|
||||||
$this->out->hidden('token-' . $this->notice->id,
|
$this->out->hidden('token-' . $this->notice->id,
|
||||||
common_session_token());
|
common_session_token());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legend of the Form
|
* Legend of the Form
|
||||||
*
|
*
|
||||||
@ -111,10 +104,10 @@ class DisfavorForm extends Form
|
|||||||
*/
|
*/
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
|
// TRANS: Form legend for removing the favourite status for a favourite notice.
|
||||||
$this->out->element('legend', null, _('Disfavor this notice'));
|
$this->out->element('legend', null, _('Disfavor this notice'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data elements
|
* Data elements
|
||||||
*
|
*
|
||||||
@ -129,7 +122,6 @@ class DisfavorForm extends Form
|
|||||||
'notice');
|
'notice');
|
||||||
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
|
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,11 +129,15 @@ class DisfavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('disfavor-submit-' . $this->notice->id,
|
$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'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,10 +145,8 @@ class DisfavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string the form's class
|
* @return string the form's class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_disfavor';
|
return 'form_disfavor';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
|||||||
*
|
*
|
||||||
* @see DisfavorForm
|
* @see DisfavorForm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FavorForm extends Form
|
class FavorForm extends Form
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Notice to favor
|
* Notice to favor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var $notice = null;
|
var $notice = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,7 +59,6 @@ class FavorForm extends Form
|
|||||||
* @param HTMLOutputter $out output channel
|
* @param HTMLOutputter $out output channel
|
||||||
* @param Notice $notice notice to favor
|
* @param Notice $notice notice to favor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function __construct($out=null, $notice=null)
|
function __construct($out=null, $notice=null)
|
||||||
{
|
{
|
||||||
parent::__construct($out);
|
parent::__construct($out);
|
||||||
@ -74,7 +71,6 @@ class FavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'favor-' . $this->notice->id;
|
return 'favor-' . $this->notice->id;
|
||||||
@ -85,7 +81,6 @@ class FavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('favor');
|
return common_local_url('favor');
|
||||||
@ -96,14 +91,12 @@ class FavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function sessionToken()
|
function sessionToken()
|
||||||
{
|
{
|
||||||
$this->out->hidden('token-' . $this->notice->id,
|
$this->out->hidden('token-' . $this->notice->id,
|
||||||
common_session_token());
|
common_session_token());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legend of the Form
|
* Legend of the Form
|
||||||
*
|
*
|
||||||
@ -111,16 +104,15 @@ class FavorForm extends Form
|
|||||||
*/
|
*/
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
|
// TRANS: Form legend for adding the favourite status to a notice.
|
||||||
$this->out->element('legend', null, _('Favor this notice'));
|
$this->out->element('legend', null, _('Favor this notice'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data elements
|
* Data elements
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
if (Event::handle('StartFavorNoticeForm', array($this, $this->notice))) {
|
if (Event::handle('StartFavorNoticeForm', array($this, $this->notice))) {
|
||||||
@ -136,11 +128,15 @@ class FavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('favor-submit-' . $this->notice->id,
|
$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'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -148,7 +144,6 @@ class FavorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string the form's class
|
* @return string the form's class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_favor';
|
return 'form_favor';
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FeaturedUsersSection extends ProfileSection
|
class FeaturedUsersSection extends ProfileSection
|
||||||
{
|
{
|
||||||
function getProfiles()
|
function getProfiles()
|
||||||
@ -84,6 +83,7 @@ class FeaturedUsersSection extends ProfileSection
|
|||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for featured users section.
|
||||||
return _('Featured users');
|
return _('Featured users');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
|||||||
*
|
*
|
||||||
* @see HTMLOutputter
|
* @see HTMLOutputter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PersonalGroupNav extends Widget
|
class PersonalGroupNav extends Widget
|
||||||
{
|
{
|
||||||
var $action = null;
|
var $action = null;
|
||||||
@ -62,7 +61,6 @@ class PersonalGroupNav extends Widget
|
|||||||
*
|
*
|
||||||
* @param Action $action current action, used for output
|
* @param Action $action current action, used for output
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function __construct($action=null)
|
function __construct($action=null)
|
||||||
{
|
{
|
||||||
parent::__construct($action);
|
parent::__construct($action);
|
||||||
@ -74,7 +72,6 @@ class PersonalGroupNav extends Widget
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
$user = null;
|
$user = null;
|
||||||
@ -99,22 +96,29 @@ class PersonalGroupNav extends Widget
|
|||||||
if (Event::handle('StartPersonalGroupNav', array($this))) {
|
if (Event::handle('StartPersonalGroupNav', array($this))) {
|
||||||
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
$this->out->menuItem(common_local_url('all', array('nickname' =>
|
||||||
$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),
|
sprintf(_('%s and friends'), $name),
|
||||||
$action == 'all', 'nav_timeline_personal');
|
$action == 'all', 'nav_timeline_personal');
|
||||||
$this->out->menuItem(common_local_url('replies', array('nickname' =>
|
$this->out->menuItem(common_local_url('replies', array('nickname' =>
|
||||||
$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),
|
sprintf(_('Replies to %s'), $name),
|
||||||
$action == 'replies', 'nav_timeline_replies');
|
$action == 'replies', 'nav_timeline_replies');
|
||||||
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
|
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
|
||||||
$nickname)),
|
$nickname)),
|
||||||
_('Profile'),
|
// TRANS: Personal group navigation menu option when logged in for seeing own profile.
|
||||||
|
_m('MENU','Profile'),
|
||||||
$name,
|
$name,
|
||||||
$action == 'showstream', 'nav_profile');
|
$action == 'showstream', 'nav_profile');
|
||||||
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
|
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
|
||||||
$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')),
|
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $name : _('User')),
|
||||||
$action == 'showfavorites', 'nav_timeline_favorites');
|
$action == 'showfavorites', 'nav_timeline_favorites');
|
||||||
|
|
||||||
@ -125,12 +129,16 @@ class PersonalGroupNav extends Widget
|
|||||||
|
|
||||||
$this->out->menuItem(common_local_url('inbox', array('nickname' =>
|
$this->out->menuItem(common_local_url('inbox', array('nickname' =>
|
||||||
$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'),
|
_('Your incoming messages'),
|
||||||
$action == 'inbox');
|
$action == 'inbox');
|
||||||
$this->out->menuItem(common_local_url('outbox', array('nickname' =>
|
$this->out->menuItem(common_local_url('outbox', array('nickname' =>
|
||||||
$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'),
|
_('Your sent messages'),
|
||||||
$action == 'outbox');
|
$action == 'outbox');
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PersonalTagCloudSection extends TagCloudSection
|
class PersonalTagCloudSection extends TagCloudSection
|
||||||
{
|
{
|
||||||
var $user = null;
|
var $user = null;
|
||||||
@ -53,6 +52,7 @@ class PersonalTagCloudSection extends TagCloudSection
|
|||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for personal tag cloud section. %s is a user nickname.
|
||||||
return sprintf(_('Tags in %s\'s notices'), $this->user->nickname);
|
return sprintf(_('Tags in %s\'s notices'), $this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,5 +84,4 @@ class PersonalTagCloudSection extends TagCloudSection
|
|||||||
3600);
|
3600);
|
||||||
return $tag;
|
return $tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PopularNoticeSection extends NoticeSection
|
class PopularNoticeSection extends NoticeSection
|
||||||
{
|
{
|
||||||
function getNotices()
|
function getNotices()
|
||||||
@ -59,6 +58,7 @@ class PopularNoticeSection extends NoticeSection
|
|||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for favourited notices section.
|
||||||
return _('Popular notices');
|
return _('Popular notices');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ProfileFormAction extends RedirectingAction
|
class ProfileFormAction extends RedirectingAction
|
||||||
{
|
{
|
||||||
var $profile = null;
|
var $profile = null;
|
||||||
@ -52,7 +51,6 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -61,6 +59,7 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
// TRANS: Client error displayed when trying to change user options while not logged in.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_('Not logged in.'));
|
||||||
} else {
|
} else {
|
||||||
// Redirect to login.
|
// Redirect to login.
|
||||||
@ -76,6 +75,7 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
$id = $this->trimmed('profileid');
|
$id = $this->trimmed('profileid');
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
|
// TRANS: Client error displayed when trying to change user options without specifying a user to work on.
|
||||||
$this->clientError(_('No profile specified.'));
|
$this->clientError(_('No profile specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -83,6 +83,7 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::staticGet('id', $id);
|
||||||
|
|
||||||
if (!$this->profile) {
|
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.'));
|
$this->clientError(_('No profile with that ID.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -99,7 +100,6 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -117,9 +117,9 @@ class ProfileFormAction extends RedirectingAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
|
// TRANS: Server error displayed when using an unimplemented method.
|
||||||
$this->serverError(_("Unimplemented method."));
|
$this->serverError(_("Unimplemented method."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user