i18n/L10n updates, translator comments added/fixed, superfluous whitespace removed.
This commit is contained in:
parent
8fd44a13bf
commit
1603b7afc9
@ -89,7 +89,7 @@ class AllAction extends ProfileAction
|
|||||||
// TRANS: Page title. %1$s is user nickname, %2$d is page number
|
// TRANS: Page title. %1$s is user nickname, %2$d is page number
|
||||||
return sprintf(_('%1$s and friends, page %2$d'), $this->user->nickname, $this->page);
|
return sprintf(_('%1$s and friends, page %2$d'), $this->user->nickname, $this->page);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Page title. %1$s is user nickname
|
// TRANS: Page title. %s is user nickname
|
||||||
return sprintf(_("%s and friends"), $this->user->nickname);
|
return sprintf(_("%s and friends"), $this->user->nickname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ class AllAction extends ProfileAction
|
|||||||
'nickname' =>
|
'nickname' =>
|
||||||
$this->user->nickname)
|
$this->user->nickname)
|
||||||
),
|
),
|
||||||
// TRANS: %1$s is user nickname
|
// TRANS: %s is user nickname
|
||||||
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
|
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url(
|
common_local_url(
|
||||||
@ -112,7 +112,7 @@ class AllAction extends ProfileAction
|
|||||||
'id' => $this->user->nickname
|
'id' => $this->user->nickname
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
// TRANS: %1$s is user nickname
|
// TRANS: %s is user nickname
|
||||||
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
|
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url(
|
common_local_url(
|
||||||
@ -121,7 +121,7 @@ class AllAction extends ProfileAction
|
|||||||
'id' => $this->user->nickname
|
'id' => $this->user->nickname
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
// TRANS: %1$s is user nickname
|
// TRANS: %s is user nickname
|
||||||
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
|
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -134,18 +134,23 @@ class AllAction extends ProfileAction
|
|||||||
|
|
||||||
function showEmptyListMessage()
|
function showEmptyListMessage()
|
||||||
{
|
{
|
||||||
// TRANS: %1$s is user nickname
|
// TRANS: %s is user nickname
|
||||||
$message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
|
$message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
|
||||||
|
|
||||||
if (common_logged_in()) {
|
if (common_logged_in()) {
|
||||||
$current_user = common_current_user();
|
$current_user = common_current_user();
|
||||||
if ($this->user->id === $current_user->id) {
|
if ($this->user->id === $current_user->id) {
|
||||||
|
// TRANS: Encouragement displayed on logged in user's empty timeline.
|
||||||
|
// TRANS: This message contains Markdown links. Keep "](" together.
|
||||||
$message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
|
$message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
|
||||||
} else {
|
} else {
|
||||||
// TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@"
|
// TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@"
|
||||||
|
// TRANS: This message contains Markdown links. Keep "](" together.
|
||||||
$message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from their profile or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
|
$message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from their profile or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Encoutagement displayed on empty timeline user pages for anonymous users.
|
||||||
|
// TRANS: %s is a user nickname. This message contains Markdown links. Keep "](" together.
|
||||||
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to them.'), $this->user->nickname);
|
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to them.'), $this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +186,7 @@ class AllAction extends ProfileAction
|
|||||||
// TRANS: H1 text
|
// TRANS: H1 text
|
||||||
$this->element('h1', null, _("You and friends"));
|
$this->element('h1', null, _("You and friends"));
|
||||||
} else {
|
} else {
|
||||||
// TRANS: H1 text. %1$s is user nickname
|
// TRANS: H1 text. %s is a user nickname
|
||||||
$this->element('h1', null, sprintf(_('%s and friends'), $this->user->nickname));
|
$this->element('h1', null, sprintf(_('%s and friends'), $this->user->nickname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -56,7 +55,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -76,7 +74,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -92,6 +89,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (!in_array($this->format, array('xml', 'json'))) {
|
if (!in_array($this->format, array('xml', 'json'))) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed handling a non-existing API method.
|
||||||
_('API method not found.'),
|
_('API method not found.'),
|
||||||
404,
|
404,
|
||||||
$this->format
|
$this->format
|
||||||
@ -102,16 +100,14 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
// Note: Twitter no longer supports IM
|
// Note: Twitter no longer supports IM
|
||||||
|
|
||||||
if (!in_array(strtolower($this->device), array('sms', 'im', 'none'))) {
|
if (!in_array(strtolower($this->device), array('sms', 'im', 'none'))) {
|
||||||
$this->clientError(
|
// TRANS: Client error displayed when no valid device parameter is provided for a user's delivery device setting.
|
||||||
_(
|
$this->clientError(_( 'You must specify a parameter named ' .
|
||||||
'You must specify a parameter named ' .
|
'\'device\' with a value of one of: sms, im, none.' ));
|
||||||
'\'device\' with a value of one of: sms, im, none.'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
|
// TRANS: Client error displayed when no existing user is provided for a user's delivery device setting.
|
||||||
$this->clientError(_('No such user.'), 404, $this->format);
|
$this->clientError(_('No such user.'), 404, $this->format);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -131,6 +127,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($this->user, 'UPDATE', __FILE__);
|
common_log_db_error($this->user, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Server error displayed when a user's delivery device cannot be updated.
|
||||||
$this->serverError(_('Could not update user.'));
|
$this->serverError(_('Could not update user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -155,5 +152,4 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
|
|||||||
$this->endDocument('json');
|
$this->endDocument('json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,8 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateProfileAction extends ApiAuthAction
|
class ApiAccountUpdateProfileAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Take arguments for running
|
* Take arguments for running
|
||||||
*
|
*
|
||||||
@ -55,7 +53,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -79,7 +76,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -103,6 +99,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
|
// TRANS: Client error displayed if a user could not be found.
|
||||||
$this->clientError(_('No such user.'), 404, $this->format);
|
$this->clientError(_('No such user.'), 404, $this->format);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -110,6 +107,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
$profile = $this->user->getProfile();
|
$profile = $this->user->getProfile();
|
||||||
|
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
|
// TRANS: Client error displayed if a user profile could not be found.
|
||||||
$this->clientError(_('User has no profile.'));
|
$this->clientError(_('User has no profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -145,6 +143,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($profile, 'UPDATE', __FILE__);
|
common_log_db_error($profile, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Server error displayed if a user profile could not be saved.
|
||||||
$this->serverError(_('Could not save profile.'));
|
$this->serverError(_('Could not save profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -163,5 +162,4 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
|
|||||||
$this->endDocument('json');
|
$this->endDocument('json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,10 +42,8 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
|
|
||||||
var $tile = false;
|
var $tile = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,7 +54,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -76,7 +73,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -92,6 +88,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (!in_array($this->format, array('xml', 'json'))) {
|
if (!in_array($this->format, array('xml', 'json'))) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed when trying to handle an unknown API method.
|
||||||
_('API method not found.'),
|
_('API method not found.'),
|
||||||
404,
|
404,
|
||||||
$this->format
|
$this->format
|
||||||
@ -106,8 +103,11 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
&& empty($_POST)
|
&& empty($_POST)
|
||||||
&& ($_SERVER['CONTENT_LENGTH'] > 0)
|
&& ($_SERVER['CONTENT_LENGTH'] > 0)
|
||||||
) {
|
) {
|
||||||
$msg = _('The server was unable to handle that much POST ' .
|
// TRANS: Client error displayed when the number of bytes in a POST request exceeds a limit.
|
||||||
'data (%s bytes) due to its current configuration.');
|
// TRANS: %s is the number of bytes of the CONTENT_LENGTH.
|
||||||
|
$msg = _m('The server was unable to handle that much POST data (%s byte) due to its current configuration.',
|
||||||
|
'The server was unable to handle that much POST data (%s bytes) due to its current configuration.',
|
||||||
|
intval($_SERVER['CONTENT_LENGTH']));
|
||||||
|
|
||||||
$this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
|
$this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
|
||||||
return;
|
return;
|
||||||
@ -125,7 +125,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
// is part of the img filename.
|
// is part of the img filename.
|
||||||
|
|
||||||
if (empty($design)) {
|
if (empty($design)) {
|
||||||
|
|
||||||
$this->user->query('BEGIN');
|
$this->user->query('BEGIN');
|
||||||
|
|
||||||
// save new design
|
// save new design
|
||||||
@ -134,6 +133,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
common_log_db_error($id, 'INSERT', __FILE__);
|
common_log_db_error($id, 'INSERT', __FILE__);
|
||||||
|
// TRANS: Client error displayed when saving design settings fails because of an empty id.
|
||||||
$this->clientError(_('Unable to save your design settings.'));
|
$this->clientError(_('Unable to save your design settings.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -144,6 +144,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (empty($result)) {
|
if (empty($result)) {
|
||||||
common_log_db_error($original, 'UPDATE', __FILE__);
|
common_log_db_error($original, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Client error displayed when saving design settings fails because of an empty result.
|
||||||
$this->clientError(_('Unable to save your design settings.'));
|
$this->clientError(_('Unable to save your design settings.'));
|
||||||
$this->user->query('ROLLBACK');
|
$this->user->query('ROLLBACK');
|
||||||
return;
|
return;
|
||||||
@ -185,6 +186,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
common_log_db_error($design, 'UPDATE', __FILE__);
|
common_log_db_error($design, 'UPDATE', __FILE__);
|
||||||
|
// TRANS: Error displayed when updating design settings fails.
|
||||||
$this->showForm(_('Could not update your design.'));
|
$this->showForm(_('Could not update your design.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -192,6 +194,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
$profile = $this->user->getProfile();
|
$profile = $this->user->getProfile();
|
||||||
|
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
|
// TRANS: Client error displayed when a user has no profile.
|
||||||
$this->clientError(_('User has no profile.'));
|
$this->clientError(_('User has no profile.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -208,5 +211,4 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
|
|||||||
$this->endDocument('json');
|
$this->endDocument('json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiBlockCreateAction extends ApiAuthAction
|
class ApiBlockCreateAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
var $other = null;
|
var $other = null;
|
||||||
@ -59,7 +58,6 @@ class ApiBlockCreateAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -79,7 +77,6 @@ class ApiBlockCreateAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -103,6 +100,7 @@ class ApiBlockCreateAction extends ApiAuthAction
|
|||||||
|
|
||||||
if ($this->user->id == $this->other->id) {
|
if ($this->user->id == $this->other->id) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed when users try to block themselves.
|
||||||
_("You cannot block yourself!"),
|
_("You cannot block yourself!"),
|
||||||
403,
|
403,
|
||||||
$this->format
|
$this->format
|
||||||
@ -124,10 +122,8 @@ class ApiBlockCreateAction extends ApiAuthAction
|
|||||||
$this->showProfile($this->other, $this->format);
|
$this->showProfile($this->other, $this->format);
|
||||||
$this->endDocument($this->format);
|
$this->endDocument($this->format);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Server error displayed when blocking a user has failed.
|
||||||
$this->serverError(_('Block user failed.'), 500, $this->format);
|
$this->serverError(_('Block user failed.'), 500, $this->format);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiBlockDestroyAction extends ApiAuthAction
|
class ApiBlockDestroyAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
var $other = null;
|
var $other = null;
|
||||||
@ -58,7 +57,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -78,7 +76,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -112,10 +109,8 @@ class ApiBlockDestroyAction extends ApiAuthAction
|
|||||||
$this->showProfile($this->other, $this->format);
|
$this->showProfile($this->other, $this->format);
|
||||||
$this->endDocument($this->format);
|
$this->endDocument($this->format);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Server error displayed when unblocking a user has failed.
|
||||||
$this->serverError(_('Unblock user failed.'));
|
$this->serverError(_('Unblock user failed.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,9 +121,9 @@ class ApiDirectMessageNewAction extends ApiAuthAction
|
|||||||
} else {
|
} else {
|
||||||
$content_shortened = common_shorten_links($this->content);
|
$content_shortened = common_shorten_links($this->content);
|
||||||
if (Message::contentTooLong($content_shortened)) {
|
if (Message::contentTooLong($content_shortened)) {
|
||||||
|
$this->clientError(
|
||||||
// TRANS: Client error displayed when message content is too long.
|
// TRANS: Client error displayed when message content is too long.
|
||||||
// TRANS: %d is the maximum number of characters for a message.
|
// TRANS: %d is the maximum number of characters for a message.
|
||||||
$this->clientError(
|
|
||||||
sprintf(_m('That\'s too long. Maximum message size is %d character.', 'That\'s too long. Maximum message size is %d characters.', Message::maxContent()),
|
sprintf(_m('That\'s too long. Maximum message size is %d character.', 'That\'s too long. Maximum message size is %d characters.', Message::maxContent()),
|
||||||
Message::maxContent()
|
Message::maxContent()
|
||||||
),
|
),
|
||||||
|
@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiFavoriteCreateAction extends ApiAuthAction
|
class ApiFavoriteCreateAction extends ApiAuthAction
|
||||||
{
|
{
|
||||||
var $notice = null;
|
var $notice = null;
|
||||||
@ -61,7 +60,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -81,7 +79,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
@ -107,6 +104,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (empty($this->notice)) {
|
if (empty($this->notice)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed when requesting a status with a non-existing ID.
|
||||||
_('No status found with that ID.'),
|
_('No status found with that ID.'),
|
||||||
404,
|
404,
|
||||||
$this->format
|
$this->format
|
||||||
@ -118,6 +116,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
|
|
||||||
if ($this->user->hasFave($this->notice)) {
|
if ($this->user->hasFave($this->notice)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed when trying to mark a notice favourite that already is a favourite.
|
||||||
_('This status is already a favorite.'),
|
_('This status is already a favorite.'),
|
||||||
403,
|
403,
|
||||||
$this->format
|
$this->format
|
||||||
@ -129,6 +128,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
|
|
||||||
if (empty($fave)) {
|
if (empty($fave)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
|
// TRANS: Client error displayed when marking a notice as favourite fails.
|
||||||
_('Could not create favorite.'),
|
_('Could not create favorite.'),
|
||||||
403,
|
403,
|
||||||
$this->format
|
$this->format
|
||||||
@ -166,5 +166,4 @@ class ApiFavoriteCreateAction extends ApiAuthAction
|
|||||||
// XXX: notify by SMS
|
// XXX: notify by SMS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user