Add/update translator documentation.
This commit is contained in:
		@@ -66,6 +66,7 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        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 coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,7 +88,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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,7 +90,7 @@ class ApiAccountUpdateProfileAction 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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,7 +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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,7 +111,7 @@ class ApiAccountUpdateProfileColorsAction 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 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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,7 +64,7 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
 | 
				
			|||||||
        parent::handle($args);
 | 
					        parent::handle($args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!in_array($this->format, array('xml', 'json'))) {
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -153,7 +153,7 @@ class ApiDirectMessageAction extends ApiAuthAction
 | 
				
			|||||||
            $this->showJsonDirectMessages();
 | 
					            $this->showJsonDirectMessages();
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@ class ApiFavoriteCreateAction 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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@ class ApiFavoriteDestroyAction 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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,7 @@ class ApiFriendshipsCreateAction 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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,7 @@ class ApiFriendshipsDestroyAction 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.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -120,7 +120,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
 | 
				
			|||||||
        parent::handle($args);
 | 
					        parent::handle($args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!in_array($this->format, array('xml', 'json'))) {
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), 404);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -134,7 +134,7 @@ class ApiGroupCreateAction extends ApiAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,7 +111,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                400,
 | 
					                400,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ class ApiGroupJoinAction extends ApiAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -134,7 +134,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,6 +67,7 @@ class ApiGroupListAction extends ApiBareAuthAction
 | 
				
			|||||||
        $this->user   = $this->getTargetUser(null);
 | 
					        $this->user   = $this->getTargetUser(null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (empty($this->user)) {
 | 
					        if (empty($this->user)) {
 | 
				
			||||||
 | 
					            // TRANS: Client error displayed when user not found for an action.
 | 
				
			||||||
            $this->clientError(_('No such user.'), 404, $this->format);
 | 
					            $this->clientError(_('No such user.'), 404, $this->format);
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -130,7 +131,7 @@ class ApiGroupListAction extends ApiBareAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -116,7 +116,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -101,7 +101,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,6 +85,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
 | 
					        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
 | 
				
			||||||
            $this->clientError(
 | 
					            $this->clientError(
 | 
				
			||||||
 | 
					                // TRANS: Client error message. POST is a HTTP command. It should not be translated.
 | 
				
			||||||
                _('This method requires a POST.'),
 | 
					                _('This method requires a POST.'),
 | 
				
			||||||
                400, $this->format
 | 
					                400, $this->format
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
@@ -93,7 +94,7 @@ class ApiGroupProfileUpdateAction 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 using an unsupported API format.
 | 
					                // TRANS: Client error displayed when coming across a non-supported API method.
 | 
				
			||||||
                _('API method not found.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
@@ -211,7 +212,7 @@ class ApiGroupProfileUpdateAction extends ApiAuthAction
 | 
				
			|||||||
            $this->showSingleJsonGroup($this->group);
 | 
					            $this->showSingleJsonGroup($this->group);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), 404, $this->format);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -110,7 +110,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            $this->showSingleJsonGroup($this->group);
 | 
					            $this->showSingleJsonGroup($this->group);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), 404, $this->format);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@ class ApiHelpTestAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            $this->endDocument('json');
 | 
					            $this->endDocument('json');
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,7 +97,7 @@ class ApiStatusesDestroyAction 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 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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404
 | 
					                404
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -106,7 +106,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction
 | 
				
			|||||||
            $this->showJsonTimeline($strm);
 | 
					            $this->showJsonTimeline($strm);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -101,7 +101,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
 | 
				
			|||||||
        parent::handle($args);
 | 
					        parent::handle($args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!in_array($this->format, array('xml', 'json', 'atom'))) {
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), 404);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -239,8 +239,8 @@ class ApiStatusesUpdateAction extends ApiAuthAction
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            $this->clientError(
 | 
					            $this->clientError(
 | 
				
			||||||
                sprintf(
 | 
					                sprintf(
 | 
				
			||||||
                    // TRANS: Client error displayed when the parameter "status" is missing.
 | 
					                    // TRANS: Client error displayed exceeding the maximum notice length.
 | 
				
			||||||
                    // TRANS: %d is the maximum number of character for a notice.
 | 
					                    // TRANS: %d is the maximum length for a notice.
 | 
				
			||||||
                    _m('That\'s too long. Maximum notice size is %d character.',
 | 
					                    _m('That\'s too long. Maximum notice size is %d character.',
 | 
				
			||||||
                      'That\'s too long. Maximum notice size is %d characters.',
 | 
					                      'That\'s too long. Maximum notice size is %d characters.',
 | 
				
			||||||
                      Notice::maxContent()),
 | 
					                      Notice::maxContent()),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -135,7 +135,7 @@ class ApiStatusnetConfigAction extends ApiAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -87,7 +87,7 @@ class ApiStatusnetVersionAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            $this->clientError(
 | 
					            $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.'),
 | 
					                _('API method not found.'),
 | 
				
			||||||
                404,
 | 
					                404,
 | 
				
			||||||
                $this->format
 | 
					                $this->format
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -105,7 +105,7 @@ class ApiSubscriptionsAction extends ApiBareAuthAction
 | 
				
			|||||||
        parent::handle($args);
 | 
					        parent::handle($args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!in_array($this->format, array('xml', 'json'))) {
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -178,7 +178,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -204,6 +204,8 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
 | 
				
			|||||||
        $profile    = $this->user->getProfile();
 | 
					        $profile    = $this->user->getProfile();
 | 
				
			||||||
        $avatar     = $profile->getAvatar(AVATAR_PROFILE_SIZE);
 | 
					        $avatar     = $profile->getAvatar(AVATAR_PROFILE_SIZE);
 | 
				
			||||||
        $sitename   = common_config('site', 'name');
 | 
					        $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);
 | 
					        $title      = sprintf(_("%s and friends"), $this->user->nickname);
 | 
				
			||||||
        $taguribase = TagURI::base();
 | 
					        $taguribase = TagURI::base();
 | 
				
			||||||
        $id         = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
 | 
					        $id         = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
 | 
				
			||||||
@@ -272,7 +274,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -177,7 +177,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -178,7 +178,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -243,7 +243,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,7 +146,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -101,6 +101,8 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
 | 
				
			|||||||
        $profile = $this->auth_user->getProfile();
 | 
					        $profile = $this->auth_user->getProfile();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $subtitle   = sprintf(
 | 
					        $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.'),
 | 
					            _('%1$s notices that %2$s / %3$s has repeated.'),
 | 
				
			||||||
            $sitename, $this->auth_user->nickname, $profile->getBestName()
 | 
					            $sitename, $this->auth_user->nickname, $profile->getBestName()
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
@@ -143,7 +145,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -161,7 +161,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -213,7 +213,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
 | 
				
			|||||||
            $this->raw($doc->asString());
 | 
					            $this->raw($doc->asString());
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -96,7 +96,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!in_array($this->format, array('xml', 'json'))) {
 | 
					        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);
 | 
					            $this->clientError(_('API method not found.'), $code = 404);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -181,6 +181,8 @@ class NewnoticeAction extends Action
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            if (Notice::contentTooLong($content_shortened)) {
 | 
					            if (Notice::contentTooLong($content_shortened)) {
 | 
				
			||||||
                $upload->delete();
 | 
					                $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.',
 | 
					                $this->clientError(sprintf(_m('Maximum notice size is %d character, including attachment URL.',
 | 
				
			||||||
                                              'Maximum notice size is %d characters, including attachment URL.',
 | 
					                                              'Maximum notice size is %d characters, including attachment URL.',
 | 
				
			||||||
                                              Notice::maxContent()),
 | 
					                                              Notice::maxContent()),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -212,6 +212,7 @@ class RegisterAction extends Action
 | 
				
			|||||||
                // TRANS: Form validation error displayed when trying to register with an invalid nickname.
 | 
					                // TRANS: Form validation error displayed when trying to register with an invalid nickname.
 | 
				
			||||||
                $this->showForm(_('Not a valid nickname.'));
 | 
					                $this->showForm(_('Not a valid nickname.'));
 | 
				
			||||||
            } else if ($this->emailExists($email)) {
 | 
					            } 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.'));
 | 
					                $this->showForm(_('Email address already exists.'));
 | 
				
			||||||
            } else if (!is_null($homepage) && (strlen($homepage) > 0) &&
 | 
					            } else if (!is_null($homepage) && (strlen($homepage) > 0) &&
 | 
				
			||||||
                       !Validate::uri($homepage,
 | 
					                       !Validate::uri($homepage,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,6 +37,7 @@ class UserrssAction extends Rss10Action
 | 
				
			|||||||
        $this->tag  = $this->trimmed('tag');
 | 
					        $this->tag  = $this->trimmed('tag');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!$this->user) {
 | 
					        if (!$this->user) {
 | 
				
			||||||
 | 
					            // TRANS: Client error displayed when user not found for an action.
 | 
				
			||||||
            $this->clientError(_('No such user.'));
 | 
					            $this->clientError(_('No such user.'));
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@@ -105,6 +106,7 @@ class UserrssAction extends Rss10Action
 | 
				
			|||||||
        $profile = $user->getProfile();
 | 
					        $profile = $user->getProfile();
 | 
				
			||||||
        if (!$profile) {
 | 
					        if (!$profile) {
 | 
				
			||||||
            common_log_db_error($user, 'SELECT', __FILE__);
 | 
					            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.'));
 | 
					            $this->serverError(_('User without matching profile.'));
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,6 +56,7 @@ class UserxrdAction extends XrdAction
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!$this->user) {
 | 
					        if (!$this->user) {
 | 
				
			||||||
 | 
					            // TRANS: Client error displayed when user not found for an action.
 | 
				
			||||||
            $this->clientError(_('No such user.'), 404);
 | 
					            $this->clientError(_('No such user.'), 404);
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user