Fix some typos in comments (most of them found by codespell)

Fix also an error string in Updater.php.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2015-09-27 13:48:00 +02:00
parent dcd243505d
commit ce5cbaa850
29 changed files with 45 additions and 44 deletions

View File

@ -290,7 +290,7 @@
* </code> * </code>
*/ */
Handlebars.registerHelper('override', function(name, options) { Handlebars.registerHelper('override', function(name, options) {
// We need to provide unlimited inheritence level. Rendering is started // We need to provide unlimited inheritance level. Rendering is started
// from the deepest level template. If the content is in the block // from the deepest level template. If the content is in the block
// storage it is related with the deepest level template. Thus we do not // storage it is related with the deepest level template. Thus we do not
// need to override it. // need to override it.

View File

@ -37,7 +37,7 @@
// Initialize fields and methods // Initialize fields and methods
/** /**
* Last threads revision number. Prevent transfering not * Last threads revision number. Prevent transferring not
* modified threads. * modified threads.
* @type Number * @type Number
* @fieldOf Mibew.Collections.Threads * @fieldOf Mibew.Collections.Threads

View File

@ -25,7 +25,7 @@
var controlsConstructors = []; var controlsConstructors = [];
/** /**
* Prepresent thread in users queue * Represent thread in users queue
* @class * @class
*/ */
var QueuedThread = Mibew.Models.QueuedThread = Mibew.Models.Thread.extend( var QueuedThread = Mibew.Models.QueuedThread = Mibew.Models.Thread.extend(

View File

@ -215,7 +215,7 @@ var Mibew = Mibew || {};
} }
} }
// Process all recieved handlers. Run handler if all dependencies loaded // Process all received handlers. Run handler if all dependencies loaded
// and add it to handlers list otherwise. // and add it to handlers list otherwise.
for (var i = 0; i < handlers.length; i++) { for (var i = 0; i < handlers.length; i++) {
// Create shortcuts // Create shortcuts

View File

@ -28,7 +28,7 @@ use Mibew\Routing\Generator\SecureUrlGeneratorInterface as UrlGeneratorInterface
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
* Convert messages to formated text * Convert messages to formatted text
* *
* @param array $msg message object which most be formatted * @param array $msg message object which most be formatted
* *

View File

@ -106,7 +106,7 @@ class Application implements
} }
/** /**
* Handles incomming request. * Handles incoming request.
* *
* @param Request $request Incoming request * @param Request $request Incoming request
* @return Response Resulting response * @return Response Resulting response

View File

@ -25,7 +25,7 @@ namespace Mibew\Asset;
class Package class Package
{ {
/** /**
* Indicates that assets sould not be sorted. * Indicates that assets should not be sorted.
*/ */
const SORT_NONE = 'none'; const SORT_NONE = 'none';
/** /**

View File

@ -72,7 +72,7 @@ abstract class AbstractController extends BaseAbstractController
/** /**
* Generates JavaScript code that starts client side application. * Generates JavaScript code that starts client side application.
* *
* @param Request $request Incomming request. * @param Request $request Incoming request.
* @param array $options Client side application options. At the moment the * @param array $options Client side application options. At the moment the
* method accepts the following options: * method accepts the following options:
* - "company": array, a set of company info. See {@link setup_logo()} * - "company": array, a set of company info. See {@link setup_logo()}

View File

@ -294,7 +294,7 @@ class InstallController extends AbstractController
// The installation has been finished (or had not been started yet) // The installation has been finished (or had not been started yet)
// We should prevent access to this action but cannot use Access // We should prevent access to this action but cannot use Access
// Check functionallity becase the user should be redirected to the // Check functionallity becase the user should be redirected to the
// beginnig. // beginning.
return $this->redirect($this->generateUrl('install')); return $this->redirect($this->generateUrl('install'));
} }

View File

@ -66,7 +66,7 @@ class JsTranslationController extends AbstractController
header_remove(); header_remove();
// The whole response body (JSON-encoded with a callback function) is // The whole response body (JSON-encoded with a callback function) is
// cached via cache backend, thus it's simplier to use Symfony's // cached via cache backend, thus it's simpler to use Symfony's
// Response class instead of JsonResponse. // Response class instead of JsonResponse.
$response = new Response(); $response = new Response();
$response->headers->set('Content-Type', 'text/javascript'); $response->headers->set('Content-Type', 'text/javascript');

View File

@ -107,8 +107,9 @@ class Database
* Get instance of Database class. * Get instance of Database class.
* *
* If no instance exists, creates new instance. * If no instance exists, creates new instance.
* Use Database::initialize() before try to get an instance. If database * Use Database::initialize() before trying to get an instance.
* was not initilize coorectly triggers an error with E_USER_ERROR level. * If database was not initialized correctly triggers an error
* with E_USER_ERROR level.
* *
* @return Database * @return Database
* @see Database::initialize() * @see Database::initialize()
@ -274,7 +275,7 @@ class Database
* @param array $params Array of query parameters. It can contains values * @param array $params Array of query parameters. It can contains values
* with following keys: * with following keys:
* - 'return_rows' control if rows must be returned and how many rows must * - 'return_rows' control if rows must be returned and how many rows must
* be returnd. The value can be Database::RETURN_ONE_ROW for olny one * be returned. The value can be Database::RETURN_ONE_ROW for only one
* row or Database::RETURN_ALL_ROWS for all rows. If this key not * row or Database::RETURN_ALL_ROWS for all rows. If this key not
* specified, the function will not return any rows. * specified, the function will not return any rows.
* - 'fetch_type' control indexes in resulting rows. The value can be * - 'fetch_type' control indexes in resulting rows. The value can be

View File

@ -550,7 +550,7 @@ final class Events
* {@link \Symfony\Component\HttpFoundation\Request} which represents * {@link \Symfony\Component\HttpFoundation\Request} which represents
* incoming request. * incoming request.
* - "response": array, set of data that will be sent to the widget. See * - "response": array, set of data that will be sent to the widget. See
* description of its stucture and use case below. * description of its structure and use case below.
* - "route_url_generator": an instance of * - "route_url_generator": an instance of
* {@link \Mibew\Routing\Generator\SecureUrlGeneratorInterface}. * {@link \Mibew\Routing\Generator\SecureUrlGeneratorInterface}.
* - "asset_url_generator": an instance of * - "asset_url_generator": an instance of

View File

@ -120,7 +120,7 @@ class CronWorker
} }
/** /**
* Retuns list of all errors that took place during running periodical * Returns list of all errors that took place during running periodical
* actions. * actions.
* *
* @return string[] * @return string[]

View File

@ -72,7 +72,7 @@ class Installer
} }
/** /**
* Retuns list of all errors that took place during installation process. * Returns list of all errors that took place during installation process.
* *
* @return string[] * @return string[]
*/ */
@ -590,7 +590,7 @@ class Installer
* *
* For example, for PHP 5.3.3 the number 50303 will be returned. * For example, for PHP 5.3.3 the number 50303 will be returned.
* *
* @return integer Verison ID. * @return integer Version ID.
*/ */
protected function getPhpVersionId() protected function getPhpVersionId()
{ {

View File

@ -159,7 +159,7 @@ class UpdateChecker
} }
if ($response_code != 200) { if ($response_code != 200) {
// Unexpected HTTP recieved. // Unexpected HTTP received.
$this->errors[] = sprintf( $this->errors[] = sprintf(
'Update server returns %u HTTP code instead of 200', 'Update server returns %u HTTP code instead of 200',
$response_code $response_code
@ -265,7 +265,7 @@ class UpdateChecker
$plugins_info = $this->getPluginsInfo(); $plugins_info = $this->getPluginsInfo();
foreach ($updates['plugins'] as $plugin_name => $update) { foreach ($updates['plugins'] as $plugin_name => $update) {
if (!isset($plugins_info[$plugin_name])) { if (!isset($plugins_info[$plugin_name])) {
// It's strange. We recieve update info for a plugin that does // It's strange. We receive update info for a plugin that does
// not exist in the system. Just do nothing. // not exist in the system. Just do nothing.
continue; continue;
} }

View File

@ -71,7 +71,7 @@ class Updater
} }
/** /**
* Retuns list of all errors that took place during update process. * Returns list of all errors that took place during update process.
* *
* @return string[] * @return string[]
*/ */
@ -102,7 +102,7 @@ class Updater
if (!preg_match("/^([0-9]{1,2}\.){2}[0-9]{1,2}(-(alpha|beta|rc)\.[0-9]+)?$/", $current_version)) { if (!preg_match("/^([0-9]{1,2}\.){2}[0-9]{1,2}(-(alpha|beta|rc)\.[0-9]+)?$/", $current_version)) {
$this->errors[] = getlocal( $this->errors[] = getlocal(
'The current version ({0}) is unknown or wrong formated', 'The current version ({0}) is unknown or wrongly formatted',
array($current_version) array($current_version)
); );

View File

@ -169,7 +169,7 @@ class DependencyGraph
* dependencies and sorts the others by loading turn. * dependencies and sorts the others by loading turn.
* *
* Together with {@link \Mibew\Plugin\DependencyGraph::doSortStep()} method * Together with {@link \Mibew\Plugin\DependencyGraph::doSortStep()} method
* is implements topological sorting algoritm. The only deference from the * it implements topological sorting algorithm. The only deference from the
* topological sorting the results are in reverse order. * topological sorting the results are in reverse order.
* *
* @return PluginInfo[] * @return PluginInfo[]

View File

@ -155,7 +155,7 @@ abstract class AbstractProcessor
} }
/** /**
* Proccess received packages * Process received packages
* *
* On any error function returns only boolean false. To handle error add * On any error function returns only boolean false. To handle error add
* listener to the "<eventPrefix>RequestError" event. * listener to the "<eventPrefix>RequestError" event.
@ -392,7 +392,7 @@ abstract class AbstractProcessor
* Process request * Process request
* *
* @param array $request 'Requests' array. See Mibew API for details. * @param array $request 'Requests' array. See Mibew API for details.
* @param mixed $result_function Control existance of the 'result' function * @param mixed $result_function Control existence of the 'result' function
* in request. Use boolean true if 'result' function must exists in * in request. Use boolean true if 'result' function must exists in
* request, boolean false if must not and null if it doesn't matter. * request, boolean false if must not and null if it doesn't matter.
* @return array Array of requests results. * @return array Array of requests results.

View File

@ -310,7 +310,7 @@ class ThreadProcessor extends ClientSideProcessor implements
*/ */
protected function checkFunction($function) protected function checkFunction($function)
{ {
// Check recipient argument existance // Check recipient argument existence
if (!array_key_exists('recipient', $function['arguments'])) { if (!array_key_exists('recipient', $function['arguments'])) {
throw new ThreadProcessorException( throw new ThreadProcessorException(
"'recipient' argument is not set in function '{$function['function']}'!", "'recipient' argument is not set in function '{$function['function']}'!",

View File

@ -855,8 +855,8 @@ class Thread
* *
* One can attach arbitrary data to the message by setting 'data' item * One can attach arbitrary data to the message by setting 'data' item
* in the $options array. DO NOT serialize data manually - it will be * in the $options array. DO NOT serialize data manually - it will be
* automatically coverted to array and serialized before save in database * automatically converted to array and serialized before save in database
* and unserialized after retreive form database. * and unserialized after retrieve form database.
* *
* One can also set plugin item of the $options array to indicate that * One can also set plugin item of the $options array to indicate that
* message was sent by a plugin. * message was sent by a plugin.
@ -1070,7 +1070,7 @@ class Thread
*/ */
public function renameUser($new_name) public function renameUser($new_name)
{ {
// Rename only if a new name is realy new // Rename only if a new name is really new
if ($this->userName != $new_name) { if ($this->userName != $new_name) {
// Save old name // Save old name
$old_name = $this->userName; $old_name = $this->userName;

View File

@ -34,7 +34,7 @@ function load_system_configs()
$parser = new YamlParser(); $parser = new YamlParser();
$configs = $parser->parse(file_get_contents(MIBEW_FS_ROOT . '/configs/config.yml')); $configs = $parser->parse(file_get_contents(MIBEW_FS_ROOT . '/configs/config.yml'));
// Mailer configs are not necessary and can be omited but the section // Mailer configs are not necessary and can be omitted but the section
// must exist anyway. Empty statement is used to make sure null, false // must exist anyway. Empty statement is used to make sure null, false
// and "" will be converted to an empty array. // and "" will be converted to an empty array.
if (empty($configs['mailer'])) { if (empty($configs['mailer'])) {

View File

@ -49,7 +49,7 @@ function locale_pattern_check($locale)
/** /**
* Gets available locales list. * Gets available locales list.
* *
* Returns a list of locales wich are exist and are enabled in the system. That * Returns a list of locales which exist and are enabled in the system. That
* list is statically cached inside the function. * list is statically cached inside the function.
* *
* @return string[] List of available locales codes. * @return string[] List of available locales codes.

View File

@ -257,7 +257,7 @@ function invitation_close_old()
$db = Database::getInstance(); $db = Database::getInstance();
// Remove links beteen visitors and invitations that will be closed. // Remove links between visitors and invitations that will be closed.
$db->query( $db->query(
("UPDATE {sitevisitor} v, {thread} t SET " ("UPDATE {sitevisitor} v, {thread} t SET "
. "v.threadid = NULL " . "v.threadid = NULL "

View File

@ -49,7 +49,7 @@ function generate_pagination_link($page, $title)
* The resulting markup is a div tag with specifed class and title. * The resulting markup is a div tag with specifed class and title.
* *
* @param string $class Name of the CSS class which should be used. * @param string $class Name of the CSS class which should be used.
* @param string $title Value of an 'title' atribute of the div tag. * @param string $title Value of an 'title' attribute of the div tag.
* @return string HTML markup * @return string HTML markup
*/ */
function generate_pagination_arrow($class, $title) function generate_pagination_arrow($class, $title)

View File

@ -17,9 +17,9 @@ mail:
width: 603 width: 603
resizable: false resizable: false
# Screenshots section describe all screenshots shiped with style # Screenshots section describe all screenshots shipped with style
# Params names should be equals to file names without extension. Pictures # Params names should be equals to file names without extension. Pictures
# extension should be '.png' # extension should be '.png'
# Params values should be equals to screenshot desription # Params values should be equals to screenshot description
screenshots: screenshots:
client_chat: "Client chat window" client_chat: "Client chat window"

View File

@ -35,7 +35,7 @@
* Stretch #messages-region to fill the window. * Stretch #messages-region to fill the window.
* *
* @param {Boolean} recalculateHeight Indicates if height of elements must * @param {Boolean} recalculateHeight Indicates if height of elements must
* be recalculated. It can be usefull when elements set is changed. * be recalculated. It can be useful when elements set is changed.
*/ */
var updateHeight = function(recalculateHeight) { var updateHeight = function(recalculateHeight) {
if ($('#messages-region').size() == 0) { if ($('#messages-region').size() == 0) {

View File

@ -1,9 +1,9 @@
# This file determines some invitation style options # This file determines some invitation style options
# Screenshots section describe all screenshots shiped with style # Screenshots section describe all screenshots shipped with style
# Params names should be equals to file names without extension. Pictures # Params names should be equals to file names without extension. Pictures
# extension should be '.png' # extension should be '.png'
# Params values should be equals to screenshot desription # Params values should be equals to screenshot description
screenshots: screenshots:
invitation: "Appearance of the invitation" invitation: "Appearance of the invitation"
location: "Location of the invitation on a page" location: "Location of the invitation on a page"

View File

@ -36,9 +36,9 @@ ban:
height: 480 height: 480
resizable: true resizable: true
# Screenshots section describe all screenshots shiped with style # Screenshots section describe all screenshots shipped with style
# Params names should be equals to file names without extension. Pictures # Params names should be equals to file names without extension. Pictures
# extension should be '.png' # extension should be '.png'
# Params values should be equals to screenshot desription # Params values should be equals to screenshot description
screenshots: screenshots:
home: "Operator's home page" home: "Operator's home page"

View File

@ -347,7 +347,7 @@ QUnit = {
test.queue(); test.queue();
}, },
// Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. // Specify the number of expected assertions to guarantee that failed test (no assertions are run at all) don't slip through.
expect: function( asserts ) { expect: function( asserts ) {
config.current.expected = asserts; config.current.expected = asserts;
}, },
@ -1022,7 +1022,7 @@ addEvent( window, "load", QUnit.load );
onErrorFnPrev = window.onerror; onErrorFnPrev = window.onerror;
// Cover uncaught exceptions // Cover uncaught exceptions
// Returning true will surpress the default browser handler, // Returning true will suppress the default browser handler,
// returning false will let it run. // returning false will let it run.
window.onerror = function ( error, filePath, linerNr ) { window.onerror = function ( error, filePath, linerNr ) {
var ret = false; var ret = false;
@ -1031,7 +1031,7 @@ window.onerror = function ( error, filePath, linerNr ) {
} }
// Treat return value as window.onerror itself does, // Treat return value as window.onerror itself does,
// Only do our handling if not surpressed. // Only do our handling if not suppressed.
if ( ret !== true ) { if ( ret !== true ) {
if ( QUnit.config.current ) { if ( QUnit.config.current ) {
if ( QUnit.config.current.ignoreGlobalErrors ) { if ( QUnit.config.current.ignoreGlobalErrors ) {
@ -1435,7 +1435,7 @@ QUnit.equiv = (function() {
loop = false; loop = false;
for ( j = 0; j < parents.length; j++ ) { for ( j = 0; j < parents.length; j++ ) {
if ( parents[j] === a[i] ) { if ( parents[j] === a[i] ) {
loop = true;// dont rewalk array loop = true;// don't rewalk array
} }
} }
if ( !loop && !innerEquiv(a[i], b[i]) ) { if ( !loop && !innerEquiv(a[i], b[i]) ) {
@ -1923,7 +1923,7 @@ QUnit.diff = (function() {
}; };
}()); }());
// for CommonJS enviroments, export everything // for CommonJS environments, export everything
if ( typeof exports !== "undefined" ) { if ( typeof exports !== "undefined" ) {
extend(exports, QUnit); extend(exports, QUnit);
} }