forked from GNUsocial/gnu-social
* add/update translator documentation.
* remove superfluous whitespace. * update punctuation on form validation messages. * L10n tweaks. * add fixme for missing class documentation.
This commit is contained in:
parent
dd5721848f
commit
13991f7eb9
@ -45,7 +45,6 @@ define('MEMBERS_PER_SECTION', 27);
|
|||||||
* @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 groupRssAction extends Rss10Action
|
class groupRssAction extends Rss10Action
|
||||||
{
|
{
|
||||||
/** group we're viewing. */
|
/** group we're viewing. */
|
||||||
@ -56,7 +55,6 @@ class groupRssAction extends Rss10Action
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isReadOnly($args)
|
function isReadOnly($args)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -71,7 +69,6 @@ class groupRssAction extends Rss10Action
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -88,6 +85,7 @@ class groupRssAction extends Rss10Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$nickname) {
|
if (!$nickname) {
|
||||||
|
// TRANS: Client error displayed when requesting a group RSS feed without providing a group nickname.
|
||||||
$this->clientError(_('No nickname.'), 404);
|
$this->clientError(_('No nickname.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -95,6 +93,7 @@ class groupRssAction extends Rss10Action
|
|||||||
$local = Local_group::staticGet('nickname', $nickname);
|
$local = Local_group::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (!$local) {
|
if (!$local) {
|
||||||
|
// TRANS: Client error displayed when requesting a group RSS feed for group that does not exist.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -102,6 +101,7 @@ class groupRssAction extends Rss10Action
|
|||||||
$this->group = User_group::staticGet('id', $local->group_id);
|
$this->group = User_group::staticGet('id', $local->group_id);
|
||||||
|
|
||||||
if (!$this->group) {
|
if (!$this->group) {
|
||||||
|
// TRANS: Client error displayed when requesting a group RSS feed for an object that is not a group.
|
||||||
$this->clientError(_('No such group.'), 404);
|
$this->clientError(_('No such group.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -112,7 +112,6 @@ class groupRssAction extends Rss10Action
|
|||||||
|
|
||||||
function getNotices($limit=0)
|
function getNotices($limit=0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$group = $this->group;
|
$group = $this->group;
|
||||||
|
|
||||||
if (is_null($group)) {
|
if (is_null($group)) {
|
||||||
|
@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/grouplist.php';
|
|||||||
* @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 GroupsAction extends Action
|
class GroupsAction extends Action
|
||||||
{
|
{
|
||||||
var $page = null;
|
var $page = null;
|
||||||
@ -59,9 +58,12 @@ class GroupsAction extends Action
|
|||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
return _("Groups");
|
// TRANS: Title for first page of the groups list.
|
||||||
|
return _m('TITLE',"Groups");
|
||||||
} else {
|
} else {
|
||||||
return sprintf(_("Groups, page %d"), $this->page);
|
// TRANS: Title for all but the first page of the groups list.
|
||||||
|
// TRANS: %d is the page number.
|
||||||
|
return sprintf(_m('TITLE',"Groups, page %d"), $this->page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,12 +89,15 @@ class GroupsAction extends Action
|
|||||||
function showPageNotice()
|
function showPageNotice()
|
||||||
{
|
{
|
||||||
$notice =
|
$notice =
|
||||||
|
// TRANS: Page notice of group list. %%%%site.name%%%% is the StatusNet site name,
|
||||||
|
// TRANS: %%%%action.groupsearch%%%% and %%%%action.newgroup%%%% are URLs. Do not change them.
|
||||||
|
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||||
sprintf(_('%%%%site.name%%%% groups let you find and talk with ' .
|
sprintf(_('%%%%site.name%%%% groups let you find and talk with ' .
|
||||||
'people of similar interests. After you join a group ' .
|
'people of similar interests. After you join a group ' .
|
||||||
'you can send messages to all other members using the ' .
|
'you can send messages to all other members using the ' .
|
||||||
'syntax "!groupname". Don\'t see a group you like? Try ' .
|
'syntax "!groupname". Don\'t see a group you like? Try ' .
|
||||||
'[searching for one](%%%%action.groupsearch%%%%) or ' .
|
'[searching for one](%%%%action.groupsearch%%%%) or ' .
|
||||||
'[start your own!](%%%%action.newgroup%%%%)'));
|
'[start your own](%%%%action.newgroup%%%%)!'));
|
||||||
$this->elementStart('div', 'instructions');
|
$this->elementStart('div', 'instructions');
|
||||||
$this->raw(common_markup_to_html($notice));
|
$this->raw(common_markup_to_html($notice));
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
@ -104,6 +109,7 @@ class GroupsAction extends Action
|
|||||||
$this->elementStart('p', array('id' => 'new_group'));
|
$this->elementStart('p', array('id' => 'new_group'));
|
||||||
$this->element('a', array('href' => common_local_url('newgroup'),
|
$this->element('a', array('href' => common_local_url('newgroup'),
|
||||||
'class' => 'more'),
|
'class' => 'more'),
|
||||||
|
// TRANS: Link to create a new group on the group list page.
|
||||||
_('Create a new group'));
|
_('Create a new group'));
|
||||||
$this->elementEnd('p');
|
$this->elementEnd('p');
|
||||||
}
|
}
|
||||||
|
@ -49,12 +49,14 @@ class GroupsearchAction extends SearchAction
|
|||||||
{
|
{
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for page where groups can be searched. %%site.name%% is the name of the StatusNet site.
|
||||||
return _('Search for groups on %%site.name%% by their name, location, or description. ' .
|
return _('Search for groups on %%site.name%% by their name, location, or description. ' .
|
||||||
'Separate the terms by spaces; they must be 3 characters or more.');
|
'Separate the terms by spaces; they must be 3 characters or more.');
|
||||||
}
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title for page where groups can be searched.
|
||||||
return _('Group search');
|
return _('Group search');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,12 +78,17 @@ class GroupsearchAction extends SearchAction
|
|||||||
$this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
|
$this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
|
||||||
$page, 'groupsearch', array('q' => $q));
|
$page, 'groupsearch', array('q' => $q));
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Text on page where groups can be searched if no results were found for a query.
|
||||||
$this->element('p', 'error', _('No results.'));
|
$this->element('p', 'error', _('No results.'));
|
||||||
$this->searchSuggestions($q);
|
$this->searchSuggestions($q);
|
||||||
if (common_logged_in()) {
|
if (common_logged_in()) {
|
||||||
$message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a logged in user.
|
||||||
|
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||||
|
$message = _('If you cannot find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a not logged in user.
|
||||||
|
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||||
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
|
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
|
||||||
}
|
}
|
||||||
$this->elementStart('div', 'guide');
|
$this->elementStart('div', 'guide');
|
||||||
@ -116,4 +123,3 @@ class GroupSearchResults extends GroupList
|
|||||||
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
|
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ class GroupunblockAction extends Action
|
|||||||
}
|
}
|
||||||
$group_id = $this->trimmed('unblockgroup');
|
$group_id = $this->trimmed('unblockgroup');
|
||||||
if (empty($group_id)) {
|
if (empty($group_id)) {
|
||||||
|
// TRANS: Client error displayed when trying to unblock a user from a group without providing a group.
|
||||||
$this->clientError(_('No group specified.'));
|
$this->clientError(_('No group specified.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class HcardAction extends Action
|
class HcardAction extends Action
|
||||||
{
|
{
|
||||||
var $user;
|
var $user;
|
||||||
@ -64,6 +63,7 @@ class HcardAction extends Action
|
|||||||
$this->user = User::staticGet('nickname', $nickname);
|
$this->user = User::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
if (!$this->user) {
|
||||||
|
// TRANS: Client error displayed when trying to get a user hCard for a non-existing user.
|
||||||
$this->clientError(_('No such user.'), 404);
|
$this->clientError(_('No such user.'), 404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -71,6 +71,7 @@ class HcardAction extends Action
|
|||||||
$this->profile = $this->user->getProfile();
|
$this->profile = $this->user->getProfile();
|
||||||
|
|
||||||
if (!$this->profile) {
|
if (!$this->profile) {
|
||||||
|
// TRANS: Server error displayed when trying to get a user hCard for a user without a profile.
|
||||||
$this->serverError(_('User has no profile.'));
|
$this->serverError(_('User has no profile.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,9 @@ if (!defined('STATUSNET')) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo XXX: Add documentation.
|
||||||
class HostMetaAction extends Action
|
class HostMetaAction extends Action
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is read only?
|
* Is read only?
|
||||||
*
|
*
|
||||||
|
@ -54,7 +54,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
*/
|
*/
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// TRANS: Title for instance messaging settings.
|
// TRANS: Title for Instant Messaging settings.
|
||||||
return _('IM settings');
|
return _('IM settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
// TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
|
// TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
|
||||||
// TRANS: the order and formatting of link text and link should remain unchanged.
|
// TRANS: the order and formatting of link text and link should remain unchanged.
|
||||||
return _('You can send and receive notices through '.
|
return _('You can send and receive notices through '.
|
||||||
'Jabber/GTalk [instant messages](%%doc.im%%). '.
|
'Jabber/Google Talk [instant messages](%%doc.im%%). '.
|
||||||
'Configure your address and settings below.');
|
'Configure your address and settings below.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
{
|
{
|
||||||
if (!common_config('xmpp', 'enabled')) {
|
if (!common_config('xmpp', 'enabled')) {
|
||||||
$this->element('div', array('class' => 'error'),
|
$this->element('div', array('class' => 'error'),
|
||||||
// TRANS: Message given in the IM settings if XMPP is not enabled on the site.
|
// TRANS: Message given in the Instant Messaging settings if XMPP is not enabled on the site.
|
||||||
_('IM is not available.'));
|
_('IM is not available.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -98,88 +98,88 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
'action' =>
|
'action' =>
|
||||||
common_local_url('imsettings')));
|
common_local_url('imsettings')));
|
||||||
$this->elementStart('fieldset', array('id' => 'settings_im_address'));
|
$this->elementStart('fieldset', array('id' => 'settings_im_address'));
|
||||||
// TRANS: Form legend for IM settings form.
|
// TRANS: Form legend for Instant Messaging settings form.
|
||||||
$this->element('legend', null, _('IM address'));
|
$this->element('legend', null, _('IM address'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
|
|
||||||
if ($user->jabber) {
|
if ($user->jabber) {
|
||||||
$this->element('p', 'form_confirmed', $user->jabber);
|
$this->element('p', 'form_confirmed', $user->jabber);
|
||||||
// TRANS: Form note in IM settings form.
|
// TRANS: Form note in Instant Messaging settings form.
|
||||||
$this->element('p', 'form_note',
|
$this->element('p', 'form_note',
|
||||||
_('Current confirmed Jabber/GTalk address.'));
|
_('Current confirmed Jabber/Google Talk address.'));
|
||||||
$this->hidden('jabber', $user->jabber);
|
$this->hidden('jabber', $user->jabber);
|
||||||
// TRANS: Button label to remove a confirmed IM address.
|
// TRANS: Button label to remove a confirmed Instant Messaging address.
|
||||||
$this->submit('remove', _m('BUTTON','Remove'));
|
$this->submit('remove', _m('BUTTON','Remove'));
|
||||||
} else {
|
} else {
|
||||||
$confirm = $this->getConfirmation();
|
$confirm = $this->getConfirmation();
|
||||||
if ($confirm) {
|
if ($confirm) {
|
||||||
$this->element('p', 'form_unconfirmed', $confirm->address);
|
$this->element('p', 'form_unconfirmed', $confirm->address);
|
||||||
$this->element('p', 'form_note',
|
$this->element('p', 'form_note',
|
||||||
// TRANS: Form note in IM settings form.
|
// TRANS: Form note in Instant Messaging settings form.
|
||||||
// TRANS: %s is the IM address set for the site.
|
// TRANS: %s is the Instant Messaging address set for the site.
|
||||||
sprintf(_('Awaiting confirmation on this address. '.
|
sprintf(_('Awaiting confirmation on this address. '.
|
||||||
'Check your Jabber/GTalk account for a '.
|
'Check your Jabber/Google Talk account for a '.
|
||||||
'message with further instructions. '.
|
'message with further instructions. '.
|
||||||
'(Did you add %s to your buddy list?)'),
|
'(Did you add %s to your buddy list?)'),
|
||||||
jabber_daemon_address()));
|
jabber_daemon_address()));
|
||||||
$this->hidden('jabber', $confirm->address);
|
$this->hidden('jabber', $confirm->address);
|
||||||
// TRANS: Button label to cancel an IM address confirmation procedure.
|
// TRANS: Button label to cancel an Instant Messaging address confirmation procedure.
|
||||||
$this->submit('cancel', _m('BUTTON','Cancel'));
|
$this->submit('cancel', _m('BUTTON','Cancel'));
|
||||||
} else {
|
} else {
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
// TRANS: Field label for IM address input in IM settings form.
|
// TRANS: Field label for Instant Messaging address input in Instant Messaging settings form.
|
||||||
$this->input('jabber', _('IM address'),
|
$this->input('jabber', _('IM address'),
|
||||||
($this->arg('jabber')) ? $this->arg('jabber') : null,
|
($this->arg('jabber')) ? $this->arg('jabber') : null,
|
||||||
// TRANS: IM address input field instructions in IM settings form.
|
// TRANS: IM address input field instructions in Instant Messaging settings form.
|
||||||
// TRANS: %s is the IM address set for the site.
|
// TRANS: %s is the Instant Messaging address set for the site.
|
||||||
// TRANS: Do not translate "example.org". It is one of the domain names reserved for use in examples by
|
// TRANS: Do not translate "example.org". It is one of the domain names reserved for use in examples by
|
||||||
// TRANS: http://www.rfc-editor.org/rfc/rfc2606.txt. Any other domain may be owned by a legitimate
|
// TRANS: http://www.rfc-editor.org/rfc/rfc2606.txt. Any other domain may be owned by a legitimate
|
||||||
// TRANS: person or organization.
|
// TRANS: person or organization.
|
||||||
sprintf(_('Jabber or GTalk address, '.
|
sprintf(_('Jabber or Google Talk address, '.
|
||||||
'like "UserName@example.org". '.
|
'like "UserName@example.org". '.
|
||||||
'First, make sure to add %s to your '.
|
'First, make sure to add %s to your '.
|
||||||
'buddy list in your IM client or on GTalk.'),
|
'buddy list in your IM client or on Google Talk.'),
|
||||||
jabber_daemon_address()));
|
jabber_daemon_address()));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
// TRANS: Button label for adding an IM address in IM settings form.
|
// TRANS: Button label for adding an Instant Messaging address in Instant Messaging settings form.
|
||||||
$this->submit('add', _m('BUTTON','Add'));
|
$this->submit('add', _m('BUTTON','Add'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
|
|
||||||
$this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
|
$this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
|
||||||
// TRANS: Form legend for IM preferences form.
|
// TRANS: Form legend for Instant Messaging preferences form.
|
||||||
$this->element('legend', null, _('IM preferences'));
|
$this->element('legend', null, _('IM preferences'));
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('jabbernotify',
|
$this->checkbox('jabbernotify',
|
||||||
// TRANS: Checkbox label in IM preferences form.
|
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||||
_('Send me notices through Jabber/GTalk.'),
|
_('Send me notices through Jabber/Google Talk.'),
|
||||||
$user->jabbernotify);
|
$user->jabbernotify);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('updatefrompresence',
|
$this->checkbox('updatefrompresence',
|
||||||
// TRANS: Checkbox label in IM preferences form.
|
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||||
_('Post a notice when my Jabber/GTalk status changes.'),
|
_('Post a notice when my Jabber/Google Talk status changes.'),
|
||||||
$user->updatefrompresence);
|
$user->updatefrompresence);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('jabberreplies',
|
$this->checkbox('jabberreplies',
|
||||||
// TRANS: Checkbox label in IM preferences form.
|
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||||
_('Send me replies through Jabber/GTalk '.
|
_('Send me replies through Jabber/Google Talk '.
|
||||||
'from people I\'m not subscribed to.'),
|
'from people I\'m not subscribed to.'),
|
||||||
$user->jabberreplies);
|
$user->jabberreplies);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->checkbox('jabbermicroid',
|
$this->checkbox('jabbermicroid',
|
||||||
// TRANS: Checkbox label in IM preferences form.
|
// TRANS: Checkbox label in Instant Messaging preferences form.
|
||||||
_('Publish a MicroID for my Jabber/GTalk address.'),
|
_('Publish a MicroID for my Jabber/Google Talk address.'),
|
||||||
$user->jabbermicroid);
|
$user->jabbermicroid);
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
// TRANS: Button label to save IM preferences.
|
// TRANS: Button label to save Instant Messaging preferences.
|
||||||
$this->submit('save', _m('BUTTON','Save'));
|
$this->submit('save', _m('BUTTON','Save'));
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
@ -235,7 +235,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
} else if ($this->arg('remove')) {
|
} else if ($this->arg('remove')) {
|
||||||
$this->removeAddress();
|
$this->removeAddress();
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Message given submitting a form with an unknown action in IM settings.
|
// TRANS: Message given submitting a form with an unknown action in Instant Messaging settings.
|
||||||
$this->showForm(_('Unexpected form submission.'));
|
$this->showForm(_('Unexpected form submission.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -272,14 +272,14 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error updating IM preferences.
|
// TRANS: Server error thrown on database error updating Instant Messaging preferences.
|
||||||
$this->serverError(_('Could not update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->query('COMMIT');
|
$user->query('COMMIT');
|
||||||
|
|
||||||
// TRANS: Confirmation message for successful IM preferences save.
|
// TRANS: Confirmation message for successful Instant Messaging preferences save.
|
||||||
$this->showForm(_('Preferences saved.'), true);
|
$this->showForm(_('Preferences saved.'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
// Some validation
|
// Some validation
|
||||||
|
|
||||||
if (!$jabber) {
|
if (!$jabber) {
|
||||||
// TRANS: Message given saving IM address without having provided one.
|
// TRANS: Message given saving Instant Messaging address without having provided one.
|
||||||
$this->showForm(_('No Jabber ID.'));
|
$this->showForm(_('No Jabber ID.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -308,20 +308,20 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
$jabber = jabber_normalize_jid($jabber);
|
$jabber = jabber_normalize_jid($jabber);
|
||||||
|
|
||||||
if (!$jabber) {
|
if (!$jabber) {
|
||||||
// TRANS: Message given saving IM address that cannot be normalised.
|
// TRANS: Message given saving Instant Messaging address that cannot be normalised.
|
||||||
$this->showForm(_('Cannot normalize that Jabber ID'));
|
$this->showForm(_('Cannot normalize that Jabber ID.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
|
if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
|
||||||
// TRANS: Message given saving IM address that not valid.
|
// TRANS: Message given saving Instant Messaging address that not valid.
|
||||||
$this->showForm(_('Not a valid Jabber ID'));
|
$this->showForm(_('Not a valid Jabber ID.'));
|
||||||
return;
|
return;
|
||||||
} else if ($user->jabber == $jabber) {
|
} else if ($user->jabber == $jabber) {
|
||||||
// TRANS: Message given saving IM address that is already set.
|
// TRANS: Message given saving Instant Messaging address that is already set.
|
||||||
$this->showForm(_('That is already your Jabber ID.'));
|
$this->showForm(_('That is already your Jabber ID.'));
|
||||||
return;
|
return;
|
||||||
} else if ($this->jabberExists($jabber)) {
|
} else if ($this->jabberExists($jabber)) {
|
||||||
// TRANS: Message given saving IM address that is already set for another user.
|
// TRANS: Message given saving Instant Messaging address that is already set for another user.
|
||||||
$this->showForm(_('Jabber ID already belongs to another user.'));
|
$this->showForm(_('Jabber ID already belongs to another user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($confirm, 'INSERT', __FILE__);
|
common_log_db_error($confirm, 'INSERT', __FILE__);
|
||||||
// TRANS: Server error thrown on database error adding IM confirmation code.
|
// TRANS: Server error thrown on database error adding Instant Messaging confirmation code.
|
||||||
$this->serverError(_('Could not insert confirmation code.'));
|
$this->serverError(_('Could not insert confirmation code.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -348,8 +348,8 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
$user->nickname,
|
$user->nickname,
|
||||||
$jabber);
|
$jabber);
|
||||||
|
|
||||||
// TRANS: Message given saving valid IM address that is to be confirmed.
|
// TRANS: Message given saving valid Instant Messaging address that is to be confirmed.
|
||||||
// TRANS: %s is the IM address set for the site.
|
// TRANS: %s is the Instant Messaging address set for the site.
|
||||||
$msg = sprintf(_('A confirmation code was sent '.
|
$msg = sprintf(_('A confirmation code was sent '.
|
||||||
'to the IM address you added. '.
|
'to the IM address you added. '.
|
||||||
'You must approve %s for '.
|
'You must approve %s for '.
|
||||||
@ -373,12 +373,12 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
$confirm = $this->getConfirmation();
|
$confirm = $this->getConfirmation();
|
||||||
|
|
||||||
if (!$confirm) {
|
if (!$confirm) {
|
||||||
// TRANS: Message given canceling IM address confirmation that is not pending.
|
// TRANS: Message given canceling Instant Messaging address confirmation that is not pending.
|
||||||
$this->showForm(_('No pending confirmation to cancel.'));
|
$this->showForm(_('No pending confirmation to cancel.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($confirm->address != $jabber) {
|
if ($confirm->address != $jabber) {
|
||||||
// TRANS: Message given canceling IM address confirmation for the wrong IM address.
|
// TRANS: Message given canceling Instant Messaging address confirmation for the wrong IM address.
|
||||||
$this->showForm(_('That is the wrong IM address.'));
|
$this->showForm(_('That is the wrong IM address.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -387,12 +387,12 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
// TRANS: Server error thrown on database error canceling Instant Messaging address confirmation.
|
||||||
$this->serverError(_('Could not delete IM confirmation.'));
|
$this->serverError(_('Could not delete IM confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: Message given after successfully canceling IM address confirmation.
|
// TRANS: Message given after successfully canceling Instant Messaging address confirmation.
|
||||||
$this->showForm(_('IM confirmation cancelled.'), true);
|
$this->showForm(_('IM confirmation cancelled.'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
// Maybe an old tab open...?
|
// Maybe an old tab open...?
|
||||||
|
|
||||||
if ($user->jabber != $jabber) {
|
if ($user->jabber != $jabber) {
|
||||||
// TRANS: Message given trying to remove an IM address that is not
|
// TRANS: Message given trying to remove an Instant Messaging address that is not
|
||||||
// TRANS: registered for the active user.
|
// TRANS: registered for the active user.
|
||||||
$this->showForm(_('That is not your Jabber ID.'));
|
$this->showForm(_('That is not your Jabber ID.'));
|
||||||
return;
|
return;
|
||||||
@ -428,7 +428,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($user, 'UPDATE', __FILE__);
|
common_log_db_error($user, 'UPDATE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error removing a registered IM address.
|
// TRANS: Server error thrown on database error removing a registered Instant Messaging address.
|
||||||
$this->serverError(_('Could not update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -436,7 +436,7 @@ class ImsettingsAction extends ConnectSettingsAction
|
|||||||
|
|
||||||
// XXX: unsubscribe to the old address
|
// XXX: unsubscribe to the old address
|
||||||
|
|
||||||
// TRANS: Message given after successfully removing a registered IM address.
|
// TRANS: Message given after successfully removing a registered Instant Messaging address.
|
||||||
$this->showForm(_('The IM address was removed.'), true);
|
$this->showForm(_('The IM address was removed.'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/mailbox.php';
|
|||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
* @see MailboxAction
|
* @see MailboxAction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class InboxAction extends MailboxAction
|
class InboxAction extends MailboxAction
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -52,13 +51,16 @@ class InboxAction extends MailboxAction
|
|||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->page > 1) {
|
if ($this->page > 1) {
|
||||||
|
// TRANS: Title for all but the first page of the inbox page.
|
||||||
|
// TRANS: %1$s is the user's nickname, %2$s is the page number.
|
||||||
return sprintf(_('Inbox for %1$s - page %2$d'), $this->user->nickname,
|
return sprintf(_('Inbox for %1$s - page %2$d'), $this->user->nickname,
|
||||||
$this->page);
|
$this->page);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Title for the first page of the inbox page.
|
||||||
|
// TRANS: %s is the user's nickname.
|
||||||
return sprintf(_('Inbox for %s'), $this->user->nickname);
|
return sprintf(_('Inbox for %s'), $this->user->nickname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +74,6 @@ class InboxAction extends MailboxAction
|
|||||||
*
|
*
|
||||||
* @see MailboxAction::getMessages()
|
* @see MailboxAction::getMessages()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getMessages()
|
function getMessages()
|
||||||
{
|
{
|
||||||
$message = new Message();
|
$message = new Message();
|
||||||
@ -98,7 +99,6 @@ class InboxAction extends MailboxAction
|
|||||||
*
|
*
|
||||||
* @return Profile The profile that matches the message
|
* @return Profile The profile that matches the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getMessageProfile($message)
|
function getMessageProfile($message)
|
||||||
{
|
{
|
||||||
return $message->getFrom();
|
return $message->getFrom();
|
||||||
@ -109,9 +109,9 @@ class InboxAction extends MailboxAction
|
|||||||
*
|
*
|
||||||
* @return string localised instructions for using the page
|
* @return string localised instructions for using the page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for user inbox page.
|
||||||
return _('This is your inbox, which lists your incoming private messages.');
|
return _('This is your inbox, which lists your incoming private messages.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
|
// @todo XXX: Add documentation.
|
||||||
class InviteAction extends CurrentUserDesignAction
|
class InviteAction extends CurrentUserDesignAction
|
||||||
{
|
{
|
||||||
var $mode = null;
|
var $mode = null;
|
||||||
@ -217,7 +218,7 @@ class InviteAction extends CurrentUserDesignAction
|
|||||||
$this->textarea('addresses', _('Email addresses'),
|
$this->textarea('addresses', _('Email addresses'),
|
||||||
$this->trimmed('addresses'),
|
$this->trimmed('addresses'),
|
||||||
// TRANS: Tooltip for field label for a list of e-mail addresses.
|
// TRANS: Tooltip for field label for a list of e-mail addresses.
|
||||||
_('Addresses of friends to invite (one per line)'));
|
_('Addresses of friends to invite (one per line).'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
// TRANS: Field label for a personal message to send to invitees.
|
// TRANS: Field label for a personal message to send to invitees.
|
||||||
|
Loading…
Reference in New Issue
Block a user