Skip to content

Commit 1dd543d

Browse files
committed
fix gettext
1 parent 4c6b05a commit 1dd543d

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

lib/chuko_web.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule ChukoWeb do
4444
layouts: [html: ChukoWeb.Layouts]
4545

4646
import Plug.Conn
47-
import ChukoWeb.Gettext
47+
use Gettext, backend: ChukoWeb.Gettext
4848

4949
unquote(verified_routes())
5050
end
@@ -86,7 +86,7 @@ defmodule ChukoWeb do
8686
import Phoenix.HTML
8787
# Core UI components and translation
8888
import ChukoWeb.CoreComponents
89-
import ChukoWeb.Gettext
89+
use Gettext, backend: ChukoWeb.Gettext
9090

9191
# Shortcut for generating JS commands
9292
alias Phoenix.LiveView.JS

lib/chuko_web/components/core_components.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule ChukoWeb.CoreComponents do
1212
use Phoenix.Component
1313

1414
alias Phoenix.LiveView.JS
15-
use Gettext, backend: Chuko.Gettext
15+
use Gettext, backend: ChukoWeb.Gettext
1616

1717
@doc """
1818
Renders a modal.

lib/chuko_web/gettext.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule ChukoWeb.Gettext do
55
By using [Gettext](https://hexdocs.pm/gettext),
66
your module gains a set of macros for translations, for example:
77
8-
import ChukoWeb.Gettext
8+
use Gettext, backend: ChukoWeb.Gettext
99
1010
# Simple translation
1111
gettext("Here is the string to translate")

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ defmodule Chuko.MixProject do
4848
{:finch, "~> 0.13"},
4949
{:telemetry_metrics, "~> 0.6"},
5050
{:telemetry_poller, "~> 1.0"},
51-
{:gettext, "~> 0.20"},
51+
{:gettext, "~> 0.26"},
5252
{:jason, "~> 1.2"},
5353
{:plug_cowboy, "~> 2.5"},
5454
{:req, "~> 0.3.0"}

0 commit comments

Comments
 (0)