From fbf4a8d951e11d2c7429c78c3f8643237a9387fb Mon Sep 17 00:00:00 2001 From: Nicholas Date: Wed, 11 Sep 2024 16:27:12 +0200 Subject: [PATCH] chore: upgrade gettext to 0.26.1 (#326) --- lib/qrstorage/services/qr_code_service.ex | 2 +- lib/qrstorage/services/recording_service.ex | 2 +- lib/qrstorage/services/translation_service.ex | 2 +- lib/qrstorage/services/tts_service.ex | 2 +- lib/qrstorage_web.ex | 6 +++--- lib/qrstorage_web/gettext.ex | 4 ++-- mix.exs | 2 +- mix.lock | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/qrstorage/services/qr_code_service.ex b/lib/qrstorage/services/qr_code_service.ex index 539bad0..79d9af4 100644 --- a/lib/qrstorage/services/qr_code_service.ex +++ b/lib/qrstorage/services/qr_code_service.ex @@ -7,7 +7,7 @@ defmodule Qrstorage.Services.QrCodeService do alias Qrstorage.Services.TtsService alias Qrstorage.Services.RateLimitingService - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext require Logger diff --git a/lib/qrstorage/services/recording_service.ex b/lib/qrstorage/services/recording_service.ex index 3bb39f2..c7bce0e 100644 --- a/lib/qrstorage/services/recording_service.ex +++ b/lib/qrstorage/services/recording_service.ex @@ -1,7 +1,7 @@ defmodule Qrstorage.Services.RecordingService do require Logger - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext def extract_recording_from_params(params) do if Map.has_key?(params, "audio_file") do diff --git a/lib/qrstorage/services/translation_service.ex b/lib/qrstorage/services/translation_service.ex index 80b143c..bb5c9f4 100644 --- a/lib/qrstorage/services/translation_service.ex +++ b/lib/qrstorage/services/translation_service.ex @@ -3,7 +3,7 @@ defmodule Qrstorage.Services.TranslationService do alias Qrstorage.QrCodes.QrCode alias Qrstorage.Repo - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext require Logger diff --git a/lib/qrstorage/services/tts_service.ex b/lib/qrstorage/services/tts_service.ex index 39c423f..df5b4cc 100644 --- a/lib/qrstorage/services/tts_service.ex +++ b/lib/qrstorage/services/tts_service.ex @@ -2,7 +2,7 @@ defmodule Qrstorage.Services.TtsService do alias Qrstorage.QrCodes.QrCode alias Qrstorage.Services.Tts.TextToSpeechApiService - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext require Logger diff --git a/lib/qrstorage_web.ex b/lib/qrstorage_web.ex index 312605e..a25ca13 100644 --- a/lib/qrstorage_web.ex +++ b/lib/qrstorage_web.ex @@ -22,7 +22,7 @@ defmodule QrstorageWeb do use Phoenix.Controller, namespace: QrstorageWeb import Plug.Conn - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext alias QrstorageWeb.Router.Helpers, as: Routes end end @@ -55,7 +55,7 @@ defmodule QrstorageWeb do def channel do quote do use Phoenix.Channel - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext end end @@ -72,7 +72,7 @@ defmodule QrstorageWeb do import QrstorageWeb.ErrorHelpers import QrstorageWeb.LanguageHelpers import QrstorageWeb.VoiceHelpers - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext alias QrstorageWeb.Router.Helpers, as: Routes end end diff --git a/lib/qrstorage_web/gettext.ex b/lib/qrstorage_web/gettext.ex index adeeef2..3bc19df 100644 --- a/lib/qrstorage_web/gettext.ex +++ b/lib/qrstorage_web/gettext.ex @@ -5,7 +5,7 @@ defmodule QrstorageWeb.Gettext do By using [Gettext](https://hexdocs.pm/gettext), your module gains a set of macros for translations, for example: - import QrstorageWeb.Gettext + use Gettext, backend: QrstorageWeb.Gettext # Simple translation gettext("Here is the string to translate") @@ -20,5 +20,5 @@ defmodule QrstorageWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext, otp_app: :qrstorage + use Gettext.Backend, otp_app: :qrstorage end diff --git a/mix.exs b/mix.exs index 0e1a43e..f3eac55 100644 --- a/mix.exs +++ b/mix.exs @@ -45,7 +45,7 @@ defmodule Qrstorage.MixProject do {:dart_sass, "0.7.0", runtime: Mix.env() == :dev}, {:telemetry_metrics, "1.0.0"}, {:telemetry_poller, "1.1.0"}, - {:gettext, "0.25.0"}, + {:gettext, "0.26.1"}, {:timex, "3.7.11"}, {:jason, "1.4.4"}, {:plug_cowboy, "2.7.2"}, diff --git a/mix.lock b/mix.lock index 7b181f2..da7a7ee 100644 --- a/mix.lock +++ b/mix.lock @@ -16,11 +16,11 @@ "esbuild": {:hex, :esbuild, "0.8.1", "0cbf919f0eccb136d2eeef0df49c4acf55336de864e63594adcea3814f3edf41", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "25fc876a67c13cb0a776e7b5d7974851556baeda2085296c14ab48555ea7560f"}, "ex_aws": {:hex, :ex_aws, "2.5.5", "5dc378eff99c3c46c917b7a96a75ad0d4c300ab7250df668d0819bcd18c0213d", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:req, "~> 0.3", [hex: :req, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ed7ee39c56012c56600e021953c6487ecce9c49320ec3b4655a15d785f221ca6"}, "ex_aws_s3": {:hex, :ex_aws_s3, "2.5.4", "87aaf4a2f24a48f516d7f5aaced9d128dd5d0f655c4431f9037a11a85c71109c", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "c06e7f68b33f7c0acba1361dbd951c79661a28f85aa2e0582990fccca4425355"}, - "expo": {:hex, :expo, "1.0.0", "647639267e088717232f4d4451526e7a9de31a3402af7fcbda09b27e9a10395a", [:mix], [], "hexpm", "18d2093d344d97678e8a331ca0391e85d29816f9664a25653fd7e6166827827c"}, + "expo": {:hex, :expo, "1.1.0", "f7b9ed7fb5745ebe1eeedf3d6f29226c5dd52897ac67c0f8af62a07e661e5c75", [:mix], [], "hexpm", "fbadf93f4700fb44c331362177bdca9eeb8097e8b0ef525c9cc501cb9917c960"}, "fast_html": {:hex, :fast_html, "2.3.0", "08c1d8ead840dd3060ba02c761bed9f37f456a1ddfe30bcdcfee8f651cec06a6", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}], "hexpm", "f18e3c7668f82d3ae0b15f48d48feeb257e28aa5ab1b0dbf781c7312e5da029d"}, "fast_sanitize": {:hex, :fast_sanitize, "0.2.3", "67b93dfb34e302bef49fec3aaab74951e0f0602fd9fa99085987af05bd91c7a5", [:mix], [{:fast_html, "~> 2.0", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "e8ad286d10d0386e15d67d0ee125245ebcfbc7d7290b08712ba9013c8c5e56e2"}, "file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"}, - "gettext": {:hex, :gettext, "0.25.0", "98a95a862a94e2d55d24520dd79256a15c87ea75b49673a2e2f206e6ebc42e5d", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "38e5d754e66af37980a94fb93bb20dcde1d2361f664b0a19f01e87296634051f"}, + "gettext": {:hex, :gettext, "0.26.1", "38e14ea5dcf962d1fc9f361b63ea07c0ce715a8ef1f9e82d3dfb8e67e0416715", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "01ce56f188b9dc28780a52783d6529ad2bc7124f9744e571e1ee4ea88bf08734"}, "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},