forked from shibao/cannery
		
	improve some wording
This commit is contained in:
		@@ -74,7 +74,7 @@ defmodule Cannery.ActivityLog.ShotGroup do
 | 
			
		||||
    |> cast(attrs, [:count, :notes, :date])
 | 
			
		||||
    |> validate_number(:count, greater_than: 0)
 | 
			
		||||
    |> validate_required([:count, :ammo_group_id, :user_id])
 | 
			
		||||
    |> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo group"))
 | 
			
		||||
    |> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo pack"))
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  defp validate_create_shot_group_count(changeset, %AmmoGroup{count: ammo_group_count}) do
 | 
			
		||||
 
 | 
			
		||||
@@ -29,13 +29,13 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
 | 
			
		||||
 | 
			
		||||
  defp apply_action(%{assigns: %{current_user: current_user}} = socket, :move, %{"id" => id}) do
 | 
			
		||||
    socket
 | 
			
		||||
    |> assign(:page_title, gettext("Move Ammo group"))
 | 
			
		||||
    |> assign(:page_title, gettext("Move ammo"))
 | 
			
		||||
    |> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
 | 
			
		||||
    socket
 | 
			
		||||
    |> assign(:page_title, gettext("Edit Ammo group"))
 | 
			
		||||
    |> assign(:page_title, gettext("Edit ammo"))
 | 
			
		||||
    |> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@@ -53,7 +53,7 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
 | 
			
		||||
 | 
			
		||||
  defp apply_action(socket, :index, _params) do
 | 
			
		||||
    socket
 | 
			
		||||
    |> assign(:page_title, gettext("Ammo groups"))
 | 
			
		||||
    |> assign(:page_title, gettext("Ammo"))
 | 
			
		||||
    |> assign(:ammo_group, nil)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@@ -61,7 +61,7 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
 | 
			
		||||
  def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
 | 
			
		||||
    Ammo.get_ammo_group!(id, current_user) |> Ammo.delete_ammo_group!(current_user)
 | 
			
		||||
 | 
			
		||||
    prompt = dgettext("prompts", "Ammo group deleted succesfully")
 | 
			
		||||
    prompt = dgettext("prompts", "Ammo deleted succesfully")
 | 
			
		||||
 | 
			
		||||
    {:noreply, socket |> put_flash(:info, prompt) |> display_ammo_groups()}
 | 
			
		||||
  end
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
 | 
			
		||||
  <%= if @rows |> Enum.empty?() do %>
 | 
			
		||||
    <h2 class="title text-xl text-primary-600">
 | 
			
		||||
      <%= gettext("No Ammo Types") %>
 | 
			
		||||
      <%= gettext("No Ammo types") %>
 | 
			
		||||
      <%= display_emoji("😔") %>
 | 
			
		||||
    </h2>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :notes, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :date, gettext("Date (UTC)"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= label(f, :date, gettext("Date"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= date_input(f, :date, class: "input input-primary col-span-2") %>
 | 
			
		||||
    <%= error_tag(f, :notes, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user