From 8b1db2b7dce5850a15391c4113df1dd4dc0df679 Mon Sep 17 00:00:00 2001 From: nwittstruck Date: Sat, 14 Dec 2024 13:57:00 +0100 Subject: [PATCH] feature: add norwegian language --- lib/qrstorage/qr_codes/qr_code.ex | 2 +- .../services/translate/translate_api_service_impl.ex | 3 ++- lib/qrstorage/services/tts/text_to_speech_mapping.ex | 6 ++++-- priv/gettext/de/LC_MESSAGES/default.po | 2 +- priv/gettext/de/LC_MESSAGES/languages.po | 3 +++ priv/gettext/default.pot | 2 +- priv/gettext/en/LC_MESSAGES/default.po | 2 +- priv/gettext/en/LC_MESSAGES/languages.po | 3 +++ priv/gettext/languages.pot | 3 +++ 9 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/qrstorage/qr_codes/qr_code.ex b/lib/qrstorage/qr_codes/qr_code.ex index 6201aa3..a577fad 100644 --- a/lib/qrstorage/qr_codes/qr_code.ex +++ b/lib/qrstorage/qr_codes/qr_code.ex @@ -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]a + @languages ~w[de en fr es tr pl ar ru it pt nl uk cs el fi hu sk ro no]a @block_list ~w[https http www] @voices ~w[male female]a diff --git a/lib/qrstorage/services/translate/translate_api_service_impl.ex b/lib/qrstorage/services/translate/translate_api_service_impl.ex index c205ab6..63c2825 100644 --- a/lib/qrstorage/services/translate/translate_api_service_impl.ex +++ b/lib/qrstorage/services/translate/translate_api_service_impl.ex @@ -22,7 +22,8 @@ defmodule Qrstorage.Services.Translate.TranslateApiServiceImpl do :fi => :FI, :hu => :HU, :sk => :SK, - :ro => :RO + :ro => :RO, + :no => :NB } @impl TranslateApiService diff --git a/lib/qrstorage/services/tts/text_to_speech_mapping.ex b/lib/qrstorage/services/tts/text_to_speech_mapping.ex index 09f3c0d..0daacbf 100644 --- a/lib/qrstorage/services/tts/text_to_speech_mapping.ex +++ b/lib/qrstorage/services/tts/text_to_speech_mapping.ex @@ -19,7 +19,8 @@ defmodule Qrstorage.Services.Tts.TextToSpeechMapping do :fi => %{"female" => "Elina-DNN", "male" => "Benoit-premium"}, :hu => %{"female" => "Kinga", "male" => "Attila"}, :sk => %{"female" => "Simona", "male" => "Jakub"}, - :ro => %{"female" => "Adina", "male" => "Teodor"} + :ro => %{"female" => "Adina", "male" => "Teodor"}, + :no => %{"female" => "Lykke-DNN"} } @language_codes %{ @@ -40,7 +41,8 @@ defmodule Qrstorage.Services.Tts.TextToSpeechMapping do :fi => "fi_fi", :hu => "hu_hu", :sk => "sk_sk", - :ro => "ro_ro" + :ro => "ro_ro", + :no => "no_nb" } def voice(language, gender) when is_atom(language) do diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index d8e1f6e..5d6dbb8 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -104,7 +104,7 @@ msgstr "Möchtest Du diesen QR-Code wirklich löschen?" msgid "Do you really want to delete this QR code? This action cannot be undone:" msgstr "Möchtest Du diesen QR-Code wirklich löschen? Diese Handlung kann nicht rückgängig gemacht werden." -#: lib/qrstorage_web/controllers/qr_code_controller.ex:94 +#: lib/qrstorage_web/controllers/qr_code_controller.ex:93 #, elixir-autogen, elixir-format msgid "Successfully deleted QR code." msgstr "QR-Code erfolgreich gelöscht." diff --git a/priv/gettext/de/LC_MESSAGES/languages.po b/priv/gettext/de/LC_MESSAGES/languages.po index 7993e1a..63d10c3 100644 --- a/priv/gettext/de/LC_MESSAGES/languages.po +++ b/priv/gettext/de/LC_MESSAGES/languages.po @@ -67,3 +67,6 @@ msgstr "Slowakisch" msgid "ro" msgstr "Rumänisch" + +msgid "no" +msgstr "Norwegisch" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index eb0d350..863f825 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -103,7 +103,7 @@ msgstr "" msgid "Do you really want to delete this QR code? This action cannot be undone:" msgstr "" -#: lib/qrstorage_web/controllers/qr_code_controller.ex:94 +#: lib/qrstorage_web/controllers/qr_code_controller.ex:93 #, elixir-autogen, elixir-format msgid "Successfully deleted QR code." msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 833aa34..dab4e2d 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -104,7 +104,7 @@ msgstr "" msgid "Do you really want to delete this QR code? This action cannot be undone:" msgstr "" -#: lib/qrstorage_web/controllers/qr_code_controller.ex:94 +#: lib/qrstorage_web/controllers/qr_code_controller.ex:93 #, elixir-autogen, elixir-format msgid "Successfully deleted QR code." msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/languages.po b/priv/gettext/en/LC_MESSAGES/languages.po index ae31d73..0f46964 100644 --- a/priv/gettext/en/LC_MESSAGES/languages.po +++ b/priv/gettext/en/LC_MESSAGES/languages.po @@ -67,3 +67,6 @@ msgstr "Slovak" msgid "ro" msgstr "Romanian" + +msgid "no" +msgstr "Norwegian" diff --git a/priv/gettext/languages.pot b/priv/gettext/languages.pot index 539b903..8fc134f 100644 --- a/priv/gettext/languages.pot +++ b/priv/gettext/languages.pot @@ -54,3 +54,6 @@ msgstr "" msgid "ro" msgstr "" + +msgid "no" +msgstr ""