From caa6690f4c2511a839e31a9df71e9e97f43577c9 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 6 Apr 2011 18:46:55 +0200 Subject: [PATCH 1/2] Update translator documentation. Whitespace updates. Break lines in README at or before 80 characters. L10n updates. --- plugins/CacheLog/CacheLogPlugin.php | 1 + plugins/CasAuthentication/CasAuthenticationPlugin.php | 3 +++ plugins/CasAuthentication/caslogin.php | 3 +++ plugins/ClientSideShorten/ClientSideShortenPlugin.php | 1 + plugins/ClientSideShorten/README | 3 ++- plugins/ClientSideShorten/shorten.js | 4 ++-- plugins/ClientSideShorten/shorten.php | 3 ++- plugins/Comet/bayeux.class.inc.php | 1 - plugins/Comet/cometupdate.js | 3 --- plugins/DirectionDetector/DirectionDetectorPlugin.php | 1 + 10 files changed, 15 insertions(+), 8 deletions(-) diff --git a/plugins/CacheLog/CacheLogPlugin.php b/plugins/CacheLog/CacheLogPlugin.php index ab9538df05..9eb3350784 100644 --- a/plugins/CacheLog/CacheLogPlugin.php +++ b/plugins/CacheLog/CacheLogPlugin.php @@ -103,6 +103,7 @@ class CacheLogPlugin extends Plugin 'author' => 'Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:CacheLog', 'description' => + // TRANS: Plugin description. _m('Log reads and writes to the cache.')); return true; } diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 3196bd94a7..ecc642b856 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -125,12 +125,15 @@ class CasAuthenticationPlugin extends AuthenticationPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->server)){ + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. throw new Exception(_m("Specifying a server is required.")); } if(!isset($this->port)){ + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. throw new Exception(_m("Specifying a port is required.")); } if(!isset($this->path)){ + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. throw new Exception(_m("Specifying a path is required.")); } //These values need to be accessible to a action object diff --git a/plugins/CasAuthentication/caslogin.php b/plugins/CasAuthentication/caslogin.php index 3301ce5824..0e16427184 100644 --- a/plugins/CasAuthentication/caslogin.php +++ b/plugins/CasAuthentication/caslogin.php @@ -25,6 +25,7 @@ class CasloginAction extends Action { parent::handle($args); if (common_is_real_login()) { + // TRANS: Client error displayed when trying to log in while already logged on. $this->clientError(_m('Already logged in.')); } else { global $casSettings; @@ -36,12 +37,14 @@ class CasloginAction extends Action $casTempPassword = common_good_rand(16); $user = common_check_user(phpCAS::getUser(), $casTempPassword); if (!$user) { + // TRANS: Server error displayed when trying to log in with incorrect username or password. $this->serverError(_m('Incorrect username or password.')); return; } // success! if (!common_set_user($user)) { + // TRANS: Server error displayed when login fails in CAS authentication plugin. $this->serverError(_m('Error setting user. You are probably not authorized.')); return; } diff --git a/plugins/ClientSideShorten/ClientSideShortenPlugin.php b/plugins/ClientSideShorten/ClientSideShortenPlugin.php index 65e27a0374..6379acd334 100644 --- a/plugins/ClientSideShorten/ClientSideShortenPlugin.php +++ b/plugins/ClientSideShorten/ClientSideShortenPlugin.php @@ -73,6 +73,7 @@ class ClientSideShortenPlugin extends Plugin 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:ClientSideShorten', 'rawdescription' => + // TRANS: Plugin description. _m('ClientSideShorten causes the web interface\'s notice form to automatically shorten URLs as they entered, and before the notice is submitted.')); return true; } diff --git a/plugins/ClientSideShorten/README b/plugins/ClientSideShorten/README index e6524c9c7d..70300a85b4 100644 --- a/plugins/ClientSideShorten/README +++ b/plugins/ClientSideShorten/README @@ -1,4 +1,5 @@ -ClientSideShorten causes the web interface's notice form to automatically shorten urls as they entered, and before the notice is submitted. +ClientSideShorten causes the web interface's notice form to automatically +shorten URLs as they entered, and before the notice is submitted. Installation ============ diff --git a/plugins/ClientSideShorten/shorten.js b/plugins/ClientSideShorten/shorten.js index bdffb81e26..d7e17d5284 100644 --- a/plugins/ClientSideShorten/shorten.js +++ b/plugins/ClientSideShorten/shorten.js @@ -16,7 +16,7 @@ function delayed () { if (!execAsap) func.apply(obj, args); - timeout = null; + timeout = null; }; if (timeout) @@ -24,7 +24,7 @@ else if (execAsap) func.apply(obj, args); - timeout = setTimeout(delayed, threshold || 100); + timeout = setTimeout(delayed, threshold || 100); }; } jQuery.fn[sr] = function(fn){ return fn ? this.bind('keypress', debounce(fn, 1000)) : this.trigger(sr); }; diff --git a/plugins/ClientSideShorten/shorten.php b/plugins/ClientSideShorten/shorten.php index 3e7121db8b..6840d532aa 100644 --- a/plugins/ClientSideShorten/shorten.php +++ b/plugins/ClientSideShorten/shorten.php @@ -52,7 +52,8 @@ class ShortenAction extends Action $this->users=array(); $this->text = $this->arg('text'); if(is_null($this->text)){ - throw new ClientException(_m('\'text\' argument must be specified.')); + // TRANS: Client exception thrown when a text argument is not present. + throw new ClientException(_m('"text" argument must be specified.')); } return true; } diff --git a/plugins/Comet/bayeux.class.inc.php b/plugins/Comet/bayeux.class.inc.php index 39ad8a8fc6..4fe8600f84 100644 --- a/plugins/Comet/bayeux.class.inc.php +++ b/plugins/Comet/bayeux.class.inc.php @@ -1,6 +1,5 @@ http://morglog.alleycatracing.com diff --git a/plugins/Comet/cometupdate.js b/plugins/Comet/cometupdate.js index 72cca004b7..50b02b7f34 100644 --- a/plugins/Comet/cometupdate.js +++ b/plugins/Comet/cometupdate.js @@ -1,6 +1,4 @@ // update the local timeline from a Comet server -// - var CometUpdate = function() { var _server; @@ -27,4 +25,3 @@ var CometUpdate = function() } } }(); - diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index ec206dd75c..be8dbea8e5 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -261,6 +261,7 @@ class DirectionDetectorPlugin extends Plugin { 'version' => DIRECTIONDETECTORPLUGIN_VERSION, 'author' => 'Behrooz Shabani', 'homepage' => $url, + // TRANS: Plugin description. 'rawdescription' => _m('Shows notices with right-to-left content in correct direction.') ); return true; From 512bd91deed74b2cb567d5c0afe10514423e46db Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 6 Apr 2011 23:43:30 +0200 Subject: [PATCH 2/2] Translator documentation added. Whitespace updates. --- plugins/Directory/DirectoryPlugin.php | 8 +++++--- plugins/DiskCache/DiskCachePlugin.php | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/Directory/DirectoryPlugin.php b/plugins/Directory/DirectoryPlugin.php index cba75802e5..4fe1eaec9e 100644 --- a/plugins/Directory/DirectoryPlugin.php +++ b/plugins/Directory/DirectoryPlugin.php @@ -44,7 +44,6 @@ if (!defined('STATUSNET')) { */ class DirectoryPlugin extends Plugin { - private $dir = null; /** @@ -165,8 +164,10 @@ class DirectoryPlugin extends Plugin $nav->out->menuItem( common_local_url('userdirectory'), - _m('Directory'), - _m('User Directory'), + // TRANS: Menu item text for user directory. + _m('MENU','Directory'), + // TRANS: Menu item title for user directory. + _m('User Directory.'), $actionName == 'userdirectory', 'nav_directory' ); @@ -184,6 +185,7 @@ class DirectoryPlugin extends Plugin 'version' => STATUSNET_VERSION, 'author' => 'Zach Copley', 'homepage' => 'http://status.net/wiki/Plugin:Directory', + // TRANS: Plugin description. 'rawdescription' => _m('Add a user directory.') ); diff --git a/plugins/DiskCache/DiskCachePlugin.php b/plugins/DiskCache/DiskCachePlugin.php index 47d4b153cf..d021a6641a 100644 --- a/plugins/DiskCache/DiskCachePlugin.php +++ b/plugins/DiskCache/DiskCachePlugin.php @@ -44,7 +44,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class DiskCachePlugin extends Plugin { var $root = '/tmp'; @@ -64,7 +63,6 @@ class DiskCachePlugin extends Plugin * * @return boolean hook success */ - function onStartCacheGet(&$key, &$value) { $filename = $this->keyToFilename($key); @@ -91,7 +89,6 @@ class DiskCachePlugin extends Plugin * * @return boolean hook success */ - function onStartCacheSet(&$key, &$value, &$flag, &$expiry, &$success) { $filename = $this->keyToFilename($key); @@ -152,7 +149,6 @@ class DiskCachePlugin extends Plugin * * @return boolean hook success */ - function onStartCacheDelete(&$key, &$success) { $filename = $this->keyToFilename($key); @@ -172,6 +168,7 @@ class DiskCachePlugin extends Plugin 'author' => 'Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:DiskCache', 'rawdescription' => + // TRANS: Plugin description. _m('Plugin to implement cache interface with disk files.')); return true; }