From: Siebrand Mazeland Date: Sun, 24 Apr 2011 17:28:26 +0000 (+0200) Subject: Update translator documentation. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6d053ac411b74f98b81711815fcf225e9a97cfe;p=quix0rs-gnu-social.git Update translator documentation. L10n/i18n updates. Whitespace updates. Break long lines in README files. --- diff --git a/plugins/InProcessCache/InProcessCachePlugin.php b/plugins/InProcessCache/InProcessCachePlugin.php index 4871fa7500..240b4e3188 100644 --- a/plugins/InProcessCache/InProcessCachePlugin.php +++ b/plugins/InProcessCache/InProcessCachePlugin.php @@ -39,7 +39,7 @@ if (!defined('STATUSNET')) { * * This plugin adds an extra level of in-process caching to any regular * cache system like APC, XCache, or Memcache. - * + * * Note that since most caching plugins return false for StartCache* * methods, you should add this plugin before them, i.e. * @@ -53,7 +53,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class InProcessCachePlugin extends Plugin { private $_items = array(); @@ -77,7 +76,7 @@ class InProcessCachePlugin extends Plugin /** * Get an item from the cache - * + * * Called before other cache systems are called (iif this * plugin was loaded correctly, see class comment). If we * have the data, return it, and don't hit the other cache @@ -88,7 +87,6 @@ class InProcessCachePlugin extends Plugin * * @return boolean false if found, else true */ - function onStartCacheGet(&$key, &$value) { if ($this->active && array_key_exists($key, $this->_items)) { @@ -116,7 +114,6 @@ class InProcessCachePlugin extends Plugin * * @return boolean hook value, true */ - function onEndCacheGet($key, &$value) { if ($this->active && (!array_key_exists($key, $this->_items) || @@ -128,7 +125,7 @@ class InProcessCachePlugin extends Plugin /** * Called at the end of setting a cache element - * + * * Always set the cache element; may overwrite existing * data. * @@ -139,7 +136,6 @@ class InProcessCachePlugin extends Plugin * * @return boolean true */ - function onEndCacheSet($key, $value, $flag, $expiry) { if ($this->active) { @@ -159,7 +155,6 @@ class InProcessCachePlugin extends Plugin * * @return boolean true */ - function onStartCacheDelete(&$key, &$success) { if ($this->active && array_key_exists($key, $this->_items)) { @@ -175,7 +170,6 @@ class InProcessCachePlugin extends Plugin * * @return boolean true */ - function onPluginVersion(&$versions) { $url = 'http://status.net/wiki/Plugin:InProcessCache'; @@ -185,6 +179,7 @@ class InProcessCachePlugin extends Plugin 'author' => 'Evan Prodromou', 'homepage' => $url, 'description' => + // TRANS: Plugin dscription. _m('Additional in-process cache for plugins.')); return true; } @@ -197,17 +192,16 @@ class InProcessCachePlugin extends Plugin * * @return boolean true */ - function cleanup() { if ($this->active && common_config('inprocess', 'stats')) { - $this->log(LOG_INFO, "cache size: " . + $this->log(LOG_INFO, "cache size: " . count($this->_items)); $sum = 0; foreach ($this->_hits as $hitcount) { $sum += $hitcount; } - $this->log(LOG_INFO, $sum . " hits on " . + $this->log(LOG_INFO, $sum . " hits on " . count($this->_hits) . " keys"); } return true; diff --git a/plugins/InfiniteScroll/InfiniteScrollPlugin.php b/plugins/InfiniteScroll/InfiniteScrollPlugin.php index b6c4fabba0..84df2ef888 100644 --- a/plugins/InfiniteScroll/InfiniteScrollPlugin.php +++ b/plugins/InfiniteScroll/InfiniteScrollPlugin.php @@ -51,6 +51,7 @@ class InfiniteScrollPlugin extends Plugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:InfiniteScroll', '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.')); return true; } diff --git a/plugins/InfiniteScroll/README b/plugins/InfiniteScroll/README index 2428cc69a3..47e265b051 100644 --- a/plugins/InfiniteScroll/README +++ b/plugins/InfiniteScroll/README @@ -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 ============ diff --git a/plugins/Irc/ChannelResponseChannel.php b/plugins/Irc/ChannelResponseChannel.php index 9d50b914ab..3ddad28aa9 100644 --- a/plugins/Irc/ChannelResponseChannel.php +++ b/plugins/Irc/ChannelResponseChannel.php @@ -58,4 +58,4 @@ class ChannelResponseChannel extends IMChannel { $text = $user->nickname.': ['.common_config('site', 'name') . '] ' . $text; $this->imPlugin->sendMessage($this->ircChannel, $text); } -} \ No newline at end of file +} diff --git a/plugins/Irc/Fake_Irc.php b/plugins/Irc/Fake_Irc.php index d95ab0491d..81b867643e 100644 --- a/plugins/Irc/Fake_Irc.php +++ b/plugins/Irc/Fake_Irc.php @@ -44,4 +44,4 @@ class Fake_Irc extends Phergie_Driver_Streams { protected function send($command, $args = '') { $this->would_be_sent = array('command' => $command, 'args' => $args); } -} \ No newline at end of file +} diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php index 7877815604..2c52bb99bd 100644 --- a/plugins/Irc/IrcPlugin.php +++ b/plugins/Irc/IrcPlugin.php @@ -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 * @link http://status.net/ */ - class IrcPlugin extends ImPlugin { public $host = null; public $port = null; @@ -76,6 +75,7 @@ class IrcPlugin extends ImPlugin { * @return string Name of service */ public function getDisplayName() { + // TRANS: Service name for IRC. return _m('IRC'); } @@ -290,6 +290,9 @@ class IrcPlugin extends ImPlugin { * @return boolean success value */ 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. ' . 'If that\'s true, you can confirm by clicking on this URL: ' . '%4$s' . @@ -339,16 +342,20 @@ class IrcPlugin extends ImPlugin { */ public function initialize() { 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)) { - 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)) { - 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)) { - 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)) { @@ -390,6 +397,7 @@ class IrcPlugin extends ImPlugin { 'author' => 'Luke Fitzgerald', 'homepage' => 'http://status.net/wiki/Plugin:IRC', 'rawdescription' => + // TRANS: Plugin description. _m('The IRC plugin allows users to send and receive notices over an IRC network.')); return true; } diff --git a/plugins/Irc/Irc_waiting_message.php b/plugins/Irc/Irc_waiting_message.php index 6c6fd454c6..659a27ffa9 100644 --- a/plugins/Irc/Irc_waiting_message.php +++ b/plugins/Irc/Irc_waiting_message.php @@ -2,6 +2,7 @@ /** * Table Definition for irc_waiting_message */ + require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; class Irc_waiting_message extends Memcached_DataObject { @@ -124,7 +125,9 @@ class Irc_waiting_message extends Memcached_DataObject { $result = $this->update($orig); 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)); } } diff --git a/plugins/Irc/ircmanager.php b/plugins/Irc/ircmanager.php index d963735251..3c0a504eb0 100644 --- a/plugins/Irc/ircmanager.php +++ b/plugins/Irc/ircmanager.php @@ -28,7 +28,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } * 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. */ - class IrcManager extends ImManager { protected $conn = null; protected $lastPing = null; @@ -231,7 +230,8 @@ class IrcManager extends ImManager { // Send message $this->plugin->sendConfirmationCode($screenname, $nickdata['code'], $nickdata['user'], true); } 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(); @@ -243,7 +243,7 @@ class IrcManager extends ImManager { if (!$result) { 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.')); return; } @@ -285,7 +285,8 @@ class IrcManager extends ImManager { if (!$result) { 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; diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index 52d326287f..38ea6e6592 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -36,16 +36,18 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin function onInitializePlugin(){ parent::onInitializePlugin(); 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))){ - 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)); } function onAutoload($cls) - { + { switch ($cls) { case 'LdapCommon': @@ -63,11 +65,13 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin { case 'register': 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; 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; default: return true; @@ -79,7 +83,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin } return true; } - + //---interface implementation---// function checkPassword($username, $password) @@ -143,6 +147,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:LdapAuthentication', 'rawdescription' => + // TRANS: Plugin description. _m('The LDAP Authentication plugin allows for StatusNet to handle authentication through LDAP.')); return true; } diff --git a/plugins/LdapAuthentication/README b/plugins/LdapAuthentication/README index c188f2dbc1..a21ba4d483 100644 --- a/plugins/LdapAuthentication/README +++ b/plugins/LdapAuthentication/README @@ -11,8 +11,9 @@ Settings ======== provider_name*: This is a identifier designated to the connection. 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. - In most cases there will be only one authentication source used. + For the most part, any name can be used, so long as each authentication + 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 (if authorative and LDAP fails, no other password checking will be done). autoregistration (false): Set to true if users should be automatically created @@ -84,4 +85,3 @@ addPlugin('ldapAuthentication', array( 'fullname'=>'displayName', 'password'=>'unicodePwd') )); - diff --git a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php index 3842385cf9..1049c5610a 100644 --- a/plugins/LdapAuthorization/LdapAuthorizationPlugin.php +++ b/plugins/LdapAuthorization/LdapAuthorizationPlugin.php @@ -38,10 +38,12 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin function onInitializePlugin(){ 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)){ - 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)); } @@ -121,6 +123,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:LdapAuthorization', 'rawdescription' => + // TRANS: Plugin description. _m('The LDAP Authorization plugin allows for StatusNet to handle authorization through LDAP.')); return true; } diff --git a/plugins/LdapAuthorization/README b/plugins/LdapAuthorization/README index 3a6d8d25e0..10538d35b8 100644 --- a/plugins/LdapAuthorization/README +++ b/plugins/LdapAuthorization/README @@ -13,8 +13,9 @@ Settings ======== provider_name*: This is a identifier designated to the connection. 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. - In most cases there will be only one authentication source used. + For the most part, any name can be used, so long as each authentication + source has a different identifier. In most cases there will be only one + authentication source used. authoritative (false): should this plugin be authoritative for authorization? uniqueMember_attribute ('uniqueMember')*: the attribute of a group @@ -23,10 +24,10 @@ roles_to_groups: array that maps StatusNet roles to LDAP groups some StatusNet roles are: moderator, administrator, sandboxed, silenced login_group: if this is set to a group DN, only members of that group will be allowed to login - + The below settings must be exact copies of the settings used for the corresponding LDAP Authentication plugin. - + host*: LDAP server name to connect to. You can provide several hosts in an array in which case the hosts are tried from left to right. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php @@ -91,4 +92,3 @@ addPlugin('ldapAuthorization', array( 'attributes'=>array( 'username'=>'sAMAccountName') )); - diff --git a/plugins/LdapCommon/LdapCommon.php b/plugins/LdapCommon/LdapCommon.php index 93e1e87dc0..afc61abf72 100644 --- a/plugins/LdapCommon/LdapCommon.php +++ b/plugins/LdapCommon/LdapCommon.php @@ -60,12 +60,15 @@ class LdapCommon $this->ldap_config = $this->get_ldap_config(); 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)){ + // TRANS: Exception thrown when initialising the LDAP Common plugin fails because of an incorrect configuration. throw new Exception(_m('"basedn" must be specified.')); } 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.')); } } @@ -122,9 +125,13 @@ class LdapCommon // if we were called with a config, assume caller will handle // incorrect username/password (LDAP_INVALID_CREDENTIALS) 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(); if (!empty($c)) { diff --git a/plugins/LilUrl/LilUrlPlugin.php b/plugins/LilUrl/LilUrlPlugin.php index b63cc8a556..0ca3d3d6be 100644 --- a/plugins/LilUrl/LilUrlPlugin.php +++ b/plugins/LilUrl/LilUrlPlugin.php @@ -38,6 +38,7 @@ class LilUrlPlugin extends UrlShortenerPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->serviceUrl)){ + // TRANS: Exception thrown when URL shortening plugin was configured incorrectly. throw new Exception(_m('A serviceUrl must be specified.')); } } @@ -63,6 +64,8 @@ class LilUrlPlugin extends UrlShortenerPlugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:LilUrl', 'rawdescription' => + // TRANS: Plugin description. + // TRANS: %1$s is the service URL. sprintf(_m('Uses %1$s URL-shortener service.'), $this->shortenerName)); diff --git a/plugins/LinkPreview/LinkPreviewPlugin.php b/plugins/LinkPreview/LinkPreviewPlugin.php index 2cc077d90e..09b3a2af64 100644 --- a/plugins/LinkPreview/LinkPreviewPlugin.php +++ b/plugins/LinkPreview/LinkPreviewPlugin.php @@ -36,7 +36,8 @@ class LinkPreviewPlugin extends Plugin 'author' => 'Brion Vibber', 'homepage' => 'http://status.net/wiki/Plugin:LinkPreview', 'rawdescription' => - _m('UI extensions previewing thumbnails from links.')); + // TRANS: Plugin description. + _m('UI extension for previewing thumbnails from links.')); return true; } diff --git a/plugins/LinkPreview/oembedproxyaction.php b/plugins/LinkPreview/oembedproxyaction.php index 5d76535b22..fd2f46f5fc 100644 --- a/plugins/LinkPreview/oembedproxyaction.php +++ b/plugins/LinkPreview/oembedproxyaction.php @@ -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 * @link http://status.net/ */ - class OembedproxyAction extends OembedAction { - function handle($args) { // 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. $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.')); } $format = $this->arg('format'); 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'); 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(); @@ -83,5 +84,4 @@ class OembedproxyAction extends OembedAction $this->init_document('json'); print json_encode($data); } - } diff --git a/plugins/Linkback/LinkbackPlugin.php b/plugins/Linkback/LinkbackPlugin.php index c40000921c..5cc4aadb05 100644 --- a/plugins/Linkback/LinkbackPlugin.php +++ b/plugins/Linkback/LinkbackPlugin.php @@ -201,6 +201,8 @@ class LinkbackPlugin extends Plugin { $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'), $profile->nickname, common_exact_date($this->notice->created)), @@ -238,6 +240,7 @@ class LinkbackPlugin extends Plugin 'author' => 'Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:Linkback', 'rawdescription' => + // TRANS: Plugin description. _m('Notify blog authors when their posts have been linked in '. 'microblog notices using '. 'Pingback '.