From 5a6f6162061985c9d0e67b7d25b94b5a53205ace Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 19 Sep 2010 15:17:36 +0200 Subject: * i18n/L10n update * translator comments added * remove superfluous whitespace --- plugins/OStatus/actions/pushcallback.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/OStatus/actions/pushcallback.php') diff --git a/plugins/OStatus/actions/pushcallback.php b/plugins/OStatus/actions/pushcallback.php index 6c6978745..701a39c16 100644 --- a/plugins/OStatus/actions/pushcallback.php +++ b/plugins/OStatus/actions/pushcallback.php @@ -24,7 +24,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } - class PushCallbackAction extends Action { function handle() @@ -46,13 +45,13 @@ class PushCallbackAction extends Action $feedid = $this->arg('feed'); common_log(LOG_INFO, "POST for feed id $feedid"); if (!$feedid) { - throw new ServerException('Empty or invalid feed id.', 400); + throw new ServerException(_m('Empty or invalid feed id.'), 400); } $feedsub = FeedSub::staticGet('id', $feedid); if (!$feedsub) { - // @todo i18n FIXME: added i18n and use sprintf when using parameters. - throw new ServerException('Unknown PuSH feed id ' . $feedid, 400); + // TRANS: Server exception. %s is a feed ID. + throw new ServerException(sprintf(_m('Unknown PuSH feed id %s'),$feedid), 400); } $hmac = ''; @@ -84,30 +83,31 @@ class PushCallbackAction extends Action $verify_token = $this->arg('hub_verify_token'); if ($mode != 'subscribe' && $mode != 'unsubscribe') { - throw new ClientException("Bad hub.mode $mode", 404); + // TRANS: Client exception. %s is an invalid value for hub.mode. + throw new ClientException(sprintf(_m('Bad hub.mode "$s".',$mode)), 404); } $feedsub = FeedSub::staticGet('uri', $topic); if (!$feedsub) { - // @todo i18n FIXME: added i18n and use sprintf when using parameters. - throw new ClientException("Bad hub.topic feed $topic.", 404); + // TRANS: Client exception. %s is an invalid feed name. + throw new ClientException(sprintf(_m('Bad hub.topic feed "%s".'),$topic), 404); } if ($feedsub->verify_token !== $verify_token) { - // @todo i18n FIXME: added i18n and use sprintf when using parameters. - throw new ClientException("Bad hub.verify_token $token for $topic.", 404); + // TRANS: Client exception. %1$s the invalid token, %2$s is the topic for which the invalid token was given. + throw new ClientException(sprintf(_m('Bad hub.verify_token %1$s for %2$s.'),$token,$topic), 404); } if ($mode == 'subscribe') { // We may get re-sub requests legitimately. if ($feedsub->sub_state != 'subscribe' && $feedsub->sub_state != 'active') { - // @todo i18n FIXME: added i18n and use sprintf when using parameters. - throw new ClientException("Unexpected subscribe request for $topic.", 404); + // TRANS: Client exception. %s is an invalid topic. + throw new ClientException(sprintf(_m('Unexpected subscribe request for %s.'),$topic), 404); } } else { if ($feedsub->sub_state != 'unsubscribe') { - // @todo i18n FIXME: added i18n and use sprintf when using parameters. - throw new ClientException("Unexpected unsubscribe request for $topic.", 404); + // TRANS: Client exception. %s is an invalid topic. + throw new ClientException(sprintf(_m('Unexpected unsubscribe request for %s.'),$topic), 404); } } -- cgit v1.2.3-54-g00ecf