Skip to content

Commit

Permalink
fix gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
okkdev committed Nov 19, 2024
1 parent 4c6b05a commit 1dd543d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/chuko_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule ChukoWeb do
layouts: [html: ChukoWeb.Layouts]

import Plug.Conn
import ChukoWeb.Gettext
use Gettext, backend: ChukoWeb.Gettext

unquote(verified_routes())
end
Expand Down Expand Up @@ -86,7 +86,7 @@ defmodule ChukoWeb do
import Phoenix.HTML
# Core UI components and translation
import ChukoWeb.CoreComponents
import ChukoWeb.Gettext
use Gettext, backend: ChukoWeb.Gettext

# Shortcut for generating JS commands
alias Phoenix.LiveView.JS
Expand Down
2 changes: 1 addition & 1 deletion lib/chuko_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule ChukoWeb.CoreComponents do
use Phoenix.Component

alias Phoenix.LiveView.JS
use Gettext, backend: Chuko.Gettext
use Gettext, backend: ChukoWeb.Gettext

@doc """
Renders a modal.
Expand Down
2 changes: 1 addition & 1 deletion lib/chuko_web/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule ChukoWeb.Gettext do
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import ChukoWeb.Gettext
use Gettext, backend: ChukoWeb.Gettext
# Simple translation
gettext("Here is the string to translate")
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule Chuko.MixProject do
{:finch, "~> 0.13"},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_poller, "~> 1.0"},
{:gettext, "~> 0.20"},
{:gettext, "~> 0.26"},
{:jason, "~> 1.2"},
{:plug_cowboy, "~> 2.5"},
{:req, "~> 0.3.0"}
Expand Down
Loading

0 comments on commit 1dd543d

Please sign in to comment.