Skip to content

Commit 39c67ee

Browse files
authored
Merge pull request #30 from hergetto/chore/update-version
[Chore]: Update version to v0.2.0
2 parents ba102a6 + 1255d47 commit 39c67ee

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.2.0 (2024-01-30)
4+
5+
- Add support to use options on translate ([#26](https://github.com/hergetto/deepl_ex/pull/26))
6+
37
## v0.1.1 (2023-08-22)
48

59
- Automatically determine the tier based on the api key ([#12](https://github.com/hergetto/deepl_ex/pull/12))

lib/deepl_ex.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ defmodule DeeplEx do
1212
This function translates the given text from the given source language, to the given target language.
1313
It either returns `{:ok, translation}` or `{:error, error}`.
1414
15+
See `DeeplEx.LanguageValidator` and `DeeplEx.OptionsValidator` for more information about the allowed values.
16+
1517
## Example with correct input
1618
1719
@@ -27,6 +29,13 @@ defmodule DeeplEx do
2729
iex> DeeplEx.translate("Hoje vou comer.", :ZZ, :EN)
2830
{:error, :invalid_language_specification}
2931
```
32+
33+
## Example when using options
34+
35+
```elixir
36+
iex> DeeplEx.translate("Hello, how are you?", :EN, :PT_BR, %{formality: "less"})
37+
{:ok, "Olá, cara, como você está?"}
38+
```
3039
"""
3140
def translate(
3241
text,

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule DeeplEx.MixProject do
22
use Mix.Project
33

4-
@version "0.1.1"
4+
@version "0.2.0"
55
@source_url "https://github.com/hergetto/deepl_ex"
66

77
def project do

0 commit comments

Comments
 (0)