From d57bc1b8e99a432d7f6425d0c8836a3c4928581a Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 18 Aug 2008 20:29:03 -0400 Subject: Twitter-compatible API - running all strings through gettext() now darcs-hash:20080819002903-462f3-94e62891db9b9de049a918034742e545f663e840.gz --- actions/twitapistatuses.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'actions/twitapistatuses.php') diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php index 92c6fbb63..6a63dd037 100644 --- a/actions/twitapistatuses.php +++ b/actions/twitapistatuses.php @@ -82,12 +82,12 @@ class TwitapistatusesAction extends TwitterapiAction { $this->show_json_timeline($notice); break; default: - common_user_error("API method not found!", $code = 404); + common_user_error(_('API method not found!'), $code = 404); break; } } else { - common_server_error('Couldn\'t find any statuses.', $code = 503); + common_server_error(_('Couldn\'t find any statuses.'), $code = 503); } exit(); @@ -253,7 +253,7 @@ class TwitapistatusesAction extends TwitterapiAction { $this->show_json_timeline($notice); break; default: - common_user_error("API method not found!", $code = 404); + common_user_error(_('API method not found!'), $code = 404); } exit(); @@ -364,7 +364,7 @@ class TwitapistatusesAction extends TwitterapiAction { $this->show_json_timeline($notice); break; default: - common_user_error("API method not found!", $code = 404); + common_user_error(_('API method not found!'), $code = 404); } exit(); @@ -397,7 +397,7 @@ class TwitapistatusesAction extends TwitterapiAction { // as "truncated." Sending this error may screw up some clients // that assume Twitter will truncate for them. Should we just // truncate too? -- Zach - $this->client_error('That\'s too long. Max notice size is 140 chars.', $code = 406, $apidata['content-type']); + $this->client_error(_('That\'s too long. Max notice size is 140 chars.'), $code = 406, $apidata['content-type']); exit(); } @@ -411,7 +411,7 @@ class TwitapistatusesAction extends TwitterapiAction { if ($reply) { $reply_to = $in_reply_to_status_id; } else { - $this->client_error('Not found', $code = 404, $apidata['content-type']); + $this->client_error(_('Not found'), $code = 404, $apidata['content-type']); exit(); } } @@ -521,7 +521,7 @@ class TwitapistatusesAction extends TwitterapiAction { $this->show_json_timeline($notices); break; default: - common_user_error("API method not found!", $code = 404); + common_user_error(_('API method not found!'), $code = 404); } @@ -548,6 +548,7 @@ class TwitapistatusesAction extends TwitterapiAction { */ function destroy($args, $apidata) { + parent::handle($args); common_server_error("API method under construction.", $code=501); } @@ -702,7 +703,7 @@ class TwitapistatusesAction extends TwitterapiAction { */ function featured($args, $apidata) { parent::handle($args); - common_server_error("API method under construction.", $code=501); + common_server_error(_('API method under construction.'), $code=501); } function get_user($id, $apidata) { @@ -716,4 +717,3 @@ class TwitapistatusesAction extends TwitterapiAction { } } - -- cgit v1.2.3-54-g00ecf