From 3d54c998fd23492ef0bc90da852be3f35a339036 Mon Sep 17 00:00:00 2001 From: Vladimir Rubin Date: Wed, 27 Nov 2024 17:49:40 +0200 Subject: [PATCH] Revert "fix something" This reverts commit aa2ad6b42c6d576a642d30f67a8fea66ef2ed2dd. --- lib/exmr_web.ex | 4 ++-- lib/exmr_web/components/core_components.ex | 2 +- lib/exmr_web/gettext.ex | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/exmr_web.ex b/lib/exmr_web.ex index d8fae0b..f53aa76 100644 --- a/lib/exmr_web.ex +++ b/lib/exmr_web.ex @@ -43,7 +43,7 @@ defmodule ExmrWeb do layouts: [html: ExmrWeb.Layouts] import Plug.Conn - use Gettext, backend: MyApp.Gettext + import ExmrWeb.Gettext unquote(verified_routes()) end @@ -85,7 +85,7 @@ defmodule ExmrWeb do import Phoenix.HTML # Core UI components and translation import ExmrWeb.CoreComponents - use Gettext, backend: MyApp.Gettext + import ExmrWeb.Gettext # Shortcut for generating JS commands alias Phoenix.LiveView.JS diff --git a/lib/exmr_web/components/core_components.ex b/lib/exmr_web/components/core_components.ex index 948b822..41b66fd 100644 --- a/lib/exmr_web/components/core_components.ex +++ b/lib/exmr_web/components/core_components.ex @@ -17,7 +17,7 @@ defmodule ExmrWeb.CoreComponents do use Phoenix.Component alias Phoenix.LiveView.JS - use Gettext, backend: MyApp.Gettext + import ExmrWeb.Gettext @doc """ Renders a modal. diff --git a/lib/exmr_web/gettext.ex b/lib/exmr_web/gettext.ex index 92aade1..6e21286 100644 --- a/lib/exmr_web/gettext.ex +++ b/lib/exmr_web/gettext.ex @@ -5,7 +5,7 @@ defmodule ExmrWeb.Gettext do By using [Gettext](https://hexdocs.pm/gettext), your module gains a set of macros for translations, for example: - use Gettext, backend: MyApp.Gettext + import ExmrWeb.Gettext # Simple translation gettext("Here is the string to translate") @@ -20,5 +20,5 @@ defmodule ExmrWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext.Backend, otp_app: :exmr + use Gettext, otp_app: :exmr end