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', 'author' => 'Brion Vibber',
'homepage' => 'http://status.net/wiki/Plugin:SubMirror', 'homepage' => 'http://status.net/wiki/Plugin:SubMirror',
'rawdescription' => 'rawdescription' =>
// TRANS: Plugin description.
_m('Pull feeds into your timeline!')); _m('Pull feeds into your timeline!'));
return true; return true;
@ -102,7 +103,6 @@ class SubMirrorPlugin extends Plugin
* *
* @return boolean hook return * @return boolean hook return
*/ */
function onEndSubGroupNav($widget) function onEndSubGroupNav($widget)
{ {
$action = $widget->out; $action = $widget->out;
@ -183,6 +183,7 @@ class SubMirrorPlugin extends Plugin
$mirror->subscriber = $profile->id; $mirror->subscriber = $profile->id;
$entry = array( $entry = array(
'id' => 'mirrors', 'id' => 'mirrors',
// TRANS: Label in profile statistics section, followed by a count.
'label' => _m('Mirrored feeds'), 'label' => _m('Mirrored feeds'),
'link' => common_local_url('mirrorsettings'), 'link' => common_local_url('mirrorsettings'),
'value' => $mirror->count(), '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='; $base = 'http://api.twitter.com/1/statuses/user_timeline.atom?screen_name=';
return $base . urlencode($screenie); return $base . urlencode($screenie);
default: 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()) { if ($this->oprofile->subscribe()) {
SubMirror::saveMirror($this->user, $this->profile); SubMirror::saveMirror($this->user, $this->profile);
} else { } 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); $oprofile = Ostatus_profile::ensureFeedURL($url);
} }
if ($oprofile->isGroup()) { 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(); return $oprofile->localProfile();
} }
@ -115,6 +116,7 @@ abstract class BaseMirrorAction extends Action
{ {
// Only allow POST requests // Only allow POST requests
if ($_SERVER['REQUEST_METHOD'] != 'POST') { 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.')); $this->clientError(_m('This action only accepts POST requests.'));
return false; return false;
} }
@ -123,6 +125,7 @@ abstract class BaseMirrorAction extends Action
$token = $this->trimmed('token'); $token = $this->trimmed('token');
if (!$token || $token != common_session_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.'. $this->clientError(_m('There was a problem with your session token.'.
' Try again, please.')); ' Try again, please.'));
return false; return false;
@ -157,6 +160,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');
// TRANS: Page title for subscribed feed mirror.
$this->element('title', null, _m('Subscribed')); $this->element('title', null, _m('Subscribed'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');

View File

@ -47,7 +47,6 @@ if (!defined('STATUSNET')) {
*/ */
class EditMirrorAction extends BaseMirrorAction class EditMirrorAction extends BaseMirrorAction
{ {
/** /**
* Check pre-requisites and instantiate attributes * Check pre-requisites and instantiate attributes
* *
@ -65,7 +64,8 @@ class EditMirrorAction extends BaseMirrorAction
'subscribed' => $this->profile->id)); 'subscribed' => $this->profile->id));
if (!$this->mirror) { 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')); $this->style = $this->validateStyle($this->trimmed('style'));
@ -83,7 +83,8 @@ class EditMirrorAction extends BaseMirrorAction
if (in_array($style, $allowed)) { if (in_array($style, $allowed)) {
return $style; return $style;
} else { } 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); $mirror = SubMirror::getMirror($this->user, $this->profile);
if (!$mirror) { if (!$mirror) {
// TRANS: Client error thrown when a mirror request is made and no result is retrieved. // 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) { if ($this->delete) {

View File

@ -38,7 +38,7 @@ class MirrorSettingsAction extends SettingsAction
*/ */
function title() function title()
{ {
// TRANS: Title. // TRANS: Page title.
return _m('Feed mirror settings'); return _m('Feed mirror settings');
} }
@ -50,7 +50,7 @@ class MirrorSettingsAction extends SettingsAction
function getInstructions() function getInstructions()
{ {
// TRANS: Instructions. // TRANS: Page 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!');
} }
@ -129,6 +129,7 @@ class MirrorSettingsAction extends SettingsAction
header('Content-Type: text/html;charset=utf-8'); header('Content-Type: text/html;charset=utf-8');
$this->elementStart('html'); $this->elementStart('html');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Title for page with form to add a mirror feed provider on.
$this->element('title', null, _m('Provider add')); $this->element('title', null, _m('Provider add'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');

View File

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

View File

@ -57,11 +57,13 @@ class AddMirrorForm extends Form
$this->li(); $this->li();
$this->doInput('addmirror-feedurl', $this->doInput('addmirror-feedurl',
'feedurl', 'feedurl',
// TRANS: Field label.
_m('Web page or feed URL:'), _m('Web page or feed URL:'),
$this->out->trimmed('feedurl')); $this->out->trimmed('feedurl'));
$this->unli(); $this->unli();
$this->li(); $this->li();
// TRANS: Button text for adding a feed.
$this->out->submit('addmirror-save', _m('BUTTON','Add feed')); $this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
$this->unli(); $this->unli();
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');

View File

@ -73,6 +73,7 @@ class AddMirrorWizard extends Widget
// hopes, is getting timely updates. // hopes, is getting timely updates.
array( array(
'id' => 'twitter', 'id' => 'twitter',
// TRANS: Name for possible feed provider.
'name' => _m('Twitter'), 'name' => _m('Twitter'),
), ),
/* /*
@ -106,6 +107,7 @@ class AddMirrorWizard extends Widget
*/ */
array( array(
'id' => 'feed', 'id' => 'feed',
// TRANS: Name for possible feed provider.
'name' => _m('RSS or Atom feed'), 'name' => _m('RSS or Atom feed'),
), ),
); );
@ -116,6 +118,7 @@ class AddMirrorWizard extends Widget
$out = $this->out; $out = $this->out;
$out->elementStart('div', 'provider-list'); $out->elementStart('div', 'provider-list');
// TRANS: Heading for feed mirroring selection form.
$out->element('h2', null, _m('Select a feed provider')); $out->element('h2', null, _m('Select a feed provider'));
$out->elementStart('table'); $out->elementStart('table');
foreach ($providers as $provider) { foreach ($providers as $provider) {

View File

@ -47,11 +47,13 @@ class AddTwitterMirrorForm extends AddMirrorForm
$this->li(); $this->li();
$this->doInput('addmirror-feedurl', $this->doInput('addmirror-feedurl',
'screen_name', 'screen_name',
// TRANS: Field label.
_m('Twitter username:'), _m('Twitter username:'),
$this->out->trimmed('screen_name')); $this->out->trimmed('screen_name'));
$this->unli(); $this->unli();
$this->li(); $this->li();
// TRANS: Button text for adding a Twitter feed mirror.
$this->out->submit('addmirror-save', _m('BUTTON','Add feed')); $this->out->submit('addmirror-save', _m('BUTTON','Add feed'));
$this->unli(); $this->unli();
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');

View File

@ -80,20 +80,25 @@ class EditMirrorForm extends Form
$this->out->elementStart('div'); $this->out->elementStart('div');
if ($feed) { if ($feed) {
// XXX: Why the hard coded space? // XXX: Why the hard coded space?
// TRANS: Field label (URL expectected).
$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%'));
} else { } else {
// TRANS: Field label.
$this->out->text(_m('LABEL', 'Local user')); $this->out->text(_m('LABEL', 'Local user'));
} }
$this->out->elementEnd('div'); $this->out->elementEnd('div');
$this->out->elementEnd('p'); $this->out->elementEnd('p');
$this->out->elementStart('fieldset', array('style' => 'margin-top: 20px')); $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')"), // TRANS: Feed mirror style (radio button option).
'copy' => _m("Repost the content under my account")); $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) { foreach ($styles as $key => $label) {
$this->out->elementStart('div'); $this->out->elementStart('div');
$attribs = array('type' => 'radio', $attribs = array('type' => 'radio',
@ -104,7 +109,7 @@ class EditMirrorForm extends Form
$attribs['checked'] = 'checked'; $attribs['checked'] = 'checked';
} }
$this->out->element('input', $attribs); $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->elementEnd('div');
} }
@ -112,9 +117,11 @@ class EditMirrorForm extends Form
$this->out->elementStart('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', $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', 'name' => 'delete',
'class' => 'submit')); 'class' => 'submit'));
$this->out->elementEnd('div'); $this->out->elementEnd('div');