Browse Source

Fix typos

Kian-Meng Ang 3 years ago
parent
commit
b033ba3ef1

+ 1 - 1
NEWS.md

@@ -57,7 +57,7 @@ I've failed to keep track. Please check resolved issues on [github](https://gith
   which is triggered on any non-block data in an extends-template.
   which is triggered on any non-block data in an extends-template.
 
 
 * Add missing features to the `cycle` tag (#195) (still missing
 * Add missing features to the `cycle` tag (#195) (still missing
-  independtly stepping the cycle value).
+  independently stepping the cycle value).
 
 
 * Support records in regroup tag (#191).
 * Support records in regroup tag (#191).
 
 

+ 1 - 1
README.markdown

@@ -10,7 +10,7 @@ version *1.6*, here:
 <https://django.readthedocs.org/en/1.6.x/ref/templates/builtins.html>
 <https://django.readthedocs.org/en/1.6.x/ref/templates/builtins.html>
 
 
 Despite our best efforts to be completely compatible with the Django
 Despite our best efforts to be completely compatible with the Django
-Template Languge, there are still a few
+Template Language, there are still a few
 [differences](https://github.com/erlydtl/erlydtl#differences-from-standard-django-template-language).
 [differences](https://github.com/erlydtl/erlydtl#differences-from-standard-django-template-language).
 
 
 
 

+ 1 - 1
rebar.config

@@ -1,7 +1,7 @@
 %% -*- mode: erlang -*-
 %% -*- mode: erlang -*-
 
 
 %% accept R15B02.., any R16B except R16B03
 %% accept R15B02.., any R16B except R16B03
-%% also accept OTP v17, altough it may not work properly on that release yet..
+%% also accept OTP v17, although it may not work properly on that release yet..
 {require_otp_vsn, "R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20|21|22|23"}.
 {require_otp_vsn, "R16B$|R16B[^0]|R16B0[^3]|R16B03-1|17|18|19|20|21|22|23"}.
 
 
 {erl_opts, [debug_info]}.
 {erl_opts, [debug_info]}.

+ 2 - 2
src/erlydtl_time_compat.erl

@@ -26,7 +26,7 @@
 %% versions. This way your code can automatically take advantage
 %% versions. This way your code can automatically take advantage
 %% of the improvements in the API when available. This is an
 %% of the improvements in the API when available. This is an
 %% example of how to implement such an API, but it can be used
 %% example of how to implement such an API, but it can be used
-%% as is if you want to. Just add (a preferrably renamed version of)
+%% as is if you want to. Just add (a preferably renamed version of)
 %% this module to your project, and call the API via this module
 %% this module to your project, and call the API via this module
 %% instead of calling the BIFs directly.
 %% instead of calling the BIFs directly.
 %%
 %%
@@ -200,7 +200,7 @@ unique_integer(Modifiers) ->
 	    case is_valid_modifier_list(Modifiers) of
 	    case is_valid_modifier_list(Modifiers) of
 		true ->
 		true ->
 		    %% now() converted to an integer
 		    %% now() converted to an integer
-		    %% fullfill the requirements of
+		    %% fulfill the requirements of
 		    %% all modifiers: unique, positive,
 		    %% all modifiers: unique, positive,
 		    %% and monotonic...
 		    %% and monotonic...
 		    {MS, S, US} = erlang:now(),
 		    {MS, S, US} = erlang:now(),

+ 3 - 3
src/filter_lib/erlydtl_dateformat.erl

@@ -66,7 +66,7 @@ format({{_,_,_} = Date,{_,_,_} = Time}, FormatString) ->
 format({_,_,_} = Date, FormatString) ->
 format({_,_,_} = Date, FormatString) ->
     replace_tags(Date, {0,0,0}, FormatString, fun stub_tran/2, <<>> );
     replace_tags(Date, {0,0,0}, FormatString, fun stub_tran/2, <<>> );
 format(DateTime, FormatString) ->
 format(DateTime, FormatString) ->
-    io:format("Unrecognised date paramater : ~p~n", [DateTime]),
+    io:format("Unrecognised date parameter : ~p~n", [DateTime]),
     FormatString.
     FormatString.
 
 
 %% The same set of functions with TranslationFunction and Locale args
 %% The same set of functions with TranslationFunction and Locale args
@@ -92,7 +92,7 @@ format({_,_,_} = Date, FormatString, none, _Locale) ->
 format({_,_,_} = Date, FormatString, TransFun, Locale) ->
 format({_,_,_} = Date, FormatString, TransFun, Locale) ->
     replace_tags(Date, {0,0,0}, FormatString, TransFun, Locale);
     replace_tags(Date, {0,0,0}, FormatString, TransFun, Locale);
 format(DateTime, FormatString, _TransFun, _Locale) ->
 format(DateTime, FormatString, _TransFun, _Locale) ->
-    io:format("Unrecognised date paramater : ~p~n", [DateTime]),
+    io:format("Unrecognised date parameter : ~p~n", [DateTime]),
     FormatString.
     FormatString.
 
 
 replace_tags(Date, Time, Input, TransFun, Locale) ->
 replace_tags(Date, Time, Input, TransFun, Locale) ->
@@ -433,6 +433,6 @@ ucfirst(Other) ->
     Other.
     Other.
 
 
 stub_tran(A,_) -> 
 stub_tran(A,_) -> 
-    % userful for test debuggging
+    % useful for test debuggging
     % io:format("calling stub translation!!!",[]),
     % io:format("calling stub translation!!!",[]),
     A.
     A.

+ 1 - 1
src/filter_lib/erlydtl_slice.erl

@@ -7,7 +7,7 @@
 -endif.
 -endif.
 -define(TEST,"").
 -define(TEST,"").
 -define(NOTEST,1).
 -define(NOTEST,1).
-%% remark out NODEBUG when running tests; unremark when debugging indivdual use cases
+%% remark out NODEBUG when running tests; unremark when debugging individual use cases
 -define(NODEBUG,1).
 -define(NODEBUG,1).
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
 

+ 1 - 1
src/i18n/sources_parser.erl

@@ -150,7 +150,7 @@ process_ast(Fname, Token, State) ->
     process_token(Fname, Token, State).
     process_token(Fname, Token, State).
 
 
 
 
-%%Block are recursivelly processed, trans are accumulated and other tags are ignored
+%%Block are recursively processed, trans are accumulated and other tags are ignored
 process_token(Fname, {block,{identifier,{_Line,_Col},_Identifier},Children}, St) -> process_ast(Fname, Children, St);
 process_token(Fname, {block,{identifier,{_Line,_Col},_Identifier},Children}, St) -> process_ast(Fname, Children, St);
 process_token(Fname, {trans,Text}, #state{acc=Acc, translators_comment=Comment}=St) ->
 process_token(Fname, {trans,Text}, #state{acc=Acc, translators_comment=Comment}=St) ->
     {{Line, Col}, String} = trans(Text),
     {{Line, Col}, String} = trans(Text),

+ 5 - 5
test/erlydtl_dateformat_tests.erl

@@ -26,7 +26,7 @@ test_defs() ->
        %% We expect these to come back verbatim
        %% We expect these to come back verbatim
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
 
 
-       %% TODO : timzeone related tests.
+       %% TODO : timezone related tests.
        %%{"r", "Sun, 8 Jul 1979 00:00:00 +0000"},
        %%{"r", "Sun, 8 Jul 1979 00:00:00 +0000"},
        %%{"O", "0000"},
        %%{"O", "0000"},
        %%{"T", "CET"},
        %%{"T", "CET"},
@@ -49,7 +49,7 @@ test_defs() ->
        {"jS \\o\\f F", "8th of July"},
        {"jS \\o\\f F", "8th of July"},
        %% We expect these to come back verbatim
        %% We expect these to come back verbatim
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
-       %% TODO : timzeone related tests.
+       %% TODO : timezone related tests.
        %% {"r", "Sun, 8 Jul 1979 22:07:12 +0000"},
        %% {"r", "Sun, 8 Jul 1979 22:07:12 +0000"},
        %% {"O", "0000"},
        %% {"O", "0000"},
        %% {"T", "CET"},
        %% {"T", "CET"},
@@ -72,7 +72,7 @@ test_defs() ->
        {"jS \\o\\f F", "25th of December"},
        {"jS \\o\\f F", "25th of December"},
        %% We expect these to come back verbatim
        %% We expect these to come back verbatim
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
-       %% TODO : timzeone related tests.
+       %% TODO : timezone related tests.
        %% {"r", "Thu, 25 Dec 2008 07:00:09 +0000"},
        %% {"r", "Thu, 25 Dec 2008 07:00:09 +0000"},
        %% {"O", "0000"},
        %% {"O", "0000"},
        %% {"T", "CET"},
        %% {"T", "CET"},
@@ -95,7 +95,7 @@ test_defs() ->
        {"jS \\o\\f F", "29th of February"},
        {"jS \\o\\f F", "29th of February"},
        %% We expect these to come back verbatim
        %% We expect these to come back verbatim
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
-       %% TODO : timzeone related tests.
+       %% TODO : timezone related tests.
        %% {"r", "Sun, 29 Feb 2004 12:00:59 +0000"},
        %% {"r", "Sun, 29 Feb 2004 12:00:59 +0000"},
        %% {"O", "0000"},
        %% {"O", "0000"},
        %% {"T", "CET"},
        %% {"T", "CET"},
@@ -118,7 +118,7 @@ test_defs() ->
        {"jS \\o\\f F", "29th of February"},
        {"jS \\o\\f F", "29th of February"},
        %% We expect these to come back verbatim
        %% We expect these to come back verbatim
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
        {"x", "x"}, {"C", "C"}, {";", ";"}, {"%%", "%%"}
-       %% TODO : timzeone related tests.
+       %% TODO : timezone related tests.
        %% {"r", "Sun, 29 Feb 2004 12:00:59 +0000"},
        %% {"r", "Sun, 29 Feb 2004 12:00:59 +0000"},
        %% {"O", "0000"},
        %% {"O", "0000"},
        %% {"T", "CET"},
        %% {"T", "CET"},

+ 1 - 1
test/erlydtl_test_defs.erl

@@ -210,7 +210,7 @@ all_test_defs() ->
         <<"It is the {% now \"jS \\o\\f F Y\" %}.">>, [{var1, ""}], generate_test_date()}
         <<"It is the {% now \"jS \\o\\f F Y\" %}.">>, [{var1, ""}], generate_test_date()}
      ]},
      ]},
       {"now",
       {"now",
-      [{"now function with translation", % notice, that only date output is traslated. While you might want to transle the whole format string ('F'->'E')
+      [{"now function with translation", % notice, that only date output is translated. While you might want to transle the whole format string ('F'->'E')
         <<"It is the {% now \"jS \\o\\f F Y\" %}.">>, [{var1, ""}], [{locale, <<"ru">>}, {translation_fun, fun date_translation/2}], generate_test_date(russian)}
         <<"It is the {% now \"jS \\o\\f F Y\" %}.">>, [{var1, ""}], [{locale, <<"ru">>}, {translation_fun, fun date_translation/2}], generate_test_date(russian)}
      ]},
      ]},
      {"if",
      {"if",

+ 2 - 2
test/erlydtl_test_extension.erl

@@ -3,11 +3,11 @@
 -export([scan/1, parse/1, compile_ast/2]).
 -export([scan/1, parse/1, compile_ast/2]).
 -include("erlydtl_ext.hrl").
 -include("erlydtl_ext.hrl").
 
 
-%% look for a foo identifer followed by a #
+%% look for a foo identifier followed by a #
 scan(#scanner_state{ template="#" ++ T, 
 scan(#scanner_state{ template="#" ++ T, 
 		     scanned=[{identifier, Loc, foo}|Scanned],
 		     scanned=[{identifier, Loc, foo}|Scanned],
 		     pos={L,C} }=S) ->
 		     pos={L,C} }=S) ->
-    %% return new state with the hash dropped, and the foo identifer replaced with bar
+    %% return new state with the hash dropped, and the foo identifier replaced with bar
     {ok, S#scanner_state{ template=T,
     {ok, S#scanner_state{ template=T,
 			  scanned=[{identifier, Loc, "rab"}|Scanned],
 			  scanned=[{identifier, Loc, "rab"}|Scanned],
 			  pos={L, C+1} }};
 			  pos={L, C+1} }};