This commit is contained in:
Danil Negrienko 2020-06-11 17:23:41 +03:00
parent 5f8f401e90
commit 050edd1abe
3 changed files with 4 additions and 2 deletions

View File

@ -78,6 +78,8 @@ defmodule Localizator.Translator do
|> translate_html_element(to, from, translator)
|> Meeseeks.parse(:tuple_tree)
|> Meeseeks.html()
|> String.trim_leading("<html><head></head><body>")
|> String.trim_trailing("</body></html>")
end
# Plain Text Content

View File

@ -40,7 +40,7 @@ defmodule Localizator.Translitor do
def convert(source, locale) do
translitor =
translitors()
|> Map.get(locale)
|> Map.get("#{locale}")
translitor.convert(source)
end

View File

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