mirror of
https://github.com/ClaperCo/Claper.git
synced 2025-12-16 11:57:58 +01:00
chore: change gettext backend syntax
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
defmodule Claper.Embeds.Embed do
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
id: integer(),
|
||||
|
||||
@@ -2,7 +2,7 @@ defmodule Claper.Quizzes.QuizQuestion do
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
schema "quiz_questions" do
|
||||
field :content, :string
|
||||
|
||||
@@ -24,7 +24,7 @@ defmodule ClaperWeb do
|
||||
use Phoenix.Controller, namespace: ClaperWeb
|
||||
|
||||
import Plug.Conn
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
unquote(verified_routes())
|
||||
end
|
||||
@@ -87,7 +87,7 @@ defmodule ClaperWeb do
|
||||
quote do
|
||||
use Phoenix.Channel
|
||||
import Phoenix.View
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
end
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ defmodule ClaperWeb do
|
||||
import Phoenix.View
|
||||
|
||||
import ClaperWeb.ErrorHelpers
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
unquote(verified_routes())
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ defmodule ClaperWeb.Gettext do
|
||||
By using [Gettext](https://hexdocs.pm/gettext),
|
||||
your module gains a set of macros for translations, for example:
|
||||
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
# Simple translation
|
||||
gettext("Here is the string to translate")
|
||||
@@ -20,5 +20,5 @@ defmodule ClaperWeb.Gettext do
|
||||
|
||||
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
||||
"""
|
||||
use Gettext, otp_app: :claper
|
||||
use Gettext.Backend, otp_app: :claper
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defmodule ClaperWeb.Notifiers.LeaderNotifier do
|
||||
use Phoenix.Swoosh, view: ClaperWeb.LeaderNotifierView, layout: {ClaperWeb.LayoutView, :email}
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
def event_invitation(event_name, email, url) do
|
||||
new()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defmodule ClaperWeb.Notifiers.UserNotifier do
|
||||
use Phoenix.Swoosh, view: ClaperWeb.UserNotifierView, layout: {ClaperWeb.LayoutView, :email}
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
|
||||
def magic(email, url) do
|
||||
new()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
defmodule ClaperWeb.LeaderNotifierView do
|
||||
use Phoenix.View, root: "lib/claper_web/templates"
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
use PhoenixHTMLHelpers
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defmodule ClaperWeb.UserNotifierView do
|
||||
use Phoenix.View, root: "lib/claper_web/templates"
|
||||
import ClaperWeb.Gettext
|
||||
use Gettext, backend: ClaperWeb.Gettext
|
||||
import Phoenix.HTML
|
||||
use PhoenixHTMLHelpers
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user