We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9573f725 authored by Brion Vibber's avatar Brion Vibber

Merge branch '0.9.x' into testing

parents 9567308b f41dcb64

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -331,8 +331,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
if (Event::handle('StartAtomPubNewActivity', array(&$activity, $this->user, &$saved))) {
if ($activity->verb != ActivityVerb::POST) {
// TRANS: Client error displayed when not using the POST verb.
// TRANS: Do not translate POST.
// TRANS: Client error displayed when not using the POST verb. Do not translate POST.
$this->clientError(_('Can only handle POST activities.'));
return;
}
......
......@@ -244,8 +244,7 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
if (Event::handle('StartAtomPubNewActivity', array(&$activity))) {
if ($activity->verb != ActivityVerb::FOLLOW) {
// TRANS: Client error displayed when not using the POST verb.
// TRANS: Do not translate POST.
// TRANS: Client error displayed when not using the follow verb.
$this->clientError(_('Can only handle Follow activities.'));
return;
}
......@@ -264,14 +263,17 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
if (empty($profile)) {
// TRANS: Client exception thrown when subscribing to a non-existing profile.
// TRANS: %s is the unknown profile ID.
$this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
return;
}
if (Subscription::exists($this->_profile, $profile)) {
// 409 Conflict
$this->clientError(sprintf(_('Already subscribed to %s'),
$person->id),
// TRANS: Client error displayed trying to subscribe to an already subscribed profile.
// TRANS: %s is the profile the user already has a subscription on.
$this->clientError(sprintf(_('Already subscribed to %s.'),
$person->id),
409);
return;
}
......
<?php
/**
* Disfavor action.
*
......
......@@ -198,6 +198,7 @@ class EditApplicationAction extends OwnerDesignAction
} elseif (Oauth_application::descriptionTooLong($description)) {
$this->showForm(sprintf(
// TRANS: Validation error shown when providing too long a description in the "Edit application" form.
// TRANS: %d is the maximum number of allowed characters.
_m('Description is too long (maximum %d character).',
'Description is too long (maximum %d characters).',
Oauth_application::maxDesc()),
......@@ -223,6 +224,7 @@ class EditApplicationAction extends OwnerDesignAction
$this->showForm(_('Organization is too long (maximum 255 characters).'));
return;
} elseif (empty($homepage)) {
// TRANS: Form validation error show when an organisation name has not been provided in the edit application form.
$this->showForm(_('Organization homepage is required.'));
return;
} elseif ((mb_strlen($homepage) > 0)
......
......@@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php';
*
* @see Widget
*/
class EmailsettingsAction extends AccountSettingsAction
{
/**
......@@ -54,7 +53,6 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return string Title of the page
*/
function title()
{
// TRANS: Title for e-mail settings.
......@@ -66,7 +64,6 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return instructions for use
*/
function getInstructions()
{
// XXX: For consistency of parameters in messages, this should be a
......@@ -91,7 +88,6 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return void
*/
function showContent()
{
$user = common_current_user();
......@@ -118,8 +114,8 @@ class EmailsettingsAction extends AccountSettingsAction
$confirm = $this->getConfirmation();
if ($confirm) {
$this->element('p', array('id' => 'form_unconfirmed'), $confirm->address);
// TRANS: Form note in e-mail settings form.
$this->element('p', array('class' => 'form_note'),
// TRANS: Form note in e-mail settings form.
_('Awaiting confirmation on this address. '.
'Check your inbox (and spam box!) for a message '.
'with further instructions.'));
......@@ -173,7 +169,7 @@ class EmailsettingsAction extends AccountSettingsAction
if ($user->incomingemail) {
$this->elementStart('p');
$this->element('span', 'address', $user->incomingemail);
// XXX: Looks a little awkward in the UI.
// @todo XXX: Looks a little awkward in the UI.
// Something like "xxxx@identi.ca Send email ..". Needs improvement.
$this->element('span', 'input_instructions',
// TRANS: Form instructions for incoming e-mail form in e-mail settings.
......@@ -208,7 +204,7 @@ class EmailsettingsAction extends AccountSettingsAction
$this->element('legend', null, _('Email preferences'));
$this->elementStart('ul', 'form_data');
if (Event::handle('StartEmailFormData', array($this))) {
$this->elementStart('li');
$this->checkbox('emailnotifysub',
......@@ -262,7 +258,6 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return Confirm_address Email address confirmation for user, or null
*/
function getConfirmation()
{
$user = common_current_user();
......@@ -288,7 +283,6 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return void
*/
function handlePost()
{
// CSRF protection
......@@ -322,13 +316,12 @@ class EmailsettingsAction extends AccountSettingsAction
*
* @return void
*/
function savePreferences()
{
$user = common_current_user();
if (Event::handle('StartEmailSaveForm', array($this, &$user))) {
$emailnotifysub = $this->boolean('emailnotifysub');
$emailnotifyfav = $this->boolean('emailnotifyfav');
$emailnotifymsg = $this->boolean('emailnotifymsg');
......@@ -336,13 +329,13 @@ class EmailsettingsAction extends AccountSettingsAction
$emailnotifyattn = $this->boolean('emailnotifyattn');
$emailmicroid = $this->boolean('emailmicroid');
$emailpost = $this->boolean('emailpost');
assert(!is_null($user)); // should already be checked
$user->query('BEGIN');