i18n/L10n updates.
Whitespace update.
'author' => 'Brion Vibber',
'homepage' => 'http://status.net/wiki/Plugin:SubMirror',
'rawdescription' =>
+ // TRANS: Plugin description.
_m('Pull feeds into your timeline!'));
return true;
*
* @return boolean hook return
*/
-
function onEndSubGroupNav($widget)
{
$action = $widget->out;
$mirror->subscriber = $profile->id;
$entry = array(
'id' => 'mirrors',
+ // TRANS: Label in profile statistics section, followed by a count.
'label' => _m('Mirrored feeds'),
'link' => common_local_url('mirrorsettings'),
'value' => $mirror->count(),
$base = 'http://api.twitter.com/1/statuses/user_timeline.atom?screen_name=';
return $base . urlencode($screenie);
default:
- throw new Exception('Internal form error: unrecognized feed provider.');
+ // TRANS: Exception thrown when a feed provider could not be recognised.
+ throw new Exception(_m('Internal form error: Unrecognized feed provider.'));
}
}
if ($this->oprofile->subscribe()) {
SubMirror::saveMirror($this->user, $this->profile);
} else {
- $this->serverError(_m("Could not subscribe to feed."));
+ // TRANS: Exception thrown when a subscribing to a feed fails.
+ $this->serverError(_m('Could not subscribe to feed.'));
}
}
}
$oprofile = Ostatus_profile::ensureFeedURL($url);
}
if ($oprofile->isGroup()) {
- $this->clientError(_m("Cannot mirror a StatusNet group at this time."));
+ // TRANS: Client error displayed when trying to mirror a StatusNet group feed.
+ $this->clientError(_m('Cannot mirror a StatusNet group at this time.'));
}
- $this->oprofile = $oprofile; // @fixme ugly side effect :D
+ $this->oprofile = $oprofile; // @todo FIXME: ugly side effect :D
return $oprofile->localProfile();
}
{
// Only allow POST requests
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ // TRANS: Client error displayed when trying to use another method than POST.
$this->clientError(_m('This action only accepts POST requests.'));
return false;
}
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
+ // TRANS: Client error displayed when the session token does not match or is not given.
$this->clientError(_m('There was a problem with your session token.'.
' Try again, please.'));
return false;
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
+ // TRANS: Page title for subscribed feed mirror.
$this->element('title', null, _m('Subscribed'));
$this->elementEnd('head');
$this->elementStart('body');
*/
class EditMirrorAction extends BaseMirrorAction
{
-
/**
* Check pre-requisites and instantiate attributes
*
'subscribed' => $this->profile->id));
if (!$this->mirror) {
- $this->clientError(_m("Requested invalid profile to edit."));
+ // TRANS: Client error displayed when trying to edit an object that is not a feed mirror.
+ $this->clientError(_m('Requested invalid profile to edit.'));
}
$this->style = $this->validateStyle($this->trimmed('style'));
if (in_array($style, $allowed)) {
return $style;
} else {
- $this->clientError(_m("Bad form data."));
+ // TRANS: Client error displayed when providing invalid input when editing a mirror.
+ $this->clientError(_m('Bad form data.'));
}
}
$mirror = SubMirror::getMirror($this->user, $this->profile);
if (!$mirror) {
// TRANS: Client error thrown when a mirror request is made and no result is retrieved.
- $this->clientError(_m('Requested edit of missing mirror.'));
+ $this->clientError(_m('The mirror request failed, because no result was retrieved.'));
}
if ($this->delete) {
*/
function title()
{
- // TRANS: Title.
+ // TRANS: Page title.
return _m('Feed mirror settings');
}
function getInstructions()
{
- // TRANS: Instructions.
+ // TRANS: Page instructions.
return _m('You can mirror updates from many RSS and Atom feeds ' .
'into your StatusNet timeline!');
}
header('Content-Type: text/html;charset=utf-8');
$this->elementStart('html');
$this->elementStart('head');
+ // TRANS: Title for page with form to add a mirror feed provider on.
$this->element('title', null, _m('Provider add'));
$this->elementEnd('head');
$this->elementStart('body');
function keyTypes()
{
- // @fixme keys
+ // @todo FIXME keys
// need a sane key for reverse lookup too
return array('subscriber' => 'K', 'subscribed' => 'K');
}
$this->li();
$this->doInput('addmirror-feedurl',
'feedurl',
+ // TRANS: Field label.
_m('Web page or feed URL:'),
$this->out->trimmed('feedurl'));
$this->unli();
$this->li();
+ // TRANS: Button text for adding a feed.
$this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
$this->unli();
$this->out->elementEnd('ul');
// hopes, is getting timely updates.
array(
'id' => 'twitter',
+ // TRANS: Name for possible feed provider.
'name' => _m('Twitter'),
),
/*
*/
array(
'id' => 'feed',
+ // TRANS: Name for possible feed provider.
'name' => _m('RSS or Atom feed'),
),
);
$out = $this->out;
$out->elementStart('div', 'provider-list');
+ // TRANS: Heading for feed mirroring selection form.
$out->element('h2', null, _m('Select a feed provider'));
$out->elementStart('table');
foreach ($providers as $provider) {
$this->li();
$this->doInput('addmirror-feedurl',
'screen_name',
+ // TRANS: Field label.
_m('Twitter username:'),
$this->out->trimmed('screen_name'));
$this->unli();
$this->li();
+ // TRANS: Button text for adding a Twitter feed mirror.
$this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
$this->unli();
$this->out->elementEnd('ul');
$this->out->elementStart('div');
if ($feed) {
// XXX: Why the hard coded space?
+ // TRANS: Field label (URL expectected).
$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%'));
} else {
+ // TRANS: Field label.
$this->out->text(_m('LABEL', 'Local user'));
}
$this->out->elementEnd('div');
$this->out->elementEnd('p');
$this->out->elementStart('fieldset', array('style' => 'margin-top: 20px'));
- $this->out->element('legend', false, _m("Mirroring style"));
+ // TRANS: Fieldset legend for feed mirror setting.
+ $this->out->element('legend', false, _m('Mirroring style'));
- $styles = array('repeat' => _m("Repeat: reference the original user's post (sometimes shows as 'RT @blah')"),
- 'copy' => _m("Repost the content under my account"));
+ // TRANS: Feed mirror style (radio button option).
+ $styles = array('repeat' => _m('Repeat: reference the original user\'s post (sometimes shows as "RT @blah")'),
+ // TRANS: Feed mirror style (radio button option).
+ 'copy' => _m('Repost the content under my account'));
foreach ($styles as $key => $label) {
$this->out->elementStart('div');
$attribs = array('type' => 'radio',
$attribs['checked'] = 'checked';
}
$this->out->element('input', $attribs);
- $this->out->element('span', false, $label); // @fixme should be label, but the styles muck it up for now
+ $this->out->element('span', false, $label); // @todo FIXME: should be label, but the styles muck it up for now
$this->out->elementEnd('div');
}
$this->out->elementStart('div');
- $this->out->submit($this->id() . '-save', _m('Save'));
+ // TRANS: Button text to save feed mirror settings.
+ $this->out->submit($this->id() . '-save', _m('BUTTON','Save'));
$this->out->element('input', array('type' => 'submit',
- 'value' => _m('Stop mirroring'),
+ // TRANS: Button text to stop mirroring a feed.
+ 'value' => _m('BUTTON','Stop mirroring'),
'name' => 'delete',
'class' => 'submit'));
$this->out->elementEnd('div');