diff --git a/lib/linguist/memorized_vocabulary.ex b/lib/linguist/memorized_vocabulary.ex index bd25cb2..f99f75b 100644 --- a/lib/linguist/memorized_vocabulary.ex +++ b/lib/linguist/memorized_vocabulary.ex @@ -123,7 +123,7 @@ defmodule Linguist.MemorizedVocabulary do :ets.new(:translations_registry, [:named_table, :set, :protected]) end - {decode_status, [file_data]} = Yomel.decode_file(source) + {decode_status, [file_data]} = YamlElixir.read_all_from_file(source) if decode_status != :ok do raise %TranslationDecodeError{message: "Decode failed for file #{source}"} end @@ -144,7 +144,7 @@ defmodule Linguist.MemorizedVocabulary do "#{acc.current_prefix}.#{key}" end - %{ + %{ paths: Map.put(acc.paths, key_name, value), current_prefix: acc.current_prefix } diff --git a/lib/linguist/vocabulary.ex b/lib/linguist/vocabulary.ex index c1af2a6..f5f1ca1 100644 --- a/lib/linguist/vocabulary.ex +++ b/lib/linguist/vocabulary.ex @@ -87,7 +87,7 @@ defmodule Linguist.Vocabulary do will not work as expected if called directly. """ def _load_yaml_file(source) do - {:ok, [result]} = Yomel.decode_file(source) + {:ok, [result]} = YamlElixir.read_all_from_file(source) result |> Enum.reduce([], &Linguist.Vocabulary._yaml_reducer/2) end diff --git a/mix.exs b/mix.exs index 3db179f..ede4040 100644 --- a/mix.exs +++ b/mix.exs @@ -22,14 +22,14 @@ defmodule Linguist.Mixfile do end def application do - [applications: []] + [applications: [:yaml_elixir]] end defp deps do [ {:ex_cldr, "~> 1.5"}, {:jason, "~> 1.0"}, - {:yomel, "~> 0.5"}, + {:yaml_elixir, "~> 2.0"}, {:credo, "~> 0.9.0", only: [:dev, :test], runtime: false} ] end