Find and fix typos using 'codespell'

This commit is contained in:
Evgeniy Khramtsov 2018-01-27 19:35:38 +03:00
parent 5d582080be
commit 6e5439db5c
12 changed files with 29 additions and 29 deletions

View File

@ -100,7 +100,7 @@ solve_challenge1(Chal = #challenge{type = <<"http-01">>, token=Tkn}, Key) ->
ets_put_key_authorization(Tkn, KeyAuthz),
{ok, Chal#challenge.uri, KeyAuthz};
solve_challenge1(Challenge, _Key) ->
?ERROR_MSG("Unkown Challenge Type: ~p", [Challenge]),
?ERROR_MSG("Unknown Challenge Type: ~p", [Challenge]),
{error, unknown_challenge}.

View File

@ -393,7 +393,7 @@ parse_who(Name, Defs, ParseOauth) when is_list(Defs) ->
{oauth, lists:foldl(fun({scope, S}, A) -> S ++ A end, [], Scopes), Rest}
end;
scope ->
report_error(<<"Oauth rule can't be embeded inside other oauth rule in 'who' section for api_permission '~s'">>,
report_error(<<"Oauth rule can't be embedded inside other oauth rule in 'who' section for api_permission '~s'">>,
[Name])
end;
({scope, ScopeList}) ->

View File

@ -259,9 +259,9 @@ get_commands_spec() ->
"documentation should be stored",
"Regexp matching names of commands or modules "
"that will be included inside generated document",
"Comma separated list of languages (choosen from java, perl, xmlrpc, json)"
"Comma separated list of languages (chosen from java, perl, xmlrpc, json)"
"that will have example invocation include in markdown document"],
result_desc = "0 if command failed, 1 when succedded",
result_desc = "0 if command failed, 1 when succeeded",
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
result_example = ok},
#ejabberd_commands{name = gen_markdown_doc_for_commands, tags = [documentation],
@ -273,9 +273,9 @@ get_commands_spec() ->
"documentation should be stored",
"Regexp matching names of commands or modules "
"that will be included inside generated document",
"Comma separated list of languages (choosen from java, perl, xmlrpc, json)"
"Comma separated list of languages (chosen from java, perl, xmlrpc, json)"
"that will have example invocation include in markdown document"],
result_desc = "0 if command failed, 1 when succedded",
result_desc = "0 if command failed, 1 when succeeded",
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
result_example = ok}].

View File

@ -133,7 +133,7 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%%-----------------------------
%% ejabberdctl Command managment
%% ejabberdctl Command management
%%-----------------------------
register_commands(CmdDescs, Module, Function) ->
@ -866,7 +866,7 @@ print(Format, Args) ->
io:format(lists:flatten(Format), Args).
%%-----------------------------
%% Command managment
%% Command management
%%-----------------------------
%%+++

View File

@ -651,7 +651,7 @@ parse_lang(Langs) ->
end.
% Code below is taken (with some modifications) from the yaws webserver, which
% is distributed under the folowing license:
% is distributed under the following license:
%
% This software (the yaws webserver) is free software.
% Parts of this software is Copyright (c) Claes Wikstrom <klacke@hyber.org>

View File

@ -107,7 +107,7 @@ init_udp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
{reuseaddr, true} |
SockOpts]) of
{ok, Socket} ->
%% Inform my parent that this port was opened succesfully
%% Inform my parent that this port was opened successfully
proc_lib:init_ack({ok, self()}),
application:ensure_started(ejabberd),
start_module_sup(Port, Module),
@ -133,7 +133,7 @@ init_udp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
init_tcp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
ListenSocket = listen_tcp(PortIP, Module, SockOpts, Port, IPS),
%% Inform my parent that this port was opened succesfully
%% Inform my parent that this port was opened successfully
proc_lib:init_ack({ok, self()}),
application:ensure_started(ejabberd),
start_module_sup(Port, Module),

View File

@ -64,7 +64,7 @@ parse(L) ->
%%% RFC2254_Filter = RegExp = Value = string(),
%%% N = integer().
%%%
%%% Description: The same as parse/1, but substitutes N or all occurences
%%% Description: The same as parse/1, but substitutes N or all occurrences
%%% of RegExp with Value *after* parsing.
%%%
%%% Example:

View File

@ -1025,7 +1025,7 @@ get_status_list(Host, Status_required) ->
Sessions2 = [ {Session#session.usr, Session#session.sid, Session#session.priority} || Session <- Sessions],
Fhost = case Host of
<<"all">> ->
%% All hosts are requested, so dont filter at all
%% All hosts are requested, so don't filter at all
fun(_, _) -> true end;
_ ->
%% Filter the list, only Host is interesting

View File

@ -43,7 +43,7 @@
%% add_commands allow exporting a class of commands, from
%% open: methods is not risky and can be called by without any access check
%% restricted (default): the same, but will appear only in ejabberdctl list.
%% admin auth is required with XMLRPC and HTTP API and checked for admin priviledges, works as usual in ejabberdctl.
%% admin auth is required with XMLRPC and HTTP API and checked for admin privileges, works as usual in ejabberdctl.
%% user - can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users.
%%
%% Then to perform an action, send a POST request to the following URL:
@ -301,7 +301,7 @@ handle(Call, Auth, Args, Version) when is_atom(Call), is_list(Args) ->
throw:{not_allowed, Msg} ->
{401, iolist_to_binary(Msg)};
throw:{error, account_unprivileged} ->
{403, 31, <<"Command need to be run with admin priviledge.">>};
{403, 31, <<"Command need to be run with admin privilege.">>};
throw:{error, access_rules_unauthorized} ->
{403, 32, <<"AccessRules: Account does not have the right to perform the operation.">>};
throw:{invalid_parameter, Msg} ->

View File

@ -2826,7 +2826,7 @@ get_options_for_subs(Host, Nidx, Subs, true) ->
broadcast_stanza(Host, _Node, _Nidx, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
NotificationType = get_option(NodeOptions, notification_type, headline),
BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but usefull
BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but useful
Stanza = add_message_type(
xmpp:set_from(BaseStanza, service_jid(Host)),
NotificationType),

View File

@ -273,8 +273,8 @@ write_roster_version(LUser, LServer, InTransaction) ->
end,
Ver.
%% Load roster from DB only if neccesary.
%% It is neccesary if
%% Load roster from DB only if necessary.
%% It is necessary if
%% - roster versioning is disabled in server OR
%% - roster versioning is not used by the client OR
%% - roster versioning is used by server and client, BUT the server isn't storing versions on db OR

View File

@ -160,10 +160,10 @@ delete_node(Nodes) ->
%% can decide to:<ul>
%% <li>reject the subscription;</li>
%% <li>allow it as is, letting the main module perform the database
%% persistance;</li>
%% persistence;</li>
%% <li>allow it, modifying the record. The main module will store the
%% modified record;</li>
%% <li>allow it, but perform the needed persistance operations.</li></ul>
%% <li>allow it, but perform the needed persistence operations.</li></ul>
%% </li></ul></p>
%% <p>The selected behaviour depends on the return parameter:
%% <ul>
@ -177,9 +177,9 @@ delete_node(Nodes) ->
%% passed in parameter <tt>SubscribeResult</tt>.</li>
%% <li><tt>{true, done}</tt>: Subscribe operation is allowed, but the
%% {@link mod_pubsub:pubsubState()} will be considered as already stored and
%% no further persistance operation will be performed. This case is used,
%% when the plugin module is doing the persistance by itself or when it want
%% to completly disable persistance.</li></ul>
%% no further persistence operation will be performed. This case is used,
%% when the plugin module is doing the persistence by itself or when it want
%% to completly disable persistence.</li></ul>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
@ -329,9 +329,9 @@ delete_subscriptions(SubState, Subscriptions) ->
%% result of the preparation as a {@link mod_pubsub:pubsubItem()} record.</li>
%% <li>This function gets the prepared record and several other parameters and can decide to:<ul>
%% <li>reject the publication;</li>
%% <li>allow the publication as is, letting the main module perform the database persistance;</li>
%% <li>allow the publication as is, letting the main module perform the database persistence;</li>
%% <li>allow the publication, modifying the record. The main module will store the modified record;</li>
%% <li>allow it, but perform the needed persistance operations.</li></ul>
%% <li>allow it, but perform the needed persistence operations.</li></ul>
%% </li></ul></p>
%% <p>The selected behaviour depends on the return parameter:
%% <ul>
@ -343,13 +343,13 @@ delete_subscriptions(SubState, Subscriptions) ->
%% performed.</li>
%% <li><tt>{true, Item}</tt>: Publication operation is allowed, but the
%% {@link mod_pubsub:pubsubItem()} record returned replaces the value passed
%% in parameter <tt>Item</tt>. The persistance will be performed by the main
%% in parameter <tt>Item</tt>. The persistence will be performed by the main
%% module.</li>
%% <li><tt>{true, done}</tt>: Publication operation is allowed, but the
%% {@link mod_pubsub:pubsubItem()} will be considered as already stored and
%% no further persistance operation will be performed. This case is used,
%% when the plugin module is doing the persistance by itself or when it want
%% to completly disable persistance.</li></ul>
%% no further persistence operation will be performed. This case is used,
%% when the plugin module is doing the persistence by itself or when it want
%% to completly disable persistence.</li></ul>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,