forked from GNUsocial/gnu-social
* i18n/L10n updates
* translator hints added * superfluous whitespace removed
This commit is contained in:
parent
a7fca907dc
commit
cc62afe5b9
@ -17,14 +17,12 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package SubMirrorPlugin
|
* @package SubMirrorPlugin
|
||||||
* @maintainer Brion Vibber <brion@status.net>
|
* @maintainer Brion Vibber <brion@status.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
|
||||||
|
|
||||||
|
|
||||||
class SubMirrorPlugin extends Plugin
|
class SubMirrorPlugin extends Plugin
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AddMirrorAction extends BaseMirrorAction
|
class AddMirrorAction extends BaseMirrorAction
|
||||||
{
|
{
|
||||||
var $feedurl;
|
var $feedurl;
|
||||||
@ -57,7 +56,6 @@ class AddMirrorAction extends BaseMirrorAction
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
abstract class BaseMirrorAction extends Action
|
abstract class BaseMirrorAction extends Action
|
||||||
{
|
{
|
||||||
var $user;
|
var $user;
|
||||||
@ -58,7 +57,6 @@ abstract class BaseMirrorAction extends Action
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::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!
|
* this stuff belongs in shared code!
|
||||||
*/
|
*/
|
||||||
function sharedBoilerplate()
|
function sharedBoilerplate()
|
||||||
{
|
{
|
||||||
// Only allow POST requests
|
// Only allow POST requests
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||||
$this->clientError(_('This action only accepts POST requests.'));
|
$this->clientError(_m('This action only accepts POST requests.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRF protection
|
// CSRF protection
|
||||||
|
|
||||||
$token = $this->trimmed('token');
|
$token = $this->trimmed('token');
|
||||||
|
|
||||||
if (!$token || $token != common_session_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.'));
|
' Try again, please.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -134,7 +130,7 @@ abstract class BaseMirrorAction extends Action
|
|||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_m('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -149,7 +145,6 @@ abstract class BaseMirrorAction extends Action
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
// Throws exception on error
|
// Throws exception on error
|
||||||
@ -158,7 +153,7 @@ abstract class BaseMirrorAction extends Action
|
|||||||
if ($this->boolean('ajax')) {
|
if ($this->boolean('ajax')) {
|
||||||
$this->startHTML('text/xml;charset=utf-8');
|
$this->startHTML('text/xml;charset=utf-8');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
$this->element('title', null, _('Subscribed'));
|
$this->element('title', null, _m('Subscribed'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$unsubscribe = new EditMirrorForm($this, $this->profile);
|
$unsubscribe = new EditMirrorForm($this, $this->profile);
|
||||||
|
@ -45,7 +45,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class EditMirrorAction extends BaseMirrorAction
|
class EditMirrorAction extends BaseMirrorAction
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -56,7 +55,6 @@ class EditMirrorAction extends BaseMirrorAction
|
|||||||
*
|
*
|
||||||
* @return boolean success flag
|
* @return boolean success flag
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare($args)
|
function prepare($args)
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
@ -93,7 +91,8 @@ class EditMirrorAction extends BaseMirrorAction
|
|||||||
{
|
{
|
||||||
$mirror = SubMirror::getMirror($this->user, $this->profile);
|
$mirror = SubMirror::getMirror($this->user, $this->profile);
|
||||||
if (!$mirror) {
|
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) {
|
if ($this->delete) {
|
||||||
|
@ -36,9 +36,9 @@ class MirrorSettingsAction extends AccountSettingsAction
|
|||||||
*
|
*
|
||||||
* @return string Page title
|
* @return string Page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title.
|
||||||
return _m('Feed mirror settings');
|
return _m('Feed mirror settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ class MirrorSettingsAction extends AccountSettingsAction
|
|||||||
|
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions.
|
||||||
return _m('You can mirror updates from many RSS and Atom feeds ' .
|
return _m('You can mirror updates from many RSS and Atom feeds ' .
|
||||||
'into your StatusNet timeline!');
|
'into your StatusNet timeline!');
|
||||||
}
|
}
|
||||||
@ -61,7 +62,6 @@ class MirrorSettingsAction extends AccountSettingsAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
@ -99,7 +99,6 @@ class MirrorSettingsAction extends AccountSettingsAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
|
|
||||||
class AddMirrorForm extends Form
|
class AddMirrorForm extends Form
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the form
|
* Name of the form
|
||||||
*
|
*
|
||||||
@ -36,7 +35,6 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -49,7 +47,6 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('fieldset');
|
$this->out->elementStart('fieldset');
|
||||||
@ -64,7 +61,7 @@ class AddMirrorForm extends Form
|
|||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->submit('addmirror-save', _m('Add feed'));
|
$this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
$this->out->elementEnd('fieldset');
|
$this->out->elementEnd('fieldset');
|
||||||
@ -94,7 +91,6 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -107,7 +103,6 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string ID of the form
|
* @return string ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'add-mirror-form';
|
return 'add-mirror-form';
|
||||||
@ -121,7 +116,6 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string URL to post to
|
* @return string URL to post to
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('addmirror');
|
return common_local_url('addmirror');
|
||||||
@ -132,10 +126,8 @@ class AddMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string the form's class
|
* @return string the form's class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_settings';
|
return 'form_settings';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,6 @@ class EditMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -58,7 +57,6 @@ class EditMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('fieldset');
|
$this->out->elementStart('fieldset');
|
||||||
@ -81,6 +79,7 @@ class EditMirrorForm extends Form
|
|||||||
$this->out->elementEnd('div');
|
$this->out->elementEnd('div');
|
||||||
$this->out->elementStart('div');
|
$this->out->elementStart('div');
|
||||||
if ($feed) {
|
if ($feed) {
|
||||||
|
// XXX: Why the hard coded space?
|
||||||
$this->out->text(_m('LABEL', 'Remote feed:') . ' ');
|
$this->out->text(_m('LABEL', 'Remote feed:') . ' ');
|
||||||
//$this->out->element('a', array('href' => $feed), $feed);
|
//$this->out->element('a', array('href' => $feed), $feed);
|
||||||
$this->out->element('input', array('value' => $feed, 'readonly' => 'readonly', 'style' => 'width: 100%'));
|
$this->out->element('input', array('value' => $feed, 'readonly' => 'readonly', 'style' => 'width: 100%'));
|
||||||
@ -155,7 +154,6 @@ class EditMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string ID of the form
|
* @return string ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'edit-mirror-form-' . $this->profile->id;
|
return 'edit-mirror-form-' . $this->profile->id;
|
||||||
@ -169,7 +167,6 @@ class EditMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string URL to post to
|
* @return string URL to post to
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('editmirror');
|
return common_local_url('editmirror');
|
||||||
@ -180,10 +177,8 @@ class EditMirrorForm extends Form
|
|||||||
*
|
*
|
||||||
* @return string the form's class
|
* @return string the form's class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_settings';
|
return 'form_settings';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
* @package SubMirror
|
* @package SubMirror
|
||||||
* @author Brion Vibber <brion@status.net>
|
* @author Brion Vibber <brion@status.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MirrorQueueHandler extends QueueHandler
|
class MirrorQueueHandler extends QueueHandler
|
||||||
{
|
{
|
||||||
function transport()
|
function transport()
|
||||||
|
Loading…
Reference in New Issue
Block a user