summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2010-09-18 22:31:41 +0200
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2010-09-18 22:31:41 +0200
commitcc62afe5b990c33296b9ada1906783ca44352aa8 (patch)
treeb0aa39a48208ceecff86a9ebaa1f0e08a599fc61 /plugins
parenta7fca907dc78e3dd9e364f23499a216b7edf7287 (diff)
* i18n/L10n updates
* translator hints added * superfluous whitespace removed
Diffstat (limited to 'plugins')
-rw-r--r--plugins/SubMirror/SubMirrorPlugin.php6
-rw-r--r--plugins/SubMirror/actions/addmirror.php2
-rw-r--r--plugins/SubMirror/actions/basemirror.php15
-rw-r--r--plugins/SubMirror/actions/editmirror.php5
-rw-r--r--plugins/SubMirror/actions/mirrorsettings.php7
-rw-r--r--plugins/SubMirror/classes/SubMirror.php10
-rw-r--r--plugins/SubMirror/lib/addmirrorform.php10
-rw-r--r--plugins/SubMirror/lib/editmirrorform.php9
-rw-r--r--plugins/SubMirror/lib/mirrorqueuehandler.php1
9 files changed, 20 insertions, 45 deletions
diff --git a/plugins/SubMirror/SubMirrorPlugin.php b/plugins/SubMirror/SubMirrorPlugin.php
index 80c6c5a88..578ef6607 100644
--- a/plugins/SubMirror/SubMirrorPlugin.php
+++ b/plugins/SubMirror/SubMirrorPlugin.php
@@ -17,14 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+
/**
* @package SubMirrorPlugin
* @maintainer Brion Vibber <brion@status.net>
*/
-
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
-
-
class SubMirrorPlugin extends Plugin
{
/**
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()
{
}
diff --git a/plugins/SubMirror/classes/SubMirror.php b/plugins/SubMirror/classes/SubMirror.php
index bd8fc80a5..b39af918d 100644
--- a/plugins/SubMirror/classes/SubMirror.php
+++ b/plugins/SubMirror/classes/SubMirror.php
@@ -79,7 +79,7 @@ class SubMirror extends Memcached_DataObject
/**
* Temporary hack to set up the compound index, since we can't do
* it yet through regular Schema interface. (Coming for 1.0...)
- *
+ *
* @param Schema $schema
* @return void
*/
@@ -145,7 +145,7 @@ class SubMirror extends Memcached_DataObject
$mirror->created = common_sql_now();
$mirror->modified = common_sql_now();
$mirror->insert();
-
+
return $mirror;
}
@@ -173,7 +173,7 @@ class SubMirror extends Memcached_DataObject
* This retains attribution within the site, and other nice things,
* but currently ends up looking like 'RT @foobar bla bla' when
* bridged out over OStatus or TwitterBridge.
- *
+ *
* @param Notice $notice
* @return mixed Notice on successful repeat, true if already repeated, false on failure
*/
@@ -192,7 +192,7 @@ class SubMirror extends Memcached_DataObject
* Mirror a notice by emitting a new notice with the same contents.
* Kind of dirty, but if pulling an external data feed into an account
* that may be what you want.
- *
+ *
* @param Notice $notice
* @return mixed Notice on successful repeat, true if already repeated, false on failure
*/
@@ -216,7 +216,7 @@ class SubMirror extends Memcached_DataObject
/**
* Get the mirroring setting for a pair of profiles, if existing.
- *
+ *
* @param Profile $subscriber
* @param Profile $subscribed
* @return mixed Profile or empty
diff --git a/plugins/SubMirror/lib/addmirrorform.php b/plugins/SubMirror/lib/addmirrorform.php
index 0a798c9ea..e1d50c272 100644
--- a/plugins/SubMirror/lib/addmirrorform.php
+++ b/plugins/SubMirror/lib/addmirrorform.php
@@ -28,7 +28,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
class AddMirrorForm extends Form
{
-
/**
* Name of the form
*
@@ -36,7 +35,6 @@ class AddMirrorForm extends Form
*
* @return void
*/
-
function formLegend()
{
}
@@ -49,7 +47,6 @@ class AddMirrorForm extends Form
*
* @return void
*/
-
function formData()
{
$this->out->elementStart('fieldset');
@@ -64,7 +61,7 @@ class AddMirrorForm extends Form
$this->unli();
$this->li();
- $this->out->submit('addmirror-save', _m('Add feed'));
+ $this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
$this->unli();
$this->out->elementEnd('ul');
$this->out->elementEnd('fieldset');
@@ -94,7 +91,6 @@ class AddMirrorForm extends Form
*
* @return void
*/
-
function formActions()
{
}
@@ -107,7 +103,6 @@ class AddMirrorForm extends Form
*
* @return string ID of the form
*/
-
function id()
{
return 'add-mirror-form';
@@ -121,7 +116,6 @@ class AddMirrorForm extends Form
*
* @return string URL to post to
*/
-
function action()
{
return common_local_url('addmirror');
@@ -132,10 +126,8 @@ class AddMirrorForm extends Form
*
* @return string the form's class
*/
-
function formClass()
{
return 'form_settings';
}
-
}
diff --git a/plugins/SubMirror/lib/editmirrorform.php b/plugins/SubMirror/lib/editmirrorform.php
index 8236da389..c1f60f9c2 100644
--- a/plugins/SubMirror/lib/editmirrorform.php
+++ b/plugins/SubMirror/lib/editmirrorform.php
@@ -45,7 +45,6 @@ class EditMirrorForm extends Form
*
* @return void
*/
-
function formLegend()
{
}
@@ -58,7 +57,6 @@ class EditMirrorForm extends Form
*
* @return void
*/
-
function formData()
{
$this->out->elementStart('fieldset');
@@ -81,6 +79,7 @@ class EditMirrorForm extends Form
$this->out->elementEnd('div');
$this->out->elementStart('div');
if ($feed) {
+ // XXX: Why the hard coded space?
$this->out->text(_m('LABEL', 'Remote feed:') . ' ');
//$this->out->element('a', array('href' => $feed), $feed);
$this->out->element('input', array('value' => $feed, 'readonly' => 'readonly', 'style' => 'width: 100%'));
@@ -111,7 +110,7 @@ class EditMirrorForm extends Form
}
$this->out->elementEnd('fieldset');
-
+
$this->out->elementStart('div');
$this->out->submit($this->id() . '-save', _m('Save'));
$this->out->element('input', array('type' => 'submit',
@@ -155,7 +154,6 @@ class EditMirrorForm extends Form
*
* @return string ID of the form
*/
-
function id()
{
return 'edit-mirror-form-' . $this->profile->id;
@@ -169,7 +167,6 @@ class EditMirrorForm extends Form
*
* @return string URL to post to
*/
-
function action()
{
return common_local_url('editmirror');
@@ -180,10 +177,8 @@ class EditMirrorForm extends Form
*
* @return string the form's class
*/
-
function formClass()
{
return 'form_settings';
}
-
}
diff --git a/plugins/SubMirror/lib/mirrorqueuehandler.php b/plugins/SubMirror/lib/mirrorqueuehandler.php
index 92b36b5eb..dae9c0889 100644
--- a/plugins/SubMirror/lib/mirrorqueuehandler.php
+++ b/plugins/SubMirror/lib/mirrorqueuehandler.php
@@ -23,7 +23,6 @@
* @package SubMirror
* @author Brion Vibber <brion@status.net>
*/
-
class MirrorQueueHandler extends QueueHandler
{
function transport()