improve ammo group wording
This commit is contained in:
@ -85,7 +85,7 @@ defmodule CanneryWeb.AmmoGroupLive.FormComponent do
|
||||
socket =
|
||||
case Ammo.update_ammo_group(ammo_group, ammo_group_params, current_user) do
|
||||
{:ok, _ammo_group} ->
|
||||
prompt = dgettext("prompts", "Ammo group updated successfully")
|
||||
prompt = dgettext("prompts", "Ammo updated successfully")
|
||||
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
|
||||
|
||||
{:error, %Changeset{} = changeset} ->
|
||||
@ -146,8 +146,8 @@ defmodule CanneryWeb.AmmoGroupLive.FormComponent do
|
||||
prompt =
|
||||
dngettext(
|
||||
"prompts",
|
||||
"Ammo group created successfully",
|
||||
"Ammo groups created successfully",
|
||||
"Ammo added successfully",
|
||||
"Ammo added successfully",
|
||||
count
|
||||
)
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= live_patch(dgettext("actions", "New Ammo group"),
|
||||
<%= live_patch(dgettext("actions", "Add Ammo"),
|
||||
to: Routes.ammo_group_index_path(Endpoint, :new),
|
||||
class: "btn btn-primary"
|
||||
) %>
|
||||
|
@ -35,9 +35,9 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
||||
|
||||
defp page_title(:add_shot_group), do: gettext("Record Shots")
|
||||
defp page_title(:edit_shot_group), do: gettext("Edit Shot Records")
|
||||
defp page_title(:move), do: gettext("Move Ammo group")
|
||||
defp page_title(:show), do: gettext("Show Ammo group")
|
||||
defp page_title(:edit), do: gettext("Edit Ammo group")
|
||||
defp page_title(:move), do: gettext("Move Ammo")
|
||||
defp page_title(:show), do: gettext("Show Ammo")
|
||||
defp page_title(:edit), do: gettext("Edit Ammo")
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
@ -47,7 +47,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show do
|
||||
) do
|
||||
ammo_group |> Ammo.delete_ammo_group!(current_user)
|
||||
|
||||
prompt = dgettext("prompts", "Ammo group deleted succesfully")
|
||||
prompt = dgettext("prompts", "Ammo deleted succesfully")
|
||||
redirect_to = Routes.ammo_group_index_path(socket, :index)
|
||||
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> push_redirect(to: redirect_to)}
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
<.container_card container={@ammo_group.container} />
|
||||
<% else %>
|
||||
<%= gettext("This ammo group is not in a container") %>
|
||||
<%= gettext("This ammo is not in a container") %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
||||
<div>
|
||||
<%= if @container.ammo_groups |> Enum.empty?() do %>
|
||||
<h2 class="mx-8 my-4 title text-lg text-primary-600">
|
||||
<%= gettext("No ammo groups in this container") %>
|
||||
<%= gettext("No ammo in this container") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
|
@ -65,7 +65,7 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
{:ok, _ammo_group} =
|
||||
ammo_group |> Ammo.update_ammo_group(%{"staged" => !ammo_group.staged}, current_user)
|
||||
|
||||
prompt = dgettext("prompts", "Ammo group unstaged succesfully")
|
||||
prompt = dgettext("prompts", "Ammo unstaged succesfully")
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user