Skip to content

Commit

Permalink
[infra] remove gettext + fix mix lock and mime
Browse files Browse the repository at this point in the history
  • Loading branch information
patatoid committed Sep 19, 2024
1 parent 39b5b2d commit 20618da
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 99 deletions.
3 changes: 0 additions & 3 deletions apps/boruta_admin/lib/boruta_admin_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ defmodule BorutaAdminWeb do
use Phoenix.Controller, namespace: BorutaAdminWeb

import Plug.Conn
import BorutaAdminWeb.Gettext
alias BorutaAdminWeb.Router.Helpers, as: Routes
end
end
Expand Down Expand Up @@ -54,7 +53,6 @@ defmodule BorutaAdminWeb do
def channel do
quote do
use Phoenix.Channel, log_join: false
import BorutaAdminWeb.Gettext
end
end

Expand All @@ -67,7 +65,6 @@ defmodule BorutaAdminWeb do
import Phoenix.View

import BorutaAdminWeb.ErrorHelpers
import BorutaAdminWeb.Gettext
alias BorutaAdminWeb.Router.Helpers, as: Routes
end
end
Expand Down
24 changes: 0 additions & 24 deletions apps/boruta_admin/lib/boruta_admin_web/gettext.ex

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ defmodule BorutaAdminWeb.ErrorHelpers do
Translates an error message using gettext.
"""
def translate_error({msg, opts}) do
if count = opts[:count] do
Gettext.dngettext(BorutaAdminWeb.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(BorutaAdminWeb.Gettext, "errors", msg, opts)
end
msg
end
end
1 change: 0 additions & 1 deletion apps/boruta_admin/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ defmodule BorutaAdmin.MixProject do
{:ecto_sql, "~> 3.4"},
{:ex_machina, "~> 2.4", only: :test},
{:finch, "~> 0.8"},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:phoenix, "~> 1.6.0", override: true},
{:phoenix_ecto, "~> 4.1"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defmodule BorutaAuth.Repo.Migrations.RelyingPartyRedirectUri do
use Ecto.Migration

use Boruta.Migrations.RelyingPartyRedirectUri
end
3 changes: 0 additions & 3 deletions apps/boruta_identity/lib/boruta_identity_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ defmodule BorutaIdentityWeb do
use Phoenix.Controller, namespace: BorutaIdentityWeb

import Plug.Conn
import BorutaIdentityWeb.Gettext
alias BorutaIdentityWeb.Router.Helpers, as: Routes
end
end
Expand Down Expand Up @@ -54,7 +53,6 @@ defmodule BorutaIdentityWeb do
def channel do
quote do
use Phoenix.Channel
import BorutaIdentityWeb.Gettext
end
end

Expand All @@ -67,7 +65,6 @@ defmodule BorutaIdentityWeb do
import Phoenix.View

import BorutaIdentityWeb.ErrorHelpers
import BorutaIdentityWeb.Gettext
alias BorutaIdentityWeb.Router.Helpers, as: Routes
end
end
Expand Down
24 changes: 0 additions & 24 deletions apps/boruta_identity/lib/boruta_identity_web/gettext.ex

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ defmodule BorutaIdentityWeb.ErrorHelpers do
# Note we use the "errors" domain, which means translations
# should be written to the errors.po file. The :count option is
# set by Ecto and indicates we should also apply plural rules.
if count = opts[:count] do
Gettext.dngettext(BorutaIdentityWeb.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(BorutaIdentityWeb.Gettext, "errors", msg, opts)
end
msg
end
end
1 change: 0 additions & 1 deletion apps/boruta_identity/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ defmodule BorutaIdentity.MixProject do
{:ex_machina, "~> 2.4", only: :test},
{:finch, "~> 0.8"},
{:gen_smtp, "~> 1.1"},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:mox, "~> 1.0"},
{:mustachex, git: "https://github.com/jui/mustachex.git"},
Expand Down
1 change: 1 addition & 0 deletions apps/boruta_web/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config :boruta_web, BorutaWeb.Endpoint,
pubsub_server: BorutaWeb.PubSub

config :mime, :types, %{
"text/event-stream" => ["event-stream"],
"application/jwt" => ["jwt"]
}

Expand Down
3 changes: 0 additions & 3 deletions apps/boruta_web/lib/boruta_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ defmodule BorutaWeb do
quote do
use Phoenix.Controller, namespace: BorutaWeb
import Plug.Conn
import BorutaWeb.Gettext
alias BorutaWeb.Router.Helpers, as: Routes
end
end
Expand All @@ -39,7 +38,6 @@ defmodule BorutaWeb do
use Phoenix.HTML

import BorutaWeb.ErrorHelpers
import BorutaWeb.Gettext
alias BorutaWeb.Router.Helpers, as: Routes
end
end
Expand All @@ -55,7 +53,6 @@ defmodule BorutaWeb do
def channel do
quote do
use Phoenix.Channel
import BorutaWeb.Gettext
end
end

Expand Down
24 changes: 0 additions & 24 deletions apps/boruta_web/lib/boruta_web/gettext.ex

This file was deleted.

6 changes: 1 addition & 5 deletions apps/boruta_web/lib/boruta_web/views/error_helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ defmodule BorutaWeb.ErrorHelpers do
# Note we use the "errors" domain, which means translations
# should be written to the errors.po file. The :count option is
# set by Ecto and indicates we should also apply plural rules.
if count = opts[:count] do
Gettext.dngettext(BorutaWeb.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(BorutaWeb.Gettext, "errors", msg, opts)
end
msg
end
end
1 change: 0 additions & 1 deletion apps/boruta_web/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ defmodule BorutaWeb.MixProject do
{:cors_plug, "~> 3.0"},
{:ex_machina, "~> 2.4", only: :test},
{:finch, "~> 0.8"},
{:gettext, "~> 0.11"},
{:hammer, "~> 6.1"},
{:jason, "~> 1.0"},
{:joken, "~> 2.3"},
Expand Down

0 comments on commit 20618da

Please sign in to comment.