i18n/L10n fixes.
Superfluous whitespace removed.
'author' => 'Sean Carmody',
'homepage' => 'http://status.net/wiki/Plugin:AutoSandbox',
'rawdescription' =>
+ // TRANS: Plugin description.
_m('Automatically sandboxes newly registered members.'));
return true;
}
function onStartRegistrationFormData($action)
{
+ // TRANS: User instructions after registration.
$instr = _m('Note you will initially be "sandboxed" so your posts will not appear in the public timeline.');
if (isset($this->contact)) {
$contactuser = User::staticGet('nickname', $this->contact);
if (!empty($contactuser)) {
$contactlink = "@<a href=\"$contactuser->uri\">$contactuser->nickname</a>";
- // TRANS: $contactlink is a clickable e-mailaddress.
- $instr = _m("Note you will initially be \"sandboxed\" so your posts will not appear in the public timeline. ".
- 'Send a message to $contactlink to speed up the unsandboxing process.');
+ // TRANS: User instructions after registration.
+ // TRANS: %s is a clickable e-mailaddress.
+ $instr = sprintf(_m('Note you will initially be "sandboxed" so your posts will not appear in the public timeline. '.
+ 'Send a message to %s to speed up the unsandboxing process.'),$contactlink);
}
}
function onInitializePlugin(){
parent::onInitializePlugin();
if(!isset($this->serviceUrl)){
- throw new Exception(_m("You must specify a serviceUrl for bit.ly shortening."));
+ // TRANS: Exception thrown when bit.ly URL shortening plugin was configured incorrectly.
+ throw new Exception(_m('You must specify a serviceUrl for bit.ly URL shortening.'));
}
}
'author' => 'Craig Andrews, Brion Vibber',
'homepage' => 'http://status.net/wiki/Plugin:BitlyUrl',
'rawdescription' =>
+ // TRANS: Plugin description. %1$s is the URL shortening service base URL (for example "bit.ly").
sprintf(_m('Uses <a href="http://%1$s/">%1$s</a> URL-shortener service.'),
$this->shortenerName));
$action_name = $nav->action->trimmed('action');
$nav->out->menuItem(common_local_url('bitlyadminpanel'),
+ // TRANS: Menu item in administration menus for bit.ly URL shortening settings.
_m('bit.ly'),
- _m('bit.ly URL shortening'),
+ // TRANS: Title for menu item in administration menus for bit.ly URL shortening settings.
+ _m('bit.ly URL shortening.'),
$action_name == 'bitlyadminpanel',
'nav_bitly_admin_panel');
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class BitlyadminpanelAction extends AdminPanelAction
{
/**
*
* @return string page title
*/
-
function title()
{
+ // TRANS: Title of administration panel.
return _m('bit.ly URL shortening');
}
*
* @return string instructions
*/
-
function getInstructions()
{
+ // TRANS: Instructions for administration panel.
+ // TRANS: This message contains Markdown links in the form [decsription](link).
return _m('URL shortening with bit.ly requires ' .
'[a bit.ly account and API key](http://bit.ly/a/your_api_key). ' .
'This verifies that this is an authorized account, and ' .
*
* @return void
*/
-
function showForm()
{
$form = new BitlyAdminPanelForm($this);
*
* @return void
*/
-
function saveSettings()
{
static $settings = array(
if (mb_strlen($values['bitly']['default_apikey']) > 255) {
$this->clientError(
- _m("Invalid login. Max length is 255 characters.")
+ // TRANS: Client error displayed when using too long a key.
+ _m('Invalid login. Maximum length is 255 characters.')
);
}
if (mb_strlen($values['bitly']['default_apikey']) > 255) {
$this->clientError(
- _m("Invalid API key. Max length is 255 characters.")
+ // TRANS: Client error displayed when using too long a key.
+ _m('Invalid API key. Maximum length is 255 characters.')
);
}
}
*
* @return int ID of the form
*/
-
function id()
{
return 'bitlyadminpanel';
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_settings';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('bitlyadminpanel');
*
* @return void
*/
-
function formData()
{
$this->out->elementStart(
'fieldset',
array('id' => 'settings_bitly')
);
- $this->out->element('legend', null, _m('Credentials'));
+ // TRANS: Fieldset legend in administration panel for bit.ly username and API key.
+ $this->out->element('legend', null, _m('LEGEND','Credentials'));
// Do we have global defaults to fall back on?
$login = $apiKey = false;
$haveGlobalDefaults = ($login && $apiKey);
if ($login && $apiKey) {
$this->out->element('p', 'form_guide',
+ // TRANS: Form guide in administration panel for bit.ly URL shortening.
_m('Leave these empty to use global default credentials.'));
} else {
$this->out->element('p', 'form_guide',
+ // TRANS: Form guide in administration panel for bit.ly URL shortening.
_m('If you leave these empty, bit.ly will be unavailable to users.'));
}
$this->out->elementStart('ul', 'form_data');
$this->li();
$this->input(
'default_login',
+ // TRANS: Field label in administration panel for bit.ly URL shortening.
_m('Login name'),
null,
'bitly'
$this->li();
$this->input(
'default_apikey',
+ // TRANS: Field label in administration panel for bit.ly URL shortening.
_m('API key'),
null,
'bitly'
*
* @return void
*/
-
function formActions()
{
$this->out->submit('submit',
+ // TRANS: Button text to save setting in administration panel for bit.ly URL shortening.
_m('BUTTON','Save'),
'submit',
null,
+ // TRANS: Button title to save setting in administration panel for bit.ly URL shortening.
_m('Save bit.ly settings'));
}
}
} else if (is_string($config)) {
return explode("\r\n", $config);
} else {
- throw new Exception("Unknown data type for config $section + $setting");
+ throw new Exception(sprintf(_m('Unknown data type for config %1$s + %2$s.'),$section, $setting));
}
}
'homepage' =>
'http://status.net/wiki/Plugin:Blacklist',
'description' =>
+ // TRANS: Plugin description.
_m('Keeps a blacklist of forbidden nickname '.
'and URL patterns.'));
return true;
// TRANS: Menu item in admin panel.
_m('MENU','Blacklist'),
// TRANS: Tooltip for menu item in admin panel.
- _m('TOOLTIP','Blacklist configuration'),
+ _m('TOOLTIP','Blacklist configuration.'),
$action_name == 'blacklistadminpanel',
'nav_blacklist_admin_panel');
}
$action->elementStart('li');
$this->checkboxAndText($action,
'blacklistnickname',
- // TRANS: Checkbox with text label in the delete user form.
+ // TRANS: Checkbox label in the blacklist user form.
_m('Add this nickname pattern to blacklist'),
'blacklistnicknamepattern',
$this->patternizeNickname($user->nickname));
$action->elementStart('li');
$this->checkboxAndText($action,
'blacklisthomepage',
- // TRANS: Checkbox with text label in the delete user form.
+ // TRANS: Checkbox label in the blacklist user form.
_m('Add this homepage pattern to blacklist'),
'blacklisthomepagepattern',
$this->patternizeHomepage($profile->homepage));
if (!empty($homepage)) {
if (!$this->_checkUrl($homepage)) {
// TRANS: Exception thrown trying to post a notice while having set a blocked homepage URL. %s is the blocked URL.
- $msg = sprintf(_m("Users from \"%s\" blocked."),
+ $msg = sprintf(_m("Users from \"%s\" are blocked."),
$homepage);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
// TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
- $msg = sprintf(_m("Posts from nickname \"%s\" disallowed."),
+ $msg = sprintf(_m("Notices from nickname \"%s\" disallowed."),
$nickname);
throw new ClientException($msg);
}
if (!$this->_checkUrl($url)) {
// TRANS: Client exception thrown trying to subscribe to a person with a blocked homepage or site URL. %s is the blocked URL.
- $msg = sprintf(_m("Users from \"%s\" blocked."),
+ $msg = sprintf(_m("Users from \"%s\" are blocked."),
$url);
throw new ClientException($msg);
}
if (!empty($nickname)) {
if (!$this->_checkNickname($nickname)) {
// TRANS: Client exception thrown trying to subscribe to a person with a blocked nickname. %s is the blocked nickname.
- $msg = sprintf(_m("Can't subscribe to nickname \"%s\"."),
+ $msg = sprintf(_m("Cannot subscribe to nickname \"%s\"."),
$nickname);
throw new ClientException($msg);
}
*/
function title()
{
- return _m('Blacklist');
+ // TRANS: Title of blacklist plugin administration panel.
+ return _m('TITLE','Blacklist');
}
/**
*/
function getInstructions()
{
+ // TRANS: Instructions for blacklist plugin administration panel.
return _m('Blacklisted URLs and nicknames');
}
$nickPatterns = Nickname_blacklist::getPatterns();
+ // TRANS: Field label in blacklist plugin administration panel.
$this->out->textarea('blacklist-nicknames', _m('Nicknames'),
implode("\r\n", $nickPatterns),
- _m('Patterns of nicknames to block, one per line'));
+ // TRANS: Field title in blacklist plugin administration panel.
+ _m('Patterns of nicknames to block, one per line.'));
$this->out->elementEnd('li');
$urlPatterns = Homepage_blacklist::getPatterns();
$this->out->elementStart('li');
+ // TRANS: Field label in blacklist plugin administration panel.
$this->out->textarea('blacklist-urls', _m('URLs'),
implode("\r\n", $urlPatterns),
- _m('Patterns of URLs to block, one per line'));
+ // TRANS: Field title in blacklist plugin administration panel.
+ _m('Patterns of URLs to block, one per line.'));
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
function formActions()
{
$this->out->submit('submit',
- _m('Save'),
+ // TRANS: Button text in blacklist plugin administration panel to save settings.
+ _m('BUTTON','Save'),
'submit',
null,
- _m('Save site settings'));
+ // TRANS: Button title in blacklist plugin administration panel to save settings.
+ _m('Save site settings.'));
}
}