// 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);
} else {
- // TRANS: Page title. %1$s is user nickname
+ // TRANS: Page title. %s is user nickname
return sprintf(_("%s and friends"), $this->user->nickname);
}
}
'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)),
new Feed(Feed::RSS2,
common_local_url(
'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)),
new Feed(Feed::ATOM,
common_local_url(
'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))
);
}
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) . ' ';
if (common_logged_in()) {
$current_user = common_current_user();
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.');
} else {
// 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);
}
} 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);
}
// TRANS: H1 text
$this->element('h1', null, _("You and friends"));
} 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));
}
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
{
/**
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed handling a non-existing API method.
_('API method not found.'),
404,
$this->format
// Note: Twitter no longer supports IM
if (!in_array(strtolower($this->device), array('sms', 'im', 'none'))) {
- $this->clientError(
- _(
- 'You must specify a parameter named ' .
- '\'device\' with a value of one of: sms, im, none.'
- )
- );
+ // 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 ' .
+ '\'device\' with a value of one of: sms, im, none.' ));
return;
}
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);
return;
}
if ($result === false) {
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.'));
return;
}
$this->endDocument('json');
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountUpdateProfileAction extends ApiAuthAction
{
-
/**
* Take arguments for running
*
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
}
if (empty($this->user)) {
+ // TRANS: Client error displayed if a user could not be found.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed if a user profile could not be found.
$this->clientError(_('User has no profile.'));
return;
}
if (!$result) {
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.'));
return;
}
$this->endDocument('json');
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
{
-
var $tile = false;
/**
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
&& empty($_POST)
&& ($_SERVER['CONTENT_LENGTH'] > 0)
) {
- $msg = _('The server was unable to handle that much POST ' .
- 'data (%s bytes) due to its current configuration.');
+ // TRANS: Client error displayed when the number of bytes in a POST request exceeds a limit.
+ // 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']));
return;
// is part of the img filename.
if (empty($design)) {
-
$this->user->query('BEGIN');
// save new design
if (empty($id)) {
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.'));
return;
}
if (empty($result)) {
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->user->query('ROLLBACK');
return;
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
+ // TRANS: Error displayed when updating design settings fails.
$this->showForm(_('Could not update your design.'));
return;
}
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed when a user has no profile.
$this->clientError(_('User has no profile.'));
return;
}
$this->endDocument('json');
}
}
-
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiBlockCreateAction extends ApiAuthAction
{
var $other = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if ($this->user->id == $this->other->id) {
$this->clientError(
+ // TRANS: Client error displayed when users try to block themselves.
_("You cannot block yourself!"),
403,
$this->format
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
} else {
+ // TRANS: Server error displayed when blocking a user has failed.
$this->serverError(_('Block user failed.'), 500, $this->format);
}
-
}
-
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiBlockDestroyAction extends ApiAuthAction
{
var $other = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
} else {
+ // TRANS: Server error displayed when unblocking a user has failed.
$this->serverError(_('Unblock user failed.'));
}
-
}
-
}
-
} else {
$content_shortened = common_shorten_links($this->content);
if (Message::contentTooLong($content_shortened)) {
- // TRANS: Client error displayed when message content is too long.
- // TRANS: %d is the maximum number of characters for a message.
$this->clientError(
+ // TRANS: Client error displayed when message content is too long.
+ // TRANS: %d is the maximum number of characters for a message.
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()
),
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiFavoriteCreateAction extends ApiAuthAction
{
var $notice = null;
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
if (empty($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed when requesting a status with a non-existing ID.
_('No status found with that ID.'),
404,
$this->format
if ($this->user->hasFave($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed when trying to mark a notice favourite that already is a favourite.
_('This status is already a favorite.'),
403,
$this->format
if (empty($fave)) {
$this->clientError(
+ // TRANS: Client error displayed when marking a notice as favourite fails.
_('Could not create favorite.'),
403,
$this->format
// XXX: notify by SMS
}
}
-
}