Update translator documentation.

i18n/L10n updates.
Whitespace update.
This commit is contained in:
Siebrand Mazeland 2011-06-06 00:38:38 +02:00
parent f007bcee16
commit 31a92ede44
10 changed files with 41 additions and 18 deletions

View File

@ -90,6 +90,7 @@ class SubMirrorPlugin extends Plugin
'author' => 'Brion Vibber',
'homepage' => 'http://status.net/wiki/Plugin:SubMirror',
'rawdescription' =>
// TRANS: Plugin description.
_m('Pull feeds into your timeline!'));
return true;
@ -102,7 +103,6 @@ class SubMirrorPlugin extends Plugin
*
* @return boolean hook return
*/
function onEndSubGroupNav($widget)
{
$action = $widget->out;
@ -183,6 +183,7 @@ class SubMirrorPlugin extends Plugin
$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(),

View File

@ -76,7 +76,8 @@ class AddMirrorAction extends BaseMirrorAction
$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.'));
}
}
@ -85,7 +86,8 @@ class AddMirrorAction extends BaseMirrorAction
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.'));
}
}
}

View File

@ -101,9 +101,10 @@ abstract class BaseMirrorAction extends Action
$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();
}
@ -115,6 +116,7 @@ abstract class BaseMirrorAction extends Action
{
// 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;
}
@ -123,6 +125,7 @@ abstract class BaseMirrorAction extends Action
$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;
@ -157,6 +160,7 @@ abstract class BaseMirrorAction extends Action
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');

View File

@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
*/
class EditMirrorAction extends BaseMirrorAction
{
/**
* Check pre-requisites and instantiate attributes
*
@ -65,7 +64,8 @@ class EditMirrorAction extends BaseMirrorAction
'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'));
@ -83,7 +83,8 @@ class EditMirrorAction extends BaseMirrorAction
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.'));
}
}
@ -92,7 +93,7 @@ class EditMirrorAction extends BaseMirrorAction
$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) {

View File

@ -38,7 +38,7 @@ class MirrorSettingsAction extends SettingsAction
*/
function title()
{
// TRANS: Title.
// TRANS: Page title.
return _m('Feed mirror settings');
}
@ -50,7 +50,7 @@ class MirrorSettingsAction extends SettingsAction
function getInstructions()
{
// TRANS: Instructions.
// TRANS: Page instructions.
return _m('You can mirror updates from many RSS and Atom feeds ' .
'into your StatusNet timeline!');
}
@ -129,6 +129,7 @@ class MirrorSettingsAction extends SettingsAction
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');

View File

@ -117,7 +117,7 @@ class SubMirror extends Memcached_DataObject
function keyTypes()
{
// @fixme keys
// @todo FIXME keys
// need a sane key for reverse lookup too
return array('subscriber' => 'K', 'subscribed' => 'K');
}

View File

@ -57,11 +57,13 @@ class AddMirrorForm extends Form
$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');

View File

@ -73,6 +73,7 @@ class AddMirrorWizard extends Widget
// hopes, is getting timely updates.
array(
'id' => 'twitter',
// TRANS: Name for possible feed provider.
'name' => _m('Twitter'),
),
/*
@ -106,6 +107,7 @@ class AddMirrorWizard extends Widget
*/
array(
'id' => 'feed',
// TRANS: Name for possible feed provider.
'name' => _m('RSS or Atom feed'),
),
);
@ -116,6 +118,7 @@ class AddMirrorWizard extends Widget
$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) {

View File

@ -47,11 +47,13 @@ class AddTwitterMirrorForm extends AddMirrorForm
$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');

View File

@ -80,20 +80,25 @@ class EditMirrorForm extends Form
$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',
@ -104,7 +109,7 @@ class EditMirrorForm extends Form
$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');
}
@ -112,9 +117,11 @@ class EditMirrorForm extends Form
$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');