This commit is contained in:
Danil Negrienko 2020-06-30 09:32:19 +03:00
parent 42f9a8ebdd
commit 0743f21847
3 changed files with 5 additions and 2 deletions

View File

@ -10,7 +10,7 @@ by adding `localizator` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:localizator, "~> 0.1.14"}
{:localizator, "~> 0.1.15"}
]
end
```

View File

@ -51,6 +51,9 @@ defmodule Localizator.Translator do
translate(source, map.to, map.from, translator)
end
@spec translate(nil, to, from_may_be_nil, translator) :: result
def translate(empty, _to, _from, _translator) when is_nil(empty), do: nil
@spec translate(String.t(), to, from_may_be_nil, translator) :: result
def translate(string, to, from, translator) when is_binary(string) do
case Commons.is_html?(string) do

View File

@ -4,7 +4,7 @@ defmodule Localizator.MixProject do
def project do
[
app: :localizator,
version: "0.1.14",
version: "0.1.15",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps()