git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 84a2fb44 authored by Siebrand Mazeland's avatar Siebrand Mazeland

Add/update translator documentation.

parent 9a6ee5e8
......@@ -66,6 +66,7 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -88,7 +88,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed handling a non-existing API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -90,7 +90,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -88,7 +88,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -111,7 +111,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method updating profile colours.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -64,7 +64,7 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed trying to execute an unknown API method verifying user credentials.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
......
......@@ -153,7 +153,7 @@ class ApiDirectMessageAction extends ApiAuthAction
$this->showJsonDirectMessages();
break;
default:
// TRANS: Client error given when an API method was not found (404).
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -94,7 +94,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -94,7 +94,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -95,7 +95,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -95,7 +95,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -120,7 +120,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed trying to execute an unknown API method showing friendship.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
return;
}
......
......@@ -134,7 +134,7 @@ class ApiGroupCreateAction extends ApiAuthAction
break;
default:
$this->clientError(
// TRANS: Client error given when an API method was not found (404).
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -111,7 +111,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method showing group membership.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
400,
$this->format
......
......@@ -144,7 +144,7 @@ class ApiGroupJoinAction extends ApiAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method joining a group.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -134,7 +134,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method leaving a group.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -67,6 +67,7 @@ class ApiGroupListAction extends ApiBareAuthAction
$this->user = $this->getTargetUser(null);
if (empty($this->user)) {
// TRANS: Client error displayed when user not found for an action.
$this->clientError(_('No such user.'), 404, $this->format);
return false;
}
......@@ -130,7 +131,7 @@ class ApiGroupListAction extends ApiBareAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method checking group membership.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -116,7 +116,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method listing the latest 20 groups.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -101,7 +101,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method showing group membership.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -85,6 +85,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
// TRANS: Client error message. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
......@@ -93,7 +94,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed when using an unsupported API format.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......@@ -211,7 +212,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
$this->showSingleJsonGroup($this->group);
break;
default:
// TRANS: Client error displayed when using an unsupported API format.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404, $this->format);
break;
}
......
......@@ -110,7 +110,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
$this->showSingleJsonGroup($this->group);
break;
default:
// TRANS: Client error displayed trying to execute an unknown API method showing a group.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404, $this->format);
break;
}
......
......@@ -80,7 +80,7 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
$this->endDocument('json');
} else {
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method testing API connectivity.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -97,7 +97,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
// TRANS: Client error displayed trying to execute an unknown API method deleting a status.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404
);
......
......@@ -106,7 +106,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
$this->showJsonTimeline($strm);
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -101,7 +101,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
parent::handle($args);
if (!in_array($this->format, array('xml', 'json', 'atom'))) {
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
return;
}
......
......@@ -239,8 +239,8 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$this->clientError(
sprintf(
// TRANS: Client error displayed when the parameter "status" is missing.
// TRANS: %d is the maximum number of character for a notice.
// TRANS: Client error displayed exceeding the maximum notice length.
// TRANS: %d is the maximum length for a notice.
_m('That\'s too long. Maximum notice size is %d character.',
'That\'s too long. Maximum notice size is %d characters.',
Notice::maxContent()),
......
......@@ -135,7 +135,7 @@ class ApiStatusnetConfigAction extends ApiAction
break;
default:
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -87,7 +87,7 @@ class ApiStatusnetVersionAction extends ApiPrivateAuthAction
break;
default:
$this->clientError(
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format
......
......@@ -105,7 +105,7 @@ class ApiSubscriptionsAction extends ApiBareAuthAction
parent::handle($args);
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
......
......@@ -178,7 +178,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -204,6 +204,8 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$profile = $this->user->getProfile();
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
$sitename = common_config('site', 'name');
// TRANS: Title of API timeline for a user and friends.
// TRANS: %s is a username.
$title = sprintf(_("%s and friends"), $this->user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
......@@ -272,7 +274,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -177,7 +177,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -178,7 +178,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -243,7 +243,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -146,7 +146,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -101,6 +101,8 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$profile = $this->auth_user->getProfile();
$subtitle = sprintf(
// TRANS: Subtitle of API time with retweets of me.
// TRANS: %1$s is the StatusNet sitename, %2$s is the user nickname, %3$s is the user profile name.
_('%1$s notices that %2$s / %3$s has repeated.'),
$sitename, $this->auth_user->nickname, $profile->getBestName()
);
......@@ -143,7 +145,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
break;
}
......
......@@ -161,7 +161,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -213,7 +213,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$this->raw($doc->asString());
break;
default:
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
break;
}
......
......@@ -96,7 +96,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction
}
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed when trying to handle an unknown API method.
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
......
......@@ -181,6 +181,8 @@ class NewnoticeAction extends Action
if (Notice::contentTooLong($content_shortened)) {
$upload->delete();
// TRANS: Client error displayed exceeding the maximum notice length.
// TRANS: %d is the maximum length for a notice.
$this->clientError(sprintf(_m('Maximum notice size is %d character, including attachment URL.',
'Maximum notice size is %d characters, including attachment URL.',
Notice::maxContent()),
......
......@@ -212,6 +212,7 @@ class RegisterAction extends Action
// TRANS: Form validation error displayed when trying to register with an invalid nickname.
$this->showForm(_('Not a valid nickname.'));
} else if ($this->emailExists($email)) {
// TRANS: Form validation error displayed when trying to register with an already registered e-mail address.
$this->showForm(_('Email address already exists.'));
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
!Validate::uri($homepage,
......
......@@ -37,6 +37,7 @@ class UserrssAction extends Rss10Action
$this->tag = $this->trimmed('tag');
if (!$this->user) {
// TRANS: Client error displayed when user not found for an action.
$this->clientError(_('No such user.'));
return false;
} else {
......@@ -105,6 +106,7 @@ class UserrssAction extends Rss10Action
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
// TRANS: Server error displayed in user RSS when user does not have a matching profile.
$this->serverError(_('User without matching profile.'));
return null;
}
......
......@@ -56,6 +56,7 @@ class UserxrdAction extends XrdAction
}
if (!$this->user) {
// TRANS: Client error displayed when user not found for an action.
$this->clientError(_('No such user.'), 404);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment