if (Message::contentTooLong($content_shortened)) {
$this->clientError(
if (Message::contentTooLong($content_shortened)) {
$this->clientError(
- sprintf(
- _('That\'s too long. Max message size is %d chars.'),
+ // 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()
),
406,
Message::maxContent()
),
406,
@@ -143,11+135,13 @@ class ApiDirectMessageNewAction extends ApiAuthAction
}
if (empty($this->other)) {
}
if (empty($this->other)) {
+ // TRANS: Client error displayed if a recipient user could not be found (403).
$this->clientError(_('Recipient user not found.'), 403, $this->format);
return;
} else if (!$this->user->mutuallySubscribed($this->other)) {
$this->clientError(
$this->clientError(_('Recipient user not found.'), 403, $this->format);
return;
} else if (!$this->user->mutuallySubscribed($this->other)) {
$this->clientError(
- _('Can\'t send direct messages to users who aren\'t your friend.'),
+ // TRANS: Client error displayed trying to direct message another user who's not a friend (403).
+ _('Cannot send direct messages to users who aren\'t your friend.'),
403,
$this->format
);
403,
$this->format
);
@@ -156,10+150,9 @@ class ApiDirectMessageNewAction extends ApiAuthAction
// Note: sending msgs to yourself is allowed by Twitter
// Note: sending msgs to yourself is allowed by Twitter
- $errmsg = 'Don\'t send a message to yourself; ' .