forked from GNUsocial/gnu-social
Update translator documentation.
i18n/L10n updates. Superfluous whitespace removed. Add FIXME in files with missing documentation.
This commit is contained in:
parent
483922f1c4
commit
3be26565fb
@ -98,6 +98,7 @@ class ApprovegroupAction extends Action
|
||||
|
||||
$cur = common_current_user();
|
||||
if (empty($cur)) {
|
||||
// TRANS: Client error displayed trying to approve group membership while not logged in.
|
||||
$this->clientError(_('Must be logged in.'), 403);
|
||||
return false;
|
||||
}
|
||||
@ -105,10 +106,12 @@ class ApprovegroupAction extends Action
|
||||
if ($cur->isAdmin($this->group)) {
|
||||
$this->profile = Profile::staticGet('id', $this->arg('profile_id'));
|
||||
} else {
|
||||
// TRANS: Client error displayed trying to approve group membership while not a group administrator.
|
||||
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// TRANS: Client error displayed trying to approve group membership without specifying a profile to approve.
|
||||
$this->clientError(_('Must specify a profile.'));
|
||||
return false;
|
||||
}
|
||||
@ -117,15 +120,18 @@ class ApprovegroupAction extends Action
|
||||
'group_id' => $this->group->id));
|
||||
|
||||
if (empty($this->request)) {
|
||||
// TRANS: Client error displayed trying to approve group membership for a non-existing request.
|
||||
$this->clientError(sprintf(_('%s is not in the moderation queue for this group.'), $this->profile->nickname), 403);
|
||||
}
|
||||
|
||||
$this->approve = (bool)$this->arg('approve');
|
||||
$this->cancel = (bool)$this->arg('cancel');
|
||||
if (!$this->approve && !$this->cancel) {
|
||||
// TRANS: Client error displayed trying to approve/deny group membership.
|
||||
$this->clientError(_('Internal error: received neither cancel nor abort.'));
|
||||
}
|
||||
if ($this->approve && $this->cancel) {
|
||||
// TRANS: Client error displayed trying to approve/deny group membership.
|
||||
$this->clientError(_('Internal error: received both cancel and abort.'));
|
||||
}
|
||||
return true;
|
||||
|
@ -68,7 +68,6 @@ class CancelgroupAction extends Action
|
||||
$nickname = common_canonical_nickname($nickname_arg);
|
||||
|
||||
// Permanent redirect on non-canonical nickname
|
||||
|
||||
if ($nickname_arg != $nickname) {
|
||||
$args = array('nickname' => $nickname);
|
||||
common_redirect(common_local_url('leavegroup', $args), 301);
|
||||
@ -98,6 +97,7 @@ class CancelgroupAction extends Action
|
||||
|
||||
$cur = common_current_user();
|
||||
if (empty($cur)) {
|
||||
// TRANS: Client error displayed when trying to leave a group while not logged in.
|
||||
$this->clientError(_('Must be logged in.'), 403);
|
||||
return false;
|
||||
}
|
||||
@ -105,6 +105,8 @@ class CancelgroupAction extends Action
|
||||
if ($cur->isAdmin($this->group)) {
|
||||
$this->profile = Profile::staticGet('id', $this->arg('profile_id'));
|
||||
} else {
|
||||
// TRANS: Client error displayed when trying to approve or cancel a group join request without
|
||||
// TRANS: being a group administrator.
|
||||
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
|
||||
return false;
|
||||
}
|
||||
@ -116,6 +118,8 @@ class CancelgroupAction extends Action
|
||||
'group_id' => $this->group->id));
|
||||
|
||||
if (empty($this->request)) {
|
||||
// TRANS: Client error displayed when trying to approve a non-existing group join request.
|
||||
// TRANS: %s is a user nickname.
|
||||
$this->clientError(sprintf(_('%s is not in the moderation queue for this group.'), $this->profile->nickname), 403);
|
||||
}
|
||||
return true;
|
||||
@ -149,6 +153,7 @@ class CancelgroupAction extends Action
|
||||
$this->startHTML('text/xml;charset=utf-8');
|
||||
$this->elementStart('head');
|
||||
// TRANS: Title for leave group page after leaving.
|
||||
// TRANS: %s$s is the leaving user's name, %2$s is the group name.
|
||||
$this->element('title', null, sprintf(_m('TITLE','%1$s left group %2$s'),
|
||||
$this->profile->nickname,
|
||||
$this->group->nickname));
|
||||
|
@ -52,7 +52,7 @@ class GroupqueueAction extends GroupDesignAction
|
||||
return true;
|
||||
}
|
||||
|
||||
// fixme most of this belongs in a base class, sounds common to most group actions?
|
||||
// @todo FIXME: most of this belongs in a base class, sounds common to most group actions?
|
||||
function prepare($args)
|
||||
{
|
||||
parent::prepare($args);
|
||||
@ -96,6 +96,7 @@ class GroupqueueAction extends GroupDesignAction
|
||||
|
||||
$cur = common_current_user();
|
||||
if (!$cur || !$cur->isAdmin($this->group)) {
|
||||
// TRANS: Client error displayed when trying to approve group applicants without being a group administrator.
|
||||
$this->clientError(_('Only the group admin may approve users.'));
|
||||
return false;
|
||||
}
|
||||
@ -105,12 +106,12 @@ class GroupqueueAction extends GroupDesignAction
|
||||
function title()
|
||||
{
|
||||
if ($this->page == 1) {
|
||||
// TRANS: Title of the page showing pending group members still awaiting approval to join the group.
|
||||
// TRANS: Title of the first page showing pending group members still awaiting approval to join the group.
|
||||
// TRANS: %s is the name of the group.
|
||||
return sprintf(_('%s group members awaiting approval'),
|
||||
$this->group->nickname);
|
||||
} else {
|
||||
// TRANS: Title of the page showing pending group members still awaiting approval to join the group.
|
||||
// TRANS: Title of all but the first page showing pending group members still awaiting approval to join the group.
|
||||
// TRANS: %1$s is the name of the group, %2$d is the page number of the members list.
|
||||
return sprintf(_('%1$s group members awaiting approval, page %2$d'),
|
||||
$this->group->nickname,
|
||||
|
@ -154,7 +154,8 @@ class JoingroupAction extends Action
|
||||
$form = new CancelGroupForm($this, $this->group);
|
||||
} else {
|
||||
// wtf?
|
||||
throw new Exception(_m("Unknown error joining group."));
|
||||
// TRANS: Exception thrown when there is an unknown error joining a group.
|
||||
throw new Exception(_("Unknown error joining group."));
|
||||
}
|
||||
$form->show();
|
||||
$this->elementEnd('body');
|
||||
|
@ -403,7 +403,8 @@ class Profile extends Memcached_DataObject
|
||||
Event::handle('EndJoinGroup', array($group, $this));
|
||||
}
|
||||
} else {
|
||||
throw new Exception(_m('Invalid group join approval: not pending.'));
|
||||
// TRANS: Exception thrown trying to approve a non-existing group join request.
|
||||
throw new Exception(_('Invalid group join approval: not pending.'));
|
||||
}
|
||||
if ($join) {
|
||||
$join->notify();
|
||||
@ -414,7 +415,7 @@ class Profile extends Memcached_DataObject
|
||||
/**
|
||||
* Leave a group that this profile is a member of.
|
||||
*
|
||||
* @param User_group $group
|
||||
* @param User_group $group
|
||||
*/
|
||||
function leaveGroup(User_group $group)
|
||||
{
|
||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/form.php';
|
||||
*
|
||||
* @see UnsubscribeForm
|
||||
*/
|
||||
|
||||
class ApproveGroupForm extends Form
|
||||
{
|
||||
/**
|
||||
@ -62,7 +61,6 @@ class ApproveGroupForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to leave
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null, $profile=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -76,7 +74,6 @@ class ApproveGroupForm extends Form
|
||||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-queue-' . $this->group->id;
|
||||
@ -87,7 +84,6 @@ class ApproveGroupForm extends Form
|
||||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_queue ajax';
|
||||
@ -98,7 +94,6 @@ class ApproveGroupForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
$params = array();
|
||||
@ -117,7 +112,9 @@ class ApproveGroupForm extends Form
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('approve', _('Accept'));
|
||||
$this->out->submit('cancel', _('Reject'));
|
||||
// TRANS: Submit button text to accept a group membership request on approve group form.
|
||||
$this->out->submit('approve', _m('BUTTON','Accept'));
|
||||
// TRANS: Submit button text to reject a group membership request on approve group form.
|
||||
$this->out->submit('cancel', _m('BUTTON','Reject'));
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/form.php';
|
||||
*
|
||||
* @see UnsubscribeForm
|
||||
*/
|
||||
|
||||
class CancelGroupForm extends Form
|
||||
{
|
||||
/**
|
||||
@ -62,7 +61,6 @@ class CancelGroupForm extends Form
|
||||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to leave
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null, $profile=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
@ -76,7 +74,6 @@ class CancelGroupForm extends Form
|
||||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-cancel-' . $this->group->id;
|
||||
@ -87,7 +84,6 @@ class CancelGroupForm extends Form
|
||||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_leave ajax';
|
||||
@ -98,7 +94,6 @@ class CancelGroupForm extends Form
|
||||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
$params = array();
|
||||
@ -114,9 +109,9 @@ class CancelGroupForm extends Form
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('submit', _('Cancel join request'));
|
||||
// TRANS: Submit button text on form to cancel group join request.
|
||||
$this->out->submit('submit', _('BUTTON','Cancel join request'));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
// @todo FIXME: standard file header missing.
|
||||
/**
|
||||
* Form for blocking a user from a group
|
||||
*
|
||||
|
@ -112,6 +112,7 @@ class GroupEditForm extends Form
|
||||
*/
|
||||
function formLegend()
|
||||
{
|
||||
// TRANS: Form legend for group edit form.
|
||||
$this->out->element('legend', null, _('Create a new group'));
|
||||
}
|
||||
|
||||
@ -142,44 +143,58 @@ class GroupEditForm extends Form
|
||||
if (Event::handle('StartGroupEditFormData', array($this))) {
|
||||
$this->out->elementStart('li');
|
||||
$this->out->hidden('groupid', $id);
|
||||
// TRANS: Field label on group edit form.
|
||||
$this->out->input('nickname', _('Nickname'),
|
||||
($this->out->arg('nickname')) ? $this->out->arg('nickname') : $nickname,
|
||||
_('1-64 lowercase letters or numbers, no punctuation or spaces'));
|
||||
// TRANS: Field title on group edit form.
|
||||
_('1-64 lowercase letters or numbers, no punctuation or spaces.'));
|
||||
$this->out->elementEnd('li');
|
||||
$this->out->elementStart('li');
|
||||
// TRANS: Field label on group edit form.
|
||||
$this->out->input('fullname', _('Full name'),
|
||||
($this->out->arg('fullname')) ? $this->out->arg('fullname') : $fullname);
|
||||
$this->out->elementEnd('li');
|
||||
$this->out->elementStart('li');
|
||||
// TRANS: Field label on group edit form; points to "more info" for a group.
|
||||
$this->out->input('homepage', _('Homepage'),
|
||||
($this->out->arg('homepage')) ? $this->out->arg('homepage') : $homepage,
|
||||
// TRANS: Field title on group edit form.
|
||||
_('URL of the homepage or blog of the group or topic.'));
|
||||
$this->out->elementEnd('li');
|
||||
$this->out->elementStart('li');
|
||||
$desclimit = User_group::maxDescription();
|
||||
if ($desclimit == 0) {
|
||||
$descinstr = _('Describe the group or topic');
|
||||
// TRANS: Text area title for group description when there is no text limit.
|
||||
$descinstr = _('Describe the group or topic.');
|
||||
} else {
|
||||
$descinstr = sprintf(_m('Describe the group or topic in %d character or less',
|
||||
'Describe the group or topic in %d characters or less',
|
||||
// TRANS: Text area title for group description.
|
||||
// TRANS: %d is the number of characters available for the description.
|
||||
$descinstr = sprintf(_m('Describe the group or topic in %d character or less.',
|
||||
'Describe the group or topic in %d characters or less.',
|
||||
$desclimit),
|
||||
$desclimit);
|
||||
}
|
||||
// TRANS: Text area label on group edit form; contains description of group.
|
||||
$this->out->textarea('description', _('Description'),
|
||||
($this->out->arg('description')) ? $this->out->arg('description') : $description,
|
||||
$descinstr);
|
||||
$this->out->elementEnd('li');
|
||||
$this->out->elementStart('li');
|
||||
// TRANS: Field label on group edit form.
|
||||
$this->out->input('location', _('Location'),
|
||||
($this->out->arg('location')) ? $this->out->arg('location') : $location,
|
||||
// TRANS: Field title on group edit form.
|
||||
_('Location for the group, if any, like "City, State (or Region), Country".'));
|
||||
$this->out->elementEnd('li');
|
||||
if (common_config('group', 'maxaliases') > 0) {
|
||||
$aliases = (empty($this->group)) ? array() : $this->group->getAliases();
|
||||
$this->out->elementStart('li');
|
||||
// TRANS: Field label on group edit form.
|
||||
$this->out->input('aliases', _('Aliases'),
|
||||
($this->out->arg('aliases')) ? $this->out->arg('aliases') :
|
||||
(!empty($aliases)) ? implode(' ', $aliases) : '',
|
||||
// TRANS: Input field title for group aliases.
|
||||
// TRANS: %d is the maximum number of group aliases available.
|
||||
sprintf(_m('Extra nicknames for the group, separated with commas or spaces. Maximum %d alias allowed.',
|
||||
'Extra nicknames for the group, separated with commas or spaces. Maximum %d aliases allowed.',
|
||||
common_config('group', 'maxaliases')),
|
||||
@ -188,9 +203,11 @@ class GroupEditForm extends Form
|
||||
}
|
||||
$this->out->elementStart('li');
|
||||
$this->out->dropdown('join_policy',
|
||||
// TRANS: Dropdown fieldd label on group edit form.
|
||||
_('Membership policy'),
|
||||
array(User_group::JOIN_POLICY_OPEN => _('Open to all'),
|
||||
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.'),
|
||||
false,
|
||||
(empty($this->group->join_policy)) ? User_group::JOIN_POLICY_OPEN : $this->group->join_policy);
|
||||
@ -207,6 +224,7 @@ class GroupEditForm extends Form
|
||||
*/
|
||||
function formActions()
|
||||
{
|
||||
// TRANS: Text for save button on group edit form.
|
||||
$this->out->submit('submit', _m('BUTTON','Save'));
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
// @todo FIXME: add documentation.
|
||||
|
||||
class GroupMemberList extends ProfileList
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
// @todo FIXME: add documentation.
|
||||
|
||||
class GroupMemberListItem extends ProfileListItem
|
||||
{
|
||||
@ -17,7 +18,7 @@ class GroupMemberListItem extends ProfileListItem
|
||||
if ($this->profile->isAdmin($this->group)) {
|
||||
$this->out->text(' '); // for separating the classes.
|
||||
// TRANS: Indicator in group members list that this user is a group administrator.
|
||||
$this->out->element('span', 'role', _('Admin'));
|
||||
$this->out->element('span', 'role', _m('GROUPADMIN','Admin'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,4 +103,3 @@ class GroupMemberListItem extends ProfileListItem
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,6 @@ require_once INSTALLDIR.'/lib/widget.php';
|
||||
*
|
||||
* @see HTMLOutputter
|
||||
*/
|
||||
|
||||
class GroupNav extends Menu
|
||||
{
|
||||
var $group = null;
|
||||
@ -58,7 +57,6 @@ class GroupNav extends Menu
|
||||
*
|
||||
* @param Action $action current action, used for output
|
||||
*/
|
||||
|
||||
function __construct($action=null, $group=null)
|
||||
{
|
||||
parent::__construct($action);
|
||||
@ -70,7 +68,6 @@ class GroupNav extends Menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function show()
|
||||
{
|
||||
$action_name = $this->action->trimmed('action');
|
||||
@ -105,7 +102,8 @@ class GroupNav extends Menu
|
||||
$this->out->menuItem(common_local_url('groupqueue', array('nickname' =>
|
||||
$nickname)),
|
||||
// TRANS: Menu item in the group navigation page. Only shown for group administrators.
|
||||
sprintf(_m('MENU','Pending members (%d)'), $pending),
|
||||
// TRANS: %d is the number of pending members.
|
||||
sprintf(_m('MENU','Pending members (%d)','Pending members (%d)',$pending), $pending),
|
||||
// TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
|
||||
// TRANS: %s is the nickname of the group.
|
||||
sprintf(_m('TOOLTIP','%s pending members'), $nickname),
|
||||
|
10
lib/mail.php
10
lib/mail.php
@ -277,7 +277,7 @@ function mail_footer_block()
|
||||
* Format a block of profile info for a plaintext notification email.
|
||||
*
|
||||
* @param Profile $profile
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
function mail_profile_block($profile)
|
||||
{
|
||||
@ -313,9 +313,9 @@ function mail_profile_block($profile)
|
||||
|
||||
// TRANS: This is a paragraph in a new-subscriber e-mail.
|
||||
// TRANS: %s is a URL where the subscriber can be reported as abusive.
|
||||
$out[] = sprintf(_("If you believe this account is being used abusively, " .
|
||||
"you can block them from your subscribers list and " .
|
||||
"report as spam to site administrators at %s"),
|
||||
$out[] = sprintf(_('If you believe this account is being used abusively, ' .
|
||||
'you can block them from your subscribers list and ' .
|
||||
'report as spam to site administrators at %s.'),
|
||||
$blocklink);
|
||||
$out[] = "";
|
||||
|
||||
@ -498,7 +498,7 @@ function mail_confirm_sms($code, $nickname, $address)
|
||||
|
||||
// TRANS: Main body heading for SMS-by-email address confirmation message.
|
||||
// TRANS: %s is the addressed user's nickname.
|
||||
$body = sprintf(_("%s: confirm you own this phone number with this code:"), $nickname);
|
||||
$body = sprintf(_('%s: confirm you own this phone number with this code:'), $nickname);
|
||||
$body .= "\n\n";
|
||||
$body .= $code;
|
||||
$body .= "\n\n";
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
// @todo FIXME: add standard file header.
|
||||
|
||||
/**
|
||||
* Form for making a user an admin for a group
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2011, StatusNet, Inc.
|
||||
*
|
||||
* A stream of notices
|
||||
*
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -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 NoticeStream
|
||||
{
|
||||
const CACHE_WINDOW = 200;
|
||||
|
Loading…
Reference in New Issue
Block a user