diff --git a/apps/block_scout_web/lib/block_scout_web.ex b/apps/block_scout_web/lib/block_scout_web.ex index 7cdc6b3633..1ce9cca0e7 100644 --- a/apps/block_scout_web/lib/block_scout_web.ex +++ b/apps/block_scout_web/lib/block_scout_web.ex @@ -25,7 +25,7 @@ defmodule BlockScoutWeb do import BlockScoutWeb.Controller import BlockScoutWeb.Router.Helpers import BlockScoutWeb.Routers.WebRouter.Helpers, except: [static_path: 2] - import BlockScoutWeb.Gettext + use Gettext, backend: BlockScoutWeb.Gettext import BlockScoutWeb.ErrorHelper import BlockScoutWeb.Routers.AccountRouter.Helpers, except: [static_path: 2] import Plug.Conn @@ -49,7 +49,6 @@ defmodule BlockScoutWeb do import BlockScoutWeb.{ CurrencyHelper, ErrorHelper, - Gettext, Router.Helpers, TabHelper, Tokens.Helper, @@ -57,6 +56,8 @@ defmodule BlockScoutWeb do WeiHelper } + use Gettext, backend: BlockScoutWeb.Gettext + import BlockScoutWeb.Routers.AccountRouter.Helpers, except: [static_path: 2] import Explorer.Chain.CurrencyHelper, only: [divide_decimals: 2] @@ -78,7 +79,7 @@ defmodule BlockScoutWeb do quote do use Phoenix.Channel - import BlockScoutWeb.Gettext + use Gettext, backend: BlockScoutWeb.Gettext end end diff --git a/apps/block_scout_web/lib/block_scout_web/gettext.ex b/apps/block_scout_web/lib/block_scout_web/gettext.ex index 3d54e804bf..bb3588f5f6 100644 --- a/apps/block_scout_web/lib/block_scout_web/gettext.ex +++ b/apps/block_scout_web/lib/block_scout_web/gettext.ex @@ -20,5 +20,5 @@ defmodule BlockScoutWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext, otp_app: :block_scout_web + use Gettext.Backend, otp_app: :block_scout_web end diff --git a/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex index aef7f4124d..025f2782d5 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/block_transaction_view.ex @@ -1,7 +1,7 @@ defmodule BlockScoutWeb.BlockTransactionView do use BlockScoutWeb, :view - import BlockScoutWeb.Gettext, only: [gettext: 1] + use Gettext, backend: BlockScoutWeb.Gettext def block_not_found_message({:ok, true}) do gettext("Easy Cowboy! This block does not exist yet!") diff --git a/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex index 191be34d7d..3d4cafd9f3 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/internal_transaction_view.ex @@ -3,7 +3,7 @@ defmodule BlockScoutWeb.InternalTransactionView do alias Explorer.Chain.InternalTransaction - import BlockScoutWeb.Gettext + use Gettext, backend: BlockScoutWeb.Gettext @doc """ Returns the formatted string for the type of the internal transaction. diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 64eafbccde..07e6f73967 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -11,7 +11,7 @@ defmodule BlockScoutWeb.TransactionView do alias Explorer.ExchangeRates.Token alias Timex.Duration - import BlockScoutWeb.Gettext + use Gettext, backend: BlockScoutWeb.Gettext import BlockScoutWeb.AddressView, only: [from_address_hash: 1, short_token_id: 2, tag_name_to_label: 1] import BlockScoutWeb.Tokens.Helper diff --git a/apps/block_scout_web/lib/block_scout_web/views/wei_helper.ex b/apps/block_scout_web/lib/block_scout_web/views/wei_helper.ex index 72c1c1ee1f..188303e0c9 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/wei_helper.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/wei_helper.ex @@ -3,7 +3,7 @@ defmodule BlockScoutWeb.WeiHelper do Helper functions for interacting with `t:Explorer.Chain.Wei.t/0` values. """ - import BlockScoutWeb.Gettext + use Gettext, backend: BlockScoutWeb.Gettext alias BlockScoutWeb.CldrHelper alias Explorer.Chain.Wei