Skip to content

Commit

Permalink
feature: add danish language (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwittstruck authored Dec 14, 2024
1 parent 7dac6f2 commit 6b76ea2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/qrstorage/qr_codes/qr_code.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Qrstorage.QrCodes.QrCode do

require Logger

@languages ~w[de en fr es tr pl ar ru it pt nl uk cs el fi hu sk ro no]a
@languages ~w[de en fr es tr pl ar ru it pt nl uk cs el fi hu sk ro no da]a
@block_list ~w[https http www]

@voices ~w[male female]a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ defmodule Qrstorage.Services.Translate.TranslateApiServiceImpl do
:hu => :HU,
:sk => :SK,
:ro => :RO,
:no => :NB
:no => :NB,
:da => :DA
}

@impl TranslateApiService
Expand Down
6 changes: 4 additions & 2 deletions lib/qrstorage/services/tts/text_to_speech_mapping.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ defmodule Qrstorage.Services.Tts.TextToSpeechMapping do
:hu => %{"female" => "Kinga", "male" => "Attila"},
:sk => %{"female" => "Simona", "male" => "Jakub"},
:ro => %{"female" => "Adina", "male" => "Teodor"},
:no => %{"female" => "Lykke-DNN"}
:no => %{"female" => "Lykke-DNN"},
:da => %{"female" => "Lene-DNN"}
}

@language_codes %{
Expand All @@ -42,7 +43,8 @@ defmodule Qrstorage.Services.Tts.TextToSpeechMapping do
:hu => "hu_hu",
:sk => "sk_sk",
:ro => "ro_ro",
:no => "no_nb"
:no => "no_nb",
:da => "da_dk"
}

def voice(language, gender) when is_atom(language) do
Expand Down
3 changes: 3 additions & 0 deletions priv/gettext/de/LC_MESSAGES/languages.po
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ msgstr "Rumänisch"

msgid "no"
msgstr "Norwegisch"

msgid "da"
msgstr "Dänisch"
3 changes: 3 additions & 0 deletions priv/gettext/en/LC_MESSAGES/languages.po
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ msgstr "Romanian"

msgid "no"
msgstr "Norwegian"

msgid "da"
msgstr "Danish"
3 changes: 3 additions & 0 deletions priv/gettext/languages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ msgstr ""

msgid "no"
msgstr ""

msgid "da"
msgstr ""

0 comments on commit 6b76ea2

Please sign in to comment.