Address gettext deprecations
Deprecation warning: warning: defining a Gettext backend by calling use Gettext, otp_app: ... is deprecated. To define a backend, call: use Gettext.Backend, otp_app: :my_app Then, instead of importing your backend, call this in your module: use Gettext, backend: MyApp.Gettext
This commit is contained in:
@@ -42,8 +42,9 @@ defmodule MusicLibraryWeb do
|
|||||||
formats: [:html, :json],
|
formats: [:html, :json],
|
||||||
layouts: [html: MusicLibraryWeb.Layouts]
|
layouts: [html: MusicLibraryWeb.Layouts]
|
||||||
|
|
||||||
|
use Gettext, backend: MusicLibraryWeb.Gettext
|
||||||
|
|
||||||
import Plug.Conn
|
import Plug.Conn
|
||||||
import MusicLibraryWeb.Gettext
|
|
||||||
|
|
||||||
unquote(verified_routes())
|
unquote(verified_routes())
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ defmodule MusicLibraryWeb.CoreComponents do
|
|||||||
use Phoenix.Component
|
use Phoenix.Component
|
||||||
|
|
||||||
alias Phoenix.LiveView.JS
|
alias Phoenix.LiveView.JS
|
||||||
import MusicLibraryWeb.Gettext
|
use Gettext, backend: MusicLibraryWeb.Gettext
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Renders a modal.
|
Renders a modal.
|
||||||
|
|||||||
@@ -20,5 +20,5 @@ defmodule MusicLibraryWeb.Gettext do
|
|||||||
|
|
||||||
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
||||||
"""
|
"""
|
||||||
use Gettext, otp_app: :music_library
|
use Gettext.Backend, otp_app: :music_library
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user