Skip to content

Commit

Permalink
Change how web_module is displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
shahryarjb committed Sep 28, 2024
1 parent 66458b6 commit 5ab7452
Show file tree
Hide file tree
Showing 26 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion priv/templates/components/alert.eex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule <%= @module %> do
flexibility in rendering custom content within alerts.
"""
use Phoenix.Component
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext
alias Phoenix.LiveView.JS

@sizes ["extra_small", "small", "medium", "large", "extra_large"]
Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/banner.eex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule <%= @module %> do

use Phoenix.Component
alias Phoenix.LiveView.JS
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext

@sizes ["extra_small", "small", "medium", "large", "extra_large"]
@colors [
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/chekbox_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end
end
4 changes: 2 additions & 2 deletions priv/templates/components/color_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/date_time_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -978,9 +978,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/drawer.eex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule <%= @module %> do
"""
use Phoenix.Component
alias Phoenix.LiveView.JS
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext

@colors [
"white",
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/email_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
8 changes: 4 additions & 4 deletions priv/templates/components/file_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ defmodule <%= @module %> do
"""

use Phoenix.Component
import <%= @web_module %>.Components.Progress, only: [progress: 1]
import <%= @web_module %>.Components.Spinner, only: [spinner: 1]
import <%= inspect(@web_module) %>.Components.Progress, only: [progress: 1]
import <%= inspect(@web_module) %>.Components.Spinner, only: [spinner: 1]

@variants ["default", "outline", "unbordered", "shadow"]

Expand Down Expand Up @@ -916,9 +916,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/input_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/menu.eex
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ defmodule <%= @module %> do
control the layout and appearance of the menu.
"""
use Phoenix.Component
import <%= @web_module %>.Components.Accordion, only: [accordion: 1]
import <%= @web_module %>.Components.Button, only: [button_link: 1]
import <%= inspect(@web_module) %>.Components.Accordion, only: [accordion: 1]
import <%= inspect(@web_module) %>.Components.Button, only: [button_link: 1]

@doc """
Renders a customizable `menu` component that can include menu items as a list of maps or use
Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/modal.eex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule <%= @module %> do
"""

use Phoenix.Component
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext
alias Phoenix.LiveView.JS

@sizes [
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/native_select.eex
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/number_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/password_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @module %>.Gettext, "errors", msg, opts)
end
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/radio_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/range_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/search_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/sidebar.eex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule <%= @module %> do
for a cohesive and interactive application experience.
"""
use Phoenix.Component
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext
alias Phoenix.LiveView.JS

@colors [
Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/speed_dial.eex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule <%= @module %> do
"""

use Phoenix.Component
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext
alias Phoenix.LiveView.JS

@variants ["default", "unbordered", "shadow"]
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/tel_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/text_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/textarea_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/toast.eex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule <%= @module %> do
"""
use Phoenix.Component
alias Phoenix.LiveView.JS
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext

@colors [
"white",
Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/toggle_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
4 changes: 2 additions & 2 deletions priv/templates/components/url_field.eex
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,9 @@ defmodule <%= @module %> do
# with our gettext backend as first argument. Translations are
# available in the errors.po file (as we use the "errors" domain).
if count = opts[:count] do
Gettext.dngettext(<%= @web_module %>.Gettext, "errors", msg, msg, count, opts)
Gettext.dngettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, msg, count, opts)
else
Gettext.dgettext(<%= @web_module %>.Gettext, "errors", msg, opts)
Gettext.dgettext(<%= inspect(@web_module) %>.Gettext, "errors", msg, opts)
end
end

Expand Down
2 changes: 1 addition & 1 deletion priv/templates/components/video.eex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule <%= @module %> do
Phoenix applications while maintaining flexibility in design and functionality.
"""
use Phoenix.Component
import <%= @web_module %>.Gettext
import <%= inspect(@web_module) %>.Gettext

@colors [
"white",
Expand Down

0 comments on commit 5ab7452

Please sign in to comment.