Update translator documentation.
L10n/i18n updates. Whitespace updates. Break long lines in README files.
This commit is contained in:
parent
413d9e2fd0
commit
e6d053ac41
@ -53,7 +53,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class InProcessCachePlugin extends Plugin
|
class InProcessCachePlugin extends Plugin
|
||||||
{
|
{
|
||||||
private $_items = array();
|
private $_items = array();
|
||||||
@ -88,7 +87,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean false if found, else true
|
* @return boolean false if found, else true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onStartCacheGet(&$key, &$value)
|
function onStartCacheGet(&$key, &$value)
|
||||||
{
|
{
|
||||||
if ($this->active && array_key_exists($key, $this->_items)) {
|
if ($this->active && array_key_exists($key, $this->_items)) {
|
||||||
@ -116,7 +114,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean hook value, true
|
* @return boolean hook value, true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndCacheGet($key, &$value)
|
function onEndCacheGet($key, &$value)
|
||||||
{
|
{
|
||||||
if ($this->active && (!array_key_exists($key, $this->_items) ||
|
if ($this->active && (!array_key_exists($key, $this->_items) ||
|
||||||
@ -139,7 +136,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndCacheSet($key, $value, $flag, $expiry)
|
function onEndCacheSet($key, $value, $flag, $expiry)
|
||||||
{
|
{
|
||||||
if ($this->active) {
|
if ($this->active) {
|
||||||
@ -159,7 +155,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onStartCacheDelete(&$key, &$success)
|
function onStartCacheDelete(&$key, &$success)
|
||||||
{
|
{
|
||||||
if ($this->active && array_key_exists($key, $this->_items)) {
|
if ($this->active && array_key_exists($key, $this->_items)) {
|
||||||
@ -175,7 +170,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onPluginVersion(&$versions)
|
function onPluginVersion(&$versions)
|
||||||
{
|
{
|
||||||
$url = 'http://status.net/wiki/Plugin:InProcessCache';
|
$url = 'http://status.net/wiki/Plugin:InProcessCache';
|
||||||
@ -185,6 +179,7 @@ class InProcessCachePlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou',
|
'author' => 'Evan Prodromou',
|
||||||
'homepage' => $url,
|
'homepage' => $url,
|
||||||
'description' =>
|
'description' =>
|
||||||
|
// TRANS: Plugin dscription.
|
||||||
_m('Additional in-process cache for plugins.'));
|
_m('Additional in-process cache for plugins.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -197,7 +192,6 @@ class InProcessCachePlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean true
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function cleanup()
|
function cleanup()
|
||||||
{
|
{
|
||||||
if ($this->active && common_config('inprocess', 'stats')) {
|
if ($this->active && common_config('inprocess', 'stats')) {
|
||||||
|
@ -51,6 +51,7 @@ class InfiniteScrollPlugin extends Plugin
|
|||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:InfiniteScroll',
|
'homepage' => 'http://status.net/wiki/Plugin:InfiniteScroll',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin dscription.
|
||||||
_m('Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.'));
|
_m('Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
Infinite Scroll adds the following functionality to your StatusNet installation: When a user scrolls towards the bottom of the page, the next page of notices is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.
|
Infinite Scroll adds the following functionality to your StatusNet installation:
|
||||||
|
When a user scrolls towards the bottom of the page, the next page of notices is
|
||||||
|
automatically retrieved and appended. This means they never need to click "Next
|
||||||
|
Page", which dramatically increases stickiness.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
@ -47,7 +47,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/ext
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class IrcPlugin extends ImPlugin {
|
class IrcPlugin extends ImPlugin {
|
||||||
public $host = null;
|
public $host = null;
|
||||||
public $port = null;
|
public $port = null;
|
||||||
@ -76,6 +75,7 @@ class IrcPlugin extends ImPlugin {
|
|||||||
* @return string Name of service
|
* @return string Name of service
|
||||||
*/
|
*/
|
||||||
public function getDisplayName() {
|
public function getDisplayName() {
|
||||||
|
// TRANS: Service name for IRC.
|
||||||
return _m('IRC');
|
return _m('IRC');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,6 +290,9 @@ class IrcPlugin extends ImPlugin {
|
|||||||
* @return boolean success value
|
* @return boolean success value
|
||||||
*/
|
*/
|
||||||
public function sendConfirmationCode($screenname, $code, $user, $checked = false) {
|
public function sendConfirmationCode($screenname, $code, $user, $checked = false) {
|
||||||
|
// TRANS: Body text for e-mail confirmation message for IRC.
|
||||||
|
// TRANS: %1$s is a user nickname, %2$s is the StatusNet sitename,
|
||||||
|
// TRANS: %3$s is the plugin display name ("IRC"), %4$s is the confirm address URL.
|
||||||
$body = sprintf(_m('User "%1$s" on %2$s has said that your %3$s screenname belongs to them. ' .
|
$body = sprintf(_m('User "%1$s" on %2$s has said that your %3$s screenname belongs to them. ' .
|
||||||
'If that\'s true, you can confirm by clicking on this URL: ' .
|
'If that\'s true, you can confirm by clicking on this URL: ' .
|
||||||
'%4$s' .
|
'%4$s' .
|
||||||
@ -339,16 +342,20 @@ class IrcPlugin extends ImPlugin {
|
|||||||
*/
|
*/
|
||||||
public function initialize() {
|
public function initialize() {
|
||||||
if (!isset($this->host)) {
|
if (!isset($this->host)) {
|
||||||
throw new Exception('must specify a host');
|
// TRANS: Exception thrown when initialising the IRC plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('You must specify a host.'));
|
||||||
}
|
}
|
||||||
if (!isset($this->username)) {
|
if (!isset($this->username)) {
|
||||||
throw new Exception('must specify a username');
|
// TRANS: Exception thrown when initialising the IRC plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('You must specify a username.'));
|
||||||
}
|
}
|
||||||
if (!isset($this->realname)) {
|
if (!isset($this->realname)) {
|
||||||
throw new Exception('must specify a "real name"');
|
// TRANS: Exception thrown when initialising the IRC plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('You must specify a "real name".'));
|
||||||
}
|
}
|
||||||
if (!isset($this->nick)) {
|
if (!isset($this->nick)) {
|
||||||
throw new Exception('must specify a nickname');
|
// TRANS: Exception thrown when initialising the IRC plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('You must specify a nickname.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->port)) {
|
if (!isset($this->port)) {
|
||||||
@ -390,6 +397,7 @@ class IrcPlugin extends ImPlugin {
|
|||||||
'author' => 'Luke Fitzgerald',
|
'author' => 'Luke Fitzgerald',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:IRC',
|
'homepage' => 'http://status.net/wiki/Plugin:IRC',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('The IRC plugin allows users to send and receive notices over an IRC network.'));
|
_m('The IRC plugin allows users to send and receive notices over an IRC network.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* Table Definition for irc_waiting_message
|
* Table Definition for irc_waiting_message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
|
||||||
|
|
||||||
class Irc_waiting_message extends Memcached_DataObject {
|
class Irc_waiting_message extends Memcached_DataObject {
|
||||||
@ -124,7 +125,9 @@ class Irc_waiting_message extends Memcached_DataObject {
|
|||||||
$result = $this->update($orig);
|
$result = $this->update($orig);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw Exception(sprintf(_m("Could not increment attempts count for %d"), $this->id));
|
// TRANS: Exception thrown when an IRC attempts count could not be updated.
|
||||||
|
// TRANS: %d is the object ID for which the count could not be updated.
|
||||||
|
throw Exception(sprintf(_m('Could not increment attempts count for %d.'), $this->id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
|||||||
* In a multi-site queuedaemon.php run, one connection will be instantiated
|
* In a multi-site queuedaemon.php run, one connection will be instantiated
|
||||||
* for each site being handled by the current process that has IRC enabled.
|
* for each site being handled by the current process that has IRC enabled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class IrcManager extends ImManager {
|
class IrcManager extends ImManager {
|
||||||
protected $conn = null;
|
protected $conn = null;
|
||||||
protected $lastPing = null;
|
protected $lastPing = null;
|
||||||
@ -231,7 +230,8 @@ class IrcManager extends ImManager {
|
|||||||
// Send message
|
// Send message
|
||||||
$this->plugin->sendConfirmationCode($screenname, $nickdata['code'], $nickdata['user'], true);
|
$this->plugin->sendConfirmationCode($screenname, $nickdata['code'], $nickdata['user'], true);
|
||||||
} else {
|
} else {
|
||||||
$this->plugin->sendMessage($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled'));
|
// TRANS: Message given when using an unregistered IRC nickname.
|
||||||
|
$this->plugin->sendMessage($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled.'));
|
||||||
|
|
||||||
$confirm = new Confirm_address();
|
$confirm = new Confirm_address();
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ class IrcManager extends ImManager {
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
// TRANS: Server error thrown on database error when deleting IRC nickname confirmation.
|
||||||
$this->serverError(_m('Could not delete confirmation.'));
|
$this->serverError(_m('Could not delete confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -285,7 +285,8 @@ class IrcManager extends ImManager {
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($wm, 'INSERT', __FILE__);
|
common_log_db_error($wm, 'INSERT', __FILE__);
|
||||||
throw new ServerException('DB error inserting IRC waiting queue item');
|
// TRANS: Server exception thrown when an IRC waiting queue item could not be added to the database.
|
||||||
|
throw new ServerException(_m('Database error inserting IRC waiting queue item.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -36,10 +36,12 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
function onInitializePlugin(){
|
function onInitializePlugin(){
|
||||||
parent::onInitializePlugin();
|
parent::onInitializePlugin();
|
||||||
if(!isset($this->attributes['nickname'])){
|
if(!isset($this->attributes['nickname'])){
|
||||||
throw new Exception("must specify a nickname attribute");
|
// TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('You must specify a nickname attribute.'));
|
||||||
}
|
}
|
||||||
if($this->password_changeable && (! isset($this->attributes['password']) || !isset($this->password_encoding))){
|
if($this->password_changeable && (! isset($this->attributes['password']) || !isset($this->password_encoding))){
|
||||||
throw new Exception("if password_changeable is set, the password attribute and password_encoding must also be specified");
|
// TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('If password_changeable is set, the password attribute and password_encoding must also be specified.'));
|
||||||
}
|
}
|
||||||
$this->ldapCommon = new LdapCommon(get_object_vars($this));
|
$this->ldapCommon = new LdapCommon(get_object_vars($this));
|
||||||
}
|
}
|
||||||
@ -63,11 +65,13 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
{
|
{
|
||||||
case 'register':
|
case 'register':
|
||||||
if($this->autoregistration) {
|
if($this->autoregistration) {
|
||||||
$instr = 'Have an LDAP account? Use your standard username and password.';
|
// TRANS: Instructions for LDAP authentication.
|
||||||
|
$instr = _m('Do you have an LDAP account? Use your standard username and password.');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'login':
|
case 'login':
|
||||||
$instr = 'Have an LDAP account? Use your standard username and password.';
|
// TRANS: Instructions for LDAP authentication.
|
||||||
|
$instr = _m('Do you have an LDAP account? Use your standard username and password.');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
@ -143,6 +147,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:LdapAuthentication',
|
'homepage' => 'http://status.net/wiki/Plugin:LdapAuthentication',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('The LDAP Authentication plugin allows for StatusNet to handle authentication through LDAP.'));
|
_m('The LDAP Authentication plugin allows for StatusNet to handle authentication through LDAP.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,9 @@ Settings
|
|||||||
========
|
========
|
||||||
provider_name*: This is a identifier designated to the connection.
|
provider_name*: This is a identifier designated to the connection.
|
||||||
It's how StatusNet will refer to the authentication source.
|
It's how StatusNet will refer to the authentication source.
|
||||||
For the most part, any name can be used, so long as each authentication source has a different identifier.
|
For the most part, any name can be used, so long as each authentication
|
||||||
In most cases there will be only one authentication source used.
|
source has a different identifier. In most cases there will be only one
|
||||||
|
authentication source used.
|
||||||
authoritative (false): Set to true if LDAP's responses are authoritative
|
authoritative (false): Set to true if LDAP's responses are authoritative
|
||||||
(if authorative and LDAP fails, no other password checking will be done).
|
(if authorative and LDAP fails, no other password checking will be done).
|
||||||
autoregistration (false): Set to true if users should be automatically created
|
autoregistration (false): Set to true if users should be automatically created
|
||||||
@ -84,4 +85,3 @@ addPlugin('ldapAuthentication', array(
|
|||||||
'fullname'=>'displayName',
|
'fullname'=>'displayName',
|
||||||
'password'=>'unicodePwd')
|
'password'=>'unicodePwd')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -38,10 +38,12 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
|
|||||||
|
|
||||||
function onInitializePlugin(){
|
function onInitializePlugin(){
|
||||||
if(!isset($this->provider_name)){
|
if(!isset($this->provider_name)){
|
||||||
throw new Exception("provider_name must be set. Use the provider_name from the LDAP Authentication plugin.");
|
// TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('provider_name must be set. Use the provider_name from the LDAP Authentication plugin.'));
|
||||||
}
|
}
|
||||||
if(!isset($this->uniqueMember_attribute)){
|
if(!isset($this->uniqueMember_attribute)){
|
||||||
throw new Exception("uniqueMember_attribute must be set.");
|
// TRANS: Exception thrown when initialising the LDAP Auth plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('uniqueMember_attribute must be set.'));
|
||||||
}
|
}
|
||||||
$this->ldapCommon = new LdapCommon(get_object_vars($this));
|
$this->ldapCommon = new LdapCommon(get_object_vars($this));
|
||||||
}
|
}
|
||||||
@ -121,6 +123,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
|
|||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:LdapAuthorization',
|
'homepage' => 'http://status.net/wiki/Plugin:LdapAuthorization',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('The LDAP Authorization plugin allows for StatusNet to handle authorization through LDAP.'));
|
_m('The LDAP Authorization plugin allows for StatusNet to handle authorization through LDAP.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,9 @@ Settings
|
|||||||
========
|
========
|
||||||
provider_name*: This is a identifier designated to the connection.
|
provider_name*: This is a identifier designated to the connection.
|
||||||
It's how StatusNet will refer to the authentication source.
|
It's how StatusNet will refer to the authentication source.
|
||||||
For the most part, any name can be used, so long as each authentication source has a different identifier.
|
For the most part, any name can be used, so long as each authentication
|
||||||
In most cases there will be only one authentication source used.
|
source has a different identifier. In most cases there will be only one
|
||||||
|
authentication source used.
|
||||||
authoritative (false): should this plugin be authoritative for
|
authoritative (false): should this plugin be authoritative for
|
||||||
authorization?
|
authorization?
|
||||||
uniqueMember_attribute ('uniqueMember')*: the attribute of a group
|
uniqueMember_attribute ('uniqueMember')*: the attribute of a group
|
||||||
@ -91,4 +92,3 @@ addPlugin('ldapAuthorization', array(
|
|||||||
'attributes'=>array(
|
'attributes'=>array(
|
||||||
'username'=>'sAMAccountName')
|
'username'=>'sAMAccountName')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -60,12 +60,15 @@ class LdapCommon
|
|||||||
$this->ldap_config = $this->get_ldap_config();
|
$this->ldap_config = $this->get_ldap_config();
|
||||||
|
|
||||||
if(!isset($this->host)){
|
if(!isset($this->host)){
|
||||||
throw new Exception(_m("A host must be specified."));
|
// TRANS: Exception thrown when initialising the LDAP Common plugin fails because of an incorrect configuration.
|
||||||
|
throw new Exception(_m('A host must be specified.'));
|
||||||
}
|
}
|
||||||
if(!isset($this->basedn)){
|
if(!isset($this->basedn)){
|
||||||
|
// TRANS: Exception thrown when initialising the LDAP Common plugin fails because of an incorrect configuration.
|
||||||
throw new Exception(_m('"basedn" must be specified.'));
|
throw new Exception(_m('"basedn" must be specified.'));
|
||||||
}
|
}
|
||||||
if(!isset($this->attributes['username'])){
|
if(!isset($this->attributes['username'])){
|
||||||
|
// TRANS: Exception thrown when initialising the LDAP Common plugin fails because of an incorrect configuration.
|
||||||
throw new Exception(_m('The username attribute must be set.'));
|
throw new Exception(_m('The username attribute must be set.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,9 +125,13 @@ class LdapCommon
|
|||||||
// if we were called with a config, assume caller will handle
|
// if we were called with a config, assume caller will handle
|
||||||
// incorrect username/password (LDAP_INVALID_CREDENTIALS)
|
// incorrect username/password (LDAP_INVALID_CREDENTIALS)
|
||||||
if (isset($config) && $err->getCode() == 0x31) {
|
if (isset($config) && $err->getCode() == 0x31) {
|
||||||
throw new LdapInvalidCredentialsException('Could not connect to LDAP server: '.$err->getMessage());
|
// TRANS: Exception thrown in the LDAP Common plugin when LDAP server is not available.
|
||||||
|
// TRANS: %s is the error message.
|
||||||
|
throw new LdapInvalidCredentialsException(sprintf(_m('Could not connect to LDAP server: %s'),$err->getMessage()));
|
||||||
}
|
}
|
||||||
throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
|
// TRANS: Exception thrown in the LDAP Common plugin when LDAP server is not available.
|
||||||
|
// TRANS: %s is the error message.
|
||||||
|
throw new Exception(sprintf(_m('Could not connect to LDAP server: %s.'),$err->getMessage()));
|
||||||
}
|
}
|
||||||
$c = Cache::instance();
|
$c = Cache::instance();
|
||||||
if (!empty($c)) {
|
if (!empty($c)) {
|
||||||
|
@ -38,6 +38,7 @@ class LilUrlPlugin extends UrlShortenerPlugin
|
|||||||
function onInitializePlugin(){
|
function onInitializePlugin(){
|
||||||
parent::onInitializePlugin();
|
parent::onInitializePlugin();
|
||||||
if(!isset($this->serviceUrl)){
|
if(!isset($this->serviceUrl)){
|
||||||
|
// TRANS: Exception thrown when URL shortening plugin was configured incorrectly.
|
||||||
throw new Exception(_m('A serviceUrl must be specified.'));
|
throw new Exception(_m('A serviceUrl must be specified.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,6 +64,8 @@ class LilUrlPlugin extends UrlShortenerPlugin
|
|||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:LilUrl',
|
'homepage' => 'http://status.net/wiki/Plugin:LilUrl',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
|
// TRANS: %1$s is the service URL.
|
||||||
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));
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ class LinkPreviewPlugin extends Plugin
|
|||||||
'author' => 'Brion Vibber',
|
'author' => 'Brion Vibber',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:LinkPreview',
|
'homepage' => 'http://status.net/wiki/Plugin:LinkPreview',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
_m('UI extensions previewing thumbnails from links.'));
|
// TRANS: Plugin description.
|
||||||
|
_m('UI extension for previewing thumbnails from links.'));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
* @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 OembedproxyAction extends OembedAction
|
class OembedproxyAction extends OembedAction
|
||||||
{
|
{
|
||||||
|
|
||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
// Trigger short error responses; not a human-readable web page.
|
// Trigger short error responses; not a human-readable web page.
|
||||||
@ -56,18 +54,21 @@ class OembedproxyAction extends OembedAction
|
|||||||
// We're not a general oEmbed proxy service; limit to valid sessions.
|
// We're not a general oEmbed proxy service; limit to valid sessions.
|
||||||
$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.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$format = $this->arg('format');
|
$format = $this->arg('format');
|
||||||
if ($format && $format != 'json') {
|
if ($format && $format != 'json') {
|
||||||
throw new ClientException('Invalid format; only JSON supported.');
|
// TRANS: Client exception thrown when requesting a different format than JSON.
|
||||||
|
throw new ClientException(_m('Invalid format; only JSON supported.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = $this->arg('url');
|
$url = $this->arg('url');
|
||||||
if (!common_valid_http_url($url)) {
|
if (!common_valid_http_url($url)) {
|
||||||
throw new ClientException('Invalid URL.');
|
// TRANS: Client exception thrown when not providing a valid URL.
|
||||||
|
throw new ClientException(_m('Invalid URL.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
@ -83,5 +84,4 @@ class OembedproxyAction extends OembedAction
|
|||||||
$this->init_document('json');
|
$this->init_document('json');
|
||||||
print json_encode($data);
|
print json_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -201,6 +201,8 @@ class LinkbackPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
$profile = $this->notice->getProfile();
|
$profile = $this->notice->getProfile();
|
||||||
|
|
||||||
|
// TRANS: Trackback title.
|
||||||
|
// TRANS: %1$s is a profile nickname, %2$s is a timestamp.
|
||||||
$args = array('title' => sprintf(_m('%1$s\'s status on %2$s'),
|
$args = array('title' => sprintf(_m('%1$s\'s status on %2$s'),
|
||||||
$profile->nickname,
|
$profile->nickname,
|
||||||
common_exact_date($this->notice->created)),
|
common_exact_date($this->notice->created)),
|
||||||
@ -238,6 +240,7 @@ class LinkbackPlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou',
|
'author' => 'Evan Prodromou',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Linkback',
|
'homepage' => 'http://status.net/wiki/Plugin:Linkback',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Notify blog authors when their posts have been linked in '.
|
_m('Notify blog authors when their posts have been linked in '.
|
||||||
'microblog notices using '.
|
'microblog notices using '.
|
||||||
'<a href="http://www.hixie.ch/specs/pingback/pingback">Pingback</a> '.
|
'<a href="http://www.hixie.ch/specs/pingback/pingback">Pingback</a> '.
|
||||||
|
Loading…
Reference in New Issue
Block a user