Skip to content
Browse files

Fix #132 according to comments in that pull request.

  • Loading branch information...
1 parent 8ea79fa commit 8c876fde4c2b383c241d4d6cbba39d979548cd94 @kaos kaos committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/erlydtl_compiler.erl
View
6 src/erlydtl_compiler.erl
@@ -428,9 +428,9 @@ init_context(ParseTrail, DefDir, Module, Options) ->
BlocktransLocales = proplists:get_value(blocktrans_locales, Options),
TransLocales = case {Locale, BlocktransLocales} of
{undefined, undefined} -> Ctx#dtl_context.trans_locales;
- {undefined, Val} when Val =/= undefined -> Val;
- {Val, undefined} when Val =/= undefined -> [Val];
- _ -> ordsets:add_element(Locale, ordsets:from_list(BlocktransLocales))
+ {undefined, Val} -> Val;
+ {Val, undefined} -> [Val];
+ _ -> lists:usort([Locale | BlocktransLocales])
end,
Context = #dtl_context{
all_options = Options,

0 comments on commit 8c876fd

Please sign in to comment.
Something went wrong with that request. Please try again.