From 26652d9be666cb9e1b97ceb1436cfc940821b226 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 20 Jan 2011 18:39:46 +0100 Subject: [PATCH] Update translator documentation Update L10n Remove superfluous whitespace --- actions/apiatomservice.php | 11 +++++++---- actions/apiblockcreate.php | 1 + actions/apistatusesshow.php | 10 ++++++++-- actions/deletenotice.php | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/actions/apiatomservice.php b/actions/apiatomservice.php index b60b312fc4..5d786723e9 100644 --- a/actions/apiatomservice.php +++ b/actions/apiatomservice.php @@ -39,7 +39,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class ApiAtomServiceAction extends ApiBareAuthAction { /** @@ -50,13 +49,13 @@ class ApiAtomServiceAction extends ApiBareAuthAction * @return boolean success flag * */ - function prepare($args) { parent::prepare($args); $this->user = $this->getTargetUser($this->arg('id')); if (empty($this->user)) { + // TRANS: Client error displayed when making an Atom API request for an unknown user. $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -71,7 +70,6 @@ class ApiAtomServiceAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); @@ -83,13 +81,15 @@ class ApiAtomServiceAction extends ApiBareAuthAction 'xmlns:atom' => 'http://www.w3.org/2005/Atom', 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/')); $this->elementStart('workspace'); - $this->element('atom:title', null, _('Main')); + // TRANS: Title for Atom feed. + $this->element('atom:title', null, _m('ATOM','Main')); $this->elementStart('collection', array('href' => common_local_url('ApiTimelineUser', array('id' => $this->user->id, 'format' => 'atom')))); $this->element('atom:title', null, + // TRANS: Title for Atom feed. %s is a user nickname. sprintf(_("%s timeline"), $this->user->nickname)); $this->element('accept', null, 'application/atom+xml;type=entry'); @@ -100,6 +100,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction array('subscriber' => $this->user->id)))); $this->element('atom:title', null, + // TRANS: Title for Atom feed with a user's subscriptions. %s is a user nickname. sprintf(_("%s subscriptions"), $this->user->nickname)); $this->element('accept', null, 'application/atom+xml;type=entry'); @@ -110,6 +111,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction array('profile' => $this->user->id)))); $this->element('atom:title', null, + // TRANS: Title for Atom feed with a user's favorite notices. %s is a user nickname. sprintf(_("%s favorites"), $this->user->nickname)); $this->element('accept', null, 'application/atom+xml;type=entry'); @@ -120,6 +122,7 @@ class ApiAtomServiceAction extends ApiBareAuthAction array('profile' => $this->user->id)))); $this->element('atom:title', null, + // TRANS: Title for Atom feed with a user's memberships. %s is a user nickname. sprintf(_("%s memberships"), $this->user->nickname)); $this->element('accept', null, 'application/atom+xml;type=entry'); diff --git a/actions/apiblockcreate.php b/actions/apiblockcreate.php index a9f31e791b..6942a53bb8 100644 --- a/actions/apiblockcreate.php +++ b/actions/apiblockcreate.php @@ -92,6 +92,7 @@ class ApiBlockCreateAction extends ApiAuthAction } if (empty($this->user) || empty($this->other)) { + // TRANS: Client error displayed when trying to block a non-existing user or a user from another site. $this->clientError(_('No such user.'), 404, $this->format); return; } diff --git a/actions/apistatusesshow.php b/actions/apistatusesshow.php index 80b0374a63..9a7f36bb3a 100644 --- a/actions/apistatusesshow.php +++ b/actions/apistatusesshow.php @@ -114,6 +114,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction $this->deleteNotice(); break; default: + // TRANS: Client error displayed calling an unsupported HTTP error in API status show. $this->clientError(_('HTTP method not supported.'), 405); return; } @@ -138,6 +139,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction $this->showSingleAtomStatus($this->notice); break; default: + // TRANS: Exception thrown requesting an unsupported notice output format. + // TRANS: %s is the requested output format. throw new Exception(sprintf(_("Unsupported format: %s"), $this->format)); } } else { @@ -171,7 +174,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction * * @return boolean true */ - + function isReadOnly($args) { return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD'); @@ -220,6 +223,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction function deleteNotice() { if ($this->format != 'atom') { + // TRANS: Client error displayed when trying to delete a notice not using the Atom format. $this->clientError(_("Can only delete using the Atom format.")); return; } @@ -227,7 +231,8 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction if (empty($this->auth_user) || ($this->notice->profile_id != $this->auth_user->id && !$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) { - $this->clientError(_('Can\'t delete this notice.'), 403); + // TRANS: Client error displayed when a user has no rights to delete notices of other users. + $this->clientError(_('Cannot delete this notice.'), 403); return; } @@ -240,6 +245,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction header('HTTP/1.1 200 OK'); header('Content-Type: text/plain'); + // TRANS: Confirmation of notice deletion in API. %d is the ID (number) of the deleted notice. print(sprintf(_('Deleted notice %d'), $this->notice->id)); print("\n"); } diff --git a/actions/deletenotice.php b/actions/deletenotice.php index a7ac28e19c..ff57bbd61e 100644 --- a/actions/deletenotice.php +++ b/actions/deletenotice.php @@ -75,7 +75,7 @@ class DeletenoticeAction extends Action if ($this->notice->profile_id != $this->user_profile->id && !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) { // TRANS: Error message displayed trying to delete a notice that was not made by the current user. - common_user_error(_('Can\'t delete this notice.')); + common_user_error(_('Cannot delete this notice.')); exit; } // XXX: Ajax!