Skip to content

Commit

Permalink
Update Gettext to v0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Aug 20, 2024
1 parent 463e96c commit d773a61
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/ash_admin/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ defmodule AshAdmin.CoreComponents do
Icons are provided by [heroicons](https://heroicons.com). See `icon/1` for usage.
"""
use Phoenix.Component
use Gettext, backend: AshAdmin.Gettext

alias Phoenix.LiveView.JS
import AshAdmin.Gettext

@doc """
Renders a modal.
Expand Down
4 changes: 2 additions & 2 deletions lib/ash_admin/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule AshAdmin.Gettext do
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import AshAdmin.Gettext
use Gettext, backend: AshAdmin.Gettext
# Simple translation
gettext("Here is the string to translate")
Expand All @@ -20,5 +20,5 @@ defmodule AshAdmin.Gettext do
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :ash_admin
use Gettext.Backend, otp_app: :ash_admin
end
3 changes: 2 additions & 1 deletion lib/ash_admin/web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ defmodule AshAdmin.Web do

defp html_helpers do
quote do
use Gettext, backend: AshAdmin.Gettext

# HTML escaping functionality
import Phoenix.HTML
# Core UI components and translation
import AshAdmin.CoreComponents
import AshAdmin.Gettext

# Shortcut for generating JS commands
alias Phoenix.LiveView.JS
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ defmodule AshAdmin.MixProject do
{:phoenix_live_view, "~> 0.20"},
{:phoenix_html, "~> 4.0"},
{:jason, "~> 1.0"},
{:gettext, "~> 0.20"},
{:gettext, "~> 0.26"},
# Dev dependencies
{:simple_sat, "~> 0.1", only: [:dev, :test]},
{:esbuild, "~> 0.7", only: [:dev, :test]},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"expo": {:hex, :expo, "1.0.0", "647639267e088717232f4d4451526e7a9de31a3402af7fcbda09b27e9a10395a", [:mix], [], "hexpm", "18d2093d344d97678e8a331ca0391e85d29816f9664a25653fd7e6166827827c"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"floki": {:hex, :floki, "0.36.2", "a7da0193538c93f937714a6704369711998a51a6164a222d710ebd54020aa7a3", [:mix], [], "hexpm", "a8766c0bc92f074e5cb36c4f9961982eda84c5d2b8e979ca67f5c268ec8ed580"},
"gettext": {:hex, :gettext, "0.25.0", "98a95a862a94e2d55d24520dd79256a15c87ea75b49673a2e2f206e6ebc42e5d", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "38e5d754e66af37980a94fb93bb20dcde1d2361f664b0a19f01e87296634051f"},
"gettext": {:hex, :gettext, "0.26.1", "38e14ea5dcf962d1fc9f361b63ea07c0ce715a8ef1f9e82d3dfb8e67e0416715", [:mix], [{:expo, "~> 0.5.1 or ~> 1.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "01ce56f188b9dc28780a52783d6529ad2bc7124f9744e571e1ee4ea88bf08734"},
"git_cli": {:hex, :git_cli, "0.3.0", "a5422f9b95c99483385b976f5d43f7e8233283a47cda13533d7c16131cb14df5", [:mix], [], "hexpm", "78cb952f4c86a41f4d3511f1d3ecb28edb268e3a7df278de2faa1bd4672eaf9b"},
"git_ops": {:hex, :git_ops, "2.6.1", "cc7799a68c26cf814d6d1a5121415b4f5bf813de200908f930b27a2f1fe9dad5", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "ce62d07e41fe993ec22c35d5edb11cf333a21ddaead6f5d9868fcb607d42039e"},
"glob_ex": {:hex, :glob_ex, "0.1.8", "f7ef872877ca2ae7a792ab1f9ff73d9c16bf46ecb028603a8a3c5283016adc07", [:mix], [], "hexpm", "9e39d01729419a60a937c9260a43981440c43aa4cadd1fa6672fecd58241c464"},
Expand Down

0 comments on commit d773a61

Please sign in to comment.