i18n/L10n updates.
Translator documentation updated. Superfluous whitespace removed. Some FIXMEs added.
This commit is contained in:
parent
c17d8e0f5f
commit
7abecb61bd
@ -199,6 +199,7 @@ class ApiAuthAction extends ApiAction
|
||||
$user = User::staticGet('id', $appUser->profile_id);
|
||||
if (!empty($user)) {
|
||||
if (!$user->hasRight(Right::API)) {
|
||||
// TRANS: Authorization exception thrown when a user without API access tries to access the API.
|
||||
throw new AuthorizationException(_('Not allowed to use API.'));
|
||||
}
|
||||
}
|
||||
@ -225,7 +226,7 @@ class ApiAuthAction extends ApiAction
|
||||
throw new OAuthException(_('Bad access token.'));
|
||||
}
|
||||
} else {
|
||||
// Also should not happen
|
||||
// Also should not happen.
|
||||
// TRANS: OAuth exception given when no user was found for a given token (no token was found).
|
||||
throw new OAuthException(_('No user for that token.'));
|
||||
}
|
||||
@ -281,6 +282,7 @@ class ApiAuthAction extends ApiAction
|
||||
|
||||
if (!empty($user)) {
|
||||
if (!$user->hasRight(Right::API)) {
|
||||
// TRANS: Authorization exception thrown when a user without API access tries to access the API.
|
||||
throw new AuthorizationException(_('Not allowed to use API.'));
|
||||
}
|
||||
$this->auth_user = $user;
|
||||
|
@ -21,6 +21,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
|
||||
require_once INSTALLDIR . '/lib/oauthstore.php';
|
||||
|
||||
// @todo FIXME: Class documentation missing.
|
||||
class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
{
|
||||
function lookup_consumer($consumerKey)
|
||||
@ -90,7 +91,7 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
);
|
||||
|
||||
if (empty($req_token)) {
|
||||
common_debug("couldn't get request token from oauth datastore");
|
||||
common_debug("Couldn't get request token from oauth datastore");
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -312,8 +313,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
if (!$result) {
|
||||
common_log_db_error($appUser, 'INSERT', __FILE__);
|
||||
|
||||
// TRANS: Server error displayed when a database error occurs.
|
||||
throw new Exception(
|
||||
// TRANS: Exception thrown when a database error occurs.
|
||||
_('Database error inserting OAuth application user.')
|
||||
);
|
||||
}
|
||||
@ -340,8 +341,8 @@ class ApiStatusNetOAuthDataStore extends StatusNetOAuthDataStore
|
||||
|
||||
if (!$result) {
|
||||
common_log_db_error($appUser, 'UPDATE', __FILE__);
|
||||
// TRANS: Server error displayed when a database error occurs.
|
||||
throw new Exception(
|
||||
// TRANS: Exception thrown when a database error occurs.
|
||||
_('Database error updating OAuth application user.')
|
||||
);
|
||||
}
|
||||
|
@ -237,13 +237,16 @@ class ConnectedAppsList extends Widget
|
||||
$this->out->elementEnd('a');
|
||||
|
||||
if ($app->name == 'anonymous') {
|
||||
$this->out->element('span', 'fn', "Unknown application");
|
||||
// TRANS: Name for an anonymous application in application list.
|
||||
$this->out->element('span', 'fn', _('Unknown application'));
|
||||
}
|
||||
|
||||
$this->out->elementEnd('span');
|
||||
|
||||
if ($app->name != 'anonymous') {
|
||||
// @todo FIXME: i18n trouble.
|
||||
// TRANS: Message has a leading space and a trailing space. Used in application list.
|
||||
// TRANS: Before this message the application name is put, behind it the organisation that manages it.
|
||||
$this->out->raw(_(' by '));
|
||||
|
||||
$this->out->element(
|
||||
@ -267,6 +270,7 @@ class ConnectedAppsList extends Widget
|
||||
// TRANS: Used in application list. %1$s is a modified date, %2$s is access type ("read-write" or "read-only")
|
||||
$txt = sprintf(_('Approved %1$s - "%2$s" access.'), $modifiedDate, $access);
|
||||
|
||||
// @todo FIXME: i18n trouble.
|
||||
$this->out->raw(" - $txt");
|
||||
if (!empty($app->description)) {
|
||||
$this->out->element(
|
||||
@ -294,7 +298,7 @@ class ConnectedAppsList extends Widget
|
||||
$this->out->elementStart('fieldset');
|
||||
$this->out->hidden('oauth_token', $this->connection->token);
|
||||
$this->out->hidden('token', common_session_token());
|
||||
// TRANS: Button label
|
||||
// TRANS: Button label in application list to revoke access to user data.
|
||||
$this->out->submit('revoke', _m('BUTTON','Revoke'));
|
||||
$this->out->elementEnd('fieldset');
|
||||
$this->out->elementEnd('form');
|
||||
|
@ -108,8 +108,8 @@ class Atom10Feed extends XMLStringer
|
||||
if (!empty($name)) {
|
||||
$xs->element('name', null, $name);
|
||||
} else {
|
||||
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
|
||||
throw new Atom10FeedException(
|
||||
// TRANS: Atom feed exception thrown when an author element does not contain a name element.
|
||||
_('Author element must contain a name element.')
|
||||
);
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ class DBErrorAction extends ServerErrorAction
|
||||
|
||||
function title()
|
||||
{
|
||||
// TRANS: Page title for when a database error occurs.
|
||||
return _('Database error');
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
* @link http://status.net/
|
||||
*
|
||||
*/
|
||||
|
||||
class DesignForm extends Form
|
||||
{
|
||||
/**
|
||||
@ -62,7 +61,6 @@ class DesignForm extends Form
|
||||
* @param Design $design initial design
|
||||
* @param Design $actionurl url of action (for form posting)
|
||||
*/
|
||||
|
||||
function __construct($out, $design, $actionurl)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -76,7 +74,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return int ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'design';
|
||||
@ -87,7 +84,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return string class of the form
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_design';
|
||||
@ -98,7 +94,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return $this->actionurl;
|
||||
@ -111,6 +106,7 @@ class DesignForm extends Form
|
||||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend of form for changing the page design.
|
||||
$this->out->element('legend', null, _('Change design'));
|
||||
}
|
||||
|
||||
@ -119,7 +115,6 @@ class DesignForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formData()
|
||||
{
|
||||
$this->backgroundData();
|
||||
@ -137,7 +132,7 @@ class DesignForm extends Form
|
||||
// TRANS: Button text on profile design page to immediately reset all colour settings to default.
|
||||
$this->out->submit('defaults', _('Use defaults'), 'submit form_action-default',
|
||||
// TRANS: Title for button on profile design page to reset all colour settings to default.
|
||||
'defaults', _('Restore default designs'));
|
||||
'defaults', _('Restore default designs.'));
|
||||
|
||||
$this->out->element('input', array('id' => 'settings_design_reset',
|
||||
'type' => 'reset',
|
||||
@ -145,7 +140,7 @@ class DesignForm extends Form
|
||||
'value' => _m('BUTTON', 'Reset'),
|
||||
'class' => 'submit form_action-primary',
|
||||
// TRANS: Title for button on profile design page to reset all colour settings to default without saving.
|
||||
'title' => _('Reset back to default')));
|
||||
'title' => _('Reset back to default.')));
|
||||
}
|
||||
|
||||
function backgroundData()
|
||||
@ -161,7 +156,7 @@ class DesignForm extends Form
|
||||
'id' => 'design_background-image_file'));
|
||||
// TRANS: Instructions for form on profile design page.
|
||||
$this->out->element('p', 'form_guide', _('You can upload your personal ' .
|
||||
'background image. The maximum file size is 2Mb.'));
|
||||
'background image. The maximum file size is 2MB.'));
|
||||
$this->out->element('input', array('name' => 'MAX_FILE_SIZE',
|
||||
'type' => 'hidden',
|
||||
'id' => 'MAX_FILE_SIZE',
|
||||
@ -319,6 +314,6 @@ class DesignForm extends Form
|
||||
// TRANS: Button text on profile design page to save settings.
|
||||
$this->out->submit('save', _m('BUTTON','Save'), 'submit form_action-secondary',
|
||||
// TRANS: Title for button on profile design page to save settings.
|
||||
'save', _('Save design'));
|
||||
'save', _('Save design.'));
|
||||
}
|
||||
}
|
||||
|
@ -81,12 +81,16 @@ class Feed
|
||||
{
|
||||
switch ($this->type) {
|
||||
case Feed::RSS1:
|
||||
// TRANS: Feed type name.
|
||||
return _('RSS 1.0');
|
||||
case Feed::RSS2:
|
||||
// TRANS: Feed type name.
|
||||
return _('RSS 2.0');
|
||||
case Feed::ATOM:
|
||||
// TRANS: Feed type name.
|
||||
return _('Atom');
|
||||
case Feed::FOAF:
|
||||
// TRANS: Feed type name. FOAF stands for Friend of a Friend.
|
||||
return _('FOAF');
|
||||
default:
|
||||
return null;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2010, StatusNet, Inc.
|
||||
*
|
||||
* Importer for feeds of activities
|
||||
*
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class FeedImporter extends QueueHandler
|
||||
{
|
||||
/**
|
||||
@ -55,7 +54,6 @@ class FeedImporter extends QueueHandler
|
||||
*
|
||||
* @return string identifier for this queue handler
|
||||
*/
|
||||
|
||||
public function transport()
|
||||
{
|
||||
return 'feedimp';
|
||||
@ -72,13 +70,15 @@ class FeedImporter extends QueueHandler
|
||||
|
||||
if ($feed->namespaceURI != Activity::ATOM ||
|
||||
$feed->localName != 'feed') {
|
||||
throw new ClientException(_("Not an atom feed."));
|
||||
// TRANS: Client exception thrown when an imported feed is not an Atom feed.
|
||||
throw new ClientException(_("Not an Atom feed."));
|
||||
}
|
||||
|
||||
|
||||
$author = ActivityUtils::getFeedAuthor($feed);
|
||||
|
||||
if (empty($author)) {
|
||||
// TRANS: Client exception thrown when an imported feed does not have an author.
|
||||
throw new ClientException(_("No author in the feed."));
|
||||
}
|
||||
|
||||
@ -86,7 +86,9 @@ class FeedImporter extends QueueHandler
|
||||
if ($trusted) {
|
||||
$user = $this->userFromAuthor($author);
|
||||
} else {
|
||||
throw new ClientException(_("Can't import without a user."));
|
||||
// TRANS: Client exception thrown when an imported feed does not have an author that
|
||||
// TRANS: can be associated with a user.
|
||||
throw new ClientException(_("Cannot import without a user."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +129,6 @@ class FeedImporter extends QueueHandler
|
||||
/**
|
||||
* Sort activities oldest-first
|
||||
*/
|
||||
|
||||
static function activitySort($a, $b)
|
||||
{
|
||||
if ($a->time == $b->time) {
|
||||
@ -154,7 +155,7 @@ class FeedImporter extends QueueHandler
|
||||
$profile = $user->getProfile();
|
||||
Ostatus_profile::updateProfile($profile, $author);
|
||||
|
||||
// FIXME: Update avatar
|
||||
// @todo FIXME: Update avatar
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ require_once INSTALLDIR.'/lib/profilelist.php';
|
||||
|
||||
define('AVATARS_PER_PAGE', 80);
|
||||
|
||||
// @todo FIXME: Class documentation missing.
|
||||
class GalleryAction extends OwnerDesignAction
|
||||
{
|
||||
var $profile = null;
|
||||
@ -56,6 +57,7 @@ class GalleryAction extends OwnerDesignAction
|
||||
$this->user = User::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$this->user) {
|
||||
// TRANS: Client error displayed when trying to perform a gallery action with an unknown user.
|
||||
$this->clientError(_('No such user.'), 404);
|
||||
return false;
|
||||
}
|
||||
@ -63,6 +65,7 @@ class GalleryAction extends OwnerDesignAction
|
||||
$this->profile = $this->user->getProfile();
|
||||
|
||||
if (!$this->profile) {
|
||||
// TRANS: Server error displayed when trying to perform a gallery action with a user without a profile.
|
||||
$this->serverError(_('User has no profile.'));
|
||||
return false;
|
||||
}
|
||||
@ -125,7 +128,8 @@ class GalleryAction extends OwnerDesignAction
|
||||
common_local_url($this->trimmed('action'),
|
||||
array('nickname' =>
|
||||
$this->user->nickname))),
|
||||
_('All'));
|
||||
// TRANS: List element on gallery action page to show all tags.
|
||||
_m('TAGS','All'));
|
||||
$this->elementEnd('li');
|
||||
$this->elementStart('li', array('id'=>'filter_tags_item'));
|
||||
$this->elementStart('form', array('name' => 'bytag',
|
||||
@ -133,11 +137,15 @@ class GalleryAction extends OwnerDesignAction
|
||||
'action' => common_path('?action=' . $this->trimmed('action')),
|
||||
'method' => 'post'));
|
||||
$this->elementStart('fieldset');
|
||||
// TRANS: Fieldset legend on gallery action page.
|
||||
$this->element('legend', null, _('Select tag to filter'));
|
||||
// TRANS: Dropdown field label on gallery action page for a list containing tags.
|
||||
$this->dropdown('tag', _('Tag'), $content,
|
||||
_('Choose a tag to narrow list'), false, $tag);
|
||||
// TRANS: Dropdown field title on gallery action page for a list containing tags.
|
||||
_('Choose a tag to narrow list.'), false, $tag);
|
||||
$this->hidden('nickname', $this->user->nickname);
|
||||
$this->submit('submit', _('Go'));
|
||||
// TRANS: Submit button text on gallery action page.
|
||||
$this->submit('submit', _m('BUTTON','Go'));
|
||||
$this->elementEnd('fieldset');
|
||||
$this->elementEnd('form');
|
||||
$this->elementEnd('li');
|
||||
@ -146,7 +154,6 @@ class GalleryAction extends OwnerDesignAction
|
||||
}
|
||||
|
||||
// Get list of tags we tagged other users with
|
||||
|
||||
function getTags($lst, $usr)
|
||||
{
|
||||
$profile_tag = new Notice_tag();
|
||||
|
@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
|
||||
*
|
||||
* @see UnSandboxForm
|
||||
*/
|
||||
|
||||
class GrantRoleForm extends ProfileActionForm
|
||||
{
|
||||
function __construct($role, $label, $writer, $profile, $r2args)
|
||||
@ -57,7 +56,6 @@ class GrantRoleForm extends ProfileActionForm
|
||||
*
|
||||
* @return string Name of the action, lowercased.
|
||||
*/
|
||||
|
||||
function target()
|
||||
{
|
||||
return 'grantrole';
|
||||
@ -68,7 +66,6 @@ class GrantRoleForm extends ProfileActionForm
|
||||
*
|
||||
* @return string Title of the form, internationalized
|
||||
*/
|
||||
|
||||
function title()
|
||||
{
|
||||
return $this->label;
|
||||
@ -85,9 +82,9 @@ class GrantRoleForm extends ProfileActionForm
|
||||
*
|
||||
* @return string description of the form, internationalized
|
||||
*/
|
||||
|
||||
function description()
|
||||
{
|
||||
// TRANS: Description on form for granting a role.
|
||||
return sprintf(_('Grant this user the "%s" role'), $this->label);
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,9 @@ class GroupEditForm extends Form
|
||||
$this->out->dropdown('join_policy',
|
||||
// TRANS: Dropdown fieldd label on group edit form.
|
||||
_('Membership policy'),
|
||||
// TRANS: Group membership policy option.
|
||||
array(User_group::JOIN_POLICY_OPEN => _('Open to all'),
|
||||
// TRANS: Group membership policy option.
|
||||
User_group::JOIN_POLICY_MODERATE => _('Admin must approve all members')),
|
||||
// TRANS: Dropdown field title on group edit form.
|
||||
_('Whether admin approval is required to join this group.'),
|
||||
|
@ -42,7 +42,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/
|
||||
*/
|
||||
|
||||
abstract class ImPlugin extends Plugin
|
||||
{
|
||||
//name of this IM transport
|
||||
@ -249,7 +248,7 @@ abstract class ImPlugin extends Plugin
|
||||
}
|
||||
|
||||
/**
|
||||
* send a confirmation code to a user
|
||||
* Send a confirmation code to a user
|
||||
*
|
||||
* @param string $screenname screenname sending to
|
||||
* @param string $code the confirmation code
|
||||
@ -259,12 +258,16 @@ abstract class ImPlugin extends Plugin
|
||||
*/
|
||||
function sendConfirmationCode($screenname, $code, $user)
|
||||
{
|
||||
$body = sprintf(_('User "%s" on %s has said that your %s screenname belongs to them. ' .
|
||||
'If that\'s true, you can confirm by clicking on this URL: ' .
|
||||
'%s' .
|
||||
// @todo FIXME: parameter 4 is not being used. Should para3 and para4 be a markdown link?
|
||||
// TRANS: Body text for confirmation code e-mail.
|
||||
// TRANS: %1$s is a user nickname, %2$s is the StatusNet sitename,
|
||||
// TRANS: %3$s is the display name of an IM plugin.
|
||||
$body = sprintf(_('User "%1$s" on %2$s has said that your %2$s screenname belongs to them. ' .
|
||||
'If that is true, you can confirm by clicking on this URL: ' .
|
||||
'%3$s' .
|
||||
' . (If you cannot click it, copy-and-paste it into the ' .
|
||||
'address bar of your browser). If that user isn\'t you, ' .
|
||||
'or if you didn\'t request this confirmation, just ignore this message.'),
|
||||
'address bar of your browser). If that user is not you, ' .
|
||||
'or if you did not request this confirmation, just ignore this message.'),
|
||||
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
|
||||
|
||||
return $this->sendMessage($screenname, $body);
|
||||
@ -316,7 +319,6 @@ abstract class ImPlugin extends Plugin
|
||||
|
||||
function broadcastNotice($notice)
|
||||
{
|
||||
|
||||
$ni = $notice->whoGets();
|
||||
|
||||
foreach ($ni as $user_id => $reason) {
|
||||
@ -346,7 +348,9 @@ abstract class ImPlugin extends Plugin
|
||||
case NOTICE_INBOX_SOURCE_GROUP:
|
||||
break;
|
||||
default:
|
||||
throw new Exception(sprintf(_("Unknown inbox source %d."), $reason));
|
||||
// TRANS: Exception thrown when trying to deliver a notice to an unknown inbox.
|
||||
// TRANS: %d is the unknown inbox ID (number).
|
||||
throw new Exception(sprintf(_('Unknown inbox source %d.'), $reason));
|
||||
}
|
||||
|
||||
common_log(LOG_INFO,
|
||||
@ -483,6 +487,8 @@ abstract class ImPlugin extends Plugin
|
||||
$content_shortened = common_shorten_links($body);
|
||||
if (Notice::contentTooLong($content_shortened)) {
|
||||
$this->sendFromSite($screenname,
|
||||
// TRANS: Message given when a status is too long. %1$s is the maximum number of characters,
|
||||
// TRANS: %2$s is the number of characters sent (used for plural).
|
||||
sprintf(_m('Message too long - maximum is %1$d character, you sent %2$d.',
|
||||
'Message too long - maximum is %1$d characters, you sent %2$d.',
|
||||
Notice::maxContent()),
|
||||
@ -619,11 +625,13 @@ abstract class ImPlugin extends Plugin
|
||||
{
|
||||
if( ! common_config('queue', 'enabled'))
|
||||
{
|
||||
throw new ServerException("Queueing must be enabled to use IM plugins");
|
||||
// TRANS: Server exception thrown trying to initialise an IM plugin without meeting all prerequisites.
|
||||
throw new ServerException(_('Queueing must be enabled to use IM plugins.'));
|
||||
}
|
||||
|
||||
if(is_null($this->transport)){
|
||||
throw new ServerException('transport cannot be null');
|
||||
// TRANS: Server exception thrown trying to initialise an IM plugin without a transport method.
|
||||
throw new ServerException(_('Transport cannot be null.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/form.php';
|
||||
*
|
||||
* @see UnsubscribeForm
|
||||
*/
|
||||
|
||||
class LeaveForm extends Form
|
||||
{
|
||||
/**
|
||||
@ -61,7 +60,6 @@ class LeaveForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to leave
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -74,7 +72,6 @@ class LeaveForm extends Form
|
||||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-leave-' . $this->group->id;
|
||||
@ -85,7 +82,6 @@ class LeaveForm extends Form
|
||||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_leave ajax';
|
||||
@ -96,7 +92,6 @@ class LeaveForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('leavegroup',
|
||||
@ -108,9 +103,9 @@ class LeaveForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('submit', _('Leave'));
|
||||
// TRANS: Button text on form to leave a group.
|
||||
$this->out->submit('submit', _m('BUTTON','Leave'));
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2011, StatusNet, Inc.
|
||||
*
|
||||
* Primary nav, show on all pages
|
||||
*
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -54,34 +54,43 @@ class PrimaryNav extends Menu
|
||||
if (Event::handle('StartPrimaryNav', array($this->action))) {
|
||||
if (!empty($user)) {
|
||||
$this->action->menuItem(common_local_url('profilesettings'),
|
||||
_m('Settings'),
|
||||
_m('Change your personal settings'),
|
||||
// TRANS: Menu item in primary navigation panel.
|
||||
_m('MENU','Settings'),
|
||||
// TRANS: Menu item title in primary navigation panel.
|
||||
_('Change your personal settings'),
|
||||
false,
|
||||
'nav_account');
|
||||
if ($user->hasRight(Right::CONFIGURESITE)) {
|
||||
$this->action->menuItem(common_local_url('siteadminpanel'),
|
||||
_m('Admin'),
|
||||
_m('Site configuration'),
|
||||
// TRANS: Menu item in primary navigation panel.
|
||||
_m('MENU','Admin'),
|
||||
// TRANS: Menu item title in primary navigation panel.
|
||||
_('Site configuration'),
|
||||
false,
|
||||
'nav_admin');
|
||||
}
|
||||
$this->action->menuItem(common_local_url('logout'),
|
||||
_m('Logout'),
|
||||
_m('Logout from the site'),
|
||||
// TRANS: Menu item in primary navigation panel.
|
||||
_m('MENU','Logout'),
|
||||
_('Logout from the site'),
|
||||
false,
|
||||
'nav_logout');
|
||||
} else {
|
||||
$this->action->menuItem(common_local_url('login'),
|
||||
_m('Login'),
|
||||
_m('Login to the site'),
|
||||
// TRANS: Menu item in primary navigation panel.
|
||||
_m('MENU','Login'),
|
||||
// TRANS: Menu item title in primary navigation panel.
|
||||
_('Login to the site'),
|
||||
false,
|
||||
'nav_login');
|
||||
}
|
||||
|
||||
if (!empty($user) || !common_config('site', 'private')) {
|
||||
$this->action->menuItem(common_local_url('noticesearch'),
|
||||
_m('Search'),
|
||||
_m('Search the site'),
|
||||
// TRANS: Menu item in primary navigation panel.
|
||||
_m('MENU','Search'),
|
||||
// TRANS: Menu item title in primary navigation panel.
|
||||
_('Search the site'),
|
||||
false,
|
||||
'nav_search');
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
||||
*
|
||||
* @see Widget
|
||||
*/
|
||||
|
||||
class PublicGroupNav extends Menu
|
||||
{
|
||||
/**
|
||||
@ -53,7 +52,6 @@ class PublicGroupNav extends Menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$action_name = $this->action->trimmed('action');
|
||||
@ -61,22 +59,32 @@ class PublicGroupNav extends Menu
|
||||
$this->action->elementStart('ul', array('class' => 'nav'));
|
||||
|
||||
if (Event::handle('StartPublicGroupNav', array($this))) {
|
||||
$this->out->menuItem(common_local_url('public'), _('Public'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('public'), _m('MENU','Public'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Public timeline'), $action_name == 'public', 'nav_timeline_public');
|
||||
|
||||
$this->out->menuItem(common_local_url('groups'), _('Groups'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('groups'), _m('MENU','Groups'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('User groups'), $action_name == 'groups', 'nav_groups');
|
||||
|
||||
$this->out->menuItem(common_local_url('publictagcloud'), _('Recent tags'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('publictagcloud'), _m('MENU','Recent tags'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Recent tags'), $action_name == 'publictagcloud', 'nav_recent-tags');
|
||||
|
||||
if (count(common_config('nickname', 'featured')) > 0) {
|
||||
$this->out->menuItem(common_local_url('featured'), _('Featured'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('featured'), _m('MENU','Featured'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Featured users'), $action_name == 'featured', 'nav_featured');
|
||||
}
|
||||
|
||||
$this->out->menuItem(common_local_url('favorited'), _('Popular'),
|
||||
_("Popular notices"), $action_name == 'favorited', 'nav_timeline_favorited');
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('favorited'), _m('MENU','Popular'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Popular notices'), $action_name == 'favorited', 'nav_timeline_favorited');
|
||||
|
||||
Event::handle('EndPublicGroupNav', array($this));
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
*
|
||||
* @see Widget
|
||||
*/
|
||||
|
||||
class SearchGroupNav extends Menu
|
||||
{
|
||||
var $q = null;
|
||||
@ -52,7 +51,6 @@ class SearchGroupNav extends Menu
|
||||
*
|
||||
* @param Action $action current action, used for output
|
||||
*/
|
||||
|
||||
function __construct($action=null, $q = null)
|
||||
{
|
||||
parent::__construct($action);
|
||||
@ -64,7 +62,6 @@ class SearchGroupNav extends Menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$action_name = $this->action->trimmed('action');
|
||||
@ -73,13 +70,18 @@ class SearchGroupNav extends Menu
|
||||
if ($this->q) {
|
||||
$args['q'] = $this->q;
|
||||
}
|
||||
$this->out->menuItem(common_local_url('peoplesearch', $args), _('People'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('peoplesearch', $args), _m('MENU','People'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Find people on this site'), $action_name == 'peoplesearch', 'nav_search_people');
|
||||
$this->out->menuItem(common_local_url('noticesearch', $args), _('Notices'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('noticesearch', $args), _m('MENU','Notices'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Find content of notices'), $action_name == 'noticesearch', 'nav_search_notice');
|
||||
$this->out->menuItem(common_local_url('groupsearch', $args), _('Groups'),
|
||||
// TRANS: Menu item in search group navigation panel.
|
||||
$this->out->menuItem(common_local_url('groupsearch', $args), _m('MENU','Groups'),
|
||||
// TRANS: Menu item title in search group navigation panel.
|
||||
_('Find groups on this site'), $action_name == 'groupsearch', 'nav_search_group');
|
||||
$this->action->elementEnd('ul');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class SecondaryNav extends Menu
|
||||
{
|
||||
function show()
|
||||
@ -53,36 +52,36 @@ class SecondaryNav extends Menu
|
||||
'id' => 'site_nav_global_secondary'));
|
||||
if (Event::handle('StartSecondaryNav', array($this->action))) {
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'help')),
|
||||
// TRANS: Secondary navigation menu option leading to help on StatusNet.
|
||||
_('Help'));
|
||||
// TRANS: Secondary navigation menu item leading to help on StatusNet.
|
||||
_m('MENU','Help'));
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'about')),
|
||||
// TRANS: Secondary navigation menu option leading to text about StatusNet site.
|
||||
_('About'));
|
||||
// TRANS: Secondary navigation menu item leading to text about StatusNet site.
|
||||
_m('MENU','About'));
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'faq')),
|
||||
// TRANS: Secondary navigation menu option leading to Frequently Asked Questions.
|
||||
_('FAQ'));
|
||||
// TRANS: Secondary navigation menu item leading to Frequently Asked Questions.
|
||||
_m('MENU','FAQ'));
|
||||
$bb = common_config('site', 'broughtby');
|
||||
if (!empty($bb)) {
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'tos')),
|
||||
// TRANS: Secondary navigation menu option leading to Terms of Service.
|
||||
_('TOS'));
|
||||
// TRANS: Secondary navigation menu item leading to Terms of Service.
|
||||
_m('MENU','TOS'));
|
||||
}
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'privacy')),
|
||||
// TRANS: Secondary navigation menu option leading to privacy policy.
|
||||
_('Privacy'));
|
||||
// TRANS: Secondary navigation menu item leading to privacy policy.
|
||||
_m('MENU','Privacy'));
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'source')),
|
||||
// TRANS: Secondary navigation menu option. Leads to information about StatusNet and its license.
|
||||
_('Source'));
|
||||
// TRANS: Secondary navigation menu item. Leads to information about StatusNet and its license.
|
||||
_m('MENU','Source'));
|
||||
$this->out->menuItem(common_local_url('version'),
|
||||
// TRANS: Secondary navigation menu option leading to version information on the StatusNet site.
|
||||
_('Version'));
|
||||
// TRANS: Secondary navigation menu item leading to version information on the StatusNet site.
|
||||
_m('MENU','Version'));
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'contact')),
|
||||
// TRANS: Secondary navigation menu option leading to e-mail contact information on the
|
||||
// TRANS: Secondary navigation menu item leading to e-mail contact information on the
|
||||
// TRANS: StatusNet site, where to report bugs, ...
|
||||
_('Contact'));
|
||||
_m('MENU','Contact'));
|
||||
$this->out->menuItem(common_local_url('doc', array('title' => 'badge')),
|
||||
// TRANS: Secondary navigation menu option. Leads to information about embedding a timeline widget.
|
||||
_('Badge'));
|
||||
// TRANS: Secondary navigation menu item. Leads to information about embedding a timeline widget.
|
||||
_m('MENU','Badge'));
|
||||
Event::handle('EndSecondaryNav', array($this->action));
|
||||
}
|
||||
$this->out->elementEnd('ul');
|
||||
|
@ -108,6 +108,7 @@ class SubGroupNav extends Menu
|
||||
array('nickname' =>
|
||||
$this->user->nickname)),
|
||||
// TRANS: Menu item in local navigation menu.
|
||||
// TRANS: %d is the number of pending subscription requests.
|
||||
sprintf(_m('MENU','Pending (%d)'), $pending),
|
||||
// TRANS: Menu item title in local navigation menu.
|
||||
sprintf(_('Approve pending subscription requests.'),
|
||||
|
Loading…
Reference in New Issue
Block a user