From cc62afe5b990c33296b9ada1906783ca44352aa8 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sat, 18 Sep 2010 22:31:41 +0200 Subject: * i18n/L10n updates * translator hints added * superfluous whitespace removed --- plugins/SubMirror/actions/addmirror.php | 2 -- plugins/SubMirror/actions/basemirror.php | 15 +++++---------- plugins/SubMirror/actions/editmirror.php | 5 ++--- plugins/SubMirror/actions/mirrorsettings.php | 7 +++---- 4 files changed, 10 insertions(+), 19 deletions(-) (limited to 'plugins/SubMirror/actions') diff --git a/plugins/SubMirror/actions/addmirror.php b/plugins/SubMirror/actions/addmirror.php index 5acdf1dfe..8c3a9740f 100644 --- a/plugins/SubMirror/actions/addmirror.php +++ b/plugins/SubMirror/actions/addmirror.php @@ -45,7 +45,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class AddMirrorAction extends BaseMirrorAction { var $feedurl; @@ -57,7 +56,6 @@ class AddMirrorAction extends BaseMirrorAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); diff --git a/plugins/SubMirror/actions/basemirror.php b/plugins/SubMirror/actions/basemirror.php index be6942efa..3e3431103 100644 --- a/plugins/SubMirror/actions/basemirror.php +++ b/plugins/SubMirror/actions/basemirror.php @@ -45,7 +45,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - abstract class BaseMirrorAction extends Action { var $user; @@ -58,7 +57,6 @@ abstract class BaseMirrorAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -107,24 +105,22 @@ abstract class BaseMirrorAction extends Action } /** - * @fixme none of this belongs in end classes + * @todo FIXME: none of this belongs in end classes * this stuff belongs in shared code! */ function sharedBoilerplate() { // Only allow POST requests - if ($_SERVER['REQUEST_METHOD'] != 'POST') { - $this->clientError(_('This action only accepts POST requests.')); + $this->clientError(_m('This action only accepts POST requests.')); return false; } // CSRF protection - $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { - $this->clientError(_('There was a problem with your session token.'. + $this->clientError(_m('There was a problem with your session token.'. ' Try again, please.')); return false; } @@ -134,7 +130,7 @@ abstract class BaseMirrorAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - $this->clientError(_('Not logged in.')); + $this->clientError(_m('Not logged in.')); return false; } return true; @@ -149,7 +145,6 @@ abstract class BaseMirrorAction extends Action * * @return void */ - function handle($args) { // Throws exception on error @@ -158,7 +153,7 @@ abstract class BaseMirrorAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Subscribed')); + $this->element('title', null, _m('Subscribed')); $this->elementEnd('head'); $this->elementStart('body'); $unsubscribe = new EditMirrorForm($this, $this->profile); diff --git a/plugins/SubMirror/actions/editmirror.php b/plugins/SubMirror/actions/editmirror.php index c7fdab0d6..0f8b03732 100644 --- a/plugins/SubMirror/actions/editmirror.php +++ b/plugins/SubMirror/actions/editmirror.php @@ -45,7 +45,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class EditMirrorAction extends BaseMirrorAction { @@ -56,7 +55,6 @@ class EditMirrorAction extends BaseMirrorAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -93,7 +91,8 @@ class EditMirrorAction extends BaseMirrorAction { $mirror = SubMirror::getMirror($this->user, $this->profile); if (!$mirror) { - $this->clientError(_m('Requested edit of missing mirror')); + // TRANS: Client error thrown when a mirror request is made and no result is retrieved. + $this->clientError(_m('Requested edit of missing mirror.')); } if ($this->delete) { diff --git a/plugins/SubMirror/actions/mirrorsettings.php b/plugins/SubMirror/actions/mirrorsettings.php index 5463a8dc0..a828b26fe 100644 --- a/plugins/SubMirror/actions/mirrorsettings.php +++ b/plugins/SubMirror/actions/mirrorsettings.php @@ -36,9 +36,9 @@ class MirrorSettingsAction extends AccountSettingsAction * * @return string Page title */ - function title() { + // TRANS: Title. return _m('Feed mirror settings'); } @@ -50,6 +50,7 @@ class MirrorSettingsAction extends AccountSettingsAction function getInstructions() { + // TRANS: Instructions. return _m('You can mirror updates from many RSS and Atom feeds ' . 'into your StatusNet timeline!'); } @@ -61,13 +62,12 @@ class MirrorSettingsAction extends AccountSettingsAction * * @return void */ - function showContent() { $user = common_current_user(); $this->showAddFeedForm(); - + $mirror = new SubMirror(); $mirror->subscriber = $user->id; if ($mirror->find()) { @@ -99,7 +99,6 @@ class MirrorSettingsAction extends AccountSettingsAction * * @return void */ - function handlePost() { } -- cgit v1.2.3-54-g00ecf