- Count
+ <%= gettext("Count") %>
|
- Price paid
+ <%= gettext("Price paid") %>
|
- Notes
+ <%= gettext("Notes") %>
|
|
@@ -53,7 +53,9 @@
- <%= live_redirect("View", to: Routes.ammo_group_show_path(@socket, :show, ammo_group)) %>
+ <%= live_redirect(dgettext("actions", "View"),
+ to: Routes.ammo_group_show_path(@socket, :show, ammo_group)
+ ) %>
<%= live_patch to: Routes.ammo_group_index_path(@socket, :edit, ammo_group),
class: "text-primary-500 link" do %>
@@ -64,7 +66,7 @@
class: "text-primary-500 link",
phx_click: "delete",
phx_value_id: ammo_group.id,
- data: [confirm: "Are you sure you want to delete this ammo?"] do %>
+ data: [confirm: dgettext("prompts", "Are you sure you want to delete this ammo?")] do %>
<% end %>
|
diff --git a/lib/cannery_web/live/ammo_group_live/show.ex b/lib/cannery_web/live/ammo_group_live/show.ex
index 49dbc2a3..211f8177 100644
--- a/lib/cannery_web/live/ammo_group_live/show.ex
+++ b/lib/cannery_web/live/ammo_group_live/show.ex
@@ -32,6 +32,6 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
{:noreply, socket |> push_redirect(to: Routes.ammo_group_index_path(socket, :index))}
end
- defp page_title(:show), do: "Show Ammo group"
- defp page_title(:edit), do: "Edit Ammo group"
+ defp page_title(:show), do: gettext("Show Ammo group")
+ defp page_title(:edit), do: gettext("Edit Ammo group")
end
diff --git a/lib/cannery_web/live/ammo_group_live/show.html.heex b/lib/cannery_web/live/ammo_group_live/show.html.heex
index ac94c563..5d5f6654 100644
--- a/lib/cannery_web/live/ammo_group_live/show.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/show.html.heex
@@ -5,18 +5,20 @@
- Count: <%= @ammo_group.count %>
+ <%= gettext("Count:") %>
+ <%= @ammo_group.count %>
<%= if @ammo_group.notes do %>
- Notes: <%= @ammo_group.notes %>
+ <%= gettext("Notes:") %>
+ <%= @ammo_group.notes %>
<% end %>
<%= if @ammo_group.price_paid do %>
- Price paid: $ <%= @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2) %>
+ <%= gettext("Price paid:") %> $ <%= @ammo_group.price_paid |> :erlang.float_to_binary(decimals: 2) %>
<% end %>
@@ -30,7 +32,7 @@
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
- data: [confirm: "Are you sure you want to delete this ammo?"] do %>
+ data: [confirm: dgettext("prompts", "Are you sure you want to delete this ammo?")] do %>
<% end %>
@@ -40,12 +42,12 @@
<%= if @ammo_group.container do %>
- Stored in
+ <%= gettext("Stored in") %>
<.container_card container={@ammo_group.container} />
<% else %>
- This ammo group is not in a container
+ <%= gettext("This ammo group is not in a container") %>
<% end %>
diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot
index fff30503..6174ed3b 100644
--- a/priv/gettext/actions.pot
+++ b/priv/gettext/actions.pot
@@ -74,3 +74,28 @@ msgstr ""
#: lib/cannery_web/templates/user_reset_password/new.html.heex:16
msgid "Send instructions to reset password"
msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.ex:29
+msgid "Add Ammo"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:11
+msgid "Add your first box!"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:16
+msgid "New Ammo group"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/form_component.ex:90
+msgid "Save"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:56
+msgid "View"
+msgstr ""
diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot
index 2574858a..332ef1c4 100644
--- a/priv/gettext/default.pot
+++ b/priv/gettext/default.pot
@@ -109,3 +109,72 @@ msgstr ""
#: lib/cannery_web/templates/user_settings/edit.html.heex:3
msgid "Settings"
msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:26
+msgid "Count"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/ammo_group_card.ex:28
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:8
+msgid "Count:"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.ex:23
+#: lib/cannery_web/live/ammo_group_live/show.ex:36
+msgid "Edit Ammo group"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
+msgid "Listing Ammo"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.ex:35
+msgid "Listing Ammo groups"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
+msgid "No Ammo"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:32
+msgid "Notes"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/ammo_group_card.ex:34
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:14
+msgid "Notes:"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:29
+msgid "Price paid"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/ammo_group_card.ex:41
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
+msgid "Price paid:"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/show.ex:35
+msgid "Show Ammo group"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:45
+msgid "Stored in"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:50
+msgid "This ammo group is not in a container"
+msgstr ""
diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot
index 3e0d3fd9..808fe1cb 100644
--- a/priv/gettext/prompts.pot
+++ b/priv/gettext/prompts.pot
@@ -75,3 +75,24 @@ msgstr ""
#: lib/cannery_web/controllers/user_settings_controller.ex:78
msgid "Your account has been deleted"
msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/form_component.ex:132
+msgid "Ammo group created successfully"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/form_component.ex:119
+msgid "Ammo group updated successfully"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/index.html.heex:69
+#: lib/cannery_web/live/ammo_group_live/show.html.heex:35
+msgid "Are you sure you want to delete this ammo?"
+msgstr ""
+
+#, elixir-format, ex-autogen
+#: lib/cannery_web/live/ammo_group_live/form_component.ex:91
+msgid "Saving..."
+msgstr ""