diff --git a/lib/trans/translator.ex b/lib/trans/translator.ex index 86818ad..2f99278 100644 --- a/lib/trans/translator.ex +++ b/lib/trans/translator.ex @@ -182,7 +182,8 @@ defmodule Trans.Translator do end end - defp translate_fields(%{__struct__: module} = struct, locale, default_locale) when is_list(locale) do + defp translate_fields(%{__struct__: module} = struct, locale, default_locale) + when is_list(locale) do fields = module.__trans__(:fields) Enum.reduce(fields, struct, fn field, struct -> @@ -193,7 +194,7 @@ defmodule Trans.Translator do end) end - defp translate_fields(%{__struct__: module} = struct, locale, default_locale) do + defp translate_fields(%{__struct__: _module} = struct, locale, default_locale) do translate_fields(struct, [locale], default_locale) end