forked from GNUsocial/gnu-social
* 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
|
||||
*/
|
||||
|
||||
class DisfavorForm extends Form
|
||||
{
|
||||
/**
|
||||
* Notice to disfavor
|
||||
*/
|
||||
|
||||
var $notice = null;
|
||||
|
||||
/**
|
||||
@ -61,7 +59,6 @@ class DisfavorForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param Notice $notice notice to disfavor
|
||||
*/
|
||||
|
||||
function __construct($out=null, $notice=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -74,7 +71,6 @@ class DisfavorForm extends Form
|
||||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'disfavor-' . $this->notice->id;
|
||||
@ -85,7 +81,6 @@ class DisfavorForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('disfavor');
|
||||
@ -96,14 +91,12 @@ class DisfavorForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function sessionToken()
|
||||
{
|
||||
$this->out->hidden('token-' . $this->notice->id,
|
||||
common_session_token());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Legend of the Form
|
||||
*
|
||||
@ -111,10 +104,10 @@ class DisfavorForm extends 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
|
||||
*
|
||||
@ -129,7 +122,6 @@ class DisfavorForm extends Form
|
||||
'notice');
|
||||
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,22 +129,24 @@ class DisfavorForm extends Form
|
||||
*
|
||||
* @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';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
||||
*
|
||||
* @see DisfavorForm
|
||||
*/
|
||||
|
||||
class FavorForm extends Form
|
||||
{
|
||||
/**
|
||||
* Notice to favor
|
||||
*/
|
||||
|
||||
var $notice = null;
|
||||
|
||||
/**
|
||||
@ -61,7 +59,6 @@ class FavorForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param Notice $notice notice to favor
|
||||
*/
|
||||
|
||||
function __construct($out=null, $notice=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -74,7 +71,6 @@ class FavorForm extends Form
|
||||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'favor-' . $this->notice->id;
|
||||
@ -85,7 +81,6 @@ class FavorForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('favor');
|
||||
@ -96,14 +91,12 @@ class FavorForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function sessionToken()
|
||||
{
|
||||
$this->out->hidden('token-' . $this->notice->id,
|
||||
common_session_token());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Legend of the Form
|
||||
*
|
||||
@ -111,16 +104,15 @@ class FavorForm extends 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))) {
|
||||
@ -136,19 +128,22 @@ class FavorForm extends Form
|
||||
*
|
||||
* @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';
|
||||
|
@ -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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FeaturedUsersSection extends ProfileSection
|
||||
{
|
||||
function getProfiles()
|
||||
@ -84,6 +83,7 @@ class FeaturedUsersSection extends ProfileSection
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for featured users section.
|
||||
return _('Featured users');
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
||||
*
|
||||
* @see HTMLOutputter
|
||||
*/
|
||||
|
||||
class PersonalGroupNav extends Widget
|
||||
{
|
||||
var $action = null;
|
||||
@ -62,7 +61,6 @@ class PersonalGroupNav extends Widget
|
||||
*
|
||||
* @param Action $action current action, used for output
|
||||
*/
|
||||
|
||||
function __construct($action=null)
|
||||
{
|
||||
parent::__construct($action);
|
||||
@ -74,7 +72,6 @@ class PersonalGroupNav extends Widget
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$user = null;
|
||||
@ -99,22 +96,29 @@ class PersonalGroupNav extends Widget
|
||||
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');
|
||||
|
||||
@ -125,12 +129,16 @@ class PersonalGroupNav extends Widget
|
||||
|
||||
$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');
|
||||
}
|
||||
|
@ -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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class PersonalTagCloudSection extends TagCloudSection
|
||||
{
|
||||
var $user = null;
|
||||
@ -53,6 +52,7 @@ class PersonalTagCloudSection extends TagCloudSection
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for personal tag cloud section. %s is a user nickname.
|
||||
return sprintf(_('Tags in %s\'s notices'), $this->user->nickname);
|
||||
}
|
||||
|
||||
@ -84,5 +84,4 @@ class PersonalTagCloudSection extends TagCloudSection
|
||||
3600);
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class PopularNoticeSection extends NoticeSection
|
||||
{
|
||||
function getNotices()
|
||||
@ -59,6 +58,7 @@ class PopularNoticeSection extends NoticeSection
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Title for favourited notices section.
|
||||
return _('Popular notices');
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class ProfileFormAction extends RedirectingAction
|
||||
{
|
||||
var $profile = null;
|
||||
@ -52,7 +51,6 @@ class ProfileFormAction extends RedirectingAction
|
||||
*
|
||||
* @return boolean success flag
|
||||
*/
|
||||
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
@ -61,6 +59,7 @@ class ProfileFormAction extends RedirectingAction
|
||||
|
||||
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.
|
||||
@ -76,6 +75,7 @@ class ProfileFormAction extends RedirectingAction
|
||||
$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;
|
||||
}
|
||||
@ -83,6 +83,7 @@ class ProfileFormAction extends RedirectingAction
|
||||
$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;
|
||||
}
|
||||
@ -99,7 +100,6 @@ class ProfileFormAction extends RedirectingAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
@ -117,9 +117,9 @@ class ProfileFormAction extends RedirectingAction
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function handlePost()
|
||||
{
|
||||
// TRANS: Server error displayed when using an unimplemented method.
|
||||
$this->serverError(_("Unimplemented method."));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user