forked from GNUsocial/gnu-social
Update translator documentation.
i18n/L10n fixes. Superfluous whitespace removed.
This commit is contained in:
parent
1a91f85438
commit
5b660bd3c6
@ -63,21 +63,24 @@ class AutoSandboxPlugin extends Plugin
|
|||||||
'author' => 'Sean Carmody',
|
'author' => 'Sean Carmody',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:AutoSandbox',
|
'homepage' => 'http://status.net/wiki/Plugin:AutoSandbox',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Automatically sandboxes newly registered members.'));
|
_m('Automatically sandboxes newly registered members.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStartRegistrationFormData($action)
|
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.');
|
$instr = _m('Note you will initially be "sandboxed" so your posts will not appear in the public timeline.');
|
||||||
|
|
||||||
if (isset($this->contact)) {
|
if (isset($this->contact)) {
|
||||||
$contactuser = User::staticGet('nickname', $this->contact);
|
$contactuser = User::staticGet('nickname', $this->contact);
|
||||||
if (!empty($contactuser)) {
|
if (!empty($contactuser)) {
|
||||||
$contactlink = "@<a href=\"$contactuser->uri\">$contactuser->nickname</a>";
|
$contactlink = "@<a href=\"$contactuser->uri\">$contactuser->nickname</a>";
|
||||||
// TRANS: $contactlink is a clickable e-mailaddress.
|
// TRANS: User instructions after registration.
|
||||||
$instr = _m("Note you will initially be \"sandboxed\" so your posts will not appear in the public timeline. ".
|
// TRANS: %s is a clickable e-mailaddress.
|
||||||
'Send a message to $contactlink to speed up the unsandboxing process.');
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ class BitlyUrlPlugin extends UrlShortenerPlugin
|
|||||||
function onInitializePlugin(){
|
function onInitializePlugin(){
|
||||||
parent::onInitializePlugin();
|
parent::onInitializePlugin();
|
||||||
if(!isset($this->serviceUrl)){
|
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.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,6 +171,7 @@ class BitlyUrlPlugin extends UrlShortenerPlugin
|
|||||||
'author' => 'Craig Andrews, Brion Vibber',
|
'author' => 'Craig Andrews, Brion Vibber',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:BitlyUrl',
|
'homepage' => 'http://status.net/wiki/Plugin:BitlyUrl',
|
||||||
'rawdescription' =>
|
'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.'),
|
sprintf(_m('Uses <a href="http://%1$s/">%1$s</a> URL-shortener service.'),
|
||||||
$this->shortenerName));
|
$this->shortenerName));
|
||||||
|
|
||||||
@ -211,8 +213,10 @@ class BitlyUrlPlugin extends UrlShortenerPlugin
|
|||||||
$action_name = $nav->action->trimmed('action');
|
$action_name = $nav->action->trimmed('action');
|
||||||
|
|
||||||
$nav->out->menuItem(common_local_url('bitlyadminpanel'),
|
$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'),
|
||||||
_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',
|
$action_name == 'bitlyadminpanel',
|
||||||
'nav_bitly_admin_panel');
|
'nav_bitly_admin_panel');
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BitlyadminpanelAction extends AdminPanelAction
|
class BitlyadminpanelAction extends AdminPanelAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -48,9 +47,9 @@ class BitlyadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return string page title
|
* @return string page title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
|
// TRANS: Title of administration panel.
|
||||||
return _m('bit.ly URL shortening');
|
return _m('bit.ly URL shortening');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,9 +58,10 @@ class BitlyadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return string instructions
|
* @return string instructions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getInstructions()
|
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 ' .
|
return _m('URL shortening with bit.ly requires ' .
|
||||||
'[a bit.ly account and API key](http://bit.ly/a/your_api_key). ' .
|
'[a bit.ly account and API key](http://bit.ly/a/your_api_key). ' .
|
||||||
'This verifies that this is an authorized account, and ' .
|
'This verifies that this is an authorized account, and ' .
|
||||||
@ -73,7 +73,6 @@ class BitlyadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
$form = new BitlyAdminPanelForm($this);
|
$form = new BitlyAdminPanelForm($this);
|
||||||
@ -86,7 +85,6 @@ class BitlyadminpanelAction extends AdminPanelAction
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
static $settings = array(
|
static $settings = array(
|
||||||
@ -129,13 +127,15 @@ class BitlyadminpanelAction extends AdminPanelAction
|
|||||||
|
|
||||||
if (mb_strlen($values['bitly']['default_apikey']) > 255) {
|
if (mb_strlen($values['bitly']['default_apikey']) > 255) {
|
||||||
$this->clientError(
|
$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) {
|
if (mb_strlen($values['bitly']['default_apikey']) > 255) {
|
||||||
$this->clientError(
|
$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.')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,7 +148,6 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return int ID of the form
|
* @return int ID of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function id()
|
function id()
|
||||||
{
|
{
|
||||||
return 'bitlyadminpanel';
|
return 'bitlyadminpanel';
|
||||||
@ -159,7 +158,6 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return string class of the form
|
* @return string class of the form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formClass()
|
function formClass()
|
||||||
{
|
{
|
||||||
return 'form_settings';
|
return 'form_settings';
|
||||||
@ -170,7 +168,6 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return string URL of the action
|
* @return string URL of the action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
{
|
{
|
||||||
return common_local_url('bitlyadminpanel');
|
return common_local_url('bitlyadminpanel');
|
||||||
@ -181,14 +178,14 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->elementStart(
|
$this->out->elementStart(
|
||||||
'fieldset',
|
'fieldset',
|
||||||
array('id' => 'settings_bitly')
|
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?
|
// Do we have global defaults to fall back on?
|
||||||
$login = $apiKey = false;
|
$login = $apiKey = false;
|
||||||
@ -196,9 +193,11 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
$haveGlobalDefaults = ($login && $apiKey);
|
$haveGlobalDefaults = ($login && $apiKey);
|
||||||
if ($login && $apiKey) {
|
if ($login && $apiKey) {
|
||||||
$this->out->element('p', 'form_guide',
|
$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.'));
|
_m('Leave these empty to use global default credentials.'));
|
||||||
} else {
|
} else {
|
||||||
$this->out->element('p', 'form_guide',
|
$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.'));
|
_m('If you leave these empty, bit.ly will be unavailable to users.'));
|
||||||
}
|
}
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
@ -206,6 +205,7 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
$this->li();
|
$this->li();
|
||||||
$this->input(
|
$this->input(
|
||||||
'default_login',
|
'default_login',
|
||||||
|
// TRANS: Field label in administration panel for bit.ly URL shortening.
|
||||||
_m('Login name'),
|
_m('Login name'),
|
||||||
null,
|
null,
|
||||||
'bitly'
|
'bitly'
|
||||||
@ -215,6 +215,7 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
$this->li();
|
$this->li();
|
||||||
$this->input(
|
$this->input(
|
||||||
'default_apikey',
|
'default_apikey',
|
||||||
|
// TRANS: Field label in administration panel for bit.ly URL shortening.
|
||||||
_m('API key'),
|
_m('API key'),
|
||||||
null,
|
null,
|
||||||
'bitly'
|
'bitly'
|
||||||
@ -230,13 +231,14 @@ class BitlyAdminPanelForm extends AdminForm
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit',
|
$this->out->submit('submit',
|
||||||
|
// TRANS: Button text to save setting in administration panel for bit.ly URL shortening.
|
||||||
_m('BUTTON','Save'),
|
_m('BUTTON','Save'),
|
||||||
'submit',
|
'submit',
|
||||||
null,
|
null,
|
||||||
|
// TRANS: Button title to save setting in administration panel for bit.ly URL shortening.
|
||||||
_m('Save bit.ly settings'));
|
_m('Save bit.ly settings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
} else if (is_string($config)) {
|
} else if (is_string($config)) {
|
||||||
return explode("\r\n", $config);
|
return explode("\r\n", $config);
|
||||||
} else {
|
} 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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,6 +340,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
'homepage' =>
|
'homepage' =>
|
||||||
'http://status.net/wiki/Plugin:Blacklist',
|
'http://status.net/wiki/Plugin:Blacklist',
|
||||||
'description' =>
|
'description' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Keeps a blacklist of forbidden nickname '.
|
_m('Keeps a blacklist of forbidden nickname '.
|
||||||
'and URL patterns.'));
|
'and URL patterns.'));
|
||||||
return true;
|
return true;
|
||||||
@ -380,7 +381,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
// TRANS: Menu item in admin panel.
|
// TRANS: Menu item in admin panel.
|
||||||
_m('MENU','Blacklist'),
|
_m('MENU','Blacklist'),
|
||||||
// TRANS: Tooltip for menu item in admin panel.
|
// TRANS: Tooltip for menu item in admin panel.
|
||||||
_m('TOOLTIP','Blacklist configuration'),
|
_m('TOOLTIP','Blacklist configuration.'),
|
||||||
$action_name == 'blacklistadminpanel',
|
$action_name == 'blacklistadminpanel',
|
||||||
'nav_blacklist_admin_panel');
|
'nav_blacklist_admin_panel');
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
$action->elementStart('li');
|
$action->elementStart('li');
|
||||||
$this->checkboxAndText($action,
|
$this->checkboxAndText($action,
|
||||||
'blacklistnickname',
|
'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'),
|
_m('Add this nickname pattern to blacklist'),
|
||||||
'blacklistnicknamepattern',
|
'blacklistnicknamepattern',
|
||||||
$this->patternizeNickname($user->nickname));
|
$this->patternizeNickname($user->nickname));
|
||||||
@ -416,7 +417,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
$action->elementStart('li');
|
$action->elementStart('li');
|
||||||
$this->checkboxAndText($action,
|
$this->checkboxAndText($action,
|
||||||
'blacklisthomepage',
|
'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'),
|
_m('Add this homepage pattern to blacklist'),
|
||||||
'blacklisthomepagepattern',
|
'blacklisthomepagepattern',
|
||||||
$this->patternizeHomepage($profile->homepage));
|
$this->patternizeHomepage($profile->homepage));
|
||||||
@ -496,7 +497,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
if (!empty($homepage)) {
|
if (!empty($homepage)) {
|
||||||
if (!$this->_checkUrl($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.
|
// 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);
|
$homepage);
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
}
|
}
|
||||||
@ -507,7 +508,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
if (!empty($nickname)) {
|
if (!empty($nickname)) {
|
||||||
if (!$this->_checkNickname($nickname)) {
|
if (!$this->_checkNickname($nickname)) {
|
||||||
// TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked 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);
|
$nickname);
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
}
|
}
|
||||||
@ -531,7 +532,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
|
|
||||||
if (!$this->_checkUrl($url)) {
|
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.
|
// 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);
|
$url);
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
}
|
}
|
||||||
@ -542,7 +543,7 @@ class BlacklistPlugin extends Plugin
|
|||||||
if (!empty($nickname)) {
|
if (!empty($nickname)) {
|
||||||
if (!$this->_checkNickname($nickname)) {
|
if (!$this->_checkNickname($nickname)) {
|
||||||
// TRANS: Client exception thrown trying to subscribe to a person with a blocked nickname. %s is the blocked 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);
|
$nickname);
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ class BlacklistadminpanelAction extends AdminPanelAction
|
|||||||
*/
|
*/
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _m('Blacklist');
|
// TRANS: Title of blacklist plugin administration panel.
|
||||||
|
return _m('TITLE','Blacklist');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,6 +60,7 @@ class BlacklistadminpanelAction extends AdminPanelAction
|
|||||||
*/
|
*/
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
|
// TRANS: Instructions for blacklist plugin administration panel.
|
||||||
return _m('Blacklisted URLs and nicknames');
|
return _m('Blacklisted URLs and nicknames');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,17 +173,21 @@ class BlacklistAdminPanelForm extends Form
|
|||||||
|
|
||||||
$nickPatterns = Nickname_blacklist::getPatterns();
|
$nickPatterns = Nickname_blacklist::getPatterns();
|
||||||
|
|
||||||
|
// TRANS: Field label in blacklist plugin administration panel.
|
||||||
$this->out->textarea('blacklist-nicknames', _m('Nicknames'),
|
$this->out->textarea('blacklist-nicknames', _m('Nicknames'),
|
||||||
implode("\r\n", $nickPatterns),
|
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');
|
$this->out->elementEnd('li');
|
||||||
|
|
||||||
$urlPatterns = Homepage_blacklist::getPatterns();
|
$urlPatterns = Homepage_blacklist::getPatterns();
|
||||||
|
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
|
// TRANS: Field label in blacklist plugin administration panel.
|
||||||
$this->out->textarea('blacklist-urls', _m('URLs'),
|
$this->out->textarea('blacklist-urls', _m('URLs'),
|
||||||
implode("\r\n", $urlPatterns),
|
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('li');
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
@ -195,9 +201,11 @@ class BlacklistAdminPanelForm extends Form
|
|||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit',
|
$this->out->submit('submit',
|
||||||
_m('Save'),
|
// TRANS: Button text in blacklist plugin administration panel to save settings.
|
||||||
|
_m('BUTTON','Save'),
|
||||||
'submit',
|
'submit',
|
||||||
null,
|
null,
|
||||||
_m('Save site settings'));
|
// TRANS: Button title in blacklist plugin administration panel to save settings.
|
||||||
|
_m('Save site settings.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user