Compare commits

...

11 Commits

Author SHA1 Message Date
9835fe3f5e bump version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 22:32:53 -04:00
4dee8808f3 improve migrations 2023-03-30 22:24:29 -04:00
65c70ca398 fix name collisions 2023-03-30 22:23:54 -04:00
550f6a6420 add migration for ammo type table and column 2023-03-30 22:02:44 -04:00
88c3f15fc8 rename ammo type files to type 2023-03-30 22:02:36 -04:00
c33f15603b rename ammo type to type 2023-03-30 22:02:36 -04:00
98775359af rename shot groups to shot records in database 2023-03-30 21:39:08 -04:00
e0e7b25bc4 add more text replacements 2023-03-30 21:38:56 -04:00
bdddf65685 remove unnecessary index churn 2023-03-30 21:38:09 -04:00
6f50702b11 rename shot group files to shot record 2023-03-30 20:44:41 -04:00
5f8d1a917f shot groups to shot records 2023-03-30 20:43:30 -04:00
72 changed files with 3551 additions and 3646 deletions

View File

@ -1,6 +1,7 @@
# v0.9.1 # v0.9.1
- Rename ammo type's "type" to "class" to avoid confusion - Rename ammo type's "type" to "class" to avoid confusion
- Fixes ammo type search - Rename "ammo type" to "type" to avoid confusion
- Fixes type search
- Fixes shot records table disappearing after selecting an empty ammo class - Fixes shot records table disappearing after selecting an empty ammo class
- Code quality improvements - Code quality improvements
@ -57,7 +58,7 @@
# v0.8.0 # v0.8.0
- Add search to catalog, ammo, container, tag and range index pages - Add search to catalog, ammo, container, tag and range index pages
- Tweak urls for catalog, ammo, containers, tags and shot records - Tweak urls for catalog, ammo, containers, tags and shot records
- Fix bug with shot group chart not drawing lines between days correctly - Fix bug with shot record chart not drawing lines between days correctly
- Improve cards across app (make them line up with each other) - Improve cards across app (make them line up with each other)
- Update translations and add spanish!!! (thank you Brea and Hannah!) - Update translations and add spanish!!! (thank you Brea and Hannah!)
@ -69,7 +70,7 @@
- Fix toggle button styling - Fix toggle button styling
- Miscellanous code improvements - Miscellanous code improvements
- Improve container index table - Improve container index table
- Fix bug with ammo not updating after deleting shot group - Fix bug with ammo not updating after deleting shot record
- Replace ammo "added on" with "purchased on" - Replace ammo "added on" with "purchased on"
- Miscellaneous wording improvements - Miscellaneous wording improvements
- Update translations - Update translations
@ -103,7 +104,7 @@
- Add ammo type cloning - Add ammo type cloning
- Add container cloning - Add container cloning
- Fix bug with moving ammo packs between containers - Fix bug with moving ammo packs between containers
- Add button to set rounds left to 0 when creating a shot group - Add button to set rounds left to 0 when creating a shot record
- Update project dependencies - Update project dependencies
# v0.5.4 # v0.5.4
@ -155,8 +156,8 @@
# v0.3.0 # v0.3.0
- Fix ammo type counts not showing when count is 0 - Fix ammo type counts not showing when count is 0
- Add prompt to create first container before first ammo group - Add prompt to create first container before first ammo group
- Edit and delete shot groups from ammo group show page - Edit and delete shot records from ammo group show page
- Use today's date when adding new shot groups - Use today's date when adding new shot records
- Create multiple ammo groups at one time - Create multiple ammo groups at one time
# v0.2.3 # v0.2.3

View File

@ -13,8 +13,8 @@ The self-hosted firearm tracker website.
# Features # Features
- Create containers to store your ammunition, and tag them with custom tags - Create containers to store your ammunition, and tag them with custom tags
- Add ammunition types to Cannery, and then ammunition groups to your containers - Add ammunition types to Cannery, and then ammo packs to your containers
- Stage groups of ammo for range day and record your ammo usage - Stage ammo packs for range day and track your usage with shot records
- Invitations via invite tokens or public registration - Invitations via invite tokens or public registration
# Installation # Installation

View File

@ -4,50 +4,50 @@ defmodule Cannery.ActivityLog do
""" """
import Ecto.Query, warn: false import Ecto.Query, warn: false
alias Cannery.Ammo.{AmmoType, Pack} alias Cannery.Ammo.{Pack, Type}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo} alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Repo}
alias Ecto.{Multi, Queryable} alias Ecto.{Multi, Queryable}
@doc """ @doc """
Returns the list of shot_groups. Returns the list of shot_records.
## Examples ## Examples
iex> list_shot_groups(:all, %User{id: 123}) iex> list_shot_records(:all, %User{id: 123})
[%ShotGroup{}, ...] [%ShotRecord{}, ...]
iex> list_shot_groups("cool", :all, %User{id: 123}) iex> list_shot_records("cool", :all, %User{id: 123})
[%ShotGroup{notes: "My cool shot group"}, ...] [%ShotRecord{notes: "My cool shot record"}, ...]
iex> list_shot_groups("cool", :rifle, %User{id: 123}) iex> list_shot_records("cool", :rifle, %User{id: 123})
[%ShotGroup{notes: "Shot some rifle rounds"}, ...] [%ShotRecord{notes: "Shot some rifle rounds"}, ...]
""" """
@spec list_shot_groups(AmmoType.class() | :all, User.t()) :: [ShotGroup.t()] @spec list_shot_records(Type.class() | :all, User.t()) :: [ShotRecord.t()]
@spec list_shot_groups(search :: nil | String.t(), AmmoType.class() | :all, User.t()) :: @spec list_shot_records(search :: nil | String.t(), Type.class() | :all, User.t()) ::
[ShotGroup.t()] [ShotRecord.t()]
def list_shot_groups(search \\ nil, type, %{id: user_id}) do def list_shot_records(search \\ nil, type, %{id: user_id}) do
from(sg in ShotGroup, from(sg in ShotRecord,
as: :sg, as: :sg,
left_join: ag in Pack, left_join: ag in Pack,
as: :ag, as: :ag,
on: sg.pack_id == ag.id, on: sg.pack_id == ag.id,
left_join: at in AmmoType, left_join: at in Type,
as: :at, as: :at,
on: ag.ammo_type_id == at.id, on: ag.type_id == at.id,
where: sg.user_id == ^user_id, where: sg.user_id == ^user_id,
distinct: sg.id distinct: sg.id
) )
|> list_shot_groups_search(search) |> list_shot_records_search(search)
|> list_shot_groups_filter_type(type) |> list_shot_records_filter_type(type)
|> Repo.all() |> Repo.all()
end end
@spec list_shot_groups_search(Queryable.t(), search :: String.t() | nil) :: @spec list_shot_records_search(Queryable.t(), search :: String.t() | nil) ::
Queryable.t() Queryable.t()
defp list_shot_groups_search(query, search) when search in ["", nil], do: query defp list_shot_records_search(query, search) when search in ["", nil], do: query
defp list_shot_groups_search(query, search) when search |> is_binary() do defp list_shot_records_search(query, search) when search |> is_binary() do
trimmed_search = String.trim(search) trimmed_search = String.trim(search)
query query
@ -79,18 +79,18 @@ defmodule Cannery.ActivityLog do
}) })
end end
@spec list_shot_groups_filter_type(Queryable.t(), AmmoType.class() | :all) :: @spec list_shot_records_filter_type(Queryable.t(), Type.class() | :all) ::
Queryable.t() Queryable.t()
defp list_shot_groups_filter_type(query, :rifle), defp list_shot_records_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle) do: query |> where([at: at], at.class == :rifle)
defp list_shot_groups_filter_type(query, :pistol), defp list_shot_records_filter_type(query, :pistol),
do: query |> where([at: at], at.class == :pistol) do: query |> where([at: at], at.class == :pistol)
defp list_shot_groups_filter_type(query, :shotgun), defp list_shot_records_filter_type(query, :shotgun),
do: query |> where([at: at], at.class == :shotgun) do: query |> where([at: at], at.class == :shotgun)
defp list_shot_groups_filter_type(query, _all), do: query defp list_shot_records_filter_type(query, _all), do: query
@doc """ @doc """
Returns a count of shot records. Returns a count of shot records.
@ -104,43 +104,43 @@ defmodule Cannery.ActivityLog do
@spec get_shot_record_count!(User.t()) :: integer() @spec get_shot_record_count!(User.t()) :: integer()
def get_shot_record_count!(%User{id: user_id}) do def get_shot_record_count!(%User{id: user_id}) do
Repo.one( Repo.one(
from sg in ShotGroup, from sg in ShotRecord,
where: sg.user_id == ^user_id, where: sg.user_id == ^user_id,
select: count(sg.id), select: count(sg.id),
distinct: true distinct: true
) || 0 ) || 0
end end
@spec list_shot_groups_for_pack(Pack.t(), User.t()) :: [ShotGroup.t()] @spec list_shot_records_for_pack(Pack.t(), User.t()) :: [ShotRecord.t()]
def list_shot_groups_for_pack( def list_shot_records_for_pack(
%Pack{id: pack_id, user_id: user_id}, %Pack{id: pack_id, user_id: user_id},
%User{id: user_id} %User{id: user_id}
) do ) do
Repo.all( Repo.all(
from sg in ShotGroup, from sg in ShotRecord,
where: sg.pack_id == ^pack_id, where: sg.pack_id == ^pack_id,
where: sg.user_id == ^user_id where: sg.user_id == ^user_id
) )
end end
@doc """ @doc """
Gets a single shot_group. Gets a single shot_record.
Raises `Ecto.NoResultsError` if the Shot group does not exist. Raises `Ecto.NoResultsError` if the shot record does not exist.
## Examples ## Examples
iex> get_shot_group!(123, %User{id: 123}) iex> get_shot_record!(123, %User{id: 123})
%ShotGroup{} %ShotRecord{}
iex> get_shot_group!(456, %User{id: 123}) iex> get_shot_record!(456, %User{id: 123})
** (Ecto.NoResultsError) ** (Ecto.NoResultsError)
""" """
@spec get_shot_group!(ShotGroup.id(), User.t()) :: ShotGroup.t() @spec get_shot_record!(ShotRecord.id(), User.t()) :: ShotRecord.t()
def get_shot_group!(id, %User{id: user_id}) do def get_shot_record!(id, %User{id: user_id}) do
Repo.one!( Repo.one!(
from sg in ShotGroup, from sg in ShotRecord,
where: sg.id == ^id, where: sg.id == ^id,
where: sg.user_id == ^user_id, where: sg.user_id == ^user_id,
order_by: sg.date order_by: sg.date
@ -148,28 +148,28 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Creates a shot_group. Creates a shot_record.
## Examples ## Examples
iex> create_shot_group(%{field: value}, %User{id: 123}) iex> create_shot_record(%{field: value}, %User{id: 123})
{:ok, %ShotGroup{}} {:ok, %ShotRecord{}}
iex> create_shot_group(%{field: bad_value}, %User{id: 123}) iex> create_shot_record(%{field: bad_value}, %User{id: 123})
{:error, %Ecto.Changeset{}} {:error, %Ecto.Changeset{}}
""" """
@spec create_shot_group(attrs :: map(), User.t(), Pack.t()) :: @spec create_shot_record(attrs :: map(), User.t(), Pack.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil} {:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
def create_shot_group(attrs, user, pack) do def create_shot_record(attrs, user, pack) do
Multi.new() Multi.new()
|> Multi.insert( |> Multi.insert(
:create_shot_group, :create_shot_record,
%ShotGroup{} |> ShotGroup.create_changeset(user, pack, attrs) %ShotRecord{} |> ShotRecord.create_changeset(user, pack, attrs)
) )
|> Multi.run( |> Multi.run(
:pack, :pack,
fn _repo, %{create_shot_group: %{pack_id: pack_id, user_id: user_id}} -> fn _repo, %{create_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
pack = pack =
Repo.one( Repo.one(
from ag in Pack, from ag in Pack,
@ -182,52 +182,52 @@ defmodule Cannery.ActivityLog do
) )
|> Multi.update( |> Multi.update(
:update_pack, :update_pack,
fn %{create_shot_group: %{count: shot_group_count}, pack: %{count: pack_count}} -> fn %{create_shot_record: %{count: shot_record_count}, pack: %{count: pack_count}} ->
pack |> Pack.range_changeset(%{"count" => pack_count - shot_group_count}) pack |> Pack.range_changeset(%{"count" => pack_count - shot_record_count})
end end
) )
|> Repo.transaction() |> Repo.transaction()
|> case do |> case do
{:ok, %{create_shot_group: shot_group}} -> {:ok, shot_group} {:ok, %{create_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :create_shot_group, changeset, _changes_so_far} -> {:error, changeset} {:error, :create_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil} {:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end end
end end
@doc """ @doc """
Updates a shot_group. Updates a shot_record.
## Examples ## Examples
iex> update_shot_group(shot_group, %{field: new_value}, %User{id: 123}) iex> update_shot_record(shot_record, %{field: new_value}, %User{id: 123})
{:ok, %ShotGroup{}} {:ok, %ShotRecord{}}
iex> update_shot_group(shot_group, %{field: bad_value}, %User{id: 123}) iex> update_shot_record(shot_record, %{field: bad_value}, %User{id: 123})
{:error, %Ecto.Changeset{}} {:error, %Ecto.Changeset{}}
""" """
@spec update_shot_group(ShotGroup.t(), attrs :: map(), User.t()) :: @spec update_shot_record(ShotRecord.t(), attrs :: map(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil} {:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
def update_shot_group( def update_shot_record(
%ShotGroup{count: count, user_id: user_id} = shot_group, %ShotRecord{count: count, user_id: user_id} = shot_record,
attrs, attrs,
%User{id: user_id} = user %User{id: user_id} = user
) do ) do
Multi.new() Multi.new()
|> Multi.update( |> Multi.update(
:update_shot_group, :update_shot_record,
shot_group |> ShotGroup.update_changeset(user, attrs) shot_record |> ShotRecord.update_changeset(user, attrs)
) )
|> Multi.run( |> Multi.run(
:pack, :pack,
fn repo, %{update_shot_group: %{pack_id: pack_id, user_id: user_id}} -> fn repo, %{update_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
{:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)} {:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)}
end end
) )
|> Multi.update( |> Multi.update(
:update_pack, :update_pack,
fn %{ fn %{
update_shot_group: %{count: new_count}, update_shot_record: %{count: new_count},
pack: %{count: pack_count} = pack pack: %{count: pack_count} = pack
} -> } ->
shot_diff_to_add = new_count - count shot_diff_to_add = new_count - count
@ -237,42 +237,42 @@ defmodule Cannery.ActivityLog do
) )
|> Repo.transaction() |> Repo.transaction()
|> case do |> case do
{:ok, %{update_shot_group: shot_group}} -> {:ok, shot_group} {:ok, %{update_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :update_shot_group, changeset, _changes_so_far} -> {:error, changeset} {:error, :update_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil} {:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end end
end end
@doc """ @doc """
Deletes a shot_group. Deletes a shot_record.
## Examples ## Examples
iex> delete_shot_group(shot_group, %User{id: 123}) iex> delete_shot_record(shot_record, %User{id: 123})
{:ok, %ShotGroup{}} {:ok, %ShotRecord{}}
iex> delete_shot_group(shot_group, %User{id: 123}) iex> delete_shot_record(shot_record, %User{id: 123})
{:error, %Ecto.Changeset{}} {:error, %Ecto.Changeset{}}
""" """
@spec delete_shot_group(ShotGroup.t(), User.t()) :: @spec delete_shot_record(ShotRecord.t(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset()} {:ok, ShotRecord.t()} | {:error, ShotRecord.changeset()}
def delete_shot_group( def delete_shot_record(
%ShotGroup{user_id: user_id} = shot_group, %ShotRecord{user_id: user_id} = shot_record,
%User{id: user_id} %User{id: user_id}
) do ) do
Multi.new() Multi.new()
|> Multi.delete(:delete_shot_group, shot_group) |> Multi.delete(:delete_shot_record, shot_record)
|> Multi.run( |> Multi.run(
:pack, :pack,
fn repo, %{delete_shot_group: %{pack_id: pack_id, user_id: user_id}} -> fn repo, %{delete_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
{:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)} {:ok, repo.one(from ag in Pack, where: ag.id == ^pack_id and ag.user_id == ^user_id)}
end end
) )
|> Multi.update( |> Multi.update(
:update_pack, :update_pack,
fn %{ fn %{
delete_shot_group: %{count: count}, delete_shot_record: %{count: count},
pack: %{count: pack_count} = pack pack: %{count: pack_count} = pack
} -> } ->
new_pack_count = pack_count + count new_pack_count = pack_count + count
@ -281,8 +281,8 @@ defmodule Cannery.ActivityLog do
) )
|> Repo.transaction() |> Repo.transaction()
|> case do |> case do
{:ok, %{delete_shot_group: shot_group}} -> {:ok, shot_group} {:ok, %{delete_shot_record: shot_record}} -> {:ok, shot_record}
{:error, :delete_shot_group, changeset, _changes_so_far} -> {:error, changeset} {:error, :delete_shot_record, changeset, _changes_so_far} -> {:error, changeset}
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil} {:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end end
end end
@ -308,7 +308,7 @@ defmodule Cannery.ActivityLog do
|> Enum.map(fn %{id: pack_id} -> pack_id end) |> Enum.map(fn %{id: pack_id} -> pack_id end)
Repo.all( Repo.all(
from sg in ShotGroup, from sg in ShotRecord,
where: sg.pack_id in ^pack_ids, where: sg.pack_id in ^pack_ids,
where: sg.user_id == ^user_id, where: sg.user_id == ^user_id,
group_by: sg.pack_id, group_by: sg.pack_id,
@ -318,7 +318,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the last entered shot group date for a pack Returns the last entered shot record date for a pack
""" """
@spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil @spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil
def get_last_used_date(%Pack{id: pack_id} = pack, user) do def get_last_used_date(%Pack{id: pack_id} = pack, user) do
@ -328,7 +328,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the last entered shot group date for a pack Returns the last entered shot record date for a pack
""" """
@spec get_last_used_dates([Pack.t()], User.t()) :: %{optional(Pack.id()) => Date.t()} @spec get_last_used_dates([Pack.t()], User.t()) :: %{optional(Pack.id()) => Date.t()}
def get_last_used_dates(packs, %User{id: user_id}) do def get_last_used_dates(packs, %User{id: user_id}) do
@ -337,7 +337,7 @@ defmodule Cannery.ActivityLog do
|> Enum.map(fn %Pack{id: pack_id, user_id: ^user_id} -> pack_id end) |> Enum.map(fn %Pack{id: pack_id, user_id: ^user_id} -> pack_id end)
Repo.all( Repo.all(
from sg in ShotGroup, from sg in ShotRecord,
where: sg.pack_id in ^pack_ids, where: sg.pack_id in ^pack_ids,
where: sg.user_id == ^user_id, where: sg.user_id == ^user_id,
group_by: sg.pack_id, group_by: sg.pack_id,
@ -347,50 +347,50 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Gets the total number of rounds shot for an ammo type Gets the total number of rounds shot for a type
Raises `Ecto.NoResultsError` if the Ammo type does not exist. Raises `Ecto.NoResultsError` if the type does not exist.
## Examples ## Examples
iex> get_used_count_for_ammo_type(123, %User{id: 123}) iex> get_used_count_for_type(123, %User{id: 123})
35 35
iex> get_used_count_for_ammo_type(456, %User{id: 123}) iex> get_used_count_for_type(456, %User{id: 123})
** (Ecto.NoResultsError) ** (Ecto.NoResultsError)
""" """
@spec get_used_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer() @spec get_used_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_used_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do def get_used_count_for_type(%Type{id: type_id} = type, user) do
[ammo_type] [type]
|> get_used_count_for_ammo_types(user) |> get_used_count_for_types(user)
|> Map.get(ammo_type_id, 0) |> Map.get(type_id, 0)
end end
@doc """ @doc """
Gets the total number of rounds shot for multiple ammo types Gets the total number of rounds shot for multiple types
## Examples ## Examples
iex> get_used_count_for_ammo_types(123, %User{id: 123}) iex> get_used_count_for_types(123, %User{id: 123})
35 35
""" """
@spec get_used_count_for_ammo_types([AmmoType.t()], User.t()) :: @spec get_used_count_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
def get_used_count_for_ammo_types(ammo_types, %User{id: user_id}) do def get_used_count_for_types(types, %User{id: user_id}) do
ammo_type_ids = type_ids =
ammo_types types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end) |> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all( Repo.all(
from ag in Pack, from ag in Pack,
left_join: sg in ShotGroup, left_join: sg in ShotRecord,
on: ag.id == sg.pack_id, on: ag.id == sg.pack_id,
where: ag.ammo_type_id in ^ammo_type_ids, where: ag.type_id in ^type_ids,
where: not (sg.count |> is_nil()), where: not (sg.count |> is_nil()),
group_by: ag.ammo_type_id, group_by: ag.type_id,
select: {ag.ammo_type_id, sum(sg.count)} select: {ag.type_id, sum(sg.count)}
) )
|> Map.new() |> Map.new()
end end

View File

@ -1,6 +1,6 @@
defmodule Cannery.ActivityLog.ShotGroup do defmodule Cannery.ActivityLog.ShotRecord do
@moduledoc """ @moduledoc """
A shot group records a group of ammo shot during a range trip A shot record records a group of ammo shot during a range trip
""" """
use Ecto.Schema use Ecto.Schema
@ -19,7 +19,7 @@ defmodule Cannery.ActivityLog.ShotGroup do
]} ]}
@primary_key {:id, :binary_id, autogenerate: true} @primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id @foreign_key_type :binary_id
schema "shot_groups" do schema "shot_records" do
field :count, :integer field :count, :integer
field :date, :date field :date, :date
field :notes, :string field :notes, :string
@ -40,41 +40,41 @@ defmodule Cannery.ActivityLog.ShotGroup do
inserted_at: NaiveDateTime.t(), inserted_at: NaiveDateTime.t(),
updated_at: NaiveDateTime.t() updated_at: NaiveDateTime.t()
} }
@type new_shot_group :: %__MODULE__{} @type new_shot_record :: %__MODULE__{}
@type id :: UUID.t() @type id :: UUID.t()
@type changeset :: Changeset.t(t() | new_shot_group()) @type changeset :: Changeset.t(t() | new_shot_record())
@doc false @doc false
@spec create_changeset( @spec create_changeset(
new_shot_group(), new_shot_record(),
User.t() | any(), User.t() | any(),
Pack.t() | any(), Pack.t() | any(),
attrs :: map() attrs :: map()
) :: changeset() ) :: changeset()
def create_changeset( def create_changeset(
shot_group, shot_record,
%User{id: user_id}, %User{id: user_id},
%Pack{id: pack_id, user_id: user_id} = pack, %Pack{id: pack_id, user_id: user_id} = pack,
attrs attrs
) do ) do
shot_group shot_record
|> change(user_id: user_id) |> change(user_id: user_id)
|> change(pack_id: pack_id) |> change(pack_id: pack_id)
|> cast(attrs, [:count, :notes, :date]) |> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255) |> validate_length(:notes, max: 255)
|> validate_create_shot_group_count(pack) |> validate_create_shot_record_count(pack)
|> validate_required([:date, :pack_id, :user_id]) |> validate_required([:date, :pack_id, :user_id])
end end
def create_changeset(shot_group, _invalid_user, _invalid_pack, attrs) do def create_changeset(shot_record, _invalid_user, _invalid_pack, attrs) do
shot_group shot_record
|> cast(attrs, [:count, :notes, :date]) |> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255) |> validate_length(:notes, max: 255)
|> validate_required([:pack_id, :user_id]) |> validate_required([:pack_id, :user_id])
|> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo pack")) |> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo pack"))
end end
defp validate_create_shot_group_count(changeset, %Pack{count: pack_count}) do defp validate_create_shot_record_count(changeset, %Pack{count: pack_count}) do
case changeset |> Changeset.get_field(:count) do case changeset |> Changeset.get_field(:count) do
nil -> nil ->
changeset |> Changeset.add_error(:ammo_left, dgettext("errors", "can't be blank")) changeset |> Changeset.add_error(:ammo_left, dgettext("errors", "can't be blank"))
@ -95,25 +95,25 @@ defmodule Cannery.ActivityLog.ShotGroup do
end end
@doc false @doc false
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) :: changeset() @spec update_changeset(t() | new_shot_record(), User.t(), attrs :: map()) :: changeset()
def update_changeset(%__MODULE__{} = shot_group, user, attrs) do def update_changeset(%__MODULE__{} = shot_record, user, attrs) do
shot_group shot_record
|> cast(attrs, [:count, :notes, :date]) |> cast(attrs, [:count, :notes, :date])
|> validate_length(:notes, max: 255) |> validate_length(:notes, max: 255)
|> validate_number(:count, greater_than: 0) |> validate_number(:count, greater_than: 0)
|> validate_required([:count, :date]) |> validate_required([:count, :date])
|> validate_update_shot_group_count(shot_group, user) |> validate_update_shot_record_count(shot_record, user)
end end
defp validate_update_shot_group_count( defp validate_update_shot_record_count(
changeset, changeset,
%__MODULE__{pack_id: pack_id, count: count}, %__MODULE__{pack_id: pack_id, count: count},
user user
) do ) do
%{count: pack_count} = Ammo.get_pack!(pack_id, user) %{count: pack_count} = Ammo.get_pack!(pack_id, user)
new_shot_group_count = changeset |> Changeset.get_field(:count) new_shot_record_count = changeset |> Changeset.get_field(:count)
shot_diff_to_add = new_shot_group_count - count shot_diff_to_add = new_shot_record_count - count
if shot_diff_to_add > pack_count do if shot_diff_to_add > pack_count do
error = dgettext("errors", "Count can be at most %{count} shots", count: pack_count + count) error = dgettext("errors", "Count can be at most %{count} shots", count: pack_count + count)

View File

@ -7,47 +7,47 @@ defmodule Cannery.Ammo do
import Ecto.Query, warn: false import Ecto.Query, warn: false
alias Cannery.{Accounts.User, Containers, Repo} alias Cannery.{Accounts.User, Containers, Repo}
alias Cannery.Containers.{Container, ContainerTag, Tag} alias Cannery.Containers.{Container, ContainerTag, Tag}
alias Cannery.{ActivityLog, ActivityLog.ShotGroup} alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
alias Cannery.Ammo.{AmmoType, Pack} alias Cannery.Ammo.{Pack, Type}
alias Ecto.{Changeset, Queryable} alias Ecto.{Changeset, Queryable}
@pack_create_limit 10_000 @pack_create_limit 10_000
@pack_preloads [:ammo_type] @pack_preloads [:type]
@ammo_type_preloads [:packs] @type_preloads [:packs]
@doc """ @doc """
Returns the list of ammo_types. Returns the list of types.
## Examples ## Examples
iex> list_ammo_types(%User{id: 123}, :all) iex> list_types(%User{id: 123}, :all)
[%AmmoType{}, ...] [%Type{}, ...]
iex> list_ammo_types("cool", %User{id: 123}, :shotgun) iex> list_types("cool", %User{id: 123}, :shotgun)
[%AmmoType{name: "My cool ammo type", class: :shotgun}, ...] [%Type{name: "My cool type", class: :shotgun}, ...]
""" """
@spec list_ammo_types(User.t(), AmmoType.class() | :all) :: [AmmoType.t()] @spec list_types(User.t(), Type.class() | :all) :: [Type.t()]
@spec list_ammo_types(search :: nil | String.t(), User.t(), AmmoType.class() | :all) :: @spec list_types(search :: nil | String.t(), User.t(), Type.class() | :all) ::
[AmmoType.t()] [Type.t()]
def list_ammo_types(search \\ nil, user, type) def list_types(search \\ nil, user, type)
def list_ammo_types(search, %{id: user_id}, type) do def list_types(search, %{id: user_id}, type) do
from(at in AmmoType, from(at in Type,
as: :at, as: :at,
where: at.user_id == ^user_id, where: at.user_id == ^user_id,
preload: ^@ammo_type_preloads preload: ^@type_preloads
) )
|> list_ammo_types_filter_type(type) |> list_types_filter_type(type)
|> list_ammo_types_filter_search(search) |> list_types_filter_search(search)
|> Repo.all() |> Repo.all()
end end
@spec list_ammo_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t() @spec list_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t()
defp list_ammo_types_filter_search(query, search) when search in ["", nil], defp list_types_filter_search(query, search) when search in ["", nil],
do: query |> order_by([at: at], at.name) do: query |> order_by([at: at], at.name)
defp list_ammo_types_filter_search(query, search) when search |> is_binary() do defp list_types_filter_search(query, search) when search |> is_binary() do
trimmed_search = String.trim(search) trimmed_search = String.trim(search)
query query
@ -72,31 +72,31 @@ defmodule Cannery.Ammo do
) )
end end
@spec list_ammo_types_filter_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t() @spec list_types_filter_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
defp list_ammo_types_filter_type(query, :rifle), defp list_types_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle) do: query |> where([at: at], at.class == :rifle)
defp list_ammo_types_filter_type(query, :pistol), defp list_types_filter_type(query, :pistol),
do: query |> where([at: at], at.class == :pistol) do: query |> where([at: at], at.class == :pistol)
defp list_ammo_types_filter_type(query, :shotgun), defp list_types_filter_type(query, :shotgun),
do: query |> where([at: at], at.class == :shotgun) do: query |> where([at: at], at.class == :shotgun)
defp list_ammo_types_filter_type(query, _all), do: query defp list_types_filter_type(query, _all), do: query
@doc """ @doc """
Returns a count of ammo_types. Returns a count of types.
## Examples ## Examples
iex> get_ammo_types_count!(%User{id: 123}) iex> get_types_count!(%User{id: 123})
3 3
""" """
@spec get_ammo_types_count!(User.t()) :: integer() @spec get_types_count!(User.t()) :: integer()
def get_ammo_types_count!(%User{id: user_id}) do def get_types_count!(%User{id: user_id}) do
Repo.one( Repo.one(
from at in AmmoType, from at in Type,
where: at.user_id == ^user_id, where: at.user_id == ^user_id,
select: count(at.id), select: count(at.id),
distinct: true distinct: true
@ -104,70 +104,70 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Gets a single ammo_type. Gets a single type.
Raises `Ecto.NoResultsError` if the Ammo type does not exist. Raises `Ecto.NoResultsError` if the type does not exist.
## Examples ## Examples
iex> get_ammo_type!(123, %User{id: 123}) iex> get_type!(123, %User{id: 123})
%AmmoType{} %Type{}
iex> get_ammo_type!(456, %User{id: 123}) iex> get_type!(456, %User{id: 123})
** (Ecto.NoResultsError) ** (Ecto.NoResultsError)
""" """
@spec get_ammo_type!(AmmoType.id(), User.t()) :: AmmoType.t() @spec get_type!(Type.id(), User.t()) :: Type.t()
def get_ammo_type!(id, %User{id: user_id}) do def get_type!(id, %User{id: user_id}) do
Repo.one!( Repo.one!(
from at in AmmoType, from at in Type,
where: at.id == ^id, where: at.id == ^id,
where: at.user_id == ^user_id, where: at.user_id == ^user_id,
preload: ^@ammo_type_preloads preload: ^@type_preloads
) )
end end
@doc """ @doc """
Gets the average cost of an ammo type from packs with price information. Gets the average cost of a type from packs with price information.
## Examples ## Examples
iex> get_average_cost_for_ammo_type( iex> get_average_cost_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
1.50 1.50
""" """
@spec get_average_cost_for_ammo_type(AmmoType.t(), User.t()) :: float() | nil @spec get_average_cost_for_type(Type.t(), User.t()) :: float() | nil
def get_average_cost_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do def get_average_cost_for_type(%Type{id: type_id} = type, user) do
[ammo_type] [type]
|> get_average_cost_for_ammo_types(user) |> get_average_cost_for_types(user)
|> Map.get(ammo_type_id) |> Map.get(type_id)
end end
@doc """ @doc """
Gets the average cost of ammo types from packs with price information Gets the average cost of types from packs with price information
for multiple ammo types. for multiple types.
## Examples ## Examples
iex> get_average_cost_for_ammo_types( iex> get_average_cost_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
1.50 1.50
""" """
@spec get_average_cost_for_ammo_types([AmmoType.t()], User.t()) :: @spec get_average_cost_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => float()} %{optional(Type.id()) => float()}
def get_average_cost_for_ammo_types(ammo_types, %User{id: user_id}) do def get_average_cost_for_types(types, %User{id: user_id}) do
ammo_type_ids = type_ids =
ammo_types types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end) |> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
sg_total_query = sg_total_query =
from sg in ShotGroup, from sg in ShotRecord,
where: not (sg.count |> is_nil()), where: not (sg.count |> is_nil()),
group_by: sg.pack_id, group_by: sg.pack_id,
select: %{pack_id: sg.pack_id, total: sum(sg.count)} select: %{pack_id: sg.pack_id, total: sum(sg.count)}
@ -177,202 +177,200 @@ defmodule Cannery.Ammo do
as: :pack, as: :pack,
left_join: sg_query in subquery(sg_total_query), left_join: sg_query in subquery(sg_total_query),
on: ag.id == sg_query.pack_id, on: ag.id == sg_query.pack_id,
where: ag.ammo_type_id in ^ammo_type_ids, where: ag.type_id in ^type_ids,
group_by: ag.ammo_type_id, group_by: ag.type_id,
where: not (ag.price_paid |> is_nil()), where: not (ag.price_paid |> is_nil()),
select: select: {ag.type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
{ag.ammo_type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
) )
|> Map.new() |> Map.new()
end end
@doc """ @doc """
Gets the total number of rounds for an ammo type Gets the total number of rounds for a type
## Examples ## Examples
iex> get_round_count_for_ammo_type( iex> get_round_count_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
35 35
""" """
@spec get_round_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer() @spec get_round_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_round_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do def get_round_count_for_type(%Type{id: type_id} = type, user) do
[ammo_type] [type]
|> get_round_count_for_ammo_types(user) |> get_round_count_for_types(user)
|> Map.get(ammo_type_id, 0) |> Map.get(type_id, 0)
end end
@doc """ @doc """
Gets the total number of rounds for multiple ammo types Gets the total number of rounds for multiple types
## Examples ## Examples
iex> get_round_count_for_ammo_types( iex> get_round_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
%{123 => 35} %{123 => 35}
""" """
@spec get_round_count_for_ammo_types([AmmoType.t()], User.t()) :: @spec get_round_count_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
def get_round_count_for_ammo_types(ammo_types, %User{id: user_id}) do def get_round_count_for_types(types, %User{id: user_id}) do
ammo_type_ids = type_ids =
ammo_types types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end) |> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all( Repo.all(
from ag in Pack, from ag in Pack,
where: ag.ammo_type_id in ^ammo_type_ids, where: ag.type_id in ^type_ids,
where: ag.user_id == ^user_id, where: ag.user_id == ^user_id,
group_by: ag.ammo_type_id, group_by: ag.type_id,
select: {ag.ammo_type_id, sum(ag.count)} select: {ag.type_id, sum(ag.count)}
) )
|> Map.new() |> Map.new()
end end
@doc """ @doc """
Gets the total number of ammo ever bought for an ammo type Gets the total number of ammo ever bought for a type
## Examples ## Examples
iex> get_historical_count_for_ammo_type( iex> get_historical_count_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
5 5
""" """
@spec get_historical_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer() @spec get_historical_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_historical_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do def get_historical_count_for_type(%Type{id: type_id} = type, user) do
[ammo_type] [type]
|> get_historical_count_for_ammo_types(user) |> get_historical_count_for_types(user)
|> Map.get(ammo_type_id, 0) |> Map.get(type_id, 0)
end end
@doc """ @doc """
Gets the total number of ammo ever bought for multiple ammo types Gets the total number of ammo ever bought for multiple types
## Examples ## Examples
iex> get_historical_count_for_ammo_types( iex> get_historical_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
%{123 => 5} %{123 => 5}
""" """
@spec get_historical_count_for_ammo_types([AmmoType.t()], User.t()) :: @spec get_historical_count_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
def get_historical_count_for_ammo_types(ammo_types, %User{id: user_id} = user) do def get_historical_count_for_types(types, %User{id: user_id} = user) do
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(user) used_counts = types |> ActivityLog.get_used_count_for_types(user)
round_counts = ammo_types |> get_round_count_for_ammo_types(user) round_counts = types |> get_round_count_for_types(user)
ammo_types types
|> Enum.filter(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> |> Enum.filter(fn %Type{id: type_id, user_id: ^user_id} ->
Map.has_key?(used_counts, ammo_type_id) or Map.has_key?(round_counts, ammo_type_id) Map.has_key?(used_counts, type_id) or Map.has_key?(round_counts, type_id)
end) end)
|> Map.new(fn %{id: ammo_type_id} -> |> Map.new(fn %{id: type_id} ->
historical_count = historical_count = Map.get(used_counts, type_id, 0) + Map.get(round_counts, type_id, 0)
Map.get(used_counts, ammo_type_id, 0) + Map.get(round_counts, ammo_type_id, 0)
{ammo_type_id, historical_count} {type_id, historical_count}
end) end)
end end
@doc """ @doc """
Creates a ammo_type. Creates a type.
## Examples ## Examples
iex> create_ammo_type(%{field: value}, %User{id: 123}) iex> create_type(%{field: value}, %User{id: 123})
{:ok, %AmmoType{}} {:ok, %Type{}}
iex> create_ammo_type(%{field: bad_value}, %User{id: 123}) iex> create_type(%{field: bad_value}, %User{id: 123})
{:error, %Changeset{}} {:error, %Changeset{}}
""" """
@spec create_ammo_type(attrs :: map(), User.t()) :: @spec create_type(attrs :: map(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()} {:ok, Type.t()} | {:error, Type.changeset()}
def create_ammo_type(attrs \\ %{}, %User{} = user) do def create_type(attrs \\ %{}, %User{} = user) do
%AmmoType{} %Type{}
|> AmmoType.create_changeset(user, attrs) |> Type.create_changeset(user, attrs)
|> Repo.insert() |> Repo.insert()
|> case do |> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()} {:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset} {:error, changeset} -> {:error, changeset}
end end
end end
@spec preload_ammo_type(AmmoType.t()) :: AmmoType.t() @spec preload_type(Type.t()) :: Type.t()
@spec preload_ammo_type([AmmoType.t()]) :: [AmmoType.t()] @spec preload_type([Type.t()]) :: [Type.t()]
defp preload_ammo_type(ammo_type_or_ammo_types) do defp preload_type(type_or_types) do
ammo_type_or_ammo_types |> Repo.preload(@ammo_type_preloads) type_or_types |> Repo.preload(@type_preloads)
end end
@doc """ @doc """
Updates a ammo_type. Updates a type.
## Examples ## Examples
iex> update_ammo_type(ammo_type, %{field: new_value}, %User{id: 123}) iex> update_type(type, %{field: new_value}, %User{id: 123})
{:ok, %AmmoType{}} {:ok, %Type{}}
iex> update_ammo_type(ammo_type, %{field: bad_value}, %User{id: 123}) iex> update_type(type, %{field: bad_value}, %User{id: 123})
{:error, %Changeset{}} {:error, %Changeset{}}
""" """
@spec update_ammo_type(AmmoType.t(), attrs :: map(), User.t()) :: @spec update_type(Type.t(), attrs :: map(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()} {:ok, Type.t()} | {:error, Type.changeset()}
def update_ammo_type(%AmmoType{user_id: user_id} = ammo_type, attrs, %User{id: user_id}) do def update_type(%Type{user_id: user_id} = type, attrs, %User{id: user_id}) do
ammo_type type
|> AmmoType.update_changeset(attrs) |> Type.update_changeset(attrs)
|> Repo.update() |> Repo.update()
|> case do |> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()} {:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset} {:error, changeset} -> {:error, changeset}
end end
end end
@doc """ @doc """
Deletes a ammo_type. Deletes a type.
## Examples ## Examples
iex> delete_ammo_type(ammo_type, %User{id: 123}) iex> delete_type(type, %User{id: 123})
{:ok, %AmmoType{}} {:ok, %Type{}}
iex> delete_ammo_type(ammo_type, %User{id: 123}) iex> delete_type(type, %User{id: 123})
{:error, %Changeset{}} {:error, %Changeset{}}
""" """
@spec delete_ammo_type(AmmoType.t(), User.t()) :: @spec delete_type(Type.t(), User.t()) ::
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()} {:ok, Type.t()} | {:error, Type.changeset()}
def delete_ammo_type(%AmmoType{user_id: user_id} = ammo_type, %User{id: user_id}) do def delete_type(%Type{user_id: user_id} = type, %User{id: user_id}) do
ammo_type type
|> Repo.delete() |> Repo.delete()
|> case do |> case do
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()} {:ok, type} -> {:ok, type |> preload_type()}
{:error, changeset} -> {:error, changeset} {:error, changeset} -> {:error, changeset}
end end
end end
@doc """ @doc """
Deletes a ammo_type. Deletes a type.
## Examples ## Examples
iex> delete_ammo_type!(ammo_type, %User{id: 123}) iex> delete_type!(type, %User{id: 123})
%AmmoType{} %Type{}
""" """
@spec delete_ammo_type!(AmmoType.t(), User.t()) :: AmmoType.t() @spec delete_type!(Type.t(), User.t()) :: Type.t()
def delete_ammo_type!(ammo_type, user) do def delete_type!(type, user) do
{:ok, ammo_type} = delete_ammo_type(ammo_type, user) {:ok, type} = delete_type(type, user)
ammo_type type
end end
@doc """ @doc """
@ -381,32 +379,32 @@ defmodule Cannery.Ammo do
## Examples ## Examples
iex> list_packs_for_type( iex> list_packs_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
[%Pack{}, ...] [%Pack{}, ...]
iex> list_packs_for_type( iex> list_packs_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456}, ...> %User{id: 456},
...> true ...> true
...> ) ...> )
[%Pack{}, %Pack{}, ...] [%Pack{}, %Pack{}, ...]
""" """
@spec list_packs_for_type(AmmoType.t(), User.t()) :: [Pack.t()] @spec list_packs_for_type(Type.t(), User.t()) :: [Pack.t()]
@spec list_packs_for_type(AmmoType.t(), User.t(), show_used :: boolean()) :: @spec list_packs_for_type(Type.t(), User.t(), show_used :: boolean()) ::
[Pack.t()] [Pack.t()]
def list_packs_for_type(ammo_type, user, show_used \\ false) def list_packs_for_type(type, user, show_used \\ false)
def list_packs_for_type( def list_packs_for_type(
%AmmoType{id: ammo_type_id, user_id: user_id}, %Type{id: type_id, user_id: user_id},
%User{id: user_id}, %User{id: user_id},
show_used show_used
) do ) do
from(ag in Pack, from(ag in Pack,
as: :ag, as: :ag,
where: ag.ammo_type_id == ^ammo_type_id, where: ag.type_id == ^type_id,
where: ag.user_id == ^user_id, where: ag.user_id == ^user_id,
preload: ^@pack_preloads preload: ^@pack_preloads
) )
@ -443,7 +441,7 @@ defmodule Cannery.Ammo do
""" """
@spec list_packs_for_container( @spec list_packs_for_container(
Container.t(), Container.t(),
AmmoType.t() | :all, Type.t() | :all,
User.t() User.t()
) :: [Pack.t()] ) :: [Pack.t()]
def list_packs_for_container( def list_packs_for_container(
@ -453,7 +451,7 @@ defmodule Cannery.Ammo do
) do ) do
from(ag in Pack, from(ag in Pack,
as: :ag, as: :ag,
join: at in assoc(ag, :ammo_type), join: at in assoc(ag, :type),
as: :at, as: :at,
where: ag.container_id == ^container_id, where: ag.container_id == ^container_id,
where: ag.user_id == ^user_id, where: ag.user_id == ^user_id,
@ -464,7 +462,7 @@ defmodule Cannery.Ammo do
|> Repo.all() |> Repo.all()
end end
@spec list_packs_for_container_filter_type(Queryable.t(), AmmoType.class() | :all) :: @spec list_packs_for_container_filter_type(Queryable.t(), Type.class() | :all) ::
Queryable.t() Queryable.t()
defp list_packs_for_container_filter_type(query, :rifle), defp list_packs_for_container_filter_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle) do: query |> where([at: at], at.class == :rifle)
@ -509,71 +507,71 @@ defmodule Cannery.Ammo do
defp get_packs_count_show_used(query, _true), do: query defp get_packs_count_show_used(query, _true), do: query
@doc """ @doc """
Returns the count of packs for an ammo type. Returns the count of packs for a type.
## Examples ## Examples
iex> get_packs_count_for_type( iex> get_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
3 3
iex> get_packs_count_for_type( iex> get_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456}, ...> %User{id: 456},
...> true ...> true
...> ) ...> )
5 5
""" """
@spec get_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer() @spec get_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
@spec get_packs_count_for_type(AmmoType.t(), User.t(), show_used :: boolean()) :: @spec get_packs_count_for_type(Type.t(), User.t(), show_used :: boolean()) ::
non_neg_integer() non_neg_integer()
def get_packs_count_for_type( def get_packs_count_for_type(
%AmmoType{id: ammo_type_id} = ammo_type, %Type{id: type_id} = type,
user, user,
show_used \\ false show_used \\ false
) do ) do
[ammo_type] [type]
|> get_packs_count_for_types(user, show_used) |> get_packs_count_for_types(user, show_used)
|> Map.get(ammo_type_id, 0) |> Map.get(type_id, 0)
end end
@doc """ @doc """
Returns the count of packs for multiple ammo types. Returns the count of packs for multiple types.
## Examples ## Examples
iex> get_packs_count_for_types( iex> get_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
3 3
iex> get_packs_count_for_types( iex> get_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456}, ...> %User{id: 456},
...> true ...> true
...> ) ...> )
5 5
""" """
@spec get_packs_count_for_types([AmmoType.t()], User.t()) :: @spec get_packs_count_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
@spec get_packs_count_for_types([AmmoType.t()], User.t(), show_used :: boolean()) :: @spec get_packs_count_for_types([Type.t()], User.t(), show_used :: boolean()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
def get_packs_count_for_types(ammo_types, %User{id: user_id}, show_used \\ false) do def get_packs_count_for_types(types, %User{id: user_id}, show_used \\ false) do
ammo_type_ids = type_ids =
ammo_types types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end) |> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
from(ag in Pack, from(ag in Pack,
as: :ag, as: :ag,
where: ag.user_id == ^user_id, where: ag.user_id == ^user_id,
where: ag.ammo_type_id in ^ammo_type_ids, where: ag.type_id in ^type_ids,
group_by: ag.ammo_type_id, group_by: ag.type_id,
select: {ag.ammo_type_id, count(ag.id)} select: {ag.type_id, count(ag.id)}
) )
|> get_packs_count_for_types_maybe_show_used(show_used) |> get_packs_count_for_types_maybe_show_used(show_used)
|> Repo.all() |> Repo.all()
@ -589,50 +587,50 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Returns the count of used packs for an ammo type. Returns the count of used packs for a type.
## Examples ## Examples
iex> get_used_packs_count_for_type( iex> get_used_packs_count_for_type(
...> %AmmoType{id: 123, user_id: 456}, ...> %Type{id: 123, user_id: 456},
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
3 3
""" """
@spec get_used_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer() @spec get_used_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
def get_used_packs_count_for_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do def get_used_packs_count_for_type(%Type{id: type_id} = type, user) do
[ammo_type] [type]
|> get_used_packs_count_for_types(user) |> get_used_packs_count_for_types(user)
|> Map.get(ammo_type_id, 0) |> Map.get(type_id, 0)
end end
@doc """ @doc """
Returns the count of used packs for multiple ammo types. Returns the count of used packs for multiple types.
## Examples ## Examples
iex> get_used_packs_count_for_types( iex> get_used_packs_count_for_types(
...> [%AmmoType{id: 123, user_id: 456}], ...> [%Type{id: 123, user_id: 456}],
...> %User{id: 456} ...> %User{id: 456}
...> ) ...> )
%{123 => 3} %{123 => 3}
""" """
@spec get_used_packs_count_for_types([AmmoType.t()], User.t()) :: @spec get_used_packs_count_for_types([Type.t()], User.t()) ::
%{optional(AmmoType.id()) => non_neg_integer()} %{optional(Type.id()) => non_neg_integer()}
def get_used_packs_count_for_types(ammo_types, %User{id: user_id}) do def get_used_packs_count_for_types(types, %User{id: user_id}) do
ammo_type_ids = type_ids =
ammo_types types
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end) |> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
Repo.all( Repo.all(
from ag in Pack, from ag in Pack,
where: ag.user_id == ^user_id, where: ag.user_id == ^user_id,
where: ag.ammo_type_id in ^ammo_type_ids, where: ag.type_id in ^type_ids,
where: ag.count == 0, where: ag.count == 0,
group_by: ag.ammo_type_id, group_by: ag.type_id,
select: {ag.ammo_type_id, count(ag.id)} select: {ag.type_id, count(ag.id)}
) )
|> Map.new() |> Map.new()
end end
@ -748,18 +746,18 @@ defmodule Cannery.Ammo do
[%Pack{notes: "My cool pack"}, ...] [%Pack{notes: "My cool pack"}, ...]
""" """
@spec list_packs(search :: String.t() | nil, AmmoType.class() | :all, User.t()) :: @spec list_packs(search :: String.t() | nil, Type.class() | :all, User.t()) ::
[Pack.t()] [Pack.t()]
@spec list_packs( @spec list_packs(
search :: nil | String.t(), search :: nil | String.t(),
AmmoType.class() | :all, Type.class() | :all,
User.t(), User.t(),
show_used :: boolean() show_used :: boolean()
) :: [Pack.t()] ) :: [Pack.t()]
def list_packs(search, type, %{id: user_id}, show_used \\ false) do def list_packs(search, type, %{id: user_id}, show_used \\ false) do
from(ag in Pack, from(ag in Pack,
as: :ag, as: :ag,
join: at in assoc(ag, :ammo_type), join: at in assoc(ag, :type),
as: :at, as: :at,
join: c in Container, join: c in Container,
on: ag.container_id == c.id, on: ag.container_id == c.id,
@ -781,7 +779,7 @@ defmodule Cannery.Ammo do
|> Repo.all() |> Repo.all()
end end
@spec list_packs_filter_on_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t() @spec list_packs_filter_on_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
defp list_packs_filter_on_type(query, :rifle), defp list_packs_filter_on_type(query, :rifle),
do: query |> where([at: at], at.class == :rifle) do: query |> where([at: at], at.class == :rifle)
@ -1063,13 +1061,13 @@ defmodule Cannery.Ammo do
end end
defp do_create_packs( defp do_create_packs(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs, %{"type_id" => type_id, "container_id" => container_id} = attrs,
multiplier, multiplier,
user user
) )
when multiplier >= 1 and when multiplier >= 1 and
multiplier <= @pack_create_limit and multiplier <= @pack_create_limit and
ammo_type_id |> is_binary() and type_id |> is_binary() and
container_id |> is_binary() do container_id |> is_binary() do
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second) now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
@ -1077,7 +1075,7 @@ defmodule Cannery.Ammo do
Enum.map(1..multiplier, fn _count -> Enum.map(1..multiplier, fn _count ->
%Pack{} %Pack{}
|> Pack.create_changeset( |> Pack.create_changeset(
get_ammo_type!(ammo_type_id, user), get_type!(type_id, user),
Containers.get_container!(container_id, user), Containers.get_container!(container_id, user),
user, user,
attrs attrs
@ -1107,15 +1105,15 @@ defmodule Cannery.Ammo do
end end
defp do_create_packs( defp do_create_packs(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs, %{"type_id" => type_id, "container_id" => container_id} = attrs,
_multiplier, _multiplier,
user user
) )
when is_binary(ammo_type_id) and is_binary(container_id) do when is_binary(type_id) and is_binary(container_id) do
changeset = changeset =
%Pack{} %Pack{}
|> Pack.create_changeset( |> Pack.create_changeset(
get_ammo_type!(ammo_type_id, user), get_type!(type_id, user),
Containers.get_container!(container_id, user), Containers.get_container!(container_id, user),
user, user,
attrs attrs

View File

@ -9,7 +9,7 @@ defmodule Cannery.Ammo.Pack do
use Ecto.Schema use Ecto.Schema
import CanneryWeb.Gettext import CanneryWeb.Gettext
import Ecto.Changeset import Ecto.Changeset
alias Cannery.Ammo.AmmoType alias Cannery.Ammo.Type
alias Cannery.{Accounts.User, Containers, Containers.Container} alias Cannery.{Accounts.User, Containers, Containers.Container}
alias Ecto.{Changeset, UUID} alias Ecto.{Changeset, UUID}
@ -20,7 +20,7 @@ defmodule Cannery.Ammo.Pack do
:notes, :notes,
:price_paid, :price_paid,
:staged, :staged,
:ammo_type_id, :type_id,
:container_id :container_id
]} ]}
@primary_key {:id, :binary_id, autogenerate: true} @primary_key {:id, :binary_id, autogenerate: true}
@ -32,7 +32,7 @@ defmodule Cannery.Ammo.Pack do
field :staged, :boolean, default: false field :staged, :boolean, default: false
field :purchased_on, :date field :purchased_on, :date
belongs_to :ammo_type, AmmoType belongs_to :type, Type
field :container_id, :binary_id field :container_id, :binary_id
field :user_id, :binary_id field :user_id, :binary_id
@ -46,8 +46,8 @@ defmodule Cannery.Ammo.Pack do
price_paid: float() | nil, price_paid: float() | nil,
staged: boolean(), staged: boolean(),
purchased_on: Date.t(), purchased_on: Date.t(),
ammo_type: AmmoType.t() | nil, type: Type.t() | nil,
ammo_type_id: AmmoType.id(), type_id: Type.id(),
container_id: Container.id(), container_id: Container.id(),
user_id: User.id(), user_id: User.id(),
inserted_at: NaiveDateTime.t(), inserted_at: NaiveDateTime.t(),
@ -60,36 +60,36 @@ defmodule Cannery.Ammo.Pack do
@doc false @doc false
@spec create_changeset( @spec create_changeset(
new_pack(), new_pack(),
AmmoType.t() | nil, Type.t() | nil,
Container.t() | nil, Container.t() | nil,
User.t(), User.t(),
attrs :: map() attrs :: map()
) :: changeset() ) :: changeset()
def create_changeset( def create_changeset(
pack, pack,
%AmmoType{id: ammo_type_id}, %Type{id: type_id},
%Container{id: container_id, user_id: user_id}, %Container{id: container_id, user_id: user_id},
%User{id: user_id}, %User{id: user_id},
attrs attrs
) )
when is_binary(ammo_type_id) and is_binary(container_id) and is_binary(user_id) do when is_binary(type_id) and is_binary(container_id) and is_binary(user_id) do
pack pack
|> change(ammo_type_id: ammo_type_id) |> change(type_id: type_id)
|> change(user_id: user_id) |> change(user_id: user_id)
|> change(container_id: container_id) |> change(container_id: container_id)
|> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on]) |> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on])
|> validate_number(:count, greater_than: 0) |> validate_number(:count, greater_than: 0)
|> validate_required([:count, :staged, :purchased_on, :ammo_type_id, :container_id, :user_id]) |> validate_required([:count, :staged, :purchased_on, :type_id, :container_id, :user_id])
end end
@doc """ @doc """
Invalid changeset, used to prompt user to select ammo type and container Invalid changeset, used to prompt user to select type and container
""" """
def create_changeset(pack, _invalid_ammo_type, _invalid_container, _invalid_user, attrs) do def create_changeset(pack, _invalid_type, _invalid_container, _invalid_user, attrs) do
pack pack
|> cast(attrs, [:ammo_type_id, :container_id]) |> cast(attrs, [:type_id, :container_id])
|> validate_required([:ammo_type_id, :container_id]) |> validate_required([:type_id, :container_id])
|> add_error(:invalid, dgettext("errors", "Please select an ammo type and container")) |> add_error(:invalid, dgettext("errors", "Please select a type and container"))
end end
@doc false @doc false

View File

@ -1,4 +1,4 @@
defmodule Cannery.Ammo.AmmoType do defmodule Cannery.Ammo.Type do
@moduledoc """ @moduledoc """
An ammunition type. An ammunition type.
@ -38,7 +38,7 @@ defmodule Cannery.Ammo.AmmoType do
]} ]}
@primary_key {:id, :binary_id, autogenerate: true} @primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id @foreign_key_type :binary_id
schema "ammo_types" do schema "types" do
field :name, :string field :name, :string
field :desc, :string field :desc, :string
@ -127,9 +127,9 @@ defmodule Cannery.Ammo.AmmoType do
inserted_at: NaiveDateTime.t(), inserted_at: NaiveDateTime.t(),
updated_at: NaiveDateTime.t() updated_at: NaiveDateTime.t()
} }
@type new_ammo_type :: %__MODULE__{} @type new_type :: %__MODULE__{}
@type id :: UUID.t() @type id :: UUID.t()
@type changeset :: Changeset.t(t() | new_ammo_type()) @type changeset :: Changeset.t(t() | new_type())
@type class :: :rifle | :shotgun | :pistol | nil @type class :: :rifle | :shotgun | :pistol | nil
@spec changeset_fields() :: [atom()] @spec changeset_fields() :: [atom()]
@ -197,10 +197,10 @@ defmodule Cannery.Ammo.AmmoType do
] ]
@doc false @doc false
@spec create_changeset(new_ammo_type(), User.t(), attrs :: map()) :: changeset() @spec create_changeset(new_type(), User.t(), attrs :: map()) :: changeset()
def create_changeset(ammo_type, %User{id: user_id}, attrs) do def create_changeset(type, %User{id: user_id}, attrs) do
changeset = changeset =
ammo_type type
|> change(user_id: user_id) |> change(user_id: user_id)
|> cast(attrs, changeset_fields()) |> cast(attrs, changeset_fields())
@ -210,10 +210,10 @@ defmodule Cannery.Ammo.AmmoType do
end end
@doc false @doc false
@spec update_changeset(t() | new_ammo_type(), attrs :: map()) :: changeset() @spec update_changeset(t() | new_type(), attrs :: map()) :: changeset()
def update_changeset(ammo_type, attrs) do def update_changeset(type, attrs) do
changeset = changeset =
ammo_type type
|> cast(attrs, changeset_fields()) |> cast(attrs, changeset_fields())
string_fields() string_fields()

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.Components.AddShotGroupComponent do defmodule CanneryWeb.Components.AddShotRecordComponent do
@moduledoc """ @moduledoc """
Livecomponent that can create a ShotGroup Livecomponent that can create a ShotRecord
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo.Pack} alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo.Pack}
alias Ecto.Changeset alias Ecto.Changeset
alias Phoenix.LiveView.{JS, Socket} alias Phoenix.LiveView.{JS, Socket}
@ -19,8 +19,8 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
) :: {:ok, Socket.t()} ) :: {:ok, Socket.t()}
def update(%{pack: pack, current_user: current_user} = assigns, socket) do def update(%{pack: pack, current_user: current_user} = assigns, socket) do
changeset = changeset =
%ShotGroup{date: Date.utc_today()} %ShotRecord{date: Date.utc_today()}
|> ShotGroup.create_changeset(current_user, pack, %{}) |> ShotRecord.create_changeset(current_user, pack, %{})
{:ok, socket |> assign(assigns) |> assign(:changeset, changeset)} {:ok, socket |> assign(assigns) |> assign(:changeset, changeset)}
end end
@ -28,12 +28,12 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
@impl true @impl true
def handle_event( def handle_event(
"validate", "validate",
%{"shot_group" => shot_group_params}, %{"shot_record" => shot_record_params},
%{assigns: %{pack: pack, current_user: current_user}} = socket %{assigns: %{pack: pack, current_user: current_user}} = socket
) do ) do
params = shot_group_params |> process_params(pack) params = shot_record_params |> process_params(pack)
changeset = %ShotGroup{} |> ShotGroup.create_changeset(current_user, pack, params) changeset = %ShotRecord{} |> ShotRecord.create_changeset(current_user, pack, params)
changeset = changeset =
case changeset |> Changeset.apply_action(:validate) do case changeset |> Changeset.apply_action(:validate) do
@ -46,17 +46,17 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
def handle_event( def handle_event(
"save", "save",
%{"shot_group" => shot_group_params}, %{"shot_record" => shot_record_params},
%{ %{
assigns: %{pack: pack, current_user: current_user, return_to: return_to} assigns: %{pack: pack, current_user: current_user, return_to: return_to}
} = socket } = socket
) do ) do
socket = socket =
shot_group_params shot_record_params
|> process_params(pack) |> process_params(pack)
|> ActivityLog.create_shot_group(current_user, pack) |> ActivityLog.create_shot_record(current_user, pack)
|> case do |> case do
{:ok, _shot_group} -> {:ok, _shot_record} ->
prompt = dgettext("prompts", "Shots recorded successfully") prompt = dgettext("prompts", "Shots recorded successfully")
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to) socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
@ -69,7 +69,7 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
# calculate count from shots left # calculate count from shots left
defp process_params(params, %Pack{count: count}) do defp process_params(params, %Pack{count: count}) do
shot_group_count = shot_record_count =
if params |> Map.get("ammo_left", "") == "" do if params |> Map.get("ammo_left", "") == "" do
nil nil
else else
@ -77,6 +77,6 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
count - new_count count - new_count
end end
params |> Map.put("count", shot_group_count) params |> Map.put("count", shot_record_count)
end end
end end

View File

@ -6,7 +6,7 @@
<.form <.form
:let={f} :let={f}
for={@changeset} for={@changeset}
id="shot-group-form" id="shot-record-form"
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
phx-target={@myself} phx-target={@myself}
phx-change="validate" phx-change="validate"
@ -29,7 +29,7 @@
<button <button
type="button" type="button"
class="mx-2 my-1 text-sm btn btn-primary" class="mx-2 my-1 text-sm btn btn-primary"
phx-click={JS.dispatch("cannery:set-zero", to: "#shot-group-form_ammo_left")} phx-click={JS.dispatch("cannery:set-zero", to: "#shot-record-form_ammo_left")}
> >
<%= gettext("Used up!") %> <%= gettext("Used up!") %>
</button> </button>
@ -37,7 +37,7 @@
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes, <%= textarea(f, :notes,
id: "add-shot-group-form-notes", id: "add-shot-record-form-notes",
class: "input input-primary col-span-2", class: "input input-primary col-span-2",
maxlength: 255, maxlength: 255,
placeholder: gettext("Really great weather"), placeholder: gettext("Really great weather"),

View File

@ -7,7 +7,7 @@
> >
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="mb-2 link"> <.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="mb-2 link">
<h1 class="title text-xl title-primary-500"> <h1 class="title text-xl title-primary-500">
<%= @pack.ammo_type.name %> <%= @pack.type.name %>
</h1> </h1>
</.link> </.link>

View File

@ -44,7 +44,7 @@
</li> </li>
<li class="mx-2 my-1"> <li class="mx-2 my-1">
<.link <.link
navigate={Routes.ammo_type_index_path(Endpoint, :index)} navigate={Routes.type_index_path(Endpoint, :index)}
class="text-white hover:underline" class="text-white hover:underline"
> >
<%= gettext("Catalog") %> <%= gettext("Catalog") %>

View File

@ -16,7 +16,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
required(:current_user) => User.t(), required(:current_user) => User.t(),
required(:packs) => [Pack.t()], required(:packs) => [Pack.t()],
required(:show_used) => boolean(), required(:show_used) => boolean(),
optional(:ammo_type) => Rendered.t(), optional(:type) => Rendered.t(),
optional(:range) => Rendered.t(), optional(:range) => Rendered.t(),
optional(:container) => Rendered.t(), optional(:container) => Rendered.t(),
optional(:actions) => Rendered.t(), optional(:actions) => Rendered.t(),
@ -31,7 +31,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
socket = socket =
socket socket
|> assign(assigns) |> assign(assigns)
|> assign_new(:ammo_type, fn -> [] end) |> assign_new(:type, fn -> [] end)
|> assign_new(:range, fn -> [] end) |> assign_new(:range, fn -> [] end)
|> assign_new(:container, fn -> [] end) |> assign_new(:container, fn -> [] end)
|> assign_new(:actions, fn -> [] end) |> assign_new(:actions, fn -> [] end)
@ -45,7 +45,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
assigns: %{ assigns: %{
packs: packs, packs: packs,
current_user: current_user, current_user: current_user,
ammo_type: ammo_type, type: type,
range: range, range: range,
container: container, container: container,
actions: actions, actions: actions,
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.PackTableComponent do
key: :count key: :count
}) })
|> TableComponent.maybe_compose_columns( |> TableComponent.maybe_compose_columns(
%{label: gettext("Ammo type"), key: :ammo_type}, %{label: gettext("Type"), key: :type},
ammo_type != [] type != []
) )
containers = containers =
@ -103,7 +103,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
extra_data = %{ extra_data = %{
current_user: current_user, current_user: current_user,
ammo_type: ammo_type, type: type,
columns: columns, columns: columns,
container: container, container: container,
containers: containers, containers: containers,
@ -144,15 +144,15 @@ defmodule CanneryWeb.Components.PackTableComponent do
@spec get_value_for_key(atom(), Pack.t(), additional_data :: map()) :: @spec get_value_for_key(atom(), Pack.t(), additional_data :: map()) ::
any() | {any(), Rendered.t()} any() | {any(), Rendered.t()}
defp get_value_for_key( defp get_value_for_key(
:ammo_type, :type,
%{ammo_type: %{name: ammo_type_name} = ammo_type}, %{type: %{name: type_name} = type},
%{ammo_type: ammo_type_block} %{type: type_block}
) do ) do
assigns = %{ammo_type: ammo_type, ammo_type_block: ammo_type_block} assigns = %{type: type, type_block: type_block}
{ammo_type_name, {type_name,
~H""" ~H"""
<%= render_slot(@ammo_type_block, @ammo_type) %> <%= render_slot(@type_block, @type) %>
"""} """}
end end

View File

@ -1,9 +1,9 @@
defmodule CanneryWeb.Components.ShotGroupTableComponent do defmodule CanneryWeb.Components.ShotRecordTableComponent do
@moduledoc """ @moduledoc """
A component that displays a list of shot groups A component that displays a list of shot records
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo, ComparableDate} alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Ammo, ComparableDate}
alias Ecto.UUID alias Ecto.UUID
alias Phoenix.LiveView.{Rendered, Socket} alias Phoenix.LiveView.{Rendered, Socket}
@ -12,26 +12,29 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
%{ %{
required(:id) => UUID.t(), required(:id) => UUID.t(),
required(:current_user) => User.t(), required(:current_user) => User.t(),
optional(:shot_groups) => [ShotGroup.t()], optional(:shot_records) => [ShotRecord.t()],
optional(:actions) => Rendered.t(), optional(:actions) => Rendered.t(),
optional(any()) => any() optional(any()) => any()
}, },
Socket.t() Socket.t()
) :: {:ok, Socket.t()} ) :: {:ok, Socket.t()}
def update(%{id: _id, shot_groups: _shot_groups, current_user: _current_user} = assigns, socket) do def update(
%{id: _id, shot_records: _shot_records, current_user: _current_user} = assigns,
socket
) do
socket = socket =
socket socket
|> assign(assigns) |> assign(assigns)
|> assign_new(:actions, fn -> [] end) |> assign_new(:actions, fn -> [] end)
|> display_shot_groups() |> display_shot_records()
{:ok, socket} {:ok, socket}
end end
defp display_shot_groups( defp display_shot_records(
%{ %{
assigns: %{ assigns: %{
shot_groups: shot_groups, shot_records: shot_records,
current_user: current_user, current_user: current_user,
actions: actions actions: actions
} }
@ -46,16 +49,16 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
] ]
packs = packs =
shot_groups shot_records
|> Enum.map(fn %{pack_id: pack_id} -> pack_id end) |> Enum.map(fn %{pack_id: pack_id} -> pack_id end)
|> Ammo.get_packs(current_user) |> Ammo.get_packs(current_user)
extra_data = %{current_user: current_user, actions: actions, packs: packs} extra_data = %{current_user: current_user, actions: actions, packs: packs}
rows = rows =
shot_groups shot_records
|> Enum.map(fn shot_group -> |> Enum.map(fn shot_record ->
shot_group |> get_row_data_for_shot_group(columns, extra_data) shot_record |> get_row_data_for_shot_record(columns, extra_data)
end) end)
socket socket
@ -81,22 +84,22 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
""" """
end end
@spec get_row_data_for_shot_group(ShotGroup.t(), columns :: [map()], extra_data :: map()) :: @spec get_row_data_for_shot_record(ShotRecord.t(), columns :: [map()], extra_data :: map()) ::
map() map()
defp get_row_data_for_shot_group(shot_group, columns, extra_data) do defp get_row_data_for_shot_record(shot_record, columns, extra_data) do
columns columns
|> Map.new(fn %{key: key} -> |> Map.new(fn %{key: key} ->
{key, get_row_value(key, shot_group, extra_data)} {key, get_row_value(key, shot_record, extra_data)}
end) end)
end end
defp get_row_value(:name, %{pack_id: pack_id}, %{packs: packs}) do defp get_row_value(:name, %{pack_id: pack_id}, %{packs: packs}) do
assigns = %{pack: pack = Map.fetch!(packs, pack_id)} assigns = %{pack: pack = Map.fetch!(packs, pack_id)}
{pack.ammo_type.name, {pack.type.name,
~H""" ~H"""
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="link"> <.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="link">
<%= @pack.ammo_type.name %> <%= @pack.type.name %>
</.link> </.link>
"""} """}
end end
@ -108,13 +111,13 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
"""} """}
end end
defp get_row_value(:actions, shot_group, %{actions: actions}) do defp get_row_value(:actions, shot_record, %{actions: actions}) do
assigns = %{actions: actions, shot_group: shot_group} assigns = %{actions: actions, shot_record: shot_record}
~H""" ~H"""
<%= render_slot(@actions, @shot_group) %> <%= render_slot(@actions, @shot_record) %>
""" """
end end
defp get_row_value(key, shot_group, _extra_data), do: shot_group |> Map.get(key) defp get_row_value(key, shot_record, _extra_data), do: shot_record |> Map.get(key)
end end

View File

@ -1,9 +1,9 @@
defmodule CanneryWeb.Components.AmmoTypeTableComponent do defmodule CanneryWeb.Components.TypeTableComponent do
@moduledoc """ @moduledoc """
A component that displays a list of ammo type A component that displays a list of types
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.AmmoType} alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.Type}
alias CanneryWeb.Components.TableComponent alias CanneryWeb.Components.TableComponent
alias Ecto.UUID alias Ecto.UUID
alias Phoenix.LiveView.{Rendered, Socket} alias Phoenix.LiveView.{Rendered, Socket}
@ -13,30 +13,30 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
%{ %{
required(:id) => UUID.t(), required(:id) => UUID.t(),
required(:current_user) => User.t(), required(:current_user) => User.t(),
optional(:class) => AmmoType.class() | nil, optional(:class) => Type.class() | nil,
optional(:show_used) => boolean(), optional(:show_used) => boolean(),
optional(:ammo_types) => [AmmoType.t()], optional(:types) => [Type.t()],
optional(:actions) => Rendered.t(), optional(:actions) => Rendered.t(),
optional(any()) => any() optional(any()) => any()
}, },
Socket.t() Socket.t()
) :: {:ok, Socket.t()} ) :: {:ok, Socket.t()}
def update(%{id: _id, ammo_types: _ammo_types, current_user: _current_user} = assigns, socket) do def update(%{id: _id, types: _types, current_user: _current_user} = assigns, socket) do
socket = socket =
socket socket
|> assign(assigns) |> assign(assigns)
|> assign_new(:show_used, fn -> false end) |> assign_new(:show_used, fn -> false end)
|> assign_new(:class, fn -> :all end) |> assign_new(:class, fn -> :all end)
|> assign_new(:actions, fn -> [] end) |> assign_new(:actions, fn -> [] end)
|> display_ammo_types() |> display_types()
{:ok, socket} {:ok, socket}
end end
defp display_ammo_types( defp display_types(
%{ %{
assigns: %{ assigns: %{
ammo_types: ammo_types, types: types,
current_user: current_user, current_user: current_user,
show_used: show_used, show_used: show_used,
class: class, class: class,
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
# remove columns if all values match defaults # remove columns if all values match defaults
default_value = if type == :atom, do: false, else: nil default_value = if type == :atom, do: false, else: nil
ammo_types types
|> Enum.any?(fn ammo_type -> Map.get(ammo_type, key, default_value) != default_value end) |> Enum.any?(fn type -> Map.get(type, key, default_value) != default_value end)
end) end)
columns = columns =
@ -152,17 +152,17 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
) )
|> TableComponent.maybe_compose_columns(%{label: gettext("Name"), key: :name, type: :name}) |> TableComponent.maybe_compose_columns(%{label: gettext("Name"), key: :name, type: :name})
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user) round_counts = types |> Ammo.get_round_count_for_types(current_user)
packs_count = ammo_types |> Ammo.get_packs_count_for_types(current_user) packs_count = types |> Ammo.get_packs_count_for_types(current_user)
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user) average_costs = types |> Ammo.get_average_cost_for_types(current_user)
[used_counts, historical_round_counts, historical_pack_counts, used_pack_counts] = [used_counts, historical_round_counts, historical_pack_counts, used_pack_counts] =
if show_used do if show_used do
[ [
ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user), types |> ActivityLog.get_used_count_for_types(current_user),
ammo_types |> Ammo.get_historical_count_for_ammo_types(current_user), types |> Ammo.get_historical_count_for_types(current_user),
ammo_types |> Ammo.get_packs_count_for_types(current_user, true), types |> Ammo.get_packs_count_for_types(current_user, true),
ammo_types |> Ammo.get_used_packs_count_for_types(current_user) types |> Ammo.get_used_packs_count_for_types(current_user)
] ]
else else
[nil, nil, nil, nil] [nil, nil, nil, nil]
@ -181,9 +181,9 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
} }
rows = rows =
ammo_types types
|> Enum.map(fn ammo_type -> |> Enum.map(fn type ->
ammo_type |> get_ammo_type_values(columns, extra_data) type |> get_type_values(columns, extra_data)
end) end)
socket |> assign(columns: columns, rows: rows) socket |> assign(columns: columns, rows: rows)
@ -198,92 +198,92 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do
""" """
end end
defp get_ammo_type_values(ammo_type, columns, extra_data) do defp get_type_values(type, columns, extra_data) do
columns columns
|> Map.new(fn %{key: key, type: type} -> |> Map.new(fn %{key: key, type: column_type} ->
{key, get_ammo_type_value(type, key, ammo_type, extra_data)} {key, get_type_value(column_type, key, type, extra_data)}
end) end)
end end
defp get_ammo_type_value(:atom, key, ammo_type, _other_data), defp get_type_value(:atom, key, type, _other_data),
do: ammo_type |> Map.get(key) |> humanize() do: type |> Map.get(key) |> humanize()
defp get_ammo_type_value(:round_count, _key, %{id: ammo_type_id}, %{round_counts: round_counts}), defp get_type_value(:round_count, _key, %{id: type_id}, %{round_counts: round_counts}),
do: Map.get(round_counts, ammo_type_id, 0) do: Map.get(round_counts, type_id, 0)
defp get_ammo_type_value( defp get_type_value(
:historical_round_count, :historical_round_count,
_key, _key,
%{id: ammo_type_id}, %{id: type_id},
%{historical_round_counts: historical_round_counts} %{historical_round_counts: historical_round_counts}
) do ) do
Map.get(historical_round_counts, ammo_type_id, 0) Map.get(historical_round_counts, type_id, 0)
end end
defp get_ammo_type_value( defp get_type_value(
:used_round_count, :used_round_count,
_key, _key,
%{id: ammo_type_id}, %{id: type_id},
%{used_counts: used_counts} %{used_counts: used_counts}
) do ) do
Map.get(used_counts, ammo_type_id, 0) Map.get(used_counts, type_id, 0)
end end
defp get_ammo_type_value( defp get_type_value(
:historical_pack_count, :historical_pack_count,
_key, _key,
%{id: ammo_type_id}, %{id: type_id},
%{historical_pack_counts: historical_pack_counts} %{historical_pack_counts: historical_pack_counts}
) do ) do
Map.get(historical_pack_counts, ammo_type_id, 0) Map.get(historical_pack_counts, type_id, 0)
end end
defp get_ammo_type_value( defp get_type_value(
:used_pack_count, :used_pack_count,
_key, _key,
%{id: ammo_type_id}, %{id: type_id},
%{used_pack_counts: used_pack_counts} %{used_pack_counts: used_pack_counts}
) do ) do
Map.get(used_pack_counts, ammo_type_id, 0) Map.get(used_pack_counts, type_id, 0)
end end
defp get_ammo_type_value(:ammo_count, _key, %{id: ammo_type_id}, %{packs_count: packs_count}), defp get_type_value(:ammo_count, _key, %{id: type_id}, %{packs_count: packs_count}),
do: Map.get(packs_count, ammo_type_id) do: Map.get(packs_count, type_id)
defp get_ammo_type_value( defp get_type_value(
:avg_price_paid, :avg_price_paid,
_key, _key,
%{id: ammo_type_id}, %{id: type_id},
%{average_costs: average_costs} %{average_costs: average_costs}
) do ) do
case Map.get(average_costs, ammo_type_id) do case Map.get(average_costs, type_id) do
nil -> {0, gettext("No cost information")} nil -> {0, gettext("No cost information")}
count -> {count, gettext("$%{amount}", amount: display_currency(count))} count -> {count, gettext("$%{amount}", amount: display_currency(count))}
end end
end end
defp get_ammo_type_value(:name, _key, %{name: ammo_type_name} = ammo_type, _other_data) do defp get_type_value(:name, _key, %{name: type_name} = type, _other_data) do
assigns = %{ammo_type: ammo_type} assigns = %{type: type}
{ammo_type_name, {type_name,
~H""" ~H"""
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)} class="link"> <.link navigate={Routes.type_show_path(Endpoint, :show, @type)} class="link">
<%= @ammo_type.name %> <%= @type.name %>
</.link> </.link>
"""} """}
end end
defp get_ammo_type_value(:actions, _key, ammo_type, %{actions: actions}) do defp get_type_value(:actions, _key, type, %{actions: actions}) do
assigns = %{actions: actions, ammo_type: ammo_type} assigns = %{actions: actions, type: type}
~H""" ~H"""
<%= render_slot(@actions, @ammo_type) %> <%= render_slot(@actions, @type) %>
""" """
end end
defp get_ammo_type_value(nil, _key, _ammo_type, _other_data), do: nil defp get_type_value(nil, _key, _type, _other_data), do: nil
defp get_ammo_type_value(_other, key, ammo_type, _other_data), do: ammo_type |> Map.get(key) defp get_type_value(_other, key, type, _other_data), do: type |> Map.get(key)
@spec display_currency(float()) :: String.t() @spec display_currency(float()) :: String.t()
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2) defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)

View File

@ -3,27 +3,27 @@ defmodule CanneryWeb.ExportController do
alias Cannery.{ActivityLog, Ammo, Containers} alias Cannery.{ActivityLog, Ammo, Containers}
def export(%{assigns: %{current_user: current_user}} = conn, %{"mode" => "json"}) do def export(%{assigns: %{current_user: current_user}} = conn, %{"mode" => "json"}) do
ammo_types = Ammo.list_ammo_types(current_user, :all) types = Ammo.list_types(current_user, :all)
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user) used_counts = types |> ActivityLog.get_used_count_for_types(current_user)
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user) round_counts = types |> Ammo.get_round_count_for_types(current_user)
pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user) pack_counts = types |> Ammo.get_packs_count_for_types(current_user)
total_pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user, true) total_pack_counts = types |> Ammo.get_packs_count_for_types(current_user, true)
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user) average_costs = types |> Ammo.get_average_cost_for_types(current_user)
ammo_types = types =
ammo_types types
|> Enum.map(fn %{id: ammo_type_id} = ammo_type -> |> Enum.map(fn %{id: type_id} = type ->
ammo_type type
|> Jason.encode!() |> Jason.encode!()
|> Jason.decode!() |> Jason.decode!()
|> Map.merge(%{ |> Map.merge(%{
"average_cost" => Map.get(average_costs, ammo_type_id), "average_cost" => Map.get(average_costs, type_id),
"round_count" => Map.get(round_counts, ammo_type_id, 0), "round_count" => Map.get(round_counts, type_id, 0),
"used_count" => Map.get(used_counts, ammo_type_id, 0), "used_count" => Map.get(used_counts, type_id, 0),
"pack_count" => Map.get(pack_counts, ammo_type_id, 0), "pack_count" => Map.get(pack_counts, type_id, 0),
"total_pack_count" => Map.get(total_pack_counts, ammo_type_id, 0) "total_pack_count" => Map.get(total_pack_counts, type_id, 0)
}) })
end) end)
@ -47,7 +47,7 @@ defmodule CanneryWeb.ExportController do
}) })
end) end)
shot_groups = ActivityLog.list_shot_groups(:all, current_user) shot_records = ActivityLog.list_shot_records(:all, current_user)
containers = containers =
Containers.list_containers(current_user) Containers.list_containers(current_user)
@ -66,9 +66,9 @@ defmodule CanneryWeb.ExportController do
json(conn, %{ json(conn, %{
user: current_user, user: current_user,
ammo_types: ammo_types, types: types,
packs: packs, packs: packs,
shot_groups: shot_groups, shot_records: shot_records,
containers: containers containers: containers
}) })
end end

View File

@ -86,19 +86,19 @@ defmodule CanneryWeb.ContainerLive.Show do
{:noreply, socket |> assign(:view_table, !view_table) |> render_container()} {:noreply, socket |> assign(:view_table, !view_table) |> render_container()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> render_container()} {:noreply, socket |> assign(:class, :rifle) |> render_container()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> render_container()} {:noreply, socket |> assign(:class, :shotgun) |> render_container()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> render_container()} {:noreply, socket |> assign(:class, :pistol) |> render_container()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> render_container()} {:noreply, socket |> assign(:class, :all) |> render_container()}
end end

View File

@ -89,7 +89,7 @@
<.form <.form
:let={f} :let={f}
for={%{}} for={%{}}
as={:ammo_type} as={:type}
phx-change="change_class" phx-change="change_class"
phx-submit="change_class" phx-submit="change_class"
class="flex items-center" class="flex items-center"
@ -126,16 +126,16 @@
<%= if @view_table do %> <%= if @view_table do %>
<.live_component <.live_component
module={CanneryWeb.Components.PackTableComponent} module={CanneryWeb.Components.PackTableComponent}
id="ammo-type-show-table" id="type-show-table"
packs={@packs} packs={@packs}
current_user={@current_user} current_user={@current_user}
show_used={false} show_used={false}
> >
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}> <:type :let={%{name: type_name} = type}>
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link"> <.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
<%= ammo_type_name %> <%= type_name %>
</.link> </.link>
</:ammo_type> </:type>
</.live_component> </.live_component>
<% else %> <% else %>
<div class="flex flex-wrap justify-center items-stretch"> <div class="flex flex-wrap justify-center items-stretch">

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.FormComponent do
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.Ammo.{AmmoType, Pack} alias Cannery.Ammo.{Pack, Type}
alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container} alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container}
alias Ecto.Changeset alias Ecto.Changeset
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket
@ -22,17 +22,17 @@ defmodule CanneryWeb.PackLive.FormComponent do
@spec update(Socket.t()) :: {:ok, Socket.t()} @spec update(Socket.t()) :: {:ok, Socket.t()}
def update(%{assigns: %{current_user: current_user}} = socket) do def update(%{assigns: %{current_user: current_user}} = socket) do
%{assigns: %{ammo_types: ammo_types, containers: containers}} = %{assigns: %{types: types, containers: containers}} =
socket = socket =
socket socket
|> assign(:pack_create_limit, @pack_create_limit) |> assign(:pack_create_limit, @pack_create_limit)
|> assign(:ammo_types, Ammo.list_ammo_types(current_user, :all)) |> assign(:types, Ammo.list_types(current_user, :all))
|> assign_new(:containers, fn -> Containers.list_containers(current_user) end) |> assign_new(:containers, fn -> Containers.list_containers(current_user) end)
params = params =
if ammo_types |> List.first() |> is_nil(), if types |> List.first() |> is_nil(),
do: %{}, do: %{},
else: %{} |> Map.put("ammo_type_id", ammo_types |> List.first() |> Map.get(:id)) else: %{} |> Map.put("type_id", types |> List.first() |> Map.get(:id))
params = params =
if containers |> List.first() |> is_nil(), if containers |> List.first() |> is_nil(),
@ -62,9 +62,9 @@ defmodule CanneryWeb.PackLive.FormComponent do
containers |> Enum.map(fn %{id: id, name: name} -> {name, id} end) containers |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
end end
@spec ammo_type_options([AmmoType.t()]) :: [{String.t(), AmmoType.id()}] @spec type_options([Type.t()]) :: [{String.t(), Type.id()}]
defp ammo_type_options(ammo_types) do defp type_options(types) do
ammo_types |> Enum.map(fn %{id: id, name: name} -> {name, id} end) types |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
end end
# Save Helpers # Save Helpers
@ -83,9 +83,9 @@ defmodule CanneryWeb.PackLive.FormComponent do
changeset = changeset =
case default_action do case default_action do
:insert -> :insert ->
ammo_type = maybe_get_ammo_type(pack_params, user) type = maybe_get_type(pack_params, user)
container = maybe_get_container(pack_params, user) container = maybe_get_container(pack_params, user)
pack |> Pack.create_changeset(ammo_type, container, user, pack_params) pack |> Pack.create_changeset(type, container, user, pack_params)
:update -> :update ->
pack |> Pack.update_changeset(pack_params, user) pack |> Pack.update_changeset(pack_params, user)
@ -107,12 +107,12 @@ defmodule CanneryWeb.PackLive.FormComponent do
defp maybe_get_container(_params_not_found, _user), do: nil defp maybe_get_container(_params_not_found, _user), do: nil
defp maybe_get_ammo_type(%{"ammo_type_id" => ammo_type_id}, user) defp maybe_get_type(%{"type_id" => type_id}, user)
when is_binary(ammo_type_id) do when is_binary(type_id) do
ammo_type_id |> Ammo.get_ammo_type!(user) type_id |> Ammo.get_type!(user)
end end
defp maybe_get_ammo_type(_params_not_found, _user), do: nil defp maybe_get_type(_params_not_found, _user), do: nil
defp save_pack( defp save_pack(
%{assigns: %{pack: pack, current_user: current_user, return_to: return_to}} = socket, %{assigns: %{pack: pack, current_user: current_user, return_to: return_to}} = socket,

View File

@ -19,11 +19,11 @@
<%= changeset_errors(@changeset) %> <%= changeset_errors(@changeset) %>
</div> </div>
<%= label(f, :ammo_type_id, gettext("Ammo type"), class: "title text-lg text-primary-600") %> <%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %>
<%= select(f, :ammo_type_id, ammo_type_options(@ammo_types), <%= select(f, :type_id, type_options(@types),
class: "text-center col-span-2 input input-primary" class: "text-center col-span-2 input input-primary"
) %> ) %>
<%= error_tag(f, :ammo_type_id, "col-span-3 text-center") %> <%= error_tag(f, :type_id, "col-span-3 text-center") %>
<%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %> <%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count, <%= number_input(f, :count,
@ -49,7 +49,7 @@
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes, <%= textarea(f, :notes,
id: "ammo-group-form-notes", id: "pack-form-notes",
class: "text-center col-span-2 input input-primary", class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs", phx_hook: "MaintainAttrs",
phx_update: "ignore" phx_update: "ignore"

View File

@ -27,7 +27,7 @@ defmodule CanneryWeb.PackLive.Index do
defp apply_action( defp apply_action(
%{assigns: %{current_user: current_user}} = socket, %{assigns: %{current_user: current_user}} = socket,
:add_shot_group, :add_shot_record,
%{"id" => id} %{"id" => id}
) do ) do
socket socket
@ -122,19 +122,19 @@ defmodule CanneryWeb.PackLive.Index do
{:noreply, socket} {:noreply, socket}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> display_packs()} {:noreply, socket |> assign(:class, :rifle) |> display_packs()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> display_packs()} {:noreply, socket |> assign(:class, :shotgun) |> display_packs()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> display_packs()} {:noreply, socket |> assign(:class, :pistol) |> display_packs()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> display_packs()} {:noreply, socket |> assign(:class, :all) |> display_packs()}
end end
@ -152,13 +152,13 @@ defmodule CanneryWeb.PackLive.Index do
# prompts # prompts
packs_count = Ammo.get_packs_count!(current_user, true) packs_count = Ammo.get_packs_count!(current_user, true)
packs = Ammo.list_packs(search, class, current_user, show_used) packs = Ammo.list_packs(search, class, current_user, show_used)
ammo_types_count = Ammo.get_ammo_types_count!(current_user) types_count = Ammo.get_types_count!(current_user)
containers_count = Containers.get_containers_count!(current_user) containers_count = Containers.get_containers_count!(current_user)
socket socket
|> assign( |> assign(
packs: packs, packs: packs,
ammo_types_count: ammo_types_count, types_count: types_count,
containers_count: containers_count, containers_count: containers_count,
packs_count: packs_count packs_count: packs_count
) )

View File

@ -14,14 +14,14 @@
<%= dgettext("actions", "add a container first") %> <%= dgettext("actions", "add a container first") %>
</.link> </.link>
</div> </div>
<% @ammo_types_count == 0 -> %> <% @types_count == 0 -> %>
<div class="flex justify-center items-center"> <div class="flex justify-center items-center">
<h2 class="m-2 title text-md text-primary-600"> <h2 class="m-2 title text-md text-primary-600">
<%= dgettext("prompts", "You'll need to") %> <%= dgettext("prompts", "You'll need to") %>
</h2> </h2>
<.link navigate={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary"> <.link navigate={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "add an ammo type first") %> <%= dgettext("actions", "add a type first") %>
</.link> </.link>
</div> </div>
<% @packs_count == 0 -> %> <% @packs_count == 0 -> %>
@ -42,7 +42,7 @@
<.form <.form
:let={f} :let={f}
for={%{}} for={%{}}
as={:ammo_type} as={:type}
phx-change="change_class" phx-change="change_class"
phx-submit="change_class" phx-submit="change_class"
class="flex items-center" class="flex items-center"
@ -97,16 +97,16 @@
<% else %> <% else %>
<.live_component <.live_component
module={CanneryWeb.Components.PackTableComponent} module={CanneryWeb.Components.PackTableComponent}
id="ammo-group-index-table" id="pack-index-table"
packs={@packs} packs={@packs}
current_user={@current_user} current_user={@current_user}
show_used={@show_used} show_used={@show_used}
> >
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}> <:type :let={%{name: type_name} = type}>
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link"> <.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
<%= ammo_type_name %> <%= type_name %>
</.link> </.link>
</:ammo_type> </:type>
<:range :let={pack}> <:range :let={pack}>
<div class="min-w-20 py-2 px-4 h-full flex flew-wrap justify-center items-center"> <div class="min-w-20 py-2 px-4 h-full flex flew-wrap justify-center items-center">
<button <button
@ -121,7 +121,7 @@
</button> </button>
<.link <.link
patch={Routes.pack_index_path(Endpoint, :add_shot_group, pack)} patch={Routes.pack_index_path(Endpoint, :add_shot_record, pack)}
class="mx-2 my-1 text-sm btn btn-primary" class="mx-2 my-1 text-sm btn btn-primary"
> >
<%= dgettext("actions", "Record shots") %> <%= dgettext("actions", "Record shots") %>
@ -213,10 +213,10 @@
current_user={@current_user} current_user={@current_user}
/> />
</.modal> </.modal>
<% :add_shot_group -> %> <% :add_shot_record -> %>
<.modal return_to={Routes.pack_index_path(Endpoint, :index)}> <.modal return_to={Routes.pack_index_path(Endpoint, :index)}>
<.live_component <.live_component
module={CanneryWeb.Components.AddShotGroupComponent} module={CanneryWeb.Components.AddShotRecordComponent}
id={:new} id={:new}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.Show do
""" """
use CanneryWeb, :live_view use CanneryWeb, :live_view
alias Cannery.{ActivityLog, ActivityLog.ShotGroup} alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
alias Cannery.{Ammo, Ammo.Pack} alias Cannery.{Ammo, Ammo.Pack}
alias Cannery.{ComparableDate, Containers} alias Cannery.{ComparableDate, Containers}
alias CanneryWeb.Endpoint alias CanneryWeb.Endpoint
@ -15,15 +15,15 @@ defmodule CanneryWeb.PackLive.Show do
@impl true @impl true
def handle_params( def handle_params(
%{"id" => id, "shot_group_id" => shot_group_id}, %{"id" => id, "shot_record_id" => shot_record_id},
_url, _url,
%{assigns: %{live_action: live_action, current_user: current_user}} = socket %{assigns: %{live_action: live_action, current_user: current_user}} = socket
) do ) do
shot_group = ActivityLog.get_shot_group!(shot_group_id, current_user) shot_record = ActivityLog.get_shot_record!(shot_record_id, current_user)
socket = socket =
socket socket
|> assign(page_title: page_title(live_action), shot_group: shot_group) |> assign(page_title: page_title(live_action), shot_record: shot_record)
|> display_pack(id) |> display_pack(id)
{:noreply, socket} {:noreply, socket}
@ -38,8 +38,8 @@ defmodule CanneryWeb.PackLive.Show do
{:noreply, socket} {:noreply, socket}
end end
defp page_title(:add_shot_group), do: gettext("Record Shots") defp page_title(:add_shot_record), do: gettext("Record Shots")
defp page_title(:edit_shot_group), do: gettext("Edit Shot Records") defp page_title(:edit_shot_record), do: gettext("Edit Shot Record")
defp page_title(:move), do: gettext("Move Ammo") defp page_title(:move), do: gettext("Move Ammo")
defp page_title(:show), do: gettext("Show Ammo") defp page_title(:show), do: gettext("Show Ammo")
defp page_title(:edit), do: gettext("Edit Ammo") defp page_title(:edit), do: gettext("Edit Ammo")
@ -69,13 +69,13 @@ defmodule CanneryWeb.PackLive.Show do
end end
def handle_event( def handle_event(
"delete_shot_group", "delete_shot_record",
%{"id" => id}, %{"id" => id},
%{assigns: %{pack: %{id: pack_id}, current_user: current_user}} = socket %{assigns: %{pack: %{id: pack_id}, current_user: current_user}} = socket
) do ) do
{:ok, _} = {:ok, _} =
ActivityLog.get_shot_group!(id, current_user) ActivityLog.get_shot_record!(id, current_user)
|> ActivityLog.delete_shot_group(current_user) |> ActivityLog.delete_shot_record(current_user)
prompt = dgettext("prompts", "Shot records deleted succesfully") prompt = dgettext("prompts", "Shot records deleted succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_pack(pack_id)} {:noreply, socket |> put_flash(:info, prompt) |> display_pack(pack_id)}
@ -93,12 +93,12 @@ defmodule CanneryWeb.PackLive.Show do
%{label: gettext("Actions"), key: :actions, sortable: false} %{label: gettext("Actions"), key: :actions, sortable: false}
] ]
shot_groups = ActivityLog.list_shot_groups_for_pack(pack, current_user) shot_records = ActivityLog.list_shot_records_for_pack(pack, current_user)
rows = rows =
shot_groups shot_records
|> Enum.map(fn shot_group -> |> Enum.map(fn shot_record ->
pack |> get_table_row_for_shot_group(shot_group, columns) pack |> get_table_row_for_shot_record(shot_record, columns)
end) end)
socket socket
@ -107,7 +107,7 @@ defmodule CanneryWeb.PackLive.Show do
original_count: Ammo.get_original_count(pack, current_user), original_count: Ammo.get_original_count(pack, current_user),
percentage_remaining: Ammo.get_percentage_remaining(pack, current_user), percentage_remaining: Ammo.get_percentage_remaining(pack, current_user),
container: container_id && Containers.get_container!(container_id, current_user), container: container_id && Containers.get_container!(container_id, current_user),
shot_groups: shot_groups, shot_records: shot_records,
columns: columns, columns: columns,
rows: rows rows: rows
) )
@ -119,9 +119,9 @@ defmodule CanneryWeb.PackLive.Show do
@spec display_currency(float()) :: String.t() @spec display_currency(float()) :: String.t()
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2) defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)
@spec get_table_row_for_shot_group(Pack.t(), ShotGroup.t(), [map()]) :: map() @spec get_table_row_for_shot_record(Pack.t(), ShotRecord.t(), [map()]) :: map()
defp get_table_row_for_shot_group(pack, %{id: id, date: date} = shot_group, columns) do defp get_table_row_for_shot_record(pack, %{id: id, date: date} = shot_record, columns) do
assigns = %{pack: pack, shot_group: shot_group} assigns = %{pack: pack, shot_record: shot_record}
columns columns
|> Map.new(fn %{key: key} -> |> Map.new(fn %{key: key} ->
@ -139,11 +139,11 @@ defmodule CanneryWeb.PackLive.Show do
~H""" ~H"""
<div class="px-4 py-2 space-x-4 flex justify-center items-center"> <div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link <.link
patch={Routes.pack_show_path(Endpoint, :edit_shot_group, @pack, @shot_group)} patch={Routes.pack_show_path(Endpoint, :edit_shot_record, @pack, @shot_record)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "Edit shot group of %{shot_group_count} shots", dgettext("actions", "Edit shot record of %{shot_record_count} shots",
shot_group_count: @shot_group.count shot_record_count: @shot_record.count
) )
} }
> >
@ -153,12 +153,12 @@ defmodule CanneryWeb.PackLive.Show do
<.link <.link
href="#" href="#"
class="text-primary-600 link" class="text-primary-600 link"
phx-click="delete_shot_group" phx-click="delete_shot_record"
phx-value-id={@shot_group.id} phx-value-id={@shot_record.id}
data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")} data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")}
aria-label={ aria-label={
dgettext("actions", "Delete shot record of %{shot_group_count} shots", dgettext("actions", "Delete shot record of %{shot_record_count} shots",
shot_group_count: @shot_group.count shot_record_count: @shot_record.count
) )
} }
> >
@ -168,7 +168,7 @@ defmodule CanneryWeb.PackLive.Show do
""" """
key -> key ->
shot_group |> Map.get(key) shot_record |> Map.get(key)
end end
{key, value} {key, value}

View File

@ -1,6 +1,6 @@
<div class="mx-auto space-y-4 max-w-3xl flex flex-col justify-center items-center"> <div class="mx-auto space-y-4 max-w-3xl flex flex-col justify-center items-center">
<h1 class="title text-2xl title-primary-500"> <h1 class="title text-2xl title-primary-500">
<%= @pack.ammo_type.name %> <%= @pack.type.name %>
</h1> </h1>
<div class="space-y-2 flex flex-col justify-center items-center"> <div class="space-y-2 flex flex-col justify-center items-center">
@ -49,7 +49,7 @@
<div class="flex flex-col justify-center items-center"> <div class="flex flex-col justify-center items-center">
<div class="flex flex-wrap justify-center items-center text-primary-600"> <div class="flex flex-wrap justify-center items-center text-primary-600">
<.link <.link
navigate={Routes.ammo_type_show_path(Endpoint, :show, @pack.ammo_type)} navigate={Routes.type_show_path(Endpoint, :show, @pack.type)}
class="mx-4 my-2 btn btn-primary" class="mx-4 my-2 btn btn-primary"
> >
<%= dgettext("actions", "View in Catalog") %> <%= dgettext("actions", "View in Catalog") %>
@ -90,7 +90,7 @@
</.link> </.link>
<.link <.link
patch={Routes.pack_show_path(Endpoint, :add_shot_group, @pack)} patch={Routes.pack_show_path(Endpoint, :add_shot_record, @pack)}
class="mx-4 my-2 btn btn-primary" class="mx-4 my-2 btn btn-primary"
> >
<%= dgettext("actions", "Record shots") %> <%= dgettext("actions", "Record shots") %>
@ -112,7 +112,7 @@
<% end %> <% end %>
</div> </div>
<%= unless @shot_groups |> Enum.empty?() do %> <%= unless @shot_records |> Enum.empty?() do %>
<hr class="mb-4 w-full" /> <hr class="mb-4 w-full" />
<h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl"> <h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl">
@ -121,7 +121,7 @@
<.live_component <.live_component
module={CanneryWeb.Components.TableComponent} module={CanneryWeb.Components.TableComponent}
id="pack_shot_groups_table" id="pack_shot_records_table"
columns={@columns} columns={@columns}
rows={@rows} rows={@rows}
/> />
@ -141,22 +141,22 @@
current_user={@current_user} current_user={@current_user}
/> />
</.modal> </.modal>
<% :edit_shot_group -> %> <% :edit_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}> <.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.live_component <.live_component
module={CanneryWeb.RangeLive.FormComponent} module={CanneryWeb.RangeLive.FormComponent}
id={@shot_group.id} id={@shot_record.id}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}
shot_group={@shot_group} shot_record={@shot_record}
return_to={Routes.pack_show_path(Endpoint, :show, @pack)} return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
current_user={@current_user} current_user={@current_user}
/> />
</.modal> </.modal>
<% :add_shot_group -> %> <% :add_shot_record -> %>
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}> <.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
<.live_component <.live_component
module={CanneryWeb.Components.AddShotGroupComponent} module={CanneryWeb.Components.AddShotRecordComponent}
id={:new} id={:new}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.RangeLive.FormComponent do defmodule CanneryWeb.RangeLive.FormComponent do
@moduledoc """ @moduledoc """
Livecomponent that can update a ShotGroup Livecomponent that can update a ShotRecord
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo, Ammo.Pack} alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo, Ammo.Pack}
alias Ecto.Changeset alias Ecto.Changeset
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket
@ -14,7 +14,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
@impl true @impl true
@spec update( @spec update(
%{ %{
required(:shot_group) => ShotGroup.t(), required(:shot_record) => ShotRecord.t(),
required(:current_user) => User.t(), required(:current_user) => User.t(),
optional(:pack) => Pack.t(), optional(:pack) => Pack.t(),
optional(any()) => any() optional(any()) => any()
@ -23,7 +23,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
) :: {:ok, Socket.t()} ) :: {:ok, Socket.t()}
def update( def update(
%{ %{
shot_group: %ShotGroup{pack_id: pack_id}, shot_record: %ShotRecord{pack_id: pack_id},
current_user: current_user current_user: current_user
} = assigns, } = assigns,
socket socket
@ -33,24 +33,24 @@ defmodule CanneryWeb.RangeLive.FormComponent do
{:ok, socket |> assign(assigns) |> assign(:pack, pack) |> assign_changeset(%{})} {:ok, socket |> assign(assigns) |> assign(:pack, pack) |> assign_changeset(%{})}
end end
def update(%{shot_group: %ShotGroup{}} = assigns, socket) do def update(%{shot_record: %ShotRecord{}} = assigns, socket) do
{:ok, socket |> assign(assigns) |> assign_changeset(%{})} {:ok, socket |> assign(assigns) |> assign_changeset(%{})}
end end
@impl true @impl true
def handle_event("validate", %{"shot_group" => shot_group_params}, socket) do def handle_event("validate", %{"shot_record" => shot_record_params}, socket) do
{:noreply, socket |> assign_changeset(shot_group_params, :validate)} {:noreply, socket |> assign_changeset(shot_record_params, :validate)}
end end
def handle_event( def handle_event(
"save", "save",
%{"shot_group" => shot_group_params}, %{"shot_record" => shot_record_params},
%{assigns: %{shot_group: shot_group, current_user: current_user, return_to: return_to}} = %{assigns: %{shot_record: shot_record, current_user: current_user, return_to: return_to}} =
socket socket
) do ) do
socket = socket =
case ActivityLog.update_shot_group(shot_group, shot_group_params, current_user) do case ActivityLog.update_shot_record(shot_record, shot_record_params, current_user) do
{:ok, _shot_group} -> {:ok, _shot_record} ->
prompt = dgettext("prompts", "Shot records updated successfully") prompt = dgettext("prompts", "Shot records updated successfully")
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to) socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
@ -67,22 +67,22 @@ defmodule CanneryWeb.RangeLive.FormComponent do
action: live_action, action: live_action,
current_user: user, current_user: user,
pack: pack, pack: pack,
shot_group: shot_group shot_record: shot_record
} }
} = socket, } = socket,
shot_group_params, shot_record_params,
action \\ nil action \\ nil
) do ) do
default_action = default_action =
case live_action do case live_action do
:add_shot_group -> :insert :add_shot_record -> :insert
editing when editing in [:edit, :edit_shot_group] -> :update editing when editing in [:edit, :edit_shot_record] -> :update
end end
changeset = changeset =
case default_action do case default_action do
:insert -> shot_group |> ShotGroup.create_changeset(user, pack, shot_group_params) :insert -> shot_record |> ShotRecord.create_changeset(user, pack, shot_record_params)
:update -> shot_group |> ShotGroup.update_changeset(user, shot_group_params) :update -> shot_record |> ShotRecord.update_changeset(user, shot_record_params)
end end
changeset = changeset =

View File

@ -6,7 +6,7 @@
<.form <.form
:let={f} :let={f}
for={@changeset} for={@changeset}
id="shot-group-form" id="shot-record-form"
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
phx-target={@myself} phx-target={@myself}
phx-change="validate" phx-change="validate"
@ -22,14 +22,14 @@
<%= label(f, :count, gettext("Shots fired"), class: "title text-lg text-primary-600") %> <%= label(f, :count, gettext("Shots fired"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count, <%= number_input(f, :count,
min: 1, min: 1,
max: @shot_group.count + @pack.count, max: @shot_record.count + @pack.count,
class: "input input-primary col-span-2" class: "input input-primary col-span-2"
) %> ) %>
<%= error_tag(f, :count, "col-span-3") %> <%= error_tag(f, :count, "col-span-3") %>
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %> <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes, <%= textarea(f, :notes,
id: "shot-group-form-notes", id: "shot-record-form-notes",
class: "input input-primary col-span-2", class: "input input-primary col-span-2",
maxlength: 255, maxlength: 255,
placeholder: gettext("Really great weather"), placeholder: gettext("Really great weather"),

View File

@ -4,17 +4,17 @@ defmodule CanneryWeb.RangeLive.Index do
""" """
use CanneryWeb, :live_view use CanneryWeb, :live_view
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo} alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
alias CanneryWeb.Endpoint alias CanneryWeb.Endpoint
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket
@impl true @impl true
def mount(%{"search" => search}, _session, socket) do def mount(%{"search" => search}, _session, socket) do
{:ok, socket |> assign(class: :all, search: search) |> display_shot_groups()} {:ok, socket |> assign(class: :all, search: search) |> display_shot_records()}
end end
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
{:ok, socket |> assign(class: :all, search: nil) |> display_shot_groups()} {:ok, socket |> assign(class: :all, search: nil) |> display_shot_records()}
end end
@impl true @impl true
@ -24,7 +24,7 @@ defmodule CanneryWeb.RangeLive.Index do
defp apply_action( defp apply_action(
%{assigns: %{current_user: current_user}} = socket, %{assigns: %{current_user: current_user}} = socket,
:add_shot_group, :add_shot_record,
%{"id" => id} %{"id" => id}
) do ) do
socket socket
@ -37,8 +37,8 @@ defmodule CanneryWeb.RangeLive.Index do
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
socket socket
|> assign( |> assign(
page_title: gettext("Edit Shot Records"), page_title: gettext("Edit Shot Record"),
shot_group: ActivityLog.get_shot_group!(id, current_user) shot_record: ActivityLog.get_shot_record!(id, current_user)
) )
end end
@ -46,7 +46,7 @@ defmodule CanneryWeb.RangeLive.Index do
socket socket
|> assign( |> assign(
page_title: gettext("New Shot Records"), page_title: gettext("New Shot Records"),
shot_group: %ShotGroup{} shot_record: %ShotRecord{}
) )
end end
@ -55,9 +55,9 @@ defmodule CanneryWeb.RangeLive.Index do
|> assign( |> assign(
page_title: gettext("Shot Records"), page_title: gettext("Shot Records"),
search: nil, search: nil,
shot_group: nil shot_record: nil
) )
|> display_shot_groups() |> display_shot_records()
end end
defp apply_action(socket, :search, %{"search" => search}) do defp apply_action(socket, :search, %{"search" => search}) do
@ -65,19 +65,19 @@ defmodule CanneryWeb.RangeLive.Index do
|> assign( |> assign(
page_title: gettext("Shot Records"), page_title: gettext("Shot Records"),
search: search, search: search,
shot_group: nil shot_record: nil
) )
|> display_shot_groups() |> display_shot_records()
end end
@impl true @impl true
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
{:ok, _} = {:ok, _} =
ActivityLog.get_shot_group!(id, current_user) ActivityLog.get_shot_record!(id, current_user)
|> ActivityLog.delete_shot_group(current_user) |> ActivityLog.delete_shot_record(current_user)
prompt = dgettext("prompts", "Shot records deleted succesfully") prompt = dgettext("prompts", "Shot records deleted succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()} {:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
end end
def handle_event( def handle_event(
@ -90,7 +90,7 @@ defmodule CanneryWeb.RangeLive.Index do
{:ok, _pack} = pack |> Ammo.update_pack(%{"staged" => !pack.staged}, current_user) {:ok, _pack} = pack |> Ammo.update_pack(%{"staged" => !pack.staged}, current_user)
prompt = dgettext("prompts", "Ammo unstaged succesfully") prompt = dgettext("prompts", "Ammo unstaged succesfully")
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()} {:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
end end
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
@ -101,29 +101,29 @@ defmodule CanneryWeb.RangeLive.Index do
{:noreply, socket |> push_patch(to: Routes.range_index_path(Endpoint, :search, search_term))} {:noreply, socket |> push_patch(to: Routes.range_index_path(Endpoint, :search, search_term))}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> display_shot_groups()} {:noreply, socket |> assign(:class, :rifle) |> display_shot_records()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> display_shot_groups()} {:noreply, socket |> assign(:class, :shotgun) |> display_shot_records()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> display_shot_groups()} {:noreply, socket |> assign(:class, :pistol) |> display_shot_records()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> display_shot_groups()} {:noreply, socket |> assign(:class, :all) |> display_shot_records()}
end end
@spec display_shot_groups(Socket.t()) :: Socket.t() @spec display_shot_records(Socket.t()) :: Socket.t()
defp display_shot_groups( defp display_shot_records(
%{assigns: %{class: class, search: search, current_user: current_user}} = socket %{assigns: %{class: class, search: search, current_user: current_user}} = socket
) do ) do
shot_groups = ActivityLog.list_shot_groups(search, class, current_user) shot_records = ActivityLog.list_shot_records(search, class, current_user)
packs = Ammo.list_staged_packs(current_user) packs = Ammo.list_staged_packs(current_user)
chart_data = shot_groups |> get_chart_data_for_shot_group() chart_data = shot_records |> get_chart_data_for_shot_record()
original_counts = packs |> Ammo.get_original_counts(current_user) original_counts = packs |> Ammo.get_original_counts(current_user)
cprs = packs |> Ammo.get_cprs(current_user) cprs = packs |> Ammo.get_cprs(current_user)
last_used_dates = packs |> ActivityLog.get_last_used_dates(current_user) last_used_dates = packs |> ActivityLog.get_last_used_dates(current_user)
@ -136,14 +136,14 @@ defmodule CanneryWeb.RangeLive.Index do
cprs: cprs, cprs: cprs,
last_used_dates: last_used_dates, last_used_dates: last_used_dates,
chart_data: chart_data, chart_data: chart_data,
shot_groups: shot_groups, shot_records: shot_records,
shot_record_count: shot_record_count shot_record_count: shot_record_count
) )
end end
@spec get_chart_data_for_shot_group([ShotGroup.t()]) :: [map()] @spec get_chart_data_for_shot_record([ShotRecord.t()]) :: [map()]
defp get_chart_data_for_shot_group(shot_groups) do defp get_chart_data_for_shot_record(shot_records) do
shot_groups shot_records
|> Enum.group_by(fn %{date: date} -> date end, fn %{count: count} -> count end) |> Enum.group_by(fn %{date: date} -> date end, fn %{count: count} -> count end)
|> Enum.map(fn {date, rounds} -> |> Enum.map(fn {date, rounds} ->
sum = Enum.sum(rounds) sum = Enum.sum(rounds)

View File

@ -39,7 +39,7 @@
</button> </button>
<.link <.link
patch={Routes.range_index_path(Endpoint, :add_shot_group, pack)} patch={Routes.range_index_path(Endpoint, :add_shot_record, pack)}
class="btn btn-primary" class="btn btn-primary"
> >
<%= dgettext("actions", "Record shots") %> <%= dgettext("actions", "Record shots") %>
@ -78,7 +78,7 @@
<.form <.form
:let={f} :let={f}
for={%{}} for={%{}}
as={:ammo_type} as={:type}
phx-change="change_class" phx-change="change_class"
phx-submit="change_class" phx-submit="change_class"
class="flex items-center" class="flex items-center"
@ -117,26 +117,26 @@
</.form> </.form>
</div> </div>
<%= if @shot_groups |> Enum.empty?() do %> <%= if @shot_records |> Enum.empty?() do %>
<h1 class="title text-xl text-primary-600"> <h1 class="title text-xl text-primary-600">
<%= gettext("No shots recorded") %> <%= gettext("No shots recorded") %>
<%= display_emoji("😔") %> <%= display_emoji("😔") %>
</h1> </h1>
<% else %> <% else %>
<.live_component <.live_component
module={CanneryWeb.Components.ShotGroupTableComponent} module={CanneryWeb.Components.ShotRecordTableComponent}
id="shot_groups_index_table" id="shot_records_index_table"
shot_groups={@shot_groups} shot_records={@shot_records}
current_user={@current_user} current_user={@current_user}
> >
<:actions :let={shot_group}> <:actions :let={shot_record}>
<div class="px-4 py-2 space-x-4 flex justify-center items-center"> <div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link <.link
patch={Routes.range_index_path(Endpoint, :edit, shot_group)} patch={Routes.range_index_path(Endpoint, :edit, shot_record)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "Edit shot record of %{shot_group_count} shots", dgettext("actions", "Edit shot record of %{shot_record_count} shots",
shot_group_count: shot_group.count shot_record_count: shot_record.count
) )
} }
> >
@ -147,13 +147,13 @@
href="#" href="#"
class="text-primary-600 link" class="text-primary-600 link"
phx-click="delete" phx-click="delete"
phx-value-id={shot_group.id} phx-value-id={shot_record.id}
data-confirm={ data-confirm={
dgettext("prompts", "Are you sure you want to delete this shot record?") dgettext("prompts", "Are you sure you want to delete this shot record?")
} }
aria-label={ aria-label={
dgettext("actions", "Delete shot record of %{shot_group_count} shots", dgettext("actions", "Delete shot record of %{shot_record_count} shots",
shot_group_count: shot_group.count shot_record_count: shot_record.count
) )
} }
> >
@ -171,18 +171,18 @@
<.modal return_to={Routes.range_index_path(Endpoint, :index)}> <.modal return_to={Routes.range_index_path(Endpoint, :index)}>
<.live_component <.live_component
module={CanneryWeb.RangeLive.FormComponent} module={CanneryWeb.RangeLive.FormComponent}
id={@shot_group.id} id={@shot_record.id}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}
shot_group={@shot_group} shot_record={@shot_record}
return_to={Routes.range_index_path(Endpoint, :index)} return_to={Routes.range_index_path(Endpoint, :index)}
current_user={@current_user} current_user={@current_user}
/> />
</.modal> </.modal>
<% :add_shot_group -> %> <% :add_shot_record -> %>
<.modal return_to={Routes.range_index_path(Endpoint, :index)}> <.modal return_to={Routes.range_index_path(Endpoint, :index)}>
<.live_component <.live_component
module={CanneryWeb.Components.AddShotGroupComponent} module={CanneryWeb.Components.AddShotRecordComponent}
id={:new} id={:new}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}

View File

@ -1,16 +1,16 @@
defmodule CanneryWeb.AmmoTypeLive.FormComponent do defmodule CanneryWeb.TypeLive.FormComponent do
@moduledoc """ @moduledoc """
Livecomponent that can update or create an Cannery.Ammo.AmmoType Livecomponent that can update or create an Cannery.Ammo.Type
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, Ammo, Ammo.AmmoType} alias Cannery.{Accounts.User, Ammo, Ammo.Type}
alias Ecto.Changeset alias Ecto.Changeset
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket
@impl true @impl true
@spec update( @spec update(
%{:ammo_type => AmmoType.t(), :current_user => User.t(), optional(any) => any}, %{:type => Type.t(), :current_user => User.t(), optional(any) => any},
Socket.t() Socket.t()
) :: {:ok, Socket.t()} ) :: {:ok, Socket.t()}
def update(%{current_user: _current_user} = assigns, socket) do def update(%{current_user: _current_user} = assigns, socket) do
@ -18,21 +18,21 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
end end
@impl true @impl true
def handle_event("validate", %{"ammo_type" => ammo_type_params}, socket) do def handle_event("validate", %{"type" => type_params}, socket) do
{:noreply, socket |> assign_changeset(ammo_type_params)} {:noreply, socket |> assign_changeset(type_params)}
end end
def handle_event( def handle_event(
"save", "save",
%{"ammo_type" => ammo_type_params}, %{"type" => type_params},
%{assigns: %{action: action}} = socket %{assigns: %{action: action}} = socket
) do ) do
save_ammo_type(socket, action, ammo_type_params) save_type(socket, action, type_params)
end end
defp assign_changeset( defp assign_changeset(
%{assigns: %{action: action, ammo_type: ammo_type, current_user: user}} = socket, %{assigns: %{action: action, type: type, current_user: user}} = socket,
ammo_type_params type_params
) do ) do
changeset_action = changeset_action =
case action do case action do
@ -43,10 +43,10 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
changeset = changeset =
case action do case action do
create when create in [:new, :clone] -> create when create in [:new, :clone] ->
ammo_type |> AmmoType.create_changeset(user, ammo_type_params) type |> Type.create_changeset(user, type_params)
:edit -> :edit ->
ammo_type |> AmmoType.update_changeset(ammo_type_params) type |> Type.update_changeset(type_params)
end end
changeset = changeset =
@ -58,16 +58,15 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
socket |> assign(changeset: changeset) socket |> assign(changeset: changeset)
end end
defp save_ammo_type( defp save_type(
%{assigns: %{ammo_type: ammo_type, current_user: current_user, return_to: return_to}} = %{assigns: %{type: type, current_user: current_user, return_to: return_to}} = socket,
socket,
:edit, :edit,
ammo_type_params type_params
) do ) do
socket = socket =
case Ammo.update_ammo_type(ammo_type, ammo_type_params, current_user) do case Ammo.update_type(type, type_params, current_user) do
{:ok, %{name: ammo_type_name}} -> {:ok, %{name: type_name}} ->
prompt = dgettext("prompts", "%{name} updated successfully", name: ammo_type_name) prompt = dgettext("prompts", "%{name} updated successfully", name: type_name)
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to) socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
{:error, %Changeset{} = changeset} -> {:error, %Changeset{} = changeset} ->
@ -77,16 +76,16 @@ defmodule CanneryWeb.AmmoTypeLive.FormComponent do
{:noreply, socket} {:noreply, socket}
end end
defp save_ammo_type( defp save_type(
%{assigns: %{current_user: current_user, return_to: return_to}} = socket, %{assigns: %{current_user: current_user, return_to: return_to}} = socket,
action, action,
ammo_type_params type_params
) )
when action in [:new, :clone] do when action in [:new, :clone] do
socket = socket =
case Ammo.create_ammo_type(ammo_type_params, current_user) do case Ammo.create_type(type_params, current_user) do
{:ok, %{name: ammo_type_name}} -> {:ok, %{name: type_name}} ->
prompt = dgettext("prompts", "%{name} created successfully", name: ammo_type_name) prompt = dgettext("prompts", "%{name} created successfully", name: type_name)
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to) socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
{:error, %Changeset{} = changeset} -> {:error, %Changeset{} = changeset} ->

View File

@ -5,7 +5,7 @@
<.form <.form
:let={f} :let={f}
for={@changeset} for={@changeset}
id="ammo_type-form" id="type-form"
phx-target={@myself} phx-target={@myself}
phx-change="validate" phx-change="validate"
phx-submit="save" phx-submit="save"
@ -37,7 +37,7 @@
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %> <%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :desc, <%= textarea(f, :desc,
id: "ammo-type-form-desc", id: "type-form-desc",
class: "text-center col-span-2 input input-primary", class: "text-center col-span-2 input input-primary",
phx_hook: "MaintainAttrs", phx_hook: "MaintainAttrs",
phx_update: "ignore" phx_update: "ignore"

View File

@ -1,18 +1,18 @@
defmodule CanneryWeb.AmmoTypeLive.Index do defmodule CanneryWeb.TypeLive.Index do
@moduledoc """ @moduledoc """
Liveview for showing a Cannery.Ammo.AmmoType index Liveview for showing a Cannery.Ammo.Type index
""" """
use CanneryWeb, :live_view use CanneryWeb, :live_view
alias Cannery.{Ammo, Ammo.AmmoType} alias Cannery.{Ammo, Ammo.Type}
@impl true @impl true
def mount(%{"search" => search}, _session, socket) do def mount(%{"search" => search}, _session, socket) do
{:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_ammo_types()} {:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_types()}
end end
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
{:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_ammo_types()} {:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_types()}
end end
@impl true @impl true
@ -21,28 +21,28 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
end end
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
%{name: ammo_type_name} = ammo_type = Ammo.get_ammo_type!(id, current_user) %{name: type_name} = type = Ammo.get_type!(id, current_user)
socket socket
|> assign( |> assign(
page_title: gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name), page_title: gettext("Edit %{type_name}", type_name: type_name),
ammo_type: ammo_type type: type
) )
end end
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do
socket socket
|> assign( |> assign(
page_title: gettext("New Ammo type"), page_title: gettext("New Type"),
ammo_type: %{Ammo.get_ammo_type!(id, current_user) | id: nil} type: %{Ammo.get_type!(id, current_user) | id: nil}
) )
end end
defp apply_action(socket, :new, _params) do defp apply_action(socket, :new, _params) do
socket socket
|> assign( |> assign(
page_title: gettext("New Ammo type"), page_title: gettext("New Type"),
ammo_type: %AmmoType{} type: %Type{}
) )
end end
@ -51,9 +51,9 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|> assign( |> assign(
page_title: gettext("Catalog"), page_title: gettext("Catalog"),
search: nil, search: nil,
ammo_type: nil type: nil
) )
|> list_ammo_types() |> list_types()
end end
defp apply_action(socket, :search, %{"search" => search}) do defp apply_action(socket, :search, %{"search" => search}) do
@ -61,54 +61,54 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|> assign( |> assign(
page_title: gettext("Catalog"), page_title: gettext("Catalog"),
search: search, search: search,
ammo_type: nil type: nil
) )
|> list_ammo_types() |> list_types()
end end
@impl true @impl true
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
%{name: name} = Ammo.get_ammo_type!(id, current_user) |> Ammo.delete_ammo_type!(current_user) %{name: name} = Ammo.get_type!(id, current_user) |> Ammo.delete_type!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: name) prompt = dgettext("prompts", "%{name} deleted succesfully", name: name)
{:noreply, socket |> put_flash(:info, prompt) |> list_ammo_types()} {:noreply, socket |> put_flash(:info, prompt) |> list_types()}
end end
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
{:noreply, socket |> assign(:show_used, !show_used) |> list_ammo_types()} {:noreply, socket |> assign(:show_used, !show_used) |> list_types()}
end end
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
{:noreply, socket |> push_patch(to: Routes.ammo_type_index_path(Endpoint, :index))} {:noreply, socket |> push_patch(to: Routes.type_index_path(Endpoint, :index))}
end end
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
search_path = Routes.ammo_type_index_path(Endpoint, :search, search_term) search_path = Routes.type_index_path(Endpoint, :search, search_term)
{:noreply, socket |> push_patch(to: search_path)} {:noreply, socket |> push_patch(to: search_path)}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
{:noreply, socket |> assign(:class, :rifle) |> list_ammo_types()} {:noreply, socket |> assign(:class, :rifle) |> list_types()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
{:noreply, socket |> assign(:class, :shotgun) |> list_ammo_types()} {:noreply, socket |> assign(:class, :shotgun) |> list_types()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
{:noreply, socket |> assign(:class, :pistol) |> list_ammo_types()} {:noreply, socket |> assign(:class, :pistol) |> list_types()}
end end
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
{:noreply, socket |> assign(:class, :all) |> list_ammo_types()} {:noreply, socket |> assign(:class, :all) |> list_types()}
end end
defp list_ammo_types( defp list_types(
%{assigns: %{class: class, search: search, current_user: current_user}} = socket %{assigns: %{class: class, search: search, current_user: current_user}} = socket
) do ) do
socket socket
|> assign( |> assign(
ammo_types: Ammo.list_ammo_types(search, current_user, class), types: Ammo.list_types(search, current_user, class),
ammo_types_count: Ammo.get_ammo_types_count!(current_user) types_count: Ammo.get_types_count!(current_user)
) )
end end
end end

View File

@ -3,25 +3,25 @@
<%= gettext("Catalog") %> <%= gettext("Catalog") %>
</h1> </h1>
<%= if @ammo_types_count == 0 do %> <%= if @types_count == 0 do %>
<h2 class="title text-xl text-primary-600"> <h2 class="title text-xl text-primary-600">
<%= gettext("No Ammo types") %> <%= gettext("No Types") %>
<%= display_emoji("😔") %> <%= display_emoji("😔") %>
</h2> </h2>
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary"> <.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "Add your first type!") %> <%= dgettext("actions", "Add your first type!") %>
</.link> </.link>
<% else %> <% else %>
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary"> <.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
<%= dgettext("actions", "New Ammo type") %> <%= dgettext("actions", "New Type") %>
</.link> </.link>
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-2xl"> <div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-2xl">
<.form <.form
:let={f} :let={f}
for={%{}} for={%{}}
as={:ammo_type} as={:type}
phx-change="change_class" phx-change="change_class"
phx-submit="change_class" phx-submit="change_class"
class="flex items-center" class="flex items-center"
@ -66,49 +66,43 @@
</.toggle_button> </.toggle_button>
</div> </div>
<%= if @ammo_types |> Enum.empty?() do %> <%= if @types |> Enum.empty?() do %>
<h2 class="title text-xl text-primary-600"> <h2 class="title text-xl text-primary-600">
<%= gettext("No Ammo types") %> <%= gettext("No Types") %>
<%= display_emoji("😔") %> <%= display_emoji("😔") %>
</h2> </h2>
<% else %> <% else %>
<.live_component <.live_component
module={CanneryWeb.Components.AmmoTypeTableComponent} module={CanneryWeb.Components.TypeTableComponent}
id="ammo_types_index_table" id="types_index_table"
action={@live_action} action={@live_action}
ammo_types={@ammo_types} types={@types}
current_user={@current_user} current_user={@current_user}
show_used={@show_used} show_used={@show_used}
class={@class} class={@class}
> >
<:actions :let={ammo_type}> <:actions :let={type}>
<div class="px-4 py-2 space-x-4 flex justify-center items-center"> <div class="px-4 py-2 space-x-4 flex justify-center items-center">
<.link <.link
navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} navigate={Routes.type_show_path(Endpoint, :show, type)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={dgettext("actions", "View %{type_name}", type_name: type.name)}
dgettext("actions", "View %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
> >
<i class="fa-fw fa-lg fas fa-eye"></i> <i class="fa-fw fa-lg fas fa-eye"></i>
</.link> </.link>
<.link <.link
patch={Routes.ammo_type_index_path(Endpoint, :edit, ammo_type)} patch={Routes.type_index_path(Endpoint, :edit, type)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={dgettext("actions", "Edit %{type_name}", type_name: type.name)}
dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
> >
<i class="fa-fw fa-lg fas fa-edit"></i> <i class="fa-fw fa-lg fas fa-edit"></i>
</.link> </.link>
<.link <.link
patch={Routes.ammo_type_index_path(Endpoint, :clone, ammo_type)} patch={Routes.type_index_path(Endpoint, :clone, type)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={dgettext("actions", "Clone %{type_name}", type_name: type.name)}
dgettext("actions", "Clone %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
> >
<i class="fa-fw fa-lg fas fa-copy"></i> <i class="fa-fw fa-lg fas fa-copy"></i>
</.link> </.link>
@ -117,17 +111,15 @@
href="#" href="#"
class="text-primary-600 link" class="text-primary-600 link"
phx-click="delete" phx-click="delete"
phx-value-id={ammo_type.id} phx-value-id={type.id}
data-confirm={ data-confirm={
dgettext( dgettext(
"prompts", "prompts",
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!", "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
name: ammo_type.name name: type.name
) )
} }
aria-label={ aria-label={dgettext("actions", "Delete %{type_name}", type_name: type.name)}
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: ammo_type.name)
}
> >
<i class="fa-lg fas fa-trash"></i> <i class="fa-lg fas fa-trash"></i>
</.link> </.link>
@ -140,15 +132,15 @@
<.modal <.modal
:if={@live_action in [:new, :edit, :clone]} :if={@live_action in [:new, :edit, :clone]}
return_to={Routes.ammo_type_index_path(Endpoint, :index)} return_to={Routes.type_index_path(Endpoint, :index)}
> >
<.live_component <.live_component
module={CanneryWeb.AmmoTypeLive.FormComponent} module={CanneryWeb.TypeLive.FormComponent}
id={@ammo_type.id || :new} id={@type.id || :new}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}
ammo_type={@ammo_type} type={@type}
return_to={Routes.ammo_type_index_path(Endpoint, :index)} return_to={Routes.type_index_path(Endpoint, :index)}
current_user={@current_user} current_user={@current_user}
} }
/> />

View File

@ -1,10 +1,10 @@
defmodule CanneryWeb.AmmoTypeLive.Show do defmodule CanneryWeb.TypeLive.Show do
@moduledoc """ @moduledoc """
Liveview for showing and editing an Cannery.Ammo.AmmoType Liveview for showing and editing an Cannery.Ammo.Type
""" """
use CanneryWeb, :live_view use CanneryWeb, :live_view
alias Cannery.{ActivityLog, Ammo, Ammo.AmmoType, Containers} alias Cannery.{ActivityLog, Ammo, Ammo.Type, Containers}
alias CanneryWeb.Endpoint alias CanneryWeb.Endpoint
@impl true @impl true
@ -13,49 +13,49 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
@impl true @impl true
def handle_params(%{"id" => id}, _params, socket) do def handle_params(%{"id" => id}, _params, socket) do
{:noreply, socket |> display_ammo_type(id)} {:noreply, socket |> display_type(id)}
end end
@impl true @impl true
def handle_event( def handle_event(
"delete", "delete",
_params, _params,
%{assigns: %{ammo_type: ammo_type, current_user: current_user}} = socket %{assigns: %{type: type, current_user: current_user}} = socket
) do ) do
%{name: ammo_type_name} = ammo_type |> Ammo.delete_ammo_type!(current_user) %{name: type_name} = type |> Ammo.delete_type!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: ammo_type_name) prompt = dgettext("prompts", "%{name} deleted succesfully", name: type_name)
redirect_to = Routes.ammo_type_index_path(socket, :index) redirect_to = Routes.type_index_path(socket, :index)
{:noreply, socket |> put_flash(:info, prompt) |> push_navigate(to: redirect_to)} {:noreply, socket |> put_flash(:info, prompt) |> push_navigate(to: redirect_to)}
end end
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
{:noreply, socket |> assign(:show_used, !show_used) |> display_ammo_type()} {:noreply, socket |> assign(:show_used, !show_used) |> display_type()}
end end
def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do
{:noreply, socket |> assign(:view_table, !view_table)} {:noreply, socket |> assign(:view_table, !view_table)}
end end
defp display_ammo_type( defp display_type(
%{assigns: %{live_action: live_action, current_user: current_user, show_used: show_used}} = %{assigns: %{live_action: live_action, current_user: current_user, show_used: show_used}} =
socket, socket,
%AmmoType{name: ammo_type_name} = ammo_type %Type{name: type_name} = type
) do ) do
custom_fields? = custom_fields? =
fields_to_display(ammo_type) fields_to_display(type)
|> Enum.any?(fn %{key: field, type: type} -> |> Enum.any?(fn %{key: field, type: column_type} ->
default_value = default_value =
case type do case column_type do
:boolean -> false :boolean -> false
_other_type -> nil _other_type -> nil
end end
ammo_type |> Map.get(field) != default_value type |> Map.get(field) != default_value
end) end)
packs = ammo_type |> Ammo.list_packs_for_type(current_user, show_used) packs = type |> Ammo.list_packs_for_type(current_user, show_used)
[ [
original_counts, original_counts,
@ -67,10 +67,10 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
if show_used do if show_used do
[ [
packs |> Ammo.get_original_counts(current_user), packs |> Ammo.get_original_counts(current_user),
ammo_type |> Ammo.get_used_packs_count_for_type(current_user), type |> Ammo.get_used_packs_count_for_type(current_user),
ammo_type |> Ammo.get_packs_count_for_type(current_user, true), type |> Ammo.get_packs_count_for_type(current_user, true),
ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user), type |> ActivityLog.get_used_count_for_type(current_user),
ammo_type |> Ammo.get_historical_count_for_ammo_type(current_user) type |> Ammo.get_historical_count_for_type(current_user)
] ]
else else
[nil, nil, nil, nil, nil] [nil, nil, nil, nil, nil]
@ -78,8 +78,8 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
page_title = page_title =
case live_action do case live_action do
:show -> ammo_type_name :show -> type_name
:edit -> gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name) :edit -> gettext("Edit %{type_name}", type_name: type_name)
end end
containers = containers =
@ -90,33 +90,33 @@ defmodule CanneryWeb.AmmoTypeLive.Show do
socket socket
|> assign( |> assign(
page_title: page_title, page_title: page_title,
ammo_type: ammo_type, type: type,
packs: packs, packs: packs,
containers: containers, containers: containers,
cprs: packs |> Ammo.get_cprs(current_user), cprs: packs |> Ammo.get_cprs(current_user),
last_used_dates: packs |> ActivityLog.get_last_used_dates(current_user), last_used_dates: packs |> ActivityLog.get_last_used_dates(current_user),
avg_cost_per_round: ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user), avg_cost_per_round: type |> Ammo.get_average_cost_for_type(current_user),
rounds: ammo_type |> Ammo.get_round_count_for_ammo_type(current_user), rounds: type |> Ammo.get_round_count_for_type(current_user),
original_counts: original_counts, original_counts: original_counts,
used_rounds: used_rounds, used_rounds: used_rounds,
historical_round_count: historical_round_count, historical_round_count: historical_round_count,
packs_count: ammo_type |> Ammo.get_packs_count_for_type(current_user), packs_count: type |> Ammo.get_packs_count_for_type(current_user),
used_packs_count: used_packs_count, used_packs_count: used_packs_count,
historical_packs_count: historical_packs_count, historical_packs_count: historical_packs_count,
fields_to_display: fields_to_display(ammo_type), fields_to_display: fields_to_display(type),
custom_fields?: custom_fields? custom_fields?: custom_fields?
) )
end end
defp display_ammo_type(%{assigns: %{current_user: current_user}} = socket, ammo_type_id) do defp display_type(%{assigns: %{current_user: current_user}} = socket, type_id) do
socket |> display_ammo_type(Ammo.get_ammo_type!(ammo_type_id, current_user)) socket |> display_type(Ammo.get_type!(type_id, current_user))
end end
defp display_ammo_type(%{assigns: %{ammo_type: ammo_type}} = socket) do defp display_type(%{assigns: %{type: type}} = socket) do
socket |> display_ammo_type(ammo_type) socket |> display_type(type)
end end
defp fields_to_display(%AmmoType{class: class}) do defp fields_to_display(%Type{class: class}) do
[ [
%{label: gettext("Cartridge:"), key: :cartridge, type: :string}, %{label: gettext("Cartridge:"), key: :cartridge, type: :string},
%{ %{

View File

@ -1,22 +1,22 @@
<div class="space-y-4 flex flex-col justify-center items-center"> <div class="space-y-4 flex flex-col justify-center items-center">
<h1 class="title text-2xl title-primary-500"> <h1 class="title text-2xl title-primary-500">
<%= @ammo_type.name %> <%= @type.name %>
</h1> </h1>
<span <span
:if={@ammo_type.desc} :if={@type.desc}
class="max-w-2xl w-full px-8 py-4 rounded-lg class="max-w-2xl w-full px-8 py-4 rounded-lg
text-center title text-lg text-center title text-lg
border border-primary-600" border border-primary-600"
> >
<%= @ammo_type.desc %> <%= @type.desc %>
</span> </span>
<div class="flex space-x-4 justify-center items-center text-primary-600"> <div class="flex space-x-4 justify-center items-center text-primary-600">
<.link <.link
patch={Routes.ammo_type_show_path(Endpoint, :edit, @ammo_type)} patch={Routes.type_show_path(Endpoint, :edit, @type)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: @ammo_type.name)} aria-label={dgettext("actions", "Edit %{type_name}", type_name: @type.name)}
> >
<i class="fa-fw fa-lg fas fa-edit"></i> <i class="fa-fw fa-lg fas fa-edit"></i>
</.link> </.link>
@ -29,12 +29,10 @@
dgettext( dgettext(
"prompts", "prompts",
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!", "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
name: @ammo_type.name name: @type.name
) )
} }
aria-label={ aria-label={dgettext("actions", "Delete %{type_name}", type_name: @type.name)}
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: @ammo_type.name)
}
> >
<i class="fa-fw fa-lg fas fa-trash"></i> <i class="fa-fw fa-lg fas fa-trash"></i>
</.link> </.link>
@ -42,14 +40,14 @@
<hr class="hr" /> <hr class="hr" />
<%= if @ammo_type.class || @custom_fields? do %> <%= if @type.class || @custom_fields? do %>
<div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center"> <div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center">
<h3 class="title text-lg"> <h3 class="title text-lg">
<%= gettext("Class") %> <%= gettext("Class") %>
</h3> </h3>
<span class="text-primary-600"> <span class="text-primary-600">
<%= case @ammo_type.class do %> <%= case @type.class do %>
<% :shotgun -> %> <% :shotgun -> %>
<%= gettext("Shotgun") %> <%= gettext("Shotgun") %>
<% :rifle -> %> <% :rifle -> %>
@ -62,7 +60,7 @@
</span> </span>
<%= for %{label: label, key: key, type: type} <- @fields_to_display do %> <%= for %{label: label, key: key, type: type} <- @fields_to_display do %>
<%= if @ammo_type |> Map.get(key) do %> <%= if @type |> Map.get(key) do %>
<h3 class="title text-lg"> <h3 class="title text-lg">
<%= label %> <%= label %>
</h3> </h3>
@ -70,9 +68,9 @@
<span class="text-primary-600"> <span class="text-primary-600">
<%= case type do %> <%= case type do %>
<% :boolean -> %> <% :boolean -> %>
<%= @ammo_type |> Map.get(key) |> humanize() %> <%= @type |> Map.get(key) |> humanize() %>
<% _ -> %> <% _ -> %>
<%= @ammo_type |> Map.get(key) %> <%= @type |> Map.get(key) %>
<% end %> <% end %>
</span> </span>
<% end %> <% end %>
@ -140,7 +138,7 @@
</h3> </h3>
<span class="text-primary-600"> <span class="text-primary-600">
<.datetime id={"#{@ammo_type.id}-inserted-at"} datetime={@ammo_type.inserted_at} /> <.datetime id={"#{@type.id}-inserted-at"} datetime={@type.inserted_at} />
</span> </span>
<%= if @avg_cost_per_round do %> <%= if @avg_cost_per_round do %>
@ -184,7 +182,7 @@
<%= if @view_table do %> <%= if @view_table do %>
<.live_component <.live_component
module={CanneryWeb.Components.PackTableComponent} module={CanneryWeb.Components.PackTableComponent}
id="ammo-type-show-table" id="type-show-table"
packs={@packs} packs={@packs}
current_user={@current_user} current_user={@current_user}
show_used={@show_used} show_used={@show_used}
@ -228,17 +226,14 @@
</div> </div>
</div> </div>
<.modal <.modal :if={@live_action == :edit} return_to={Routes.type_show_path(Endpoint, :show, @type)}>
:if={@live_action == :edit}
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
>
<.live_component <.live_component
module={CanneryWeb.AmmoTypeLive.FormComponent} module={CanneryWeb.TypeLive.FormComponent}
id={@ammo_type.id} id={@type.id}
title={@page_title} title={@page_title}
action={@live_action} action={@live_action}
ammo_type={@ammo_type} type={@type}
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)} return_to={Routes.type_show_path(Endpoint, :show, @type)}
current_user={@current_user} current_user={@current_user}
/> />
</.modal> </.modal>

View File

@ -69,14 +69,14 @@ defmodule CanneryWeb.Router do
live "/tags/edit/:id", TagLive.Index, :edit live "/tags/edit/:id", TagLive.Index, :edit
live "/tags/search/:search", TagLive.Index, :search live "/tags/search/:search", TagLive.Index, :search
live "/catalog", AmmoTypeLive.Index, :index live "/catalog", TypeLive.Index, :index
live "/catalog/new", AmmoTypeLive.Index, :new live "/catalog/new", TypeLive.Index, :new
live "/catalog/clone/:id", AmmoTypeLive.Index, :clone live "/catalog/clone/:id", TypeLive.Index, :clone
live "/catalog/edit/:id", AmmoTypeLive.Index, :edit live "/catalog/edit/:id", TypeLive.Index, :edit
live "/catalog/search/:search", AmmoTypeLive.Index, :search live "/catalog/search/:search", TypeLive.Index, :search
live "/type/:id", AmmoTypeLive.Show, :show live "/type/:id", TypeLive.Show, :show
live "/type/:id/edit", AmmoTypeLive.Show, :edit live "/type/:id/edit", TypeLive.Show, :edit
live "/containers", ContainerLive.Index, :index live "/containers", ContainerLive.Index, :index
live "/containers/new", ContainerLive.Index, :new live "/containers/new", ContainerLive.Index, :new
@ -93,19 +93,19 @@ defmodule CanneryWeb.Router do
live "/ammo/new", PackLive.Index, :new live "/ammo/new", PackLive.Index, :new
live "/ammo/edit/:id", PackLive.Index, :edit live "/ammo/edit/:id", PackLive.Index, :edit
live "/ammo/clone/:id", PackLive.Index, :clone live "/ammo/clone/:id", PackLive.Index, :clone
live "/ammo/add_shot_group/:id", PackLive.Index, :add_shot_group live "/ammo/add_shot_record/:id", PackLive.Index, :add_shot_record
live "/ammo/move/:id", PackLive.Index, :move live "/ammo/move/:id", PackLive.Index, :move
live "/ammo/search/:search", PackLive.Index, :search live "/ammo/search/:search", PackLive.Index, :search
live "/ammo/show/:id", PackLive.Show, :show live "/ammo/show/:id", PackLive.Show, :show
live "/ammo/show/edit/:id", PackLive.Show, :edit live "/ammo/show/edit/:id", PackLive.Show, :edit
live "/ammo/show/add_shot_group/:id", PackLive.Show, :add_shot_group live "/ammo/show/add_shot_record/:id", PackLive.Show, :add_shot_record
live "/ammo/show/move/:id", PackLive.Show, :move live "/ammo/show/move/:id", PackLive.Show, :move
live "/ammo/show/:id/edit/:shot_group_id", PackLive.Show, :edit_shot_group live "/ammo/show/:id/edit/:shot_record_id", PackLive.Show, :edit_shot_record
live "/range", RangeLive.Index, :index live "/range", RangeLive.Index, :index
live "/range/edit/:id", RangeLive.Index, :edit live "/range/edit/:id", RangeLive.Index, :edit
live "/range/add_shot_group/:id", RangeLive.Index, :add_shot_group live "/range/add_shot_record/:id", RangeLive.Index, :add_shot_record
live "/range/search/:search", RangeLive.Index, :search live "/range/search/:search", RangeLive.Index, :search
end end

View File

@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
def project do def project do
[ [
app: :cannery, app: :cannery,
version: "0.9.0", version: "0.9.1",
elixir: "1.14.1", elixir: "1.14.1",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(), compilers: Mix.compilers(),

View File

@ -27,7 +27,7 @@ msgstr ""
msgid "Add your first container!" msgid "Add your first container!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "" msgstr ""
@ -82,11 +82,6 @@ msgstr ""
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -120,13 +115,13 @@ msgstr ""
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -203,11 +198,6 @@ msgstr ""
msgid "View in Catalog" msgid "View in Catalog"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -237,11 +227,6 @@ msgstr ""
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -253,12 +238,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -276,18 +255,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -305,16 +272,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage" msgid "Stage"
@ -331,11 +288,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -353,8 +305,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add a type first"
msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "Fügen Sie ihre erste Box hinzu!"
msgid "Add your first container!" msgid "Add your first container!"
msgstr "Fügen Sie ihren ersten Behälter hinzu!" msgstr "Fügen Sie ihren ersten Behälter hinzu!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "Fügen Sie ihre erste Munitionsart hinzu!" msgstr "Fügen Sie ihre erste Munitionsart hinzu!"
@ -95,11 +95,6 @@ msgstr "Einloggen"
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "Erstellen Sie ihren ersten Tag!" msgstr "Erstellen Sie ihren ersten Tag!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Neue Munitionsart"
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Bestätigungsmail erneut senden"
msgid "Reset password" msgid "Reset password"
msgstr "Passwort zurücksetzen" msgstr "Passwort zurücksetzen"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
@ -216,11 +211,6 @@ msgstr "Sprache wechseln"
msgid "View in Catalog" msgid "View in Catalog"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr ""
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Stage" msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Neue Munitionsart"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Admins:" msgstr "Admins:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Admins:"
msgid "Ammo" msgid "Ammo"
msgstr "Munition" msgstr "Munition"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Munitionsarten"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "Hintergrundfarbe" msgstr "Hintergrundfarbe"
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "Knallpatrone" msgstr "Knallpatrone"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "Messing" msgstr "Messing"
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "Projektilkern" msgstr "Projektilkern"
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "Patronenart" msgstr "Patronenart"
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "Kaliber" msgstr "Kaliber"
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "Patrone" msgstr "Patrone"
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "Gehäusematerial" msgstr "Gehäusematerial"
@ -105,8 +99,8 @@ msgstr "Behälter"
msgid "Containers" msgid "Containers"
msgstr "Behälter" msgstr "Behälter"
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "Korrosiv" msgstr "Korrosiv"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Anzahl:" msgstr "Anzahl:"
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "Beschreibung" msgstr "Beschreibung"
@ -151,19 +145,19 @@ msgstr "Einladung bearbeiten"
msgid "Edit Tag" msgid "Edit Tag"
msgstr "Tag bearbeiten" msgstr "Tag bearbeiten"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "VM" msgstr "VM"
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "Körner" msgstr "Körner"
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "Brandmunition" msgstr "Brandmunition"
@ -213,9 +207,9 @@ msgstr "Standort:"
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Magazin, Ladestreifen, Munitionskiste usw." msgstr "Magazin, Ladestreifen, Munitionskiste usw."
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "Hersteller" msgstr "Hersteller"
@ -230,22 +224,16 @@ msgstr "Metallene Munitionskiste mit Anime-Girl-Sticker"
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "Meine coole Munitionskiste" msgstr "Meine coole Munitionskiste"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Neuer Munitionstyp"
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Neuer Tag"
msgid "No Ammo" msgid "No Ammo"
msgstr "Keine Munition" msgstr "Keine Munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "Keine Munition dieser Art" msgstr "Keine Munition dieser Art"
@ -290,8 +278,8 @@ msgstr "Keine Einladung"
msgid "No tags" msgid "No tags"
msgstr "Keine Tags" msgstr "Keine Tags"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Bemerkungen:"
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "Auf dem Bücherregal" msgstr "Auf dem Bücherregal"
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "Druck" msgstr "Druck"
@ -327,8 +315,8 @@ msgstr "Kaufpreis"
msgid "Price paid:" msgid "Price paid:"
msgstr "Kaufpreis:" msgstr "Kaufpreis:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "Zündertyp" msgstr "Zündertyp"
@ -361,7 +349,7 @@ msgstr "Einstellungen"
msgid "Simple:" msgid "Simple:"
msgstr "Einfach:" msgstr "Einfach:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "Stahl" msgstr "Stahl"
@ -395,15 +383,17 @@ msgstr "Textfarbe"
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen" msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen"
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "Leuchtspur" msgstr "Leuchtspur"
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "Art" msgstr "Art"
@ -445,8 +435,8 @@ msgstr "Schießplatz"
msgid "Range day" msgid "Range day"
msgstr "Range Day" msgstr "Range Day"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -463,18 +453,12 @@ msgstr "Schüsse abgegeben"
msgid "No ammo staged" msgid "No ammo staged"
msgstr "Keine Munition selektiert" msgstr "Keine Munition selektiert"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "Schüsse dokumentieren" msgstr "Schüsse dokumentieren"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Schießkladde editieren"
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -486,13 +470,7 @@ msgstr "Neue Schießkladde"
msgid "No shots recorded" msgid "No shots recorded"
msgstr "Keine Schüsse dokumentiert" msgstr "Keine Schüsse dokumentiert"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Patronen verbleibend"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -520,48 +498,48 @@ msgstr "Kein weiterer Behälter"
msgid "Shot log" msgid "Shot log"
msgstr "Schießkladde" msgstr "Schießkladde"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "$%{amount}" msgstr "$%{amount}"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "Bimetall" msgstr "Bimetall"
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "Patronenhülse" msgstr "Patronenhülse"
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "Mündungsgeschwindigkeit" msgstr "Mündungsgeschwindigkeit"
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "Pulverkörner pro Ladung" msgstr "Pulverkörner pro Ladung"
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "Pulverart" msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "UPC" msgstr "UPC"
@ -584,8 +562,8 @@ msgstr "Derzeitiges Passwort"
msgid "New password" msgid "New password"
msgstr "Neues Passwort" msgstr "Neues Passwort"
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "Patronenhülsenform" msgstr "Patronenhülsenform"
@ -608,16 +586,16 @@ msgid "Edit %{name} tags"
msgstr "Editiere %{name} Tags" msgstr "Editiere %{name} Tags"
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds:" msgid "Rounds:"
msgstr "Patronen:" msgstr "Patronen:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "Keine Preisinformationen" msgstr "Keine Preisinformationen"
@ -688,7 +666,7 @@ msgstr "Schüsse dokumentieren"
msgid "Copies" msgid "Copies"
msgstr "Kopien" msgstr "Kopien"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "Hinzugefügt am:" msgstr "Hinzugefügt am:"
@ -735,9 +713,9 @@ msgid "View the source code"
msgstr "Quellcode ansehen" msgstr "Quellcode ansehen"
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "" msgstr ""
@ -768,8 +746,8 @@ msgid "This ammo is not in a container"
msgstr "Diese Munitionsgruppe ist nicht in einem Behälter" msgstr "Diese Munitionsgruppe ist nicht in einem Behälter"
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "" msgstr ""
@ -795,9 +773,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "Behälter" msgstr "Behälter"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "" msgstr ""
@ -813,182 +791,171 @@ msgstr ""
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "Patronen abgefeuert" msgstr "Patronen abgefeuert"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Packs" msgid "Packs"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds" msgid "Rounds"
msgstr "Patronen:" msgstr "Patronen:"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "Summe aller Patronen" msgstr "Summe aller Patronen"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "Summe abgegebener Schüsse:" msgstr "Summe abgegebener Schüsse:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds" msgid "Used rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:" msgid "Used rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "Patronen abgefeuert" msgstr "Patronen abgefeuert"
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Blank:" msgid "Blank:"
msgstr "Knallpatrone" msgstr "Knallpatrone"
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:" msgid "Bullet core:"
msgstr "Projektilkern" msgstr "Projektilkern"
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:" msgid "Bullet type:"
msgstr "Patronenart" msgstr "Patronenart"
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:" msgid "Caliber:"
msgstr "Kaliber" msgstr "Kaliber"
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:" msgid "Cartridge:"
msgstr "Patrone" msgstr "Patrone"
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Case material:" msgid "Case material:"
msgstr "Gehäusematerial" msgstr "Gehäusematerial"
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:" msgid "Corrosive:"
msgstr "Korrosiv" msgstr "Korrosiv"
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:" msgid "Firing type:"
msgstr "Patronenhülsenform" msgstr "Patronenhülsenform"
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Grains:" msgid "Grains:"
msgstr "Körner" msgstr "Körner"
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:" msgid "Incendiary:"
msgstr "Brandmunition" msgstr "Brandmunition"
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:" msgid "Jacket type:"
msgstr "Patronenhülse" msgstr "Patronenhülse"
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "Hersteller" msgstr "Hersteller"
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "Mündungsgeschwindigkeit" msgstr "Mündungsgeschwindigkeit"
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "Pulverkörner pro Ladung" msgstr "Pulverkörner pro Ladung"
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:" msgid "Powder type:"
msgstr "Pulverart" msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:" msgid "Pressure:"
msgstr "Druck" msgstr "Druck"
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:" msgid "Primer type:"
msgstr "Zündertyp" msgstr "Zündertyp"
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:" msgid "Tracer:"
msgstr "Leuchtspur" msgstr "Leuchtspur"
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "UPC:" msgid "UPC:"
msgstr "UPC" msgstr "UPC"
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr "%{name} bearbeiten"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1052,13 +1019,7 @@ msgstr ""
msgid "Edit ammo" msgid "Edit ammo"
msgstr "Munitionstyp bearbeiten" msgstr "Munitionstyp bearbeiten"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Keine Munitionsarten"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1187,42 +1148,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1249,76 +1210,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Brass height" msgid "Brass height"
msgstr "Messing" msgstr "Messing"
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1328,140 +1289,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "Keine Munition" msgstr "Keine Munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder" msgid "Powder"
msgstr "Pulverart" msgstr "Pulverart"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer" msgid "Primer"
msgstr "Zündertyp" msgstr "Zündertyp"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size" msgid "Shot size"
msgstr "Schüsse abgegeben" msgstr "Schüsse abgegeben"
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:" msgid "Shot size:"
msgstr "Schüsse abgegeben" msgstr "Schüsse abgegeben"
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Patronen:"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Schießkladde editieren"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "%{name} bearbeiten"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Neuer Munitionstyp"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Art"

View File

@ -69,7 +69,7 @@ msgstr "Ungültige Mailadresse oder Passwort"
msgid "Not found" msgid "Not found"
msgstr "Nicht gefunden" msgstr "Nicht gefunden"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -173,42 +173,42 @@ msgstr ""
"Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War " "Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War "
"%{multiplier}" "%{multiplier}"
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "Anzahl muss weniger als %{count} betragen" msgstr "Anzahl muss weniger als %{count} betragen"
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to ## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no ## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead. ## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "%{name} erfolgreich erstellt" msgstr "%{name} erfolgreich erstellt"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "%{name} erfolgreich gelöscht" msgstr "%{name} erfolgreich gelöscht"
@ -44,10 +44,10 @@ msgstr "%{name} erfolgreich gelöscht"
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "%{name} wurde gelöscht" msgstr "%{name} wurde gelöscht"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "%{name} erfolgreich aktualisiert" msgstr "%{name} erfolgreich aktualisiert"
@ -128,13 +128,13 @@ msgstr "Passwort erfolgreich geändert."
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto" msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "Speichere..." msgstr "Speichere..."
@ -166,7 +166,7 @@ msgstr "%{tag_name} wurde von %{container_name} entfernt"
msgid "Adding..." msgid "Adding..."
msgstr "Füge hinzu..." msgstr "Füge hinzu..."
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "Schüsse erfolgreich dokumentiert" msgstr "Schüsse erfolgreich dokumentiert"
@ -257,8 +257,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Munitionsgruppe erfolgreich aktualisiert" msgstr[0] "Munitionsgruppe erfolgreich aktualisiert"
msgstr[1] "Munitionsgruppe erfolgreich aktualisiert" msgstr[1] "Munitionsgruppe erfolgreich aktualisiert"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?" msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"

View File

@ -26,7 +26,7 @@ msgid "Admins:"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -34,54 +34,48 @@ msgstr ""
msgid "Ammo" msgid "Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "" msgstr ""
@ -101,8 +95,8 @@ msgstr ""
msgid "Containers" msgid "Containers"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "" msgstr ""
@ -120,8 +114,8 @@ msgid "Count:"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "" msgstr ""
@ -147,19 +141,19 @@ msgstr ""
msgid "Edit Tag" msgid "Edit Tag"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "" msgstr ""
@ -209,9 +203,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""
@ -226,22 +220,16 @@ msgstr ""
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -263,7 +251,7 @@ msgstr ""
msgid "No Ammo" msgid "No Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "" msgstr ""
@ -286,8 +274,8 @@ msgstr ""
msgid "No tags" msgid "No tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -306,8 +294,8 @@ msgstr ""
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "" msgstr ""
@ -323,8 +311,8 @@ msgstr ""
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "" msgstr ""
@ -355,7 +343,7 @@ msgstr ""
msgid "Simple:" msgid "Simple:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
@ -389,15 +377,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
@ -439,8 +429,8 @@ msgstr ""
msgid "Range day" msgid "Range day"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -457,18 +447,12 @@ msgstr ""
msgid "No ammo staged" msgid "No ammo staged"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -480,13 +464,7 @@ msgstr ""
msgid "No shots recorded" msgid "No shots recorded"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -514,48 +492,48 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "" msgstr ""
@ -578,8 +556,8 @@ msgstr ""
msgid "New password" msgid "New password"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "" msgstr ""
@ -602,16 +580,16 @@ msgid "Edit %{name} tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds:" msgid "Rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "" msgstr ""
@ -682,7 +660,7 @@ msgstr ""
msgid "Copies" msgid "Copies"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "" msgstr ""
@ -729,9 +707,9 @@ msgid "View the source code"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "" msgstr ""
@ -762,8 +740,8 @@ msgid "This ammo is not in a container"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "" msgstr ""
@ -789,9 +767,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "" msgstr ""
@ -807,182 +785,171 @@ msgstr ""
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs" msgid "Packs"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds" msgid "Rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used rounds" msgid "Used rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used rounds:" msgid "Used rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank:" msgid "Blank:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core:" msgid "Bullet core:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type:" msgid "Bullet type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber:" msgid "Caliber:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge:" msgid "Cartridge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material:" msgid "Case material:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive:" msgid "Corrosive:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type:" msgid "Firing type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains:" msgid "Grains:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary:" msgid "Incendiary:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type:" msgid "Jacket type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type:" msgid "Powder type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure:" msgid "Pressure:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type:" msgid "Primer type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer:" msgid "Tracer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC:" msgid "UPC:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1046,13 +1013,7 @@ msgstr ""
msgid "Edit ammo" msgid "Edit ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1170,42 +1131,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1232,76 +1193,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height" msgid "Brass height"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1311,140 +1272,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder" msgid "Powder"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer" msgid "Primer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot size" msgid "Shot size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot size:" msgid "Shot size:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format
msgid "No Types"
msgstr ""

View File

@ -27,7 +27,7 @@ msgstr ""
msgid "Add your first container!" msgid "Add your first container!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "" msgstr ""
@ -82,11 +82,6 @@ msgstr ""
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -120,13 +115,13 @@ msgstr ""
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -203,11 +198,6 @@ msgstr ""
msgid "View in Catalog" msgid "View in Catalog"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -237,11 +227,6 @@ msgstr ""
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -253,12 +238,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -276,18 +255,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -305,16 +272,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Stage" msgid "Stage"
@ -331,11 +288,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -353,8 +305,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -26,7 +26,7 @@ msgid "Admins:"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -34,54 +34,48 @@ msgstr ""
msgid "Ammo" msgid "Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "" msgstr ""
@ -101,8 +95,8 @@ msgstr ""
msgid "Containers" msgid "Containers"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "" msgstr ""
@ -120,8 +114,8 @@ msgid "Count:"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "" msgstr ""
@ -147,19 +141,19 @@ msgstr ""
msgid "Edit Tag" msgid "Edit Tag"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "" msgstr ""
@ -209,9 +203,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""
@ -226,22 +220,16 @@ msgstr ""
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -263,7 +251,7 @@ msgstr ""
msgid "No Ammo" msgid "No Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "" msgstr ""
@ -286,8 +274,8 @@ msgstr ""
msgid "No tags" msgid "No tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -306,8 +294,8 @@ msgstr ""
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "" msgstr ""
@ -323,8 +311,8 @@ msgstr ""
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "" msgstr ""
@ -355,7 +343,7 @@ msgstr ""
msgid "Simple:" msgid "Simple:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
@ -389,15 +377,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
@ -439,8 +429,8 @@ msgstr ""
msgid "Range day" msgid "Range day"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -457,18 +447,12 @@ msgstr ""
msgid "No ammo staged" msgid "No ammo staged"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -480,13 +464,7 @@ msgstr ""
msgid "No shots recorded" msgid "No shots recorded"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -514,48 +492,48 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "" msgstr ""
@ -578,8 +556,8 @@ msgstr ""
msgid "New password" msgid "New password"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "" msgstr ""
@ -602,16 +580,16 @@ msgid "Edit %{name} tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds:" msgid "Rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "" msgstr ""
@ -682,7 +660,7 @@ msgstr ""
msgid "Copies" msgid "Copies"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "" msgstr ""
@ -729,9 +707,9 @@ msgid "View the source code"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "" msgstr ""
@ -762,8 +740,8 @@ msgid "This ammo is not in a container"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "" msgstr ""
@ -789,9 +767,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "" msgstr ""
@ -807,182 +785,171 @@ msgstr ""
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Packs" msgid "Packs"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds" msgid "Rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds" msgid "Used rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:" msgid "Used rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Blank:" msgid "Blank:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:" msgid "Bullet core:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:" msgid "Bullet type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:" msgid "Caliber:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:" msgid "Cartridge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Case material:" msgid "Case material:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:" msgid "Corrosive:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:" msgid "Firing type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Grains:" msgid "Grains:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:" msgid "Incendiary:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:" msgid "Jacket type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:" msgid "Powder type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:" msgid "Pressure:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:" msgid "Primer type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:" msgid "Tracer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "UPC:" msgid "UPC:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1046,13 +1013,7 @@ msgstr ""
msgid "Edit ammo" msgid "Edit ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1170,42 +1131,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1232,76 +1193,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Brass height" msgid "Brass height"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1311,140 +1272,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder" msgid "Powder"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer" msgid "Primer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size" msgid "Shot size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:" msgid "Shot size:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr ""

View File

@ -56,7 +56,7 @@ msgstr ""
msgid "Not found" msgid "Not found"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -156,42 +156,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "" msgstr ""
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -10,17 +10,17 @@ msgid ""
msgstr "" msgstr ""
"Language: en\n" "Language: en\n"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "" msgstr ""
@ -31,10 +31,10 @@ msgstr ""
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "" msgstr ""
@ -109,13 +109,13 @@ msgstr ""
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "" msgstr ""
@ -145,7 +145,7 @@ msgstr ""
msgid "Adding..." msgid "Adding..."
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "" msgstr ""
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "" msgstr ""

View File

@ -56,7 +56,7 @@ msgstr ""
msgid "Not found" msgid "Not found"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -155,42 +155,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "" msgstr ""
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select a type and container"
msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "¡Añade tu primera caja!"
msgid "Add your first container!" msgid "Add your first container!"
msgstr "¡Añade tu primer contenedor!" msgstr "¡Añade tu primer contenedor!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "¡Añade tu primer tipo!" msgstr "¡Añade tu primer tipo!"
@ -95,11 +95,6 @@ msgstr "Entrar"
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "¡Aplica tu primera etiqueta!" msgstr "¡Aplica tu primera etiqueta!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Reenviar instrucciones de confirmación"
msgid "Reset password" msgid "Reset password"
msgstr "Resetear contraseña" msgstr "Resetear contraseña"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "Guardar" msgstr "Guardar"
@ -216,11 +211,6 @@ msgstr "Cambiar lenguaje"
msgid "View in Catalog" msgid "View in Catalog"
msgstr "Ver en Catalogo" msgstr "Ver en Catalogo"
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr "añade primero un tipo de munición"
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr "Desmontar del campo de tiro"
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "Exportar datos como JSON" msgstr "Exportar datos como JSON"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Stage" msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr "añade primero un tipo de munición"

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Aministradores:" msgstr "Aministradores:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Aministradores:"
msgid "Ammo" msgid "Ammo"
msgstr "Munición" msgstr "Munición"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Tipo de munición"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "Color de fondo" msgstr "Color de fondo"
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "Fogueo" msgstr "Fogueo"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "Latón" msgstr "Latón"
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "Núcleo de bala" msgstr "Núcleo de bala"
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "Tipo de bala" msgstr "Tipo de bala"
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "Calibre" msgstr "Calibre"
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "Cartucho" msgstr "Cartucho"
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "Material del casquillo" msgstr "Material del casquillo"
@ -105,8 +99,8 @@ msgstr "Contenedor"
msgid "Containers" msgid "Containers"
msgstr "Contenedores" msgstr "Contenedores"
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "Corrosiva" msgstr "Corrosiva"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Cantidad:" msgstr "Cantidad:"
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "Descripción" msgstr "Descripción"
@ -151,19 +145,19 @@ msgstr "Editar Invitación"
msgid "Edit Tag" msgid "Edit Tag"
msgstr "Editar Etiqueta" msgstr "Editar Etiqueta"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "Bala encamisada" msgstr "Bala encamisada"
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "Grano" msgstr "Grano"
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "Incendiaria" msgstr "Incendiaria"
@ -213,9 +207,9 @@ msgstr "Localización:"
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Cargador, Clip, Caja de Munición, etc" msgstr "Cargador, Clip, Caja de Munición, etc"
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "Fabricante" msgstr "Fabricante"
@ -230,22 +224,16 @@ msgstr "Lata de munición metálica con la pegatina de chica de anime"
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "Mi lata de munición guapa" msgstr "Mi lata de munición guapa"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Nueva Etiqueta"
msgid "No Ammo" msgid "No Ammo"
msgstr "Sin Munición" msgstr "Sin Munición"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "Sin munición para este tipo" msgstr "Sin munición para este tipo"
@ -290,8 +278,8 @@ msgstr "Sin invitaciones"
msgid "No tags" msgid "No tags"
msgstr "Sin etiquetas" msgstr "Sin etiquetas"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Notas:"
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "En la estantería" msgstr "En la estantería"
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "Presión" msgstr "Presión"
@ -327,8 +315,8 @@ msgstr "Precio pagado"
msgid "Price paid:" msgid "Price paid:"
msgstr "Precio pagado:" msgstr "Precio pagado:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "Tipo de espoleta" msgstr "Tipo de espoleta"
@ -361,7 +349,7 @@ msgstr "Ajustes"
msgid "Simple:" msgid "Simple:"
msgstr "Simple:" msgstr "Simple:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "Acero" msgstr "Acero"
@ -396,15 +384,17 @@ msgstr "Color del texto"
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "La página de seguimiento de armas autogestionada" msgstr "La página de seguimiento de armas autogestionada"
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "Trazadora" msgstr "Trazadora"
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "Tipo" msgstr "Tipo"
@ -446,8 +436,8 @@ msgstr "Campo de tiro"
msgid "Range day" msgid "Range day"
msgstr "Día de disparar" msgstr "Día de disparar"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -464,18 +454,12 @@ msgstr "Tiros disparados"
msgid "No ammo staged" msgid "No ammo staged"
msgstr "No hay munición preparada" msgstr "No hay munición preparada"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "Tiros récord" msgstr "Tiros récord"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Editar Tiros Récord"
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -487,13 +471,7 @@ msgstr "Nuevos Tiros Récord"
msgid "No shots recorded" msgid "No shots recorded"
msgstr "No se han grabado tiros" msgstr "No se han grabado tiros"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Balas restantes"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -521,48 +499,48 @@ msgstr "No hay otros contenedores"
msgid "Shot log" msgid "Shot log"
msgstr "Registro de tiros" msgstr "Registro de tiros"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "$%{amount}" msgstr "$%{amount}"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "Bimetal" msgstr "Bimetal"
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "Tipo de camisa" msgstr "Tipo de camisa"
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "Velocidad de boca" msgstr "Velocidad de boca"
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "Granos de polvora por carga" msgstr "Granos de polvora por carga"
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "Tipo de polvora" msgstr "Tipo de polvora"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "" msgstr ""
@ -585,8 +563,8 @@ msgstr "Contraseña actual"
msgid "New password" msgid "New password"
msgstr "Nueva contraseña" msgstr "Nueva contraseña"
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "Tipo de fuego" msgstr "Tipo de fuego"
@ -609,16 +587,16 @@ msgid "Edit %{name} tags"
msgstr "Editar etiquetas de %{name}" msgstr "Editar etiquetas de %{name}"
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds:" msgid "Rounds:"
msgstr "Balas:" msgstr "Balas:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "No hay información de coste" msgstr "No hay información de coste"
@ -689,7 +667,7 @@ msgstr "Tiros Récord"
msgid "Copies" msgid "Copies"
msgstr "Copias" msgstr "Copias"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "Añadido en:" msgstr "Añadido en:"
@ -736,9 +714,9 @@ msgid "View the source code"
msgstr "Ver código fuente" msgstr "Ver código fuente"
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "Catálogo" msgstr "Catálogo"
@ -769,8 +747,8 @@ msgid "This ammo is not in a container"
msgstr "Esta munición no está en un contenedor" msgstr "Esta munición no está en un contenedor"
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "Paquetes:" msgstr "Paquetes:"
@ -797,9 +775,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "Contenedor:" msgstr "Contenedor:"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "Mostrar usadas" msgstr "Mostrar usadas"
@ -815,182 +793,171 @@ msgstr "%{percentage}%"
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "Balas disparadas: %{count}" msgstr "Balas disparadas: %{count}"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Packs" msgid "Packs"
msgstr "Paquetes" msgstr "Paquetes"
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds" msgid "Rounds"
msgstr "Balas" msgstr "Balas"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "Ver como tabla" msgstr "Ver como tabla"
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "Paquetes totales" msgstr "Paquetes totales"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "Paquetes totales:" msgstr "Paquetes totales:"
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "Balas totales" msgstr "Balas totales"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "Balas totales:" msgstr "Balas totales:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "Paquetes usados" msgstr "Paquetes usados"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "Paquetes usados:" msgstr "Paquetes usados:"
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds" msgid "Used rounds"
msgstr "Balas usadas" msgstr "Balas usadas"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used rounds:" msgid "Used rounds:"
msgstr "Balas usadas:" msgstr "Balas usadas:"
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr "¡Acabada!"
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "Tabla de disparos" msgstr "Tabla de disparos"
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank:" msgid "Blank:"
msgstr "En blanco:" msgstr "En blanco:"
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core:" msgid "Bullet core:"
msgstr "Núcleo de bala:" msgstr "Núcleo de bala:"
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type:" msgid "Bullet type:"
msgstr "Tipo de bala:" msgstr "Tipo de bala:"
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber:" msgid "Caliber:"
msgstr "Calibre:" msgstr "Calibre:"
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge:" msgid "Cartridge:"
msgstr "Cartucho:" msgstr "Cartucho:"
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material:" msgid "Case material:"
msgstr "Material de la camisa:" msgstr "Material de la camisa:"
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive:" msgid "Corrosive:"
msgstr "Corrosiva:" msgstr "Corrosiva:"
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type:" msgid "Firing type:"
msgstr "Tipo de fuego:" msgstr "Tipo de fuego:"
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains:" msgid "Grains:"
msgstr "Granos:" msgstr "Granos:"
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary:" msgid "Incendiary:"
msgstr "Incendiarias:" msgstr "Incendiarias:"
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type:" msgid "Jacket type:"
msgstr "Tipo de camisa:" msgstr "Tipo de camisa:"
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "Fabricante:" msgstr "Fabricante:"
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "Velocidad de boca:" msgstr "Velocidad de boca:"
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "Granos de polvora por carga:" msgstr "Granos de polvora por carga:"
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type:" msgid "Powder type:"
msgstr "Tipo de polvora:" msgstr "Tipo de polvora:"
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure:" msgid "Pressure:"
msgstr "Presión:" msgstr "Presión:"
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type:" msgid "Primer type:"
msgstr "Tipo de espoleta:" msgstr "Tipo de espoleta:"
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer:" msgid "Tracer:"
msgstr "Trazadora:" msgstr "Trazadora:"
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC:" msgid "UPC:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr "Editar %{ammo_type_name}"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1054,13 +1021,7 @@ msgstr "Comprada en:"
msgid "Edit ammo" msgid "Edit ammo"
msgstr "Editar munición" msgstr "Editar munición"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Sin tipo de Munición"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1189,42 +1150,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1251,76 +1212,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Brass height" msgid "Brass height"
msgstr "Latón" msgstr "Latón"
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1330,140 +1291,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "Sin Munición" msgstr "Sin Munición"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder" msgid "Powder"
msgstr "Tipo de polvora" msgstr "Tipo de polvora"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer" msgid "Primer"
msgstr "Tipo de espoleta" msgstr "Tipo de espoleta"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size" msgid "Shot size"
msgstr "Tiros disparados" msgstr "Tiros disparados"
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:" msgid "Shot size:"
msgstr "Tiros disparados" msgstr "Tiros disparados"
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Balas"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Editar Tiros Récord"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "Editar %{ammo_type_name}"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nuevo tipo de Munición"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Tipo"

View File

@ -69,7 +69,7 @@ msgstr "Correo o contraseña incorrecta"
msgid "Not found" msgid "Not found"
msgstr "No se encontró" msgstr "No se encontró"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -171,42 +171,42 @@ msgstr "No se ha podido procesar el número de copias"
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier" msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier"
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "Multiplicador inválido" msgstr "Multiplicador inválido"
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr "Por favor escoja un tipo de munición y un contenedor"
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "Su navegador no es compatible con el elemento lienzo." msgstr "Su navegador no es compatible con el elemento lienzo."
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "Por favor escoja un usuario y tipo de munición valido" msgstr "Por favor escoja un usuario y tipo de munición valido"
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "El recuento debe ser menos de %{count}" msgstr "El recuento debe ser menos de %{count}"
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr "Por favor escoja un tipo de munición y un contenedor"

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to ## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no ## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead. ## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "%{name} creado exitosamente" msgstr "%{name} creado exitosamente"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "%{name} borrado exitosamente" msgstr "%{name} borrado exitosamente"
@ -44,10 +44,10 @@ msgstr "%{name} borrado exitosamente"
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "%{name} ha sido borrado" msgstr "%{name} ha sido borrado"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "%{name} actualizado exitosamente" msgstr "%{name} actualizado exitosamente"
@ -128,13 +128,13 @@ msgstr "Contraseña cambiada exitosamente."
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "Por favor chequea el correo para verificar tu cuenta" msgstr "Por favor chequea el correo para verificar tu cuenta"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "Guardando..." msgstr "Guardando..."
@ -165,7 +165,7 @@ msgstr "se ha removido %{tag_name} de %{container_name}"
msgid "Adding..." msgid "Adding..."
msgstr "Añadiendo..." msgstr "Añadiendo..."
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "Tiros registrados exitosamente" msgstr "Tiros registrados exitosamente"
@ -256,8 +256,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Munición añadida exitosamente" msgstr[0] "Munición añadida exitosamente"
msgstr[1] "Municiones añadidas exitosamente" msgstr[1] "Municiones añadidas exitosamente"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "" msgstr ""

View File

@ -40,7 +40,7 @@ msgstr "Ajoutez votre première caisse !"
msgid "Add your first container!" msgid "Add your first container!"
msgstr "Ajoutez votre premier conteneur!" msgstr "Ajoutez votre premier conteneur!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "Ajoutez votre premier type!" msgstr "Ajoutez votre premier type!"
@ -95,11 +95,6 @@ msgstr "Se connecter"
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "Faîtes votre premier tag!" msgstr "Faîtes votre premier tag!"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -133,13 +128,13 @@ msgstr "Renvoyer les instructions de confirmation"
msgid "Reset password" msgid "Reset password"
msgstr "Réinitialisé le mot de passe" msgstr "Réinitialisé le mot de passe"
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "Sauvegarder" msgstr "Sauvegarder"
@ -216,11 +211,6 @@ msgstr "Changer la langue"
msgid "View in Catalog" msgid "View in Catalog"
msgstr "Voir en catalogue" msgstr "Voir en catalogue"
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr "Ajoutez d'abord un type de munitions"
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -250,11 +240,6 @@ msgstr ""
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -266,12 +251,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -289,18 +268,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -318,16 +285,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Stage" msgid "Stage"
@ -344,11 +301,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -366,8 +318,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr "Ajoutez d'abord un type de munitions"

View File

@ -30,7 +30,7 @@ msgid "Admins:"
msgstr "Administrateur·ices:" msgstr "Administrateur·ices:"
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -38,54 +38,48 @@ msgstr "Administrateur·ices:"
msgid "Ammo" msgid "Ammo"
msgstr "Munition" msgstr "Munition"
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr "Type de munition"
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "Couleur de fond" msgstr "Couleur de fond"
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "Vide" msgstr "Vide"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "Cuivre" msgstr "Cuivre"
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "Noyau de balle" msgstr "Noyau de balle"
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "Type de balle" msgstr "Type de balle"
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "Calibre" msgstr "Calibre"
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "Cartouche" msgstr "Cartouche"
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "Matériau de la caisse" msgstr "Matériau de la caisse"
@ -105,8 +99,8 @@ msgstr "Conteneur"
msgid "Containers" msgid "Containers"
msgstr "Conteneurs" msgstr "Conteneurs"
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "Corrosive" msgstr "Corrosive"
@ -124,8 +118,8 @@ msgid "Count:"
msgstr "Quantité:" msgstr "Quantité:"
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
@ -151,19 +145,19 @@ msgstr "Modifier linvitation"
msgid "Edit Tag" msgid "Edit Tag"
msgstr "Modifier le tag" msgstr "Modifier le tag"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "FMJ" msgstr "FMJ"
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "Graines" msgstr "Graines"
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "Incendiaire" msgstr "Incendiaire"
@ -213,9 +207,9 @@ msgstr "Localisation:"
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "Chargeur, lame-chargeur, boite de munition, etc." msgstr "Chargeur, lame-chargeur, boite de munition, etc."
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "Fabricant" msgstr "Fabricant"
@ -230,22 +224,16 @@ msgstr "Boite de munition avec le sticker de fille danimation"
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "Ma superbe boite de munition" msgstr "Ma superbe boite de munition"
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -267,7 +255,7 @@ msgstr "Nouveau tag"
msgid "No Ammo" msgid "No Ammo"
msgstr "Aucune munition" msgstr "Aucune munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "Aucune munition pour ce type" msgstr "Aucune munition pour ce type"
@ -290,8 +278,8 @@ msgstr "Aucune invitation"
msgid "No tags" msgid "No tags"
msgstr "Aucun tag" msgstr "Aucun tag"
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -310,8 +298,8 @@ msgstr "Notes:"
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "Sur létagère" msgstr "Sur létagère"
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "Pression" msgstr "Pression"
@ -327,8 +315,8 @@ msgstr "Prix payé"
msgid "Price paid:" msgid "Price paid:"
msgstr "Prix payé:" msgstr "Prix payé:"
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "Type damorce" msgstr "Type damorce"
@ -361,7 +349,7 @@ msgstr "Paramètres"
msgid "Simple:" msgid "Simple:"
msgstr "Simple:" msgstr "Simple:"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "Acier" msgstr "Acier"
@ -397,15 +385,17 @@ msgstr "Couleur du texte"
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "Le site web de suivi darme à feux auto-hébergé" msgstr "Le site web de suivi darme à feux auto-hébergé"
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "Traceuse" msgstr "Traceuse"
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
@ -447,8 +437,8 @@ msgstr "Portée"
msgid "Range day" msgid "Range day"
msgstr "Journée de stand" msgstr "Journée de stand"
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -465,18 +455,12 @@ msgstr "Tirs réalisés"
msgid "No ammo staged" msgid "No ammo staged"
msgstr "Aucune munition sélectionnée" msgstr "Aucune munition sélectionnée"
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "Tirs enregistrés" msgstr "Tirs enregistrés"
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr "Modifier les enregistrements de tir"
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -488,13 +472,7 @@ msgstr "Nouveaux enregistrements de tir"
msgid "No shots recorded" msgid "No shots recorded"
msgstr "Aucun tir enregistré" msgstr "Aucun tir enregistré"
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr "Cartouches restantes"
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -522,48 +500,48 @@ msgstr "Aucun autre conteneur"
msgid "Shot log" msgid "Shot log"
msgstr "Évènements de tir" msgstr "Évènements de tir"
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "%{amount}$" msgstr "%{amount}$"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "Bi-métal" msgstr "Bi-métal"
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "Type de douille" msgstr "Type de douille"
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "Vélocité du canon" msgstr "Vélocité du canon"
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "Graines de poudre par charge" msgstr "Graines de poudre par charge"
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "Type de poudre" msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "UPC" msgstr "UPC"
@ -586,8 +564,8 @@ msgstr "Mot de passe actuel"
msgid "New password" msgid "New password"
msgstr "Nouveau mot de passe" msgstr "Nouveau mot de passe"
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "Type dallumage" msgstr "Type dallumage"
@ -610,16 +588,16 @@ msgid "Edit %{name} tags"
msgstr "Éditer les tags de %{name}" msgstr "Éditer les tags de %{name}"
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds:" msgid "Rounds:"
msgstr "Cartouches:" msgstr "Cartouches:"
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "Aucune information de prix" msgstr "Aucune information de prix"
@ -690,7 +668,7 @@ msgstr "Enregistrer des tirs"
msgid "Copies" msgid "Copies"
msgstr "Exemplaires" msgstr "Exemplaires"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "Ajouté le:" msgstr "Ajouté le:"
@ -737,9 +715,9 @@ msgid "View the source code"
msgstr "Voir le code source" msgstr "Voir le code source"
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "Catalogue" msgstr "Catalogue"
@ -770,8 +748,8 @@ msgid "This ammo is not in a container"
msgstr "Ce groupe de munition nest pas dans un conteneur" msgstr "Ce groupe de munition nest pas dans un conteneur"
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "Packages:" msgstr "Packages:"
@ -798,9 +776,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "Conteneur" msgstr "Conteneur"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "" msgstr ""
@ -816,182 +794,171 @@ msgstr ""
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "Cartouches tirées" msgstr "Cartouches tirées"
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Packs" msgid "Packs"
msgstr "Packages:" msgstr "Packages:"
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds" msgid "Rounds"
msgstr "Cartouches:" msgstr "Cartouches:"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "Quantité de cartouches" msgstr "Quantité de cartouches"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "Nombre totale de cartouches tirées:" msgstr "Nombre totale de cartouches tirées:"
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds" msgid "Used rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:" msgid "Used rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "Cartouches tirées" msgstr "Cartouches tirées"
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Blank:" msgid "Blank:"
msgstr "Vide" msgstr "Vide"
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:" msgid "Bullet core:"
msgstr "Noyau de balle" msgstr "Noyau de balle"
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:" msgid "Bullet type:"
msgstr "Type de balle" msgstr "Type de balle"
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:" msgid "Caliber:"
msgstr "Calibre" msgstr "Calibre"
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:" msgid "Cartridge:"
msgstr "Cartouche" msgstr "Cartouche"
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Case material:" msgid "Case material:"
msgstr "Matériau de la caisse" msgstr "Matériau de la caisse"
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:" msgid "Corrosive:"
msgstr "Corrosive" msgstr "Corrosive"
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:" msgid "Firing type:"
msgstr "Type dallumage" msgstr "Type dallumage"
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Grains:" msgid "Grains:"
msgstr "Graines" msgstr "Graines"
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:" msgid "Incendiary:"
msgstr "Incendiaire" msgstr "Incendiaire"
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:" msgid "Jacket type:"
msgstr "Type de douille" msgstr "Type de douille"
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "Fabricant" msgstr "Fabricant"
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "Vélocité du canon" msgstr "Vélocité du canon"
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "Graines de poudre par charge" msgstr "Graines de poudre par charge"
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:" msgid "Powder type:"
msgstr "Type de poudre" msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:" msgid "Pressure:"
msgstr "Pression" msgstr "Pression"
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:" msgid "Primer type:"
msgstr "Type damorce" msgstr "Type damorce"
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:" msgid "Tracer:"
msgstr "Traceuse" msgstr "Traceuse"
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "UPC:" msgid "UPC:"
msgstr "UPC" msgstr "UPC"
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr "Éditer %{name}"
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1055,13 +1022,7 @@ msgstr ""
msgid "Edit ammo" msgid "Edit ammo"
msgstr "Éditer le type de munition" msgstr "Éditer le type de munition"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr "Aucun type de munition"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1190,42 +1151,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1252,76 +1213,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Brass height" msgid "Brass height"
msgstr "Cuivre" msgstr "Cuivre"
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1331,140 +1292,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "Aucune munition" msgstr "Aucune munition"
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder" msgid "Powder"
msgstr "Type de poudre" msgstr "Type de poudre"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer" msgid "Primer"
msgstr "Type damorce" msgstr "Type damorce"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size" msgid "Shot size"
msgstr "Tirs réalisés" msgstr "Tirs réalisés"
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:" msgid "Shot size:"
msgstr "Tirs réalisés" msgstr "Tirs réalisés"
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr "Cartouches:"
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr "Modifier les enregistrements de tir"
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr "Éditer %{name}"
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr "Nouveau type de munition"
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr "Type"

View File

@ -69,7 +69,7 @@ msgstr "Mél ou mot de passe invalide"
msgid "Not found" msgid "Not found"
msgstr "Pas trouvé" msgstr "Pas trouvé"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -172,42 +172,42 @@ msgstr "Impossible d'analyser le nombre de copies"
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}" msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}"
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "Multiplicateur invalide" msgstr "Multiplicateur invalide"
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr "Veuillez choisir un type de munitions et un conteneur"
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "Veuillez choisir un utilisateur valide et un groupe de munitions" msgstr "Veuillez choisir un utilisateur valide et un groupe de munitions"
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "La quantité doit être inférieur à %{count}" msgstr "La quantité doit être inférieur à %{count}"
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr "Veuillez choisir un type de munitions et un conteneur"

View File

@ -23,17 +23,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to ## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no ## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead. ## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "%{name} créé· avec succès" msgstr "%{name} créé· avec succès"
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "%{name} supprimé· avec succès" msgstr "%{name} supprimé· avec succès"
@ -44,10 +44,10 @@ msgstr "%{name} supprimé· avec succès"
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "%{name} a été supprimé·e" msgstr "%{name} a été supprimé·e"
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "%{name} mis à jour avec succès" msgstr "%{name} mis à jour avec succès"
@ -129,13 +129,13 @@ msgstr "Mot de passe mis à jour avec succès."
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "Veuillez vérifier votre mél pour confirmer votre compte" msgstr "Veuillez vérifier votre mél pour confirmer votre compte"
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "Sauvegarde en cours…" msgstr "Sauvegarde en cours…"
@ -167,7 +167,7 @@ msgstr "%{tag_name} a été retiré de %{container_name}"
msgid "Adding..." msgid "Adding..."
msgstr "Ajout en cours…" msgstr "Ajout en cours…"
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "Tirs enregistré avec succès" msgstr "Tirs enregistré avec succès"
@ -258,8 +258,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "Groupe de munition mis à jour avec succès" msgstr[0] "Groupe de munition mis à jour avec succès"
msgstr[1] "Groupe de munition mis à jour avec succès" msgstr[1] "Groupe de munition mis à jour avec succès"
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "Êtes-vous certain·e de supprimer %{name}?" msgstr "Êtes-vous certain·e de supprimer %{name}?"

View File

@ -38,7 +38,7 @@ msgstr ""
msgid "Add your first container!" msgid "Add your first container!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13 #: lib/cannery_web/live/type_live/index.html.heex:13
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Add your first type!" msgid "Add your first type!"
msgstr "" msgstr ""
@ -93,11 +93,6 @@ msgstr ""
msgid "Make your first tag!" msgid "Make your first tag!"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:17
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:17 #: lib/cannery_web/live/container_live/index.html.heex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Container" msgid "New Container"
@ -131,13 +126,13 @@ msgstr ""
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:57 #: lib/cannery_web/components/add_shot_record_component.html.heex:57
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:350
#: lib/cannery_web/live/container_live/form_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:57
#: lib/cannery_web/live/invite_live/form_component.html.heex:35 #: lib/cannery_web/live/invite_live/form_component.html.heex:35
#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #: lib/cannery_web/live/pack_live/form_component.html.heex:84
#: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/range_live/form_component.html.heex:45
#: lib/cannery_web/live/tag_live/form_component.html.heex:37 #: lib/cannery_web/live/tag_live/form_component.html.heex:37
#: lib/cannery_web/live/type_live/form_component.html.heex:350
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -214,11 +209,6 @@ msgstr ""
msgid "View in Catalog" msgid "View in Catalog"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format
msgid "add an ammo type first"
msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:89 #: lib/cannery_web/live/pack_live/show.html.heex:89
@ -248,11 +238,6 @@ msgstr ""
msgid "Export Data as JSON" msgid "Export Data as JSON"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:110
#, elixir-autogen, elixir-format
msgid "Clone %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:87 #: lib/cannery_web/live/container_live/index.html.heex:87
#: lib/cannery_web/live/container_live/index.html.heex:145 #: lib/cannery_web/live/container_live/index.html.heex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -264,12 +249,6 @@ msgstr ""
msgid "Copy invite link for %{invite_name}" msgid "Copy invite link for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:129
#: lib/cannery_web/live/ammo_type_live/show.html.heex:36
#, elixir-autogen, elixir-format
msgid "Delete %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:104 #: lib/cannery_web/live/container_live/index.html.heex:104
#: lib/cannery_web/live/container_live/index.html.heex:162 #: lib/cannery_web/live/container_live/index.html.heex:162
#: lib/cannery_web/live/container_live/show.html.heex:48 #: lib/cannery_web/live/container_live/show.html.heex:48
@ -287,18 +266,6 @@ msgstr ""
msgid "Delete invite for %{invite_name}" msgid "Delete invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format
msgid "Delete shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:100
#: lib/cannery_web/live/ammo_type_live/show.html.heex:19
#, elixir-autogen, elixir-format
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/container_live/index.html.heex:77 #: lib/cannery_web/live/container_live/index.html.heex:77
#: lib/cannery_web/live/container_live/index.html.heex:135 #: lib/cannery_web/live/container_live/index.html.heex:135
#: lib/cannery_web/live/container_live/show.html.heex:35 #: lib/cannery_web/live/container_live/show.html.heex:35
@ -316,16 +283,6 @@ msgstr ""
msgid "Edit invite for %{invite_name}" msgid "Edit invite for %{invite_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#, elixir-autogen, elixir-format
msgid "Edit shot group of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format
msgid "Edit shot record of %{shot_group_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:120 #: lib/cannery_web/live/pack_live/index.html.heex:120
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Stage" msgid "Stage"
@ -342,11 +299,6 @@ msgstr ""
msgid "Unstage" msgid "Unstage"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
#, elixir-autogen, elixir-format
msgid "View %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:174 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone pack of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
@ -364,8 +316,52 @@ msgstr ""
msgid "Edit pack of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#: lib/cannery_web/live/type_live/show.html.heex:204
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View pack of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:160
#: lib/cannery_web/live/range_live/index.html.heex:155
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:145
#: lib/cannery_web/live/range_live/index.html.heex:138
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit shot record of %{shot_record_count} shots"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:105
#, elixir-autogen, elixir-format, fuzzy
msgid "Clone %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:122
#: lib/cannery_web/live/type_live/show.html.heex:35
#, elixir-autogen, elixir-format, fuzzy
msgid "Delete %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:97
#: lib/cannery_web/live/type_live/show.html.heex:19
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:17
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:89
#, elixir-autogen, elixir-format, fuzzy
msgid "View %{type_name}"
msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:24
#, elixir-autogen, elixir-format, fuzzy
msgid "add a type first"
msgstr ""

View File

@ -28,7 +28,7 @@ msgid "Admins:"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:58 #: lib/cannery_web/components/core_components/topbar.html.heex:58
#: lib/cannery_web/components/shot_group_table_component.ex:41 #: lib/cannery_web/components/shot_record_table_component.ex:44
#: lib/cannery_web/live/pack_live/index.ex:75 #: lib/cannery_web/live/pack_live/index.ex:75
#: lib/cannery_web/live/pack_live/index.ex:84 #: lib/cannery_web/live/pack_live/index.ex:84
#: lib/cannery_web/live/pack_live/index.html.heex:3 #: lib/cannery_web/live/pack_live/index.html.heex:3
@ -36,54 +36,48 @@ msgstr ""
msgid "Ammo" msgid "Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format
msgid "Ammo type"
msgstr ""
#: lib/cannery_web/live/tag_live/form_component.html.heex:25 #: lib/cannery_web/live/tag_live/form_component.html.heex:25
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Background color" msgid "Background color"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:87 #: lib/cannery_web/components/type_table_component.ex:87
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324 #: lib/cannery_web/live/type_live/form_component.html.heex:324
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Blank" msgid "Blank"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/type_live/form_component.html.heex:171
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass" msgid "Brass"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144 #: lib/cannery_web/live/type_live/form_component.html.heex:144
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet core" msgid "Bullet core"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:60 #: lib/cannery_web/components/type_table_component.ex:60
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121 #: lib/cannery_web/live/type_live/form_component.html.heex:121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bullet type" msgid "Bullet type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68 #: lib/cannery_web/live/type_live/form_component.html.heex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Caliber" msgid "Caliber"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:49 #: lib/cannery_web/components/type_table_component.ex:49
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52 #: lib/cannery_web/live/type_live/form_component.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cartridge" msgid "Cartridge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:67 #: lib/cannery_web/components/type_table_component.ex:67
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167 #: lib/cannery_web/live/type_live/form_component.html.heex:167
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Case material" msgid "Case material"
msgstr "" msgstr ""
@ -103,8 +97,8 @@ msgstr ""
msgid "Containers" msgid "Containers"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:88 #: lib/cannery_web/components/type_table_component.ex:88
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328 #: lib/cannery_web/live/type_live/form_component.html.heex:328
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Corrosive" msgid "Corrosive"
msgstr "" msgstr ""
@ -122,8 +116,8 @@ msgid "Count:"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:46 #: lib/cannery_web/components/container_table_component.ex:46
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:38
#: lib/cannery_web/live/container_live/form_component.html.heex:29 #: lib/cannery_web/live/container_live/form_component.html.heex:29
#: lib/cannery_web/live/type_live/form_component.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Description" msgid "Description"
msgstr "" msgstr ""
@ -149,19 +143,19 @@ msgstr ""
msgid "Edit Tag" msgid "Edit Tag"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135 #: lib/cannery_web/live/type_live/form_component.html.heex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "FMJ" msgid "FMJ"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:59 #: lib/cannery_web/components/type_table_component.ex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112 #: lib/cannery_web/live/type_live/form_component.html.heex:112
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Grains" msgid "Grains"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:86 #: lib/cannery_web/components/type_table_component.ex:86
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320 #: lib/cannery_web/live/type_live/form_component.html.heex:320
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Incendiary" msgid "Incendiary"
msgstr "" msgstr ""
@ -211,9 +205,9 @@ msgstr ""
msgid "Magazine, Clip, Ammo Box, etc" msgid "Magazine, Clip, Ammo Box, etc"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:89 #: lib/cannery_web/components/type_table_component.ex:89
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333 #: lib/cannery_web/live/type_live/form_component.html.heex:333
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336 #: lib/cannery_web/live/type_live/form_component.html.heex:336
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""
@ -228,22 +222,16 @@ msgstr ""
msgid "My cool ammo can" msgid "My cool ammo can"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:153
#: lib/cannery_web/components/container_table_component.ex:45 #: lib/cannery_web/components/container_table_component.ex:45
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31 #: lib/cannery_web/components/type_table_component.ex:153
#: lib/cannery_web/live/container_live/form_component.html.heex:21 #: lib/cannery_web/live/container_live/form_component.html.heex:21
#: lib/cannery_web/live/invite_live/form_component.html.heex:21 #: lib/cannery_web/live/invite_live/form_component.html.heex:21
#: lib/cannery_web/live/tag_live/form_component.html.heex:21 #: lib/cannery_web/live/tag_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/form_component.html.heex:31
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:36
#: lib/cannery_web/live/ammo_type_live/index.ex:44
#, elixir-autogen, elixir-format
msgid "New Ammo type"
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/index.ex:39 #: lib/cannery_web/live/container_live/index.ex:39
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -265,7 +253,7 @@ msgstr ""
msgid "No Ammo" msgid "No Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180 #: lib/cannery_web/live/type_live/show.html.heex:178
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "" msgstr ""
@ -288,8 +276,8 @@ msgstr ""
msgid "No tags" msgid "No tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:38 #: lib/cannery_web/components/add_shot_record_component.html.heex:38
#: lib/cannery_web/components/shot_group_table_component.ex:43 #: lib/cannery_web/components/shot_record_table_component.ex:46
#: lib/cannery_web/live/pack_live/form_component.html.heex:50 #: lib/cannery_web/live/pack_live/form_component.html.heex:50
#: lib/cannery_web/live/pack_live/show.ex:91 #: lib/cannery_web/live/pack_live/show.ex:91
#: lib/cannery_web/live/range_live/form_component.html.heex:30 #: lib/cannery_web/live/range_live/form_component.html.heex:30
@ -308,8 +296,8 @@ msgstr ""
msgid "On the bookshelf" msgid "On the bookshelf"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:80 #: lib/cannery_web/components/type_table_component.ex:80
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257 #: lib/cannery_web/live/type_live/form_component.html.heex:257
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pressure" msgid "Pressure"
msgstr "" msgstr ""
@ -325,8 +313,8 @@ msgstr ""
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:83 #: lib/cannery_web/components/type_table_component.ex:83
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296 #: lib/cannery_web/live/type_live/form_component.html.heex:296
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Primer type" msgid "Primer type"
msgstr "" msgstr ""
@ -357,7 +345,7 @@ msgstr ""
msgid "Simple:" msgid "Simple:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151 #: lib/cannery_web/live/type_live/form_component.html.heex:151
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
@ -391,15 +379,17 @@ msgstr ""
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:85 #: lib/cannery_web/components/type_table_component.ex:85
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316 #: lib/cannery_web/live/type_live/form_component.html.heex:316
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Tracer" msgid "Tracer"
msgstr "" msgstr ""
#: lib/cannery_web/components/container_table_component.ex:48 #: lib/cannery_web/components/container_table_component.ex:48
#: lib/cannery_web/components/move_pack_component.ex:66 #: lib/cannery_web/components/move_pack_component.ex:66
#: lib/cannery_web/components/pack_table_component.ex:95
#: lib/cannery_web/live/container_live/form_component.html.heex:39 #: lib/cannery_web/live/container_live/form_component.html.heex:39
#: lib/cannery_web/live/pack_live/form_component.html.heex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
@ -441,8 +431,8 @@ msgstr ""
msgid "Range day" msgid "Range day"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:49 #: lib/cannery_web/components/add_shot_record_component.html.heex:49
#: lib/cannery_web/components/shot_group_table_component.ex:44 #: lib/cannery_web/components/shot_record_table_component.ex:47
#: lib/cannery_web/live/pack_live/show.ex:92 #: lib/cannery_web/live/pack_live/show.ex:92
#: lib/cannery_web/live/range_live/form_component.html.heex:41 #: lib/cannery_web/live/range_live/form_component.html.heex:41
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -459,18 +449,12 @@ msgstr ""
msgid "No ammo staged" msgid "No ammo staged"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:3 #: lib/cannery_web/components/add_shot_record_component.html.heex:3
#: lib/cannery_web/live/pack_live/index.ex:35 #: lib/cannery_web/live/pack_live/index.ex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format
msgid "Edit Shot Records"
msgstr ""
#: lib/cannery_web/live/range_live/index.ex:48 #: lib/cannery_web/live/range_live/index.ex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "New Shot Records" msgid "New Shot Records"
@ -482,13 +466,7 @@ msgstr ""
msgid "No shots recorded" msgid "No shots recorded"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:22 #: lib/cannery_web/components/shot_record_table_component.ex:45
#: lib/cannery_web/components/add_shot_group_component.html.heex:26
#, elixir-autogen, elixir-format
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/shot_group_table_component.ex:42
#: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/pack_live/show.ex:90
#: lib/cannery_web/live/range_live/index.html.heex:69 #: lib/cannery_web/live/range_live/index.html.heex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -516,48 +494,48 @@ msgstr ""
msgid "Shot log" msgid "Shot log"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:261
#: lib/cannery_web/components/core_components/pack_card.html.heex:42 #: lib/cannery_web/components/core_components/pack_card.html.heex:42
#: lib/cannery_web/components/core_components/pack_card.html.heex:47 #: lib/cannery_web/components/core_components/pack_card.html.heex:47
#: lib/cannery_web/components/pack_table_component.ex:163 #: lib/cannery_web/components/pack_table_component.ex:163
#: lib/cannery_web/components/pack_table_component.ex:246 #: lib/cannery_web/components/pack_table_component.ex:246
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152 #: lib/cannery_web/components/type_table_component.ex:261
#: lib/cannery_web/live/pack_live/show.html.heex:37 #: lib/cannery_web/live/pack_live/show.html.heex:37
#: lib/cannery_web/live/pack_live/show.html.heex:42 #: lib/cannery_web/live/pack_live/show.html.heex:42
#: lib/cannery_web/live/type_live/show.html.heex:150
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "$%{amount}" msgid "$%{amount}"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160 #: lib/cannery_web/live/type_live/form_component.html.heex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Bimetal" msgid "Bimetal"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:66 #: lib/cannery_web/components/type_table_component.ex:66
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/type_live/form_component.html.heex:156
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Jacket type" msgid "Jacket type"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:82 #: lib/cannery_web/components/type_table_component.ex:82
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279 #: lib/cannery_web/live/type_live/form_component.html.heex:279
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Muzzle velocity" msgid "Muzzle velocity"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:76 #: lib/cannery_web/components/type_table_component.ex:76
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244 #: lib/cannery_web/live/type_live/form_component.html.heex:244
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder grains per charge" msgid "Powder grains per charge"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:74 #: lib/cannery_web/components/type_table_component.ex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236 #: lib/cannery_web/live/type_live/form_component.html.heex:236
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Powder type" msgid "Powder type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343 #: lib/cannery_web/live/type_live/form_component.html.heex:343
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "UPC" msgid "UPC"
msgstr "" msgstr ""
@ -580,8 +558,8 @@ msgstr ""
msgid "New password" msgid "New password"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:84 #: lib/cannery_web/components/type_table_component.ex:84
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304 #: lib/cannery_web/live/type_live/form_component.html.heex:304
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Firing type" msgid "Firing type"
msgstr "" msgstr ""
@ -604,16 +582,16 @@ msgid "Edit %{name} tags"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:37 #: lib/cannery_web/components/core_components/container_card.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:87
#: lib/cannery_web/live/container_live/show.html.heex:27 #: lib/cannery_web/live/container_live/show.html.heex:27
#: lib/cannery_web/live/type_live/show.html.heex:85
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds:" msgid "Rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:260
#: lib/cannery_web/components/pack_table_component.ex:160 #: lib/cannery_web/components/pack_table_component.ex:160
#: lib/cannery_web/components/pack_table_component.ex:242 #: lib/cannery_web/components/pack_table_component.ex:242
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156 #: lib/cannery_web/components/type_table_component.ex:260
#: lib/cannery_web/live/type_live/show.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No cost information" msgid "No cost information"
msgstr "" msgstr ""
@ -684,7 +662,7 @@ msgstr ""
msgid "Copies" msgid "Copies"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139 #: lib/cannery_web/live/type_live/show.html.heex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Added on:" msgid "Added on:"
msgstr "" msgstr ""
@ -731,9 +709,9 @@ msgid "View the source code"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/topbar.html.heex:50 #: lib/cannery_web/components/core_components/topbar.html.heex:50
#: lib/cannery_web/live/ammo_type_live/index.ex:52 #: lib/cannery_web/live/type_live/index.ex:52
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3 #: lib/cannery_web/live/type_live/index.html.heex:3
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Catalog" msgid "Catalog"
msgstr "" msgstr ""
@ -764,8 +742,8 @@ msgid "This ammo is not in a container"
msgstr "" msgstr ""
#: lib/cannery_web/components/core_components/container_card.html.heex:32 #: lib/cannery_web/components/core_components/container_card.html.heex:32
#: lib/cannery_web/live/ammo_type_live/show.html.heex:113
#: lib/cannery_web/live/container_live/show.html.heex:22 #: lib/cannery_web/live/container_live/show.html.heex:22
#: lib/cannery_web/live/type_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Packs:" msgid "Packs:"
msgstr "" msgstr ""
@ -791,9 +769,9 @@ msgstr ""
msgid "Container:" msgid "Container:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:166
#: lib/cannery_web/live/pack_live/index.html.heex:87 #: lib/cannery_web/live/pack_live/index.html.heex:87
#: lib/cannery_web/live/type_live/index.html.heex:64
#: lib/cannery_web/live/type_live/show.html.heex:164
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Show used" msgid "Show used"
msgstr "" msgstr ""
@ -809,182 +787,171 @@ msgstr ""
msgid "Rounds shot: %{count}" msgid "Rounds shot: %{count}"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:123
#: lib/cannery_web/components/container_table_component.ex:64 #: lib/cannery_web/components/container_table_component.ex:64
#: lib/cannery_web/components/type_table_component.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Packs" msgid "Packs"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:144
#: lib/cannery_web/components/container_table_component.ex:65 #: lib/cannery_web/components/container_table_component.ex:65
#: lib/cannery_web/components/type_table_component.ex:144
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds" msgid "Rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:172
#: lib/cannery_web/live/container_live/index.html.heex:40 #: lib/cannery_web/live/container_live/index.html.heex:40
#: lib/cannery_web/live/container_live/show.html.heex:115 #: lib/cannery_web/live/container_live/show.html.heex:115
#: lib/cannery_web/live/type_live/show.html.heex:170
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View as table" msgid "View as table"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:108 #: lib/cannery_web/components/type_table_component.ex:108
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs" msgid "Total ever packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130 #: lib/cannery_web/live/type_live/show.html.heex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total ever packs:" msgid "Total ever packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:129 #: lib/cannery_web/components/type_table_component.ex:129
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds" msgid "Total ever rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104 #: lib/cannery_web/live/type_live/show.html.heex:102
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Total ever rounds:" msgid "Total ever rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:116 #: lib/cannery_web/components/type_table_component.ex:116
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs" msgid "Used packs"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122 #: lib/cannery_web/live/type_live/show.html.heex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Used packs:" msgid "Used packs:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:137 #: lib/cannery_web/components/type_table_component.ex:137
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds" msgid "Used rounds"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96 #: lib/cannery_web/live/type_live/show.html.heex:94
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Used rounds:" msgid "Used rounds:"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:34
#, elixir-autogen, elixir-format, fuzzy
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:71 #: lib/cannery_web/live/range_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds shot chart" msgid "Rounds shot chart"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:154 #: lib/cannery_web/live/type_live/show.ex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Blank:" msgid "Blank:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:132 #: lib/cannery_web/live/type_live/show.ex:132
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet core:" msgid "Bullet core:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:131 #: lib/cannery_web/live/type_live/show.ex:131
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Bullet type:" msgid "Bullet type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Caliber:" msgid "Caliber:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:121 #: lib/cannery_web/live/type_live/show.ex:121
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Cartridge:" msgid "Cartridge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:134 #: lib/cannery_web/live/type_live/show.ex:134
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Case material:" msgid "Case material:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:155 #: lib/cannery_web/live/type_live/show.ex:155
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Corrosive:" msgid "Corrosive:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:151 #: lib/cannery_web/live/type_live/show.ex:151
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Firing type:" msgid "Firing type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:130 #: lib/cannery_web/live/type_live/show.ex:130
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Grains:" msgid "Grains:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:153 #: lib/cannery_web/live/type_live/show.ex:153
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Incendiary:" msgid "Incendiary:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:133 #: lib/cannery_web/live/type_live/show.ex:133
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Jacket type:" msgid "Jacket type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:156 #: lib/cannery_web/live/type_live/show.ex:156
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Manufacturer:" msgid "Manufacturer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:149 #: lib/cannery_web/live/type_live/show.ex:149
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Muzzle velocity:" msgid "Muzzle velocity:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:143 #: lib/cannery_web/live/type_live/show.ex:143
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder grains per charge:" msgid "Powder grains per charge:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:141 #: lib/cannery_web/live/type_live/show.ex:141
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder type:" msgid "Powder type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:147 #: lib/cannery_web/live/type_live/show.ex:147
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Pressure:" msgid "Pressure:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:150 #: lib/cannery_web/live/type_live/show.ex:150
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer type:" msgid "Primer type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:152 #: lib/cannery_web/live/type_live/show.ex:152
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Tracer:" msgid "Tracer:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:157 #: lib/cannery_web/live/type_live/show.ex:157
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "UPC:" msgid "UPC:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:102 #: lib/cannery_web/components/type_table_component.ex:102
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148 #: lib/cannery_web/live/type_live/show.html.heex:146
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Average CPR" msgid "Average CPR"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:28
#: lib/cannery_web/live/ammo_type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{ammo_type_name}"
msgstr ""
#: lib/cannery_web/components/core_components/pack_card.html.heex:17 #: lib/cannery_web/components/core_components/pack_card.html.heex:17
#: lib/cannery_web/components/pack_table_component.ex:250 #: lib/cannery_web/components/pack_table_component.ex:250
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1048,13 +1015,7 @@ msgstr ""
msgid "Edit ammo" msgid "Edit ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 #: lib/cannery_web/live/type_live/index.html.heex:58
#: lib/cannery_web/live/ammo_type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Ammo types"
msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Search catalog" msgid "Search catalog"
msgstr "" msgstr ""
@ -1181,42 +1142,42 @@ msgstr ""
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261 #: lib/cannery_web/live/type_live/form_component.html.heex:261
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "+P" msgid "+P"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75 #: lib/cannery_web/live/type_live/form_component.html.heex:75
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid ".223" msgid ".223"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56 #: lib/cannery_web/live/type_live/form_component.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "5.56x46mm NATO" msgid "5.56x46mm NATO"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300 #: lib/cannery_web/live/type_live/form_component.html.heex:300
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Boxer" msgid "Boxer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308 #: lib/cannery_web/live/type_live/form_component.html.heex:308
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Centerfire" msgid "Centerfire"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:43 #: lib/cannery_web/components/add_shot_record_component.html.heex:43
#: lib/cannery_web/live/range_live/form_component.html.heex:35 #: lib/cannery_web/live/range_live/form_component.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Really great weather" msgid "Really great weather"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:100
#: lib/cannery_web/components/container_table_component.ex:67 #: lib/cannery_web/components/container_table_component.ex:67
#: lib/cannery_web/components/move_pack_component.ex:68 #: lib/cannery_web/components/move_pack_component.ex:68
#: lib/cannery_web/components/pack_table_component.ex:59 #: lib/cannery_web/components/pack_table_component.ex:59
#: lib/cannery_web/components/shot_group_table_component.ex:45 #: lib/cannery_web/components/shot_record_table_component.ex:48
#: lib/cannery_web/components/type_table_component.ex:100
#: lib/cannery_web/live/pack_live/show.ex:93 #: lib/cannery_web/live/pack_live/show.ex:93
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Actions" msgid "Actions"
@ -1243,76 +1204,76 @@ msgstr ""
msgid "Close modal" msgid "Close modal"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:35
#: lib/cannery_web/live/container_live/show.html.heex:103 #: lib/cannery_web/live/container_live/show.html.heex:103
#: lib/cannery_web/live/pack_live/index.html.heex:58 #: lib/cannery_web/live/pack_live/index.html.heex:58
#: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/range_live/index.html.heex:92
#: lib/cannery_web/live/type_live/index.html.heex:35
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "All" msgid "All"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313 #: lib/cannery_web/live/type_live/form_component.html.heex:313
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Attributes" msgid "Attributes"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:56 #: lib/cannery_web/components/type_table_component.ex:56
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89 #: lib/cannery_web/live/type_live/form_component.html.heex:89
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Brass height" msgid "Brass height"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:128 #: lib/cannery_web/live/type_live/show.ex:128
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Brass height:" msgid "Brass height:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:57 #: lib/cannery_web/components/type_table_component.ex:57
#: lib/cannery_web/components/ammo_type_table_component.ex:58 #: lib/cannery_web/components/type_table_component.ex:58
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96 #: lib/cannery_web/live/type_live/form_component.html.heex:96
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size" msgid "Chamber size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:129 #: lib/cannery_web/live/type_live/show.ex:129
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Chamber size:" msgid "Chamber size:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48 #: lib/cannery_web/live/type_live/form_component.html.heex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dimensions" msgid "Dimensions"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:81 #: lib/cannery_web/components/type_table_component.ex:81
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266 #: lib/cannery_web/live/type_live/form_component.html.heex:266
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent" msgid "Dram equivalent"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:148 #: lib/cannery_web/live/type_live/show.ex:148
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dram equivalent:" msgid "Dram equivalent:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:51 #: lib/cannery_web/components/type_table_component.ex:51
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67 #: lib/cannery_web/live/type_live/form_component.html.heex:67
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge" msgid "Gauge"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:123 #: lib/cannery_web/live/type_live/show.ex:123
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Gauge:" msgid "Gauge:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:72 #: lib/cannery_web/components/type_table_component.ex:72
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207 #: lib/cannery_web/live/type_live/form_component.html.heex:207
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains" msgid "Load grains"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:139 #: lib/cannery_web/live/type_live/show.ex:139
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Load grains:" msgid "Load grains:"
msgstr "" msgstr ""
@ -1322,140 +1283,175 @@ msgstr ""
msgid "No ammo" msgid "No ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60 #: lib/cannery_web/live/type_live/show.html.heex:58
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "None specified" msgid "None specified"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:38
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
#: lib/cannery_web/live/container_live/show.html.heex:106 #: lib/cannery_web/live/container_live/show.html.heex:106
#: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/pack_live/index.html.heex:61
#: lib/cannery_web/live/range_live/index.html.heex:95 #: lib/cannery_web/live/range_live/index.html.heex:95
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:38
#: lib/cannery_web/live/type_live/show.html.heex:56
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Pistol" msgid "Pistol"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233 #: lib/cannery_web/live/type_live/form_component.html.heex:233
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Powder" msgid "Powder"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293 #: lib/cannery_web/live/type_live/form_component.html.heex:293
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Primer" msgid "Primer"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109 #: lib/cannery_web/live/type_live/form_component.html.heex:109
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Projectile" msgid "Projectile"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:36
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
#: lib/cannery_web/live/container_live/show.html.heex:104 #: lib/cannery_web/live/container_live/show.html.heex:104
#: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/pack_live/index.html.heex:59
#: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/range_live/index.html.heex:93
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:36
#: lib/cannery_web/live/type_live/show.html.heex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rifle" msgid "Rifle"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:73 #: lib/cannery_web/components/type_table_component.ex:73
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215 #: lib/cannery_web/live/type_live/form_component.html.heex:215
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight" msgid "Shot charge weight"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:140 #: lib/cannery_web/live/type_live/show.ex:140
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot charge weight:" msgid "Shot charge weight:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:70 #: lib/cannery_web/components/type_table_component.ex:70
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191 #: lib/cannery_web/live/type_live/form_component.html.heex:191
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material" msgid "Shot material"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:137 #: lib/cannery_web/live/type_live/show.ex:137
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot material:" msgid "Shot material:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:71 #: lib/cannery_web/components/type_table_component.ex:71
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200 #: lib/cannery_web/live/type_live/form_component.html.heex:200
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size" msgid "Shot size"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:138 #: lib/cannery_web/live/type_live/show.ex:138
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Shot size:" msgid "Shot size:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:69 #: lib/cannery_web/components/type_table_component.ex:69
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183 #: lib/cannery_web/live/type_live/form_component.html.heex:183
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type" msgid "Shot type"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:136 #: lib/cannery_web/live/type_live/show.ex:136
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shot type:" msgid "Shot type:"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:25
#: lib/cannery_web/live/ammo_type_live/index.html.heex:37
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
#: lib/cannery_web/live/container_live/show.html.heex:105 #: lib/cannery_web/live/container_live/show.html.heex:105
#: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/pack_live/index.html.heex:60
#: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/range_live/index.html.heex:94
#: lib/cannery_web/live/type_live/form_component.html.heex:25
#: lib/cannery_web/live/type_live/index.html.heex:37
#: lib/cannery_web/live/type_live/show.html.heex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shotgun" msgid "Shotgun"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:62 #: lib/cannery_web/components/type_table_component.ex:62
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143 #: lib/cannery_web/live/type_live/form_component.html.heex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Slug core" msgid "Slug core"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187 #: lib/cannery_web/live/type_live/form_component.html.heex:187
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Target, bird, buck, etc" msgid "Target, bird, buck, etc"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:127 #: lib/cannery_web/live/type_live/show.ex:127
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired length:" msgid "Unfired length:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:55 #: lib/cannery_web/components/type_table_component.ex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80 #: lib/cannery_web/live/type_live/form_component.html.heex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unfired shell length" msgid "Unfired shell length"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:68 #: lib/cannery_web/components/type_table_component.ex:68
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/type_live/form_component.html.heex:176
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding" msgid "Wadding"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.ex:135 #: lib/cannery_web/live/type_live/show.ex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Wadding:" msgid "Wadding:"
msgstr "" msgstr ""
#: lib/cannery_web/components/ammo_type_table_component.ex:150 #: lib/cannery_web/components/type_table_component.ex:150
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:21
#: lib/cannery_web/live/ammo_type_live/index.html.heex:29
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48
#: lib/cannery_web/live/container_live/show.html.heex:97 #: lib/cannery_web/live/container_live/show.html.heex:97
#: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/pack_live/index.html.heex:50
#: lib/cannery_web/live/range_live/index.html.heex:86 #: lib/cannery_web/live/range_live/index.html.heex:86
#: lib/cannery_web/live/type_live/form_component.html.heex:21
#: lib/cannery_web/live/type_live/index.html.heex:29
#: lib/cannery_web/live/type_live/show.html.heex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Class" msgid "Class"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:22
#: lib/cannery_web/components/add_shot_record_component.html.heex:26
#, elixir-autogen, elixir-format, fuzzy
msgid "Rounds left"
msgstr ""
#: lib/cannery_web/components/add_shot_record_component.html.heex:34
#, elixir-autogen, elixir-format
msgid "Used up!"
msgstr ""
#: lib/cannery_web/live/pack_live/show.ex:42
#: lib/cannery_web/live/range_live/index.ex:40
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit Shot Record"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:28
#: lib/cannery_web/live/type_live/show.ex:82
#, elixir-autogen, elixir-format, fuzzy
msgid "Edit %{type_name}"
msgstr ""
#: lib/cannery_web/live/type_live/index.ex:36
#: lib/cannery_web/live/type_live/index.ex:44
#, elixir-autogen, elixir-format, fuzzy
msgid "New Type"
msgstr ""
#: lib/cannery_web/live/type_live/index.html.heex:8
#: lib/cannery_web/live/type_live/index.html.heex:71
#, elixir-autogen, elixir-format, fuzzy
msgid "No Types"
msgstr ""

View File

@ -70,7 +70,7 @@ msgstr "Seoladh email nó pasfhocal neamhbhailí"
msgid "Not found" msgid "Not found"
msgstr "Ní feidir é a fáil" msgstr "Ní feidir é a fáil"
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18 #: lib/cannery_web/live/type_live/form_component.html.heex:18
#: lib/cannery_web/templates/user_registration/new.html.heex:13 #: lib/cannery_web/templates/user_registration/new.html.heex:13
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:13
#: lib/cannery_web/templates/user_settings/edit.html.heex:22 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
@ -171,42 +171,42 @@ msgstr ""
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "" msgstr ""
#: lib/cannery/ammo.ex:1123 #: lib/cannery/ammo.ex:1121
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Invalid multiplier" msgid "Invalid multiplier"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format
msgid "Please select an ammo type and container"
msgstr ""
#: lib/cannery_web/live/range_live/index.html.heex:74 #: lib/cannery_web/live/range_live/index.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Your browser does not support the canvas element." msgid "Your browser does not support the canvas element."
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:74 #: lib/cannery/activity_log/shot_record.ex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Please select a valid user and ammo pack" msgid "Please select a valid user and ammo pack"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:88 #: lib/cannery/activity_log/shot_record.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left can be at most %{count} rounds" msgid "Ammo left can be at most %{count} rounds"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:84 #: lib/cannery/activity_log/shot_record.ex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Ammo left must be at least 0" msgid "Ammo left must be at least 0"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:119 #: lib/cannery/activity_log/shot_record.ex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Count can be at most %{count} shots" msgid "Count can be at most %{count} shots"
msgstr "" msgstr ""
#: lib/cannery/activity_log/shot_group.ex:80 #: lib/cannery/activity_log/shot_record.ex:80
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "can't be blank" msgid "can't be blank"
msgstr "" msgstr ""
#: lib/cannery/ammo/pack.ex:92
#, elixir-autogen, elixir-format, fuzzy
msgid "Please select a type and container"
msgstr ""

View File

@ -21,17 +21,17 @@ msgstr ""
## Run "mix gettext.extract" to bring this file up to ## Run "mix gettext.extract" to bring this file up to
## date. Leave "msgstr"s empty as changing them here has no ## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead. ## effect: edit them in PO (.po) files instead.
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "" msgstr ""
@ -42,10 +42,10 @@ msgstr ""
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "" msgstr ""
@ -120,13 +120,13 @@ msgstr ""
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "" msgstr ""
@ -156,7 +156,7 @@ msgstr ""
msgid "Adding..." msgid "Adding..."
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "" msgstr ""
@ -250,8 +250,8 @@ msgstr[2] ""
msgstr[3] "" msgstr[3] ""
msgstr[4] "" msgstr[4] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "" msgstr ""

View File

@ -10,17 +10,17 @@
msgid "" msgid ""
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:89
#: lib/cannery_web/live/container_live/form_component.ex:89 #: lib/cannery_web/live/container_live/form_component.ex:89
#: lib/cannery_web/live/invite_live/form_component.ex:80 #: lib/cannery_web/live/invite_live/form_component.ex:80
#: lib/cannery_web/live/tag_live/form_component.ex:78 #: lib/cannery_web/live/tag_live/form_component.ex:78
#: lib/cannery_web/live/type_live/form_component.ex:88
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} created successfully" msgid "%{name} created successfully"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/index.ex:72
#: lib/cannery_web/live/ammo_type_live/show.ex:27
#: lib/cannery_web/live/tag_live/index.ex:65 #: lib/cannery_web/live/tag_live/index.ex:65
#: lib/cannery_web/live/type_live/index.ex:72
#: lib/cannery_web/live/type_live/show.ex:27
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} deleted succesfully" msgid "%{name} deleted succesfully"
msgstr "" msgstr ""
@ -31,10 +31,10 @@ msgstr ""
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/form_component.ex:70
#: lib/cannery_web/live/container_live/form_component.ex:70 #: lib/cannery_web/live/container_live/form_component.ex:70
#: lib/cannery_web/live/invite_live/form_component.ex:62 #: lib/cannery_web/live/invite_live/form_component.ex:62
#: lib/cannery_web/live/tag_live/form_component.ex:60 #: lib/cannery_web/live/tag_live/form_component.ex:60
#: lib/cannery_web/live/type_live/form_component.ex:69
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "%{name} updated successfully" msgid "%{name} updated successfully"
msgstr "" msgstr ""
@ -109,13 +109,13 @@ msgstr ""
msgid "Please check your email to verify your account" msgid "Please check your email to verify your account"
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.html.heex:59 #: lib/cannery_web/components/add_shot_record_component.html.heex:59
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:351
#: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:59
#: lib/cannery_web/live/invite_live/form_component.html.heex:37 #: lib/cannery_web/live/invite_live/form_component.html.heex:37
#: lib/cannery_web/live/pack_live/form_component.html.heex:85 #: lib/cannery_web/live/pack_live/form_component.html.heex:85
#: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/range_live/form_component.html.heex:47
#: lib/cannery_web/live/tag_live/form_component.html.heex:39 #: lib/cannery_web/live/tag_live/form_component.html.heex:39
#: lib/cannery_web/live/type_live/form_component.html.heex:351
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Saving..." msgid "Saving..."
msgstr "" msgstr ""
@ -145,7 +145,7 @@ msgstr ""
msgid "Adding..." msgid "Adding..."
msgstr "" msgstr ""
#: lib/cannery_web/components/add_shot_group_component.ex:60 #: lib/cannery_web/components/add_shot_record_component.ex:60
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Shots recorded successfully" msgid "Shots recorded successfully"
msgstr "" msgstr ""
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122 #: lib/cannery_web/live/type_live/index.html.heex:116
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/type_live/show.html.heex:29
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!" msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
msgstr "" msgstr ""

View File

@ -2,10 +2,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
use Ecto.Migration use Ecto.Migration
def up do def up do
drop index(:ammo_types, [:type])
flush()
rename table(:ammo_types), :type, to: :class rename table(:ammo_types), :type, to: :class
alter table(:ammo_types) do alter table(:ammo_types) do
@ -14,8 +10,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
flush() flush()
create index(:ammo_types, [:class])
execute """ execute """
ALTER TABLE ammo_types ALTER TABLE ammo_types
ADD COLUMN search tsvector ADD COLUMN search tsvector
@ -59,10 +53,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
end end
def down do def down do
drop index(:ammo_types, [:class])
flush()
rename table(:ammo_types), :class, to: :type rename table(:ammo_types), :class, to: :type
alter table(:ammo_types) do alter table(:ammo_types) do
@ -71,8 +61,6 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
flush() flush()
create index(:ammo_types, [:type])
execute """ execute """
ALTER TABLE ammo_types ALTER TABLE ammo_types
ADD COLUMN search TSVECTOR ADD COLUMN search TSVECTOR

View File

@ -3,11 +3,7 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
def up do def up do
drop index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index) drop index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
drop index(:ammo_groups, [:user_id, :ammo_type_id]) drop index(:shot_groups, [:user_id, :ammo_group_id])
drop index(:ammo_groups, [:user_id, :container_id])
drop index(:ammo_groups, [:ammo_type_id])
drop index(:ammo_groups, [:container_id])
drop index(:ammo_groups, [:user_id])
flush() flush()
@ -16,22 +12,11 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
flush() flush()
create index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index) create index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index)
create index(:packs, [:user_id, :ammo_type_id])
create index(:packs, [:user_id, :container_id])
create index(:packs, [:ammo_type_id])
create index(:packs, [:container_id])
create index(:packs, [:user_id])
rename table(:shot_groups), :ammo_group_id, to: :pack_id rename table(:shot_groups), :ammo_group_id, to: :pack_id
end end
def down do def down do
drop index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index) drop index(:packs, [:user_id], where: "count = 0", name: :empty_packs_index)
drop index(:packs, [:user_id, :ammo_type_id])
drop index(:packs, [:user_id, :container_id])
drop index(:packs, [:ammo_type_id])
drop index(:packs, [:container_id])
drop index(:packs, [:user_id])
flush() flush()
@ -40,12 +25,10 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
flush() flush()
create index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index) create index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
create index(:ammo_groups, [:user_id, :ammo_type_id])
create index(:ammo_groups, [:user_id, :container_id])
create index(:ammo_groups, [:ammo_type_id])
create index(:ammo_groups, [:container_id])
create index(:ammo_groups, [:user_id])
rename table(:shot_groups), :pack_id, to: :ammo_group_id rename table(:shot_groups), :pack_id, to: :ammo_group_id
flush()
create index(:shot_groups, [:user_id, :ammo_group_id])
end end
end end

View File

@ -0,0 +1,7 @@
defmodule Cannery.Repo.Migrations.RenameShotGroupsToShotRecords do
use Ecto.Migration
def change do
rename table(:shot_groups), to: table(:shot_records)
end
end

View File

@ -0,0 +1,8 @@
defmodule Cannery.Repo.Migrations.RenameAmmoTypeToType do
use Ecto.Migration
def change do
rename table(:ammo_types), to: table(:types)
rename table(:packs), :ammo_type_id, to: :type_id
end
end

View File

@ -5,31 +5,30 @@ defmodule Cannery.ActivityLogTest do
use Cannery.DataCase use Cannery.DataCase
import Cannery.Fixtures import Cannery.Fixtures
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo} alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
@moduletag :activity_log_test @moduletag :activity_log_test
describe "shot_groups" do describe "shot_records" do
setup do setup do
current_user = user_fixture() current_user = user_fixture()
container = container_fixture(current_user) container = container_fixture(current_user)
ammo_type = ammo_type_fixture(current_user) type = type_fixture(current_user)
{1, [%{id: pack_id} = pack]} = {1, [%{id: pack_id} = pack]} = pack_fixture(%{count: 25}, type, container, current_user)
pack_fixture(%{count: 25}, ammo_type, container, current_user)
shot_group = shot_record =
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"} %{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|> shot_group_fixture(current_user, pack) |> shot_record_fixture(current_user, pack)
pack = pack_id |> Ammo.get_pack!(current_user) pack = pack_id |> Ammo.get_pack!(current_user)
[ [
current_user: current_user, current_user: current_user,
container: container, container: container,
ammo_type: ammo_type, type: type,
pack: pack, pack: pack,
shot_group: shot_group shot_record: shot_record
] ]
end end
@ -37,95 +36,96 @@ defmodule Cannery.ActivityLogTest do
%{pack: pack, current_user: current_user} do %{pack: pack, current_user: current_user} do
assert ActivityLog.get_shot_record_count!(current_user) == 1 assert ActivityLog.get_shot_record_count!(current_user) == 1
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack) shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
assert ActivityLog.get_shot_record_count!(current_user) == 2 assert ActivityLog.get_shot_record_count!(current_user) == 2
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack) shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
assert ActivityLog.get_shot_record_count!(current_user) == 3 assert ActivityLog.get_shot_record_count!(current_user) == 3
other_user = user_fixture() other_user = user_fixture()
assert ActivityLog.get_shot_record_count!(other_user) == 0 assert ActivityLog.get_shot_record_count!(other_user) == 0
container = container_fixture(other_user) container = container_fixture(other_user)
ammo_type = ammo_type_fixture(other_user) type = type_fixture(other_user)
{1, [pack]} = pack_fixture(%{count: 25}, ammo_type, container, other_user) {1, [pack]} = pack_fixture(%{count: 25}, type, container, other_user)
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack) shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack)
assert ActivityLog.get_shot_record_count!(other_user) == 1 assert ActivityLog.get_shot_record_count!(other_user) == 1
end end
test "get_shot_group!/2 returns the shot_group with given id", test "get_shot_record!/2 returns the shot_record with given id",
%{shot_group: shot_group, current_user: current_user} do %{shot_record: shot_record, current_user: current_user} do
assert ActivityLog.get_shot_group!(shot_group.id, current_user) == shot_group assert ActivityLog.get_shot_record!(shot_record.id, current_user) == shot_record
end end
test "get_shot_group!/2 does not return a shot_group of another user", test "get_shot_record!/2 does not return a shot_record of another user",
%{shot_group: shot_group} do %{shot_record: shot_record} do
another_user = user_fixture() another_user = user_fixture()
assert_raise Ecto.NoResultsError, fn -> assert_raise Ecto.NoResultsError, fn ->
ActivityLog.get_shot_group!(shot_group.id, another_user) ActivityLog.get_shot_record!(shot_record.id, another_user)
end end
end end
test "create_shot_group/3 with valid data creates a shot_group", test "create_shot_record/3 with valid data creates a shot_record",
%{current_user: current_user, pack: pack} do %{current_user: current_user, pack: pack} do
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"} valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{} = shot_group} = assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.create_shot_group(valid_attrs, current_user, pack) ActivityLog.create_shot_record(valid_attrs, current_user, pack)
assert shot_group.count == 10 assert shot_record.count == 10
assert shot_group.date == ~D[2022-02-13] assert shot_record.date == ~D[2022-02-13]
assert shot_group.notes == "some notes" assert shot_record.notes == "some notes"
end end
test "create_shot_group/3 removes corresponding count from pack", test "create_shot_record/3 removes corresponding count from pack",
%{ %{
current_user: current_user, current_user: current_user,
pack: %{id: pack_id, count: org_count} = pack pack: %{id: pack_id, count: org_count} = pack
} do } do
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"} valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{} = shot_group} = assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.create_shot_group(valid_attrs, current_user, pack) ActivityLog.create_shot_record(valid_attrs, current_user, pack)
%{count: new_count} = pack_id |> Ammo.get_pack!(current_user) %{count: new_count} = pack_id |> Ammo.get_pack!(current_user)
assert org_count - shot_group.count == new_count assert org_count - shot_record.count == new_count
assert new_count == 10 assert new_count == 10
end end
test "create_shot_group/3 does not remove more tha pack amount", test "create_shot_record/3 does not remove more tha pack amount",
%{current_user: current_user, pack: %{id: pack_id} = pack} do %{current_user: current_user, pack: %{id: pack_id} = pack} do
valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"} valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"}
assert {:ok, %ShotGroup{}} = ActivityLog.create_shot_group(valid_attrs, current_user, pack) assert {:ok, %ShotRecord{}} =
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
pack = pack_id |> Ammo.get_pack!(current_user) pack = pack_id |> Ammo.get_pack!(current_user)
assert pack.count == 0 assert pack.count == 0
assert {:error, %Ecto.Changeset{}} = assert {:error, %Ecto.Changeset{}} =
ActivityLog.create_shot_group(%{count: 1}, current_user, pack) ActivityLog.create_shot_record(%{count: 1}, current_user, pack)
end end
test "create_shot_group/3 with invalid data returns error changeset", test "create_shot_record/3 with invalid data returns error changeset",
%{current_user: current_user, pack: pack} do %{current_user: current_user, pack: pack} do
invalid_params = %{count: nil, date: nil, notes: nil} invalid_params = %{count: nil, date: nil, notes: nil}
assert {:error, %Ecto.Changeset{}} = assert {:error, %Ecto.Changeset{}} =
ActivityLog.create_shot_group(invalid_params, current_user, pack) ActivityLog.create_shot_record(invalid_params, current_user, pack)
end end
test "update_shot_group/3 with valid data updates the shot_group and pack", test "update_shot_record/3 with valid data updates the shot_record and pack",
%{ %{
shot_group: shot_group, shot_record: shot_record,
pack: %{id: pack_id}, pack: %{id: pack_id},
current_user: current_user current_user: current_user
} do } do
assert {:ok, %ShotGroup{} = shot_group} = assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.update_shot_group( ActivityLog.update_shot_record(
shot_group, shot_record,
%{ %{
count: 10, count: 10,
date: ~D[2022-02-13], date: ~D[2022-02-13],
@ -136,14 +136,14 @@ defmodule Cannery.ActivityLogTest do
pack = pack_id |> Ammo.get_pack!(current_user) pack = pack_id |> Ammo.get_pack!(current_user)
assert shot_group.count == 10 assert shot_record.count == 10
assert pack.count == 15 assert pack.count == 15
assert shot_group.date == ~D[2022-02-13] assert shot_record.date == ~D[2022-02-13]
assert shot_group.notes == "some updated notes" assert shot_record.notes == "some updated notes"
assert {:ok, %ShotGroup{} = shot_group} = assert {:ok, %ShotRecord{} = shot_record} =
ActivityLog.update_shot_group( ActivityLog.update_shot_record(
shot_group, shot_record,
%{ %{
count: 25, count: 25,
date: ~D[2022-02-13], date: ~D[2022-02-13],
@ -154,83 +154,82 @@ defmodule Cannery.ActivityLogTest do
pack = pack_id |> Ammo.get_pack!(current_user) pack = pack_id |> Ammo.get_pack!(current_user)
assert shot_group.count == 25 assert shot_record.count == 25
assert pack.count == 0 assert pack.count == 0
end end
test "update_shot_group/3 with invalid data returns error changeset", test "update_shot_record/3 with invalid data returns error changeset",
%{shot_group: shot_group, current_user: current_user} do %{shot_record: shot_record, current_user: current_user} do
assert {:error, %Ecto.Changeset{}} = assert {:error, %Ecto.Changeset{}} =
ActivityLog.update_shot_group( ActivityLog.update_shot_record(
shot_group, shot_record,
%{count: 26, date: nil, notes: nil}, %{count: 26, date: nil, notes: nil},
current_user current_user
) )
assert {:error, %Ecto.Changeset{}} = assert {:error, %Ecto.Changeset{}} =
ActivityLog.update_shot_group( ActivityLog.update_shot_record(
shot_group, shot_record,
%{count: -1, date: nil, notes: nil}, %{count: -1, date: nil, notes: nil},
current_user current_user
) )
assert shot_group == ActivityLog.get_shot_group!(shot_group.id, current_user) assert shot_record == ActivityLog.get_shot_record!(shot_record.id, current_user)
end end
test "delete_shot_group/2 deletes the shot_group and adds value back", test "delete_shot_record/2 deletes the shot_record and adds value back",
%{shot_group: shot_group, current_user: current_user, pack: %{id: pack_id}} do %{shot_record: shot_record, current_user: current_user, pack: %{id: pack_id}} do
assert {:ok, %ShotGroup{}} = ActivityLog.delete_shot_group(shot_group, current_user) assert {:ok, %ShotRecord{}} = ActivityLog.delete_shot_record(shot_record, current_user)
assert %{count: 25} = pack_id |> Ammo.get_pack!(current_user) assert %{count: 25} = pack_id |> Ammo.get_pack!(current_user)
assert_raise Ecto.NoResultsError, fn -> assert_raise Ecto.NoResultsError, fn ->
ActivityLog.get_shot_group!(shot_group.id, current_user) ActivityLog.get_shot_record!(shot_record.id, current_user)
end end
end end
test "get_used_count/2 returns accurate used count", %{ test "get_used_count/2 returns accurate used count", %{
pack: pack, pack: pack,
ammo_type: ammo_type, type: type,
container: container, container: container,
current_user: current_user current_user: current_user
} do } do
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user) {1, [another_pack]} = pack_fixture(type, container, current_user)
assert 0 = another_pack |> ActivityLog.get_used_count(current_user) assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
assert 5 = pack |> ActivityLog.get_used_count(current_user) assert 5 = pack |> ActivityLog.get_used_count(current_user)
shot_group_fixture(%{count: 15}, current_user, pack) shot_record_fixture(%{count: 15}, current_user, pack)
assert 20 = pack |> ActivityLog.get_used_count(current_user) assert 20 = pack |> ActivityLog.get_used_count(current_user)
shot_group_fixture(%{count: 10}, current_user, pack) shot_record_fixture(%{count: 10}, current_user, pack)
assert 30 = pack |> ActivityLog.get_used_count(current_user) assert 30 = pack |> ActivityLog.get_used_count(current_user)
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user) {1, [another_pack]} = pack_fixture(type, container, current_user)
assert 0 = another_pack |> ActivityLog.get_used_count(current_user) assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
end end
test "get_used_counts/2 returns accurate used counts", %{ test "get_used_counts/2 returns accurate used counts", %{
pack: %{id: pack_id} = pack, pack: %{id: pack_id} = pack,
ammo_type: ammo_type, type: type,
container: container, container: container,
current_user: current_user current_user: current_user
} do } do
{1, [%{id: another_pack_id} = another_pack]} = {1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
pack_fixture(ammo_type, container, current_user)
assert %{pack_id => 5} == assert %{pack_id => 5} ==
[pack, another_pack] |> ActivityLog.get_used_counts(current_user) [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
shot_group_fixture(%{count: 5}, current_user, another_pack) shot_record_fixture(%{count: 5}, current_user, another_pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user) used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 5} = used_counts assert %{^pack_id => 5} = used_counts
assert %{^another_pack_id => 5} = used_counts assert %{^another_pack_id => 5} = used_counts
shot_group_fixture(%{count: 15}, current_user, pack) shot_record_fixture(%{count: 15}, current_user, pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user) used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 20} = used_counts assert %{^pack_id => 20} = used_counts
assert %{^another_pack_id => 5} = used_counts assert %{^another_pack_id => 5} = used_counts
shot_group_fixture(%{count: 10}, current_user, pack) shot_record_fixture(%{count: 10}, current_user, pack)
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user) used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
assert %{^pack_id => 30} = used_counts assert %{^pack_id => 30} = used_counts
assert %{^another_pack_id => 5} = used_counts assert %{^another_pack_id => 5} = used_counts
@ -238,200 +237,196 @@ defmodule Cannery.ActivityLogTest do
test "get_last_used_date/2 returns accurate used count", %{ test "get_last_used_date/2 returns accurate used count", %{
pack: pack, pack: pack,
ammo_type: ammo_type, type: type,
container: container, container: container,
shot_group: %{date: date}, shot_record: %{date: date},
current_user: current_user current_user: current_user
} do } do
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user) {1, [another_pack]} = pack_fixture(type, container, current_user)
assert another_pack |> ActivityLog.get_last_used_date(current_user) |> is_nil() assert another_pack |> ActivityLog.get_last_used_date(current_user) |> is_nil()
assert ^date = pack |> ActivityLog.get_last_used_date(current_user) assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack) %{date: date} = shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
assert ^date = pack |> ActivityLog.get_last_used_date(current_user) assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack) %{date: date} = shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
assert ^date = pack |> ActivityLog.get_last_used_date(current_user) assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
end end
test "get_last_used_dates/2 returns accurate used counts", %{ test "get_last_used_dates/2 returns accurate used counts", %{
pack: %{id: pack_id} = pack, pack: %{id: pack_id} = pack,
ammo_type: ammo_type, type: type,
container: container, container: container,
shot_group: %{date: date}, shot_record: %{date: date},
current_user: current_user current_user: current_user
} do } do
{1, [%{id: another_pack_id} = another_pack]} = {1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
pack_fixture(ammo_type, container, current_user)
# unset date # unset date
assert %{pack_id => date} == assert %{pack_id => date} ==
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user) [pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
shot_group_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack) shot_record_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack)
# setting initial date # setting initial date
last_used_shot_groups = last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user) [pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ^date} = last_used_shot_groups assert %{^pack_id => ^date} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
# setting another date # setting another date
shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack) shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
last_used_shot_groups = last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user) [pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_groups assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
# setting yet another date # setting yet another date
shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack) shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
last_used_shot_groups = last_used_shot_records =
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user) [pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_groups assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_records
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
end end
test "get_used_count_for_ammo_type/2 gets accurate used round count for ammo type", test "get_used_count_for_type/2 gets accurate used round count for type",
%{ammo_type: ammo_type, pack: pack, current_user: current_user} do %{type: type, pack: pack, current_user: current_user} do
another_ammo_type = ammo_type_fixture(current_user) another_type = type_fixture(current_user)
assert 0 = another_ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user) assert 0 = another_type |> ActivityLog.get_used_count_for_type(current_user)
assert 5 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user) assert 5 = type |> ActivityLog.get_used_count_for_type(current_user)
shot_group_fixture(%{count: 5}, current_user, pack) shot_record_fixture(%{count: 5}, current_user, pack)
assert 10 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user) assert 10 = type |> ActivityLog.get_used_count_for_type(current_user)
shot_group_fixture(%{count: 1}, current_user, pack) shot_record_fixture(%{count: 1}, current_user, pack)
assert 11 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user) assert 11 = type |> ActivityLog.get_used_count_for_type(current_user)
end end
test "get_used_count_for_ammo_types/2 gets accurate used round count for ammo types", %{ test "get_used_count_for_types/2 gets accurate used round count for types", %{
ammo_type: %{id: ammo_type_id} = ammo_type, type: %{id: type_id} = type,
container: container, container: container,
current_user: current_user current_user: current_user
} do } do
# testing unused ammo type # testing unused type
%{id: another_ammo_type_id} = another_ammo_type = ammo_type_fixture(current_user) %{id: another_type_id} = another_type = type_fixture(current_user)
{1, [pack]} = pack_fixture(another_ammo_type, container, current_user) {1, [pack]} = pack_fixture(another_type, container, current_user)
assert %{ammo_type_id => 5} == assert %{type_id => 5} ==
[ammo_type, another_ammo_type] [type, another_type]
|> ActivityLog.get_used_count_for_ammo_types(current_user) |> ActivityLog.get_used_count_for_types(current_user)
# use generated pack # use generated pack
shot_group_fixture(%{count: 5}, current_user, pack) shot_record_fixture(%{count: 5}, current_user, pack)
used_counts = used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
assert %{^ammo_type_id => 5} = used_counts assert %{^type_id => 5} = used_counts
assert %{^another_ammo_type_id => 5} = used_counts assert %{^another_type_id => 5} = used_counts
# use generated pack again # use generated pack again
shot_group_fixture(%{count: 1}, current_user, pack) shot_record_fixture(%{count: 1}, current_user, pack)
used_counts = used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
assert %{^ammo_type_id => 5} = used_counts assert %{^type_id => 5} = used_counts
assert %{^another_ammo_type_id => 6} = used_counts assert %{^another_type_id => 6} = used_counts
end end
end end
describe "list_shot_groups/3" do describe "list_shot_records/3" do
setup do setup do
current_user = user_fixture() current_user = user_fixture()
container = container_fixture(current_user) container = container_fixture(current_user)
ammo_type = ammo_type_fixture(current_user) type = type_fixture(current_user)
{1, [pack]} = pack_fixture(ammo_type, container, current_user) {1, [pack]} = pack_fixture(type, container, current_user)
[ [
current_user: current_user, current_user: current_user,
container: container, container: container,
ammo_type: ammo_type, type: type,
pack: pack pack: pack
] ]
end end
test "list_shot_groups/3 returns relevant shot_groups for a type", test "list_shot_records/3 returns relevant shot_records for a type",
%{current_user: current_user, container: container} do %{current_user: current_user, container: container} do
other_user = user_fixture() other_user = user_fixture()
other_container = container_fixture(other_user) other_container = container_fixture(other_user)
for class <- ["rifle", "shotgun", "pistol"] do for class <- ["rifle", "shotgun", "pistol"] do
other_ammo_type = ammo_type_fixture(%{class: class}, other_user) other_type = type_fixture(%{class: class}, other_user)
{1, [other_pack]} = pack_fixture(other_ammo_type, other_container, other_user) {1, [other_pack]} = pack_fixture(other_type, other_container, other_user)
shot_group_fixture(other_user, other_pack) shot_record_fixture(other_user, other_pack)
end end
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user) rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user) {1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
rifle_shot_group = shot_group_fixture(current_user, rifle_pack) rifle_shot_record = shot_record_fixture(current_user, rifle_pack)
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user) shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user) {1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
shotgun_shot_group = shot_group_fixture(current_user, shotgun_pack) shotgun_shot_record = shot_record_fixture(current_user, shotgun_pack)
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user) pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user) {1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
pistol_shot_group = shot_group_fixture(current_user, pistol_pack) pistol_shot_record = shot_record_fixture(current_user, pistol_pack)
assert [^rifle_shot_group] = ActivityLog.list_shot_groups(:rifle, current_user) assert [^rifle_shot_record] = ActivityLog.list_shot_records(:rifle, current_user)
assert [^shotgun_shot_group] = ActivityLog.list_shot_groups(:shotgun, current_user) assert [^shotgun_shot_record] = ActivityLog.list_shot_records(:shotgun, current_user)
assert [^pistol_shot_group] = ActivityLog.list_shot_groups(:pistol, current_user) assert [^pistol_shot_record] = ActivityLog.list_shot_records(:pistol, current_user)
shot_groups = ActivityLog.list_shot_groups(:all, current_user) shot_records = ActivityLog.list_shot_records(:all, current_user)
assert Enum.count(shot_groups) == 3 assert Enum.count(shot_records) == 3
assert rifle_shot_group in shot_groups assert rifle_shot_record in shot_records
assert shotgun_shot_group in shot_groups assert shotgun_shot_record in shot_records
assert pistol_shot_group in shot_groups assert pistol_shot_record in shot_records
shot_groups = ActivityLog.list_shot_groups(nil, current_user) shot_records = ActivityLog.list_shot_records(nil, current_user)
assert Enum.count(shot_groups) == 3 assert Enum.count(shot_records) == 3
assert rifle_shot_group in shot_groups assert rifle_shot_record in shot_records
assert shotgun_shot_group in shot_groups assert shotgun_shot_record in shot_records
assert pistol_shot_group in shot_groups assert pistol_shot_record in shot_records
end end
test "list_shot_groups/3 returns relevant shot_groups for a search", %{ test "list_shot_records/3 returns relevant shot_records for a search", %{
ammo_type: ammo_type, type: type,
pack: pack, pack: pack,
container: container, container: container,
current_user: current_user current_user: current_user
} do } do
shot_group_a = shot_group_fixture(%{notes: "amazing"}, current_user, pack) shot_record_a = shot_record_fixture(%{notes: "amazing"}, current_user, pack)
{1, [another_pack]} = {1, [another_pack]} = pack_fixture(%{notes: "stupendous"}, type, container, current_user)
pack_fixture(%{notes: "stupendous"}, ammo_type, container, current_user)
shot_group_b = shot_group_fixture(current_user, another_pack) shot_record_b = shot_record_fixture(current_user, another_pack)
another_ammo_type = ammo_type_fixture(%{name: "fabulous ammo"}, current_user) another_type = type_fixture(%{name: "fabulous ammo"}, current_user)
{1, [yet_another_pack]} = pack_fixture(another_ammo_type, container, current_user) {1, [yet_another_pack]} = pack_fixture(another_type, container, current_user)
shot_group_c = shot_group_fixture(current_user, yet_another_pack) shot_record_c = shot_record_fixture(current_user, yet_another_pack)
another_user = user_fixture() another_user = user_fixture()
another_container = container_fixture(another_user) another_container = container_fixture(another_user)
another_ammo_type = ammo_type_fixture(another_user) another_type = type_fixture(another_user)
{1, [another_pack]} = pack_fixture(another_ammo_type, another_container, another_user) {1, [another_pack]} = pack_fixture(another_type, another_container, another_user)
_shouldnt_return = shot_group_fixture(another_user, another_pack) _shouldnt_return = shot_record_fixture(another_user, another_pack)
# notes # notes
assert ActivityLog.list_shot_groups("amazing", :all, current_user) == [shot_group_a] assert ActivityLog.list_shot_records("amazing", :all, current_user) == [shot_record_a]
# pack attributes # pack attributes
assert ActivityLog.list_shot_groups("stupendous", :all, current_user) == [shot_group_b] assert ActivityLog.list_shot_records("stupendous", :all, current_user) == [shot_record_b]
# ammo type attributes # type attributes
assert ActivityLog.list_shot_groups("fabulous", :all, current_user) == [shot_group_c] assert ActivityLog.list_shot_records("fabulous", :all, current_user) == [shot_record_c]
end end
end end
end end

File diff suppressed because it is too large Load Diff

View File

@ -11,19 +11,19 @@ defmodule CanneryWeb.ExportControllerTest do
setup [:register_and_log_in_user] setup [:register_and_log_in_user]
defp add_data(%{current_user: current_user}) do defp add_data(%{current_user: current_user}) do
ammo_type = ammo_type_fixture(current_user) type = type_fixture(current_user)
container = container_fixture(current_user) container = container_fixture(current_user)
tag = tag_fixture(current_user) tag = tag_fixture(current_user)
Containers.add_tag!(container, tag, current_user) Containers.add_tag!(container, tag, current_user)
{1, [pack]} = pack_fixture(ammo_type, container, current_user) {1, [pack]} = pack_fixture(type, container, current_user)
shot_group = shot_group_fixture(current_user, pack) shot_record = shot_record_fixture(current_user, pack)
pack = pack |> Repo.reload!() pack = pack |> Repo.reload!()
%{ %{
ammo_type: ammo_type, type: type,
pack: pack, pack: pack,
container: container, container: container,
shot_group: shot_group, shot_record: shot_record,
tag: tag tag: tag
} }
end end
@ -35,15 +35,15 @@ defmodule CanneryWeb.ExportControllerTest do
conn: conn, conn: conn,
current_user: current_user, current_user: current_user,
container: container, container: container,
ammo_type: ammo_type, type: type,
pack: pack, pack: pack,
shot_group: shot_group, shot_record: shot_record,
tag: tag tag: tag
} do } do
conn = get(conn, Routes.export_path(conn, :export, :json)) conn = get(conn, Routes.export_path(conn, :export, :json))
ideal_pack = %{ ideal_pack = %{
"ammo_type_id" => pack.ammo_type_id, "type_id" => pack.type_id,
"container_id" => pack.container_id, "container_id" => pack.container_id,
"count" => pack.count, "count" => pack.count,
"id" => pack.id, "id" => pack.id,
@ -56,34 +56,34 @@ defmodule CanneryWeb.ExportControllerTest do
"percentage_remaining" => pack |> Ammo.get_percentage_remaining(current_user) "percentage_remaining" => pack |> Ammo.get_percentage_remaining(current_user)
} }
ideal_ammo_type = %{ ideal_type = %{
"blank" => ammo_type.blank, "blank" => type.blank,
"bullet_core" => ammo_type.bullet_core, "bullet_core" => type.bullet_core,
"bullet_type" => ammo_type.bullet_type, "bullet_type" => type.bullet_type,
"caliber" => ammo_type.caliber, "caliber" => type.caliber,
"cartridge" => ammo_type.cartridge, "cartridge" => type.cartridge,
"case_material" => ammo_type.case_material, "case_material" => type.case_material,
"corrosive" => ammo_type.corrosive, "corrosive" => type.corrosive,
"desc" => ammo_type.desc, "desc" => type.desc,
"firing_type" => ammo_type.firing_type, "firing_type" => type.firing_type,
"grains" => ammo_type.grains, "grains" => type.grains,
"id" => ammo_type.id, "id" => type.id,
"incendiary" => ammo_type.incendiary, "incendiary" => type.incendiary,
"jacket_type" => ammo_type.jacket_type, "jacket_type" => type.jacket_type,
"manufacturer" => ammo_type.manufacturer, "manufacturer" => type.manufacturer,
"muzzle_velocity" => ammo_type.muzzle_velocity, "muzzle_velocity" => type.muzzle_velocity,
"name" => ammo_type.name, "name" => type.name,
"powder_grains_per_charge" => ammo_type.powder_grains_per_charge, "powder_grains_per_charge" => type.powder_grains_per_charge,
"powder_type" => ammo_type.powder_type, "powder_type" => type.powder_type,
"pressure" => ammo_type.pressure, "pressure" => type.pressure,
"primer_type" => ammo_type.primer_type, "primer_type" => type.primer_type,
"tracer" => ammo_type.tracer, "tracer" => type.tracer,
"upc" => ammo_type.upc, "upc" => type.upc,
"average_cost" => ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user), "average_cost" => type |> Ammo.get_average_cost_for_type(current_user),
"round_count" => ammo_type |> Ammo.get_round_count_for_ammo_type(current_user), "round_count" => type |> Ammo.get_round_count_for_type(current_user),
"used_count" => ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user), "used_count" => type |> ActivityLog.get_used_count_for_type(current_user),
"pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user), "pack_count" => type |> Ammo.get_packs_count_for_type(current_user),
"total_pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user, true) "total_pack_count" => type |> Ammo.get_packs_count_for_type(current_user, true)
} }
ideal_container = %{ ideal_container = %{
@ -104,12 +104,12 @@ defmodule CanneryWeb.ExportControllerTest do
"round_count" => container |> Ammo.get_round_count_for_container!(current_user) "round_count" => container |> Ammo.get_round_count_for_container!(current_user)
} }
ideal_shot_group = %{ ideal_shot_record = %{
"pack_id" => shot_group.pack_id, "pack_id" => shot_record.pack_id,
"count" => shot_group.count, "count" => shot_record.count,
"date" => to_string(shot_group.date), "date" => to_string(shot_record.date),
"id" => shot_group.id, "id" => shot_record.id,
"notes" => shot_group.notes "notes" => shot_record.notes
} }
ideal_user = %{ ideal_user = %{
@ -125,9 +125,9 @@ defmodule CanneryWeb.ExportControllerTest do
json_resp = conn |> json_response(200) json_resp = conn |> json_response(200)
assert %{"packs" => [^ideal_pack]} = json_resp assert %{"packs" => [^ideal_pack]} = json_resp
assert %{"ammo_types" => [^ideal_ammo_type]} = json_resp assert %{"types" => [^ideal_type]} = json_resp
assert %{"containers" => [^ideal_container]} = json_resp assert %{"containers" => [^ideal_container]} = json_resp
assert %{"shot_groups" => [^ideal_shot_group]} = json_resp assert %{"shot_records" => [^ideal_shot_record]} = json_resp
assert %{"user" => ^ideal_user} = json_resp assert %{"user" => ^ideal_user} = json_resp
end end
end end

View File

@ -1,400 +0,0 @@
defmodule CanneryWeb.AmmoTypeLiveTest do
@moduledoc """
Tests the ammo type liveview
"""
use CanneryWeb.ConnCase
import Phoenix.LiveViewTest
alias Cannery.{Ammo, Repo}
@moduletag :ammo_type_live_test
@create_attrs %{
bullet_type: "some bullet_type",
case_material: "some case_material",
desc: "some desc",
manufacturer: "some manufacturer",
name: "some name",
grains: 120
}
@update_attrs %{
bullet_type: "some updated bullet_type",
case_material: "some updated case_material",
desc: "some updated desc",
manufacturer: "some updated manufacturer",
name: "some updated name",
grains: 456
}
@invalid_attrs %{
bullet_type: nil,
case_material: nil,
desc: nil,
manufacturer: nil,
name: nil,
grains: nil
}
@pack_attrs %{
notes: "some pack",
count: 20
}
@shot_group_attrs %{
notes: "some shot group",
count: 20
}
defp create_ammo_type(%{current_user: current_user}) do
[ammo_type: ammo_type_fixture(@create_attrs, current_user)]
end
defp create_pack(%{ammo_type: ammo_type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
[pack: pack, container: container]
end
defp create_empty_pack(%{ammo_type: ammo_type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
shot_group = shot_group_fixture(@shot_group_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[pack: pack, container: container, shot_group: shot_group]
end
describe "Index" do
setup [:register_and_log_in_user, :create_ammo_type]
test "lists all ammo_types", %{conn: conn, ammo_type: ammo_type} do
{:ok, _index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "Catalog"
assert html =~ ammo_type.bullet_type
end
test "can sort by class", %{conn: conn, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user)
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle})
assert html =~ rifle_type.name
refute html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun})
refute html =~ rifle_type.name
assert html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol})
refute html =~ rifle_type.name
refute html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all})
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
end
test "can search for ammo_type", %{conn: conn, ammo_type: ammo_type} do
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ ammo_type.bullet_type
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ammo_type.bullet_type}) =~
ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, ammo_type.bullet_type))
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ ammo_type.bullet_type
assert_patch(index_live, Routes.ammo_type_index_path(conn, :index))
end
test "saves new ammo_type", %{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element("a", "New Ammo type") |> render_click() =~ "New Ammo type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :new))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @create_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some bullet_type"
end
test "updates ammo_type in listing",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Edit #{ammo_type.name}"]/) |> render_click() =~
"Edit #{ammo_type.name}"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :edit, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @update_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
test "clones ammo_type in listing",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{ammo_type.name}"]/) |> render_click()
assert html =~ "New Ammo type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :clone, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @create_attrs)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some bullet_type"
end
test "clones ammo_type in listing with updates",
%{conn: conn, current_user: current_user, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{ammo_type.name}"]/) |> render_click()
assert html =~ "New Ammo type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.ammo_type_index_path(conn, :clone, ammo_type))
assert index_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#ammo_type-form")
|> render_submit(
ammo_type: Map.merge(@create_attrs, %{bullet_type: "some updated bullet_type"})
)
|> follow_redirect(conn, Routes.ammo_type_index_path(conn, :index))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} created successfully"
assert html =~ "some updated bullet_type"
end
test "deletes ammo_type in listing", %{conn: conn, ammo_type: ammo_type} do
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Delete #{ammo_type.name}"]/) |> render_click()
refute has_element?(index_live, "#ammo_type-#{ammo_type.id}")
end
end
describe "Index with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "shows used packs on toggle",
%{conn: conn, pack: pack, current_user: current_user} do
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
assert html =~ "Show used"
refute html =~ "Used rounds"
refute html =~ "Total ever rounds"
refute html =~ "Used packs"
refute html =~ "Total ever packs"
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "Used rounds"
assert html =~ "Total ever rounds"
assert html =~ "Used packs"
assert html =~ "Total ever packs"
assert html =~ "\n20\n"
assert html =~ "\n0\n"
assert html =~ "\n1\n"
shot_group_fixture(%{count: 5}, current_user, pack)
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n15\n"
assert html =~ "\n5\n"
end
end
describe "Show ammo type" do
setup [:register_and_log_in_user, :create_ammo_type]
test "displays ammo_type", %{
conn: conn,
ammo_type: %{name: name, bullet_type: bullet_type} = ammo_type
} do
{:ok, _show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ name
assert html =~ bullet_type
end
test "updates ammo_type within modal",
%{conn: conn, current_user: current_user, ammo_type: %{name: name} = ammo_type} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert show_live |> element(~s/a[aria-label="Edit #{ammo_type.name}"]/) |> render_click() =~
"Edit #{name}"
assert_patch(show_live, Routes.ammo_type_show_path(conn, :edit, ammo_type))
assert show_live
|> form("#ammo_type-form")
|> render_change(ammo_type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
show_live
|> form("#ammo_type-form")
|> render_submit(ammo_type: @update_attrs)
|> follow_redirect(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
ammo_type = ammo_type.id |> Ammo.get_ammo_type!(current_user)
assert html =~ "#{ammo_type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
end
describe "Show ammo type with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "displays pack", %{
conn: conn,
ammo_type: %{name: ammo_type_name} = ammo_type,
container: %{name: container_name}
} do
{:ok, _show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ ammo_type_name
assert html =~ "\n20\n"
assert html =~ container_name
end
test "displays pack in table",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ container_name
end
end
describe "Show ammo type with empty pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_empty_pack]
test "displays empty packs on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
test "displays empty packs in table on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
end
end

View File

@ -22,7 +22,7 @@ defmodule CanneryWeb.ContainerLiveTest do
type: "some updated type" type: "some updated type"
} }
@invalid_attrs %{desc: nil, location: nil, name: nil, type: nil} @invalid_attrs %{desc: nil, location: nil, name: nil, type: nil}
@ammo_type_attrs %{ @type_attrs %{
bullet_type: "some bullet_type", bullet_type: "some bullet_type",
case_material: "some case_material", case_material: "some case_material",
desc: "some desc", desc: "some desc",
@ -41,10 +41,10 @@ defmodule CanneryWeb.ContainerLiveTest do
end end
defp create_pack(%{container: container, current_user: current_user}) do defp create_pack(%{container: container, current_user: current_user}) do
ammo_type = ammo_type_fixture(@ammo_type_attrs, current_user) type = type_fixture(@type_attrs, current_user)
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user) {1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
[ammo_type: ammo_type, pack: pack] [type: type, pack: pack]
end end
describe "Index" do describe "Index" do
@ -245,56 +245,56 @@ defmodule CanneryWeb.ContainerLiveTest do
test "can sort by type", test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do %{conn: conn, container: container, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user) rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user) {1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user) shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user) {1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user) pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user) {1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
{:ok, index_live, html} = live(conn, Routes.container_show_path(conn, :show, container)) {:ok, index_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ "All" assert html =~ "All"
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle}) |> render_change(type: %{class: :rifle})
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
refute html =~ shotgun_pack.ammo_type.name refute html =~ shotgun_pack.type.name
refute html =~ pistol_pack.ammo_type.name refute html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun}) |> render_change(type: %{class: :shotgun})
refute html =~ rifle_pack.ammo_type.name refute html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
refute html =~ pistol_pack.ammo_type.name refute html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol}) |> render_change(type: %{class: :pistol})
refute html =~ rifle_pack.ammo_type.name refute html =~ rifle_pack.type.name
refute html =~ shotgun_pack.ammo_type.name refute html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all}) |> render_change(type: %{class: :all})
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
end end
end end
@ -302,15 +302,15 @@ defmodule CanneryWeb.ContainerLiveTest do
setup [:register_and_log_in_user, :create_container, :create_pack] setup [:register_and_log_in_user, :create_container, :create_pack]
test "displays pack", test "displays pack",
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do %{conn: conn, type: %{name: type_name}, container: container} do
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container)) {:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ ammo_type_name assert html =~ type_name
assert html =~ "\n20\n" assert html =~ "\n20\n"
end end
test "displays pack in table", test "displays pack in table",
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do %{conn: conn, type: %{name: type_name}, container: container} do
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container)) {:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
html = html =
@ -318,7 +318,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/) |> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click() |> render_click()
assert html =~ ammo_type_name assert html =~ type_name
assert html =~ "\n20\n" assert html =~ "\n20\n"
end end
end end

View File

@ -12,44 +12,44 @@ defmodule CanneryWeb.PackLiveTest do
@update_attrs %{count: 43, notes: "some updated notes", price_paid: 456.7} @update_attrs %{count: 43, notes: "some updated notes", price_paid: 456.7}
@invalid_attrs %{count: nil, notes: nil, price_paid: nil} @invalid_attrs %{count: nil, notes: nil, price_paid: nil}
@pack_create_limit 10_000 @pack_create_limit 10_000
@shot_group_create_attrs %{ammo_left: 5, notes: "some notes"} @shot_record_create_attrs %{ammo_left: 5, notes: "some notes"}
@shot_group_update_attrs %{ @shot_record_update_attrs %{
count: 5, count: 5,
date: ~N[2022-02-13 03:17:00], date: ~N[2022-02-13 03:17:00],
notes: "some updated notes" notes: "some updated notes"
} }
@shot_group_invalid_attrs %{ammo_left: nil, count: nil, notes: nil} @shot_record_invalid_attrs %{ammo_left: nil, count: nil, notes: nil}
@empty_attrs %{ @empty_attrs %{
price_paid: 50, price_paid: 50,
count: 20 count: 20
} }
@shot_group_attrs %{ @shot_record_attrs %{
price_paid: 50, price_paid: 50,
count: 20 count: 20
} }
defp create_pack(%{current_user: current_user}) do defp create_pack(%{current_user: current_user}) do
ammo_type = ammo_type_fixture(current_user) type = type_fixture(current_user)
container = container_fixture(current_user) container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@create_attrs, ammo_type, container, current_user) {1, [pack]} = pack_fixture(@create_attrs, type, container, current_user)
[ammo_type: ammo_type, pack: pack, container: container] [type: type, pack: pack, container: container]
end end
defp create_shot_group(%{current_user: current_user, pack: pack}) do defp create_shot_record(%{current_user: current_user, pack: pack}) do
shot_group = shot_group_fixture(@shot_group_update_attrs, current_user, pack) shot_record = shot_record_fixture(@shot_record_update_attrs, current_user, pack)
pack = pack |> Repo.reload!() pack = pack |> Repo.reload!()
[pack: pack, shot_group: shot_group] [pack: pack, shot_record: shot_record]
end end
defp create_empty_pack(%{ defp create_empty_pack(%{
current_user: current_user, current_user: current_user,
ammo_type: ammo_type, type: type,
container: container container: container
}) do }) do
{1, [pack]} = pack_fixture(@empty_attrs, ammo_type, container, current_user) {1, [pack]} = pack_fixture(@empty_attrs, type, container, current_user)
shot_group = shot_group_fixture(@shot_group_attrs, current_user, pack) shot_record = shot_record_fixture(@shot_record_attrs, current_user, pack)
pack = pack |> Repo.reload!() pack = pack |> Repo.reload!()
[empty_pack: pack, shot_group: shot_group] [empty_pack: pack, shot_record: shot_record]
end end
describe "Index of pack" do describe "Index of pack" do
@ -57,92 +57,92 @@ defmodule CanneryWeb.PackLiveTest do
test "lists all packs", %{conn: conn, pack: pack} do test "lists all packs", %{conn: conn, pack: pack} do
{:ok, _index_live, html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, _index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
pack = pack |> Repo.preload(:ammo_type) pack = pack |> Repo.preload(:type)
assert html =~ "Ammo" assert html =~ "Ammo"
assert html =~ pack.ammo_type.name assert html =~ pack.type.name
end end
test "can sort by type", test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do %{conn: conn, container: container, current_user: current_user} do
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user) rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user) {1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user) shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user) {1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user) pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user) {1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
assert html =~ "All" assert html =~ "All"
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle}) |> render_change(type: %{class: :rifle})
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
refute html =~ shotgun_pack.ammo_type.name refute html =~ shotgun_pack.type.name
refute html =~ pistol_pack.ammo_type.name refute html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun}) |> render_change(type: %{class: :shotgun})
refute html =~ rifle_pack.ammo_type.name refute html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
refute html =~ pistol_pack.ammo_type.name refute html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol}) |> render_change(type: %{class: :pistol})
refute html =~ rifle_pack.ammo_type.name refute html =~ rifle_pack.type.name
refute html =~ shotgun_pack.ammo_type.name refute html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all}) |> render_change(type: %{class: :all})
assert html =~ rifle_pack.ammo_type.name assert html =~ rifle_pack.type.name
assert html =~ shotgun_pack.ammo_type.name assert html =~ shotgun_pack.type.name
assert html =~ pistol_pack.ammo_type.name assert html =~ pistol_pack.type.name
end end
test "can search for packs", %{conn: conn, pack: pack} do test "can search for packs", %{conn: conn, pack: pack} do
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
pack = pack |> Repo.preload(:ammo_type) pack = pack |> Repo.preload(:type)
assert html =~ pack.ammo_type.name assert html =~ pack.type.name
assert index_live assert index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: pack.ammo_type.name}) =~ |> render_change(search: %{search_term: pack.type.name}) =~
pack.ammo_type.name pack.type.name
assert_patch( assert_patch(
index_live, index_live,
Routes.pack_index_path(conn, :search, pack.ammo_type.name) Routes.pack_index_path(conn, :search, pack.type.name)
) )
refute index_live refute index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ |> render_change(search: %{search_term: "something_else"}) =~
pack.ammo_type.name pack.type.name
assert_patch(index_live, Routes.pack_index_path(conn, :search, "something_else")) assert_patch(index_live, Routes.pack_index_path(conn, :search, "something_else"))
assert index_live assert index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ pack.ammo_type.name |> render_change(search: %{search_term: ""}) =~ pack.type.name
assert_patch(index_live, Routes.pack_index_path(conn, :index)) assert_patch(index_live, Routes.pack_index_path(conn, :index))
end end
@ -311,20 +311,20 @@ defmodule CanneryWeb.PackLiveTest do
refute has_element?(index_live, "#pack-#{pack.id}") refute has_element?(index_live, "#pack-#{pack.id}")
end end
test "saves new shot_group", %{conn: conn, pack: pack} do test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots" assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_group, pack)) assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_record, pack))
assert index_live assert index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank" |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} = {:ok, _view, html} =
index_live index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_submit(shot_group: @shot_group_create_attrs) |> render_submit(shot_record: @shot_record_create_attrs)
|> follow_redirect(conn, Routes.pack_index_path(conn, :index)) |> follow_redirect(conn, Routes.pack_index_path(conn, :index))
assert html =~ "Shots recorded successfully" assert html =~ "Shots recorded successfully"
@ -366,9 +366,9 @@ defmodule CanneryWeb.PackLiveTest do
test "displays pack", %{conn: conn, pack: pack} do test "displays pack", %{conn: conn, pack: pack} do
{:ok, _show_live, html} = live(conn, Routes.pack_show_path(conn, :show, pack)) {:ok, _show_live, html} = live(conn, Routes.pack_show_path(conn, :show, pack))
pack = pack |> Repo.preload(:ammo_type) pack = pack |> Repo.preload(:type)
assert html =~ "Show Ammo" assert html =~ "Show Ammo"
assert html =~ pack.ammo_type.name assert html =~ pack.type.name
end end
test "updates pack within modal", %{conn: conn, pack: pack} do test "updates pack within modal", %{conn: conn, pack: pack} do
@ -394,66 +394,66 @@ defmodule CanneryWeb.PackLiveTest do
assert html =~ "some updated notes" assert html =~ "some updated notes"
end end
test "saves new shot_group", %{conn: conn, pack: pack} do test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :show, pack)) {:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :show, pack))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots" assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_group, pack)) assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_record, pack))
assert index_live assert index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank" |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} = {:ok, _view, html} =
index_live index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_submit(shot_group: @shot_group_create_attrs) |> render_submit(shot_record: @shot_record_create_attrs)
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack)) |> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
assert html =~ "Shots recorded successfully" assert html =~ "Shots recorded successfully"
end end
end end
describe "Show pack with shot group" do describe "Show pack with shot record" do
setup [:register_and_log_in_user, :create_pack, :create_shot_group] setup [:register_and_log_in_user, :create_pack, :create_shot_record]
test "updates shot_group in listing", test "updates shot_record in listing",
%{conn: conn, pack: pack, shot_group: shot_group} do %{conn: conn, pack: pack, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack)) {:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack))
assert index_live assert index_live
|> element(~s/a[aria-label="Edit shot group of #{shot_group.count} shots"]/) |> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|> render_click() =~ "Edit Shot Records" |> render_click() =~ "Edit Shot Record"
assert_patch( assert_patch(
index_live, index_live,
Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group) Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record)
) )
assert index_live assert index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can&#39;t be blank" |> render_change(shot_record: @shot_record_invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} = {:ok, _view, html} =
index_live index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_submit(shot_group: @shot_group_update_attrs) |> render_submit(shot_record: @shot_record_update_attrs)
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack)) |> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
assert html =~ "Shot records updated successfully" assert html =~ "Shot records updated successfully"
assert html =~ "some updated notes" assert html =~ "some updated notes"
end end
test "deletes shot_group in listing", test "deletes shot_record in listing",
%{conn: conn, pack: pack, shot_group: shot_group} do %{conn: conn, pack: pack, shot_record: shot_record} do
{:ok, index_live, _html} = {:ok, index_live, _html} =
live(conn, Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group)) live(conn, Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record))
assert index_live assert index_live
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/) |> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|> render_click() |> render_click()
refute has_element?(index_live, "#shot_group-#{shot_group.id}") refute has_element?(index_live, "#shot_record-#{shot_record.id}")
end end
end end
end end

View File

@ -12,156 +12,156 @@ defmodule CanneryWeb.RangeLiveTest do
@update_attrs %{count: 16, notes: "some updated notes"} @update_attrs %{count: 16, notes: "some updated notes"}
@invalid_attrs %{count: nil, notes: nil} @invalid_attrs %{count: nil, notes: nil}
defp create_shot_group(%{current_user: current_user}) do defp create_shot_record(%{current_user: current_user}) do
container = container_fixture(%{staged: true}, current_user) container = container_fixture(%{staged: true}, current_user)
ammo_type = ammo_type_fixture(current_user) type = type_fixture(current_user)
{1, [pack]} = pack_fixture(%{staged: true}, ammo_type, container, current_user) {1, [pack]} = pack_fixture(%{staged: true}, type, container, current_user)
shot_group = shot_record =
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"} %{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|> shot_group_fixture(current_user, pack) |> shot_record_fixture(current_user, pack)
[ [
container: container, container: container,
ammo_type: ammo_type, type: type,
pack: pack, pack: pack,
shot_group: shot_group shot_record: shot_record
] ]
end end
describe "Index" do describe "Index" do
setup [:register_and_log_in_user, :create_shot_group] setup [:register_and_log_in_user, :create_shot_record]
test "lists all shot_groups", %{conn: conn, shot_group: shot_group} do test "lists all shot_records", %{conn: conn, shot_record: shot_record} do
{:ok, _index_live, html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, _index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ "Range day" assert html =~ "Range day"
assert html =~ shot_group.notes assert html =~ shot_record.notes
end end
test "can sort by type", test "can sort by type",
%{conn: conn, container: container, current_user: current_user} do %{conn: conn, container: container, current_user: current_user} do
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user) rifle_type = type_fixture(%{class: :rifle}, current_user)
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user) {1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
rifle_shot_group = shot_group_fixture(%{notes: "group_one"}, current_user, rifle_pack) rifle_shot_record = shot_record_fixture(%{notes: "group_one"}, current_user, rifle_pack)
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user) shotgun_type = type_fixture(%{class: :shotgun}, current_user)
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user) {1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
shotgun_shot_group = shot_group_fixture(%{notes: "group_two"}, current_user, shotgun_pack) shotgun_shot_record = shot_record_fixture(%{notes: "group_two"}, current_user, shotgun_pack)
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user) pistol_type = type_fixture(%{class: :pistol}, current_user)
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user) {1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
pistol_shot_group = shot_group_fixture(%{notes: "group_three"}, current_user, pistol_pack) pistol_shot_record = shot_record_fixture(%{notes: "group_three"}, current_user, pistol_pack)
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ "All" assert html =~ "All"
assert html =~ rifle_shot_group.notes assert html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_group.notes assert html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_group.notes assert html =~ pistol_shot_record.notes
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :rifle}) |> render_change(type: %{class: :rifle})
assert html =~ rifle_shot_group.notes assert html =~ rifle_shot_record.notes
refute html =~ shotgun_shot_group.notes refute html =~ shotgun_shot_record.notes
refute html =~ pistol_shot_group.notes refute html =~ pistol_shot_record.notes
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :shotgun}) |> render_change(type: %{class: :shotgun})
refute html =~ rifle_shot_group.notes refute html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_group.notes assert html =~ shotgun_shot_record.notes
refute html =~ pistol_shot_group.notes refute html =~ pistol_shot_record.notes
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :pistol}) |> render_change(type: %{class: :pistol})
refute html =~ rifle_shot_group.notes refute html =~ rifle_shot_record.notes
refute html =~ shotgun_shot_group.notes refute html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_group.notes assert html =~ pistol_shot_record.notes
html = html =
index_live index_live
|> form(~s/form[phx-change="change_class"]/) |> form(~s/form[phx-change="change_class"]/)
|> render_change(ammo_type: %{class: :all}) |> render_change(type: %{class: :all})
assert html =~ rifle_shot_group.notes assert html =~ rifle_shot_record.notes
assert html =~ shotgun_shot_group.notes assert html =~ shotgun_shot_record.notes
assert html =~ pistol_shot_group.notes assert html =~ pistol_shot_record.notes
end end
test "can search for shot_group", %{conn: conn, shot_group: shot_group} do test "can search for shot_record", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
assert html =~ shot_group.notes assert html =~ shot_record.notes
assert index_live assert index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: shot_group.notes}) =~ shot_group.notes |> render_change(search: %{search_term: shot_record.notes}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_group.notes)) assert_patch(index_live, Routes.range_index_path(conn, :search, shot_record.notes))
refute index_live refute index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ shot_group.notes |> render_change(search: %{search_term: "something_else"}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :search, "something_else")) assert_patch(index_live, Routes.range_index_path(conn, :search, "something_else"))
assert index_live assert index_live
|> form(~s/form[phx-change="search"]/) |> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ shot_group.notes |> render_change(search: %{search_term: ""}) =~ shot_record.notes
assert_patch(index_live, Routes.range_index_path(conn, :index)) assert_patch(index_live, Routes.range_index_path(conn, :index))
end end
test "saves new shot_group", %{conn: conn, pack: pack} do test "saves new shot_record", %{conn: conn, pack: pack} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots" assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
assert_patch(index_live, Routes.range_index_path(conn, :add_shot_group, pack)) assert_patch(index_live, Routes.range_index_path(conn, :add_shot_record, pack))
assert index_live assert index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_change(shot_group: @invalid_attrs) =~ "can&#39;t be blank" |> render_change(shot_record: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} = {:ok, _view, html} =
index_live index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_submit(shot_group: @create_attrs) |> render_submit(shot_record: @create_attrs)
|> follow_redirect(conn, Routes.range_index_path(conn, :index)) |> follow_redirect(conn, Routes.range_index_path(conn, :index))
assert html =~ "Shots recorded successfully" assert html =~ "Shots recorded successfully"
assert html =~ "some notes" assert html =~ "some notes"
end end
test "updates shot_group in listing", %{conn: conn, shot_group: shot_group} do test "updates shot_record in listing", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live assert index_live
|> element(~s/a[aria-label="Edit shot record of #{shot_group.count} shots"]/) |> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|> render_click() =~ "Edit Shot Records" |> render_click() =~ "Edit Shot Record"
assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_group)) assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_record))
assert index_live assert index_live
|> form("#shot-group-form") |> form("#shot-record-form")
|> render_change(shot_group: @invalid_attrs) =~ "can&#39;t be blank" |> render_change(shot_record: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} = {:ok, _view, html} =
index_live index_live
|> form("#shot-group-form", shot_group: @update_attrs) |> form("#shot-record-form", shot_record: @update_attrs)
|> render_submit() |> render_submit()
|> follow_redirect(conn, Routes.range_index_path(conn, :index)) |> follow_redirect(conn, Routes.range_index_path(conn, :index))
@ -169,14 +169,14 @@ defmodule CanneryWeb.RangeLiveTest do
assert html =~ "some updated notes" assert html =~ "some updated notes"
end end
test "deletes shot_group in listing", %{conn: conn, shot_group: shot_group} do test "deletes shot_record in listing", %{conn: conn, shot_record: shot_record} do
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
assert index_live assert index_live
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/) |> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|> render_click() |> render_click()
refute has_element?(index_live, "#shot_group-#{shot_group.id}") refute has_element?(index_live, "#shot_record-#{shot_record.id}")
end end
end end
end end

View File

@ -0,0 +1,400 @@
defmodule CanneryWeb.TypeLiveTest do
@moduledoc """
Tests the type liveview
"""
use CanneryWeb.ConnCase
import Phoenix.LiveViewTest
alias Cannery.{Ammo, Repo}
@moduletag :type_live_test
@create_attrs %{
bullet_type: "some bullet_type",
case_material: "some case_material",
desc: "some desc",
manufacturer: "some manufacturer",
name: "some name",
grains: 120
}
@update_attrs %{
bullet_type: "some updated bullet_type",
case_material: "some updated case_material",
desc: "some updated desc",
manufacturer: "some updated manufacturer",
name: "some updated name",
grains: 456
}
@invalid_attrs %{
bullet_type: nil,
case_material: nil,
desc: nil,
manufacturer: nil,
name: nil,
grains: nil
}
@pack_attrs %{
notes: "some pack",
count: 20
}
@shot_record_attrs %{
notes: "some shot record",
count: 20
}
defp create_type(%{current_user: current_user}) do
[type: type_fixture(@create_attrs, current_user)]
end
defp create_pack(%{type: type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
[pack: pack, container: container]
end
defp create_empty_pack(%{type: type, current_user: current_user}) do
container = container_fixture(current_user)
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
shot_record = shot_record_fixture(@shot_record_attrs, current_user, pack)
pack = pack |> Repo.reload!()
[pack: pack, container: container, shot_record: shot_record]
end
describe "Index" do
setup [:register_and_log_in_user, :create_type]
test "lists all types", %{conn: conn, type: type} do
{:ok, _index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "Catalog"
assert html =~ type.bullet_type
end
test "can sort by class", %{conn: conn, current_user: current_user} do
rifle_type = type_fixture(%{class: :rifle}, current_user)
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
pistol_type = type_fixture(%{class: :pistol}, current_user)
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "All"
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :rifle})
assert html =~ rifle_type.name
refute html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :shotgun})
refute html =~ rifle_type.name
assert html =~ shotgun_type.name
refute html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :pistol})
refute html =~ rifle_type.name
refute html =~ shotgun_type.name
assert html =~ pistol_type.name
html =
index_live
|> form(~s/form[phx-change="change_class"]/)
|> render_change(type: %{class: :all})
assert html =~ rifle_type.name
assert html =~ shotgun_type.name
assert html =~ pistol_type.name
end
test "can search for type", %{conn: conn, type: type} do
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ type.bullet_type
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: type.bullet_type}) =~
type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :search, type.bullet_type))
refute index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: "something_else"}) =~ type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :search, "something_else"))
assert index_live
|> form(~s/form[phx-change="search"]/)
|> render_change(search: %{search_term: ""}) =~ type.bullet_type
assert_patch(index_live, Routes.type_index_path(conn, :index))
end
test "saves new type", %{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element("a", "New Type") |> render_click() =~ "New Type"
assert_patch(index_live, Routes.type_index_path(conn, :new))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @create_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some bullet_type"
end
test "updates type in listing",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Edit #{type.name}"]/) |> render_click() =~
"Edit #{type.name}"
assert_patch(index_live, Routes.type_index_path(conn, :edit, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @update_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
test "clones type in listing",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{type.name}"]/) |> render_click()
assert html =~ "New Type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.type_index_path(conn, :clone, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(type: @create_attrs)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some bullet_type"
end
test "clones type in listing with updates",
%{conn: conn, current_user: current_user, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html = index_live |> element(~s/a[aria-label="Clone #{type.name}"]/) |> render_click()
assert html =~ "New Type"
assert html =~ "some bullet_type"
assert_patch(index_live, Routes.type_index_path(conn, :clone, type))
assert index_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
index_live
|> form("#type-form")
|> render_submit(
type: Map.merge(@create_attrs, %{bullet_type: "some updated bullet_type"})
)
|> follow_redirect(conn, Routes.type_index_path(conn, :index))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} created successfully"
assert html =~ "some updated bullet_type"
end
test "deletes type in listing", %{conn: conn, type: type} do
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
assert index_live |> element(~s/a[aria-label="Delete #{type.name}"]/) |> render_click()
refute has_element?(index_live, "#type-#{type.id}")
end
end
describe "Index with pack" do
setup [:register_and_log_in_user, :create_type, :create_pack]
test "shows used packs on toggle",
%{conn: conn, pack: pack, current_user: current_user} do
{:ok, index_live, html} = live(conn, Routes.type_index_path(conn, :index))
assert html =~ "Show used"
refute html =~ "Used rounds"
refute html =~ "Total ever rounds"
refute html =~ "Used packs"
refute html =~ "Total ever packs"
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "Used rounds"
assert html =~ "Total ever rounds"
assert html =~ "Used packs"
assert html =~ "Total ever packs"
assert html =~ "\n20\n"
assert html =~ "\n0\n"
assert html =~ "\n1\n"
shot_record_fixture(%{count: 5}, current_user, pack)
{:ok, index_live, _html} = live(conn, Routes.type_index_path(conn, :index))
html =
index_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n15\n"
assert html =~ "\n5\n"
end
end
describe "Show type" do
setup [:register_and_log_in_user, :create_type]
test "displays type", %{
conn: conn,
type: %{name: name, bullet_type: bullet_type} = type
} do
{:ok, _show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ name
assert html =~ bullet_type
end
test "updates type within modal",
%{conn: conn, current_user: current_user, type: %{name: name} = type} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
assert show_live |> element(~s/a[aria-label="Edit #{type.name}"]/) |> render_click() =~
"Edit #{name}"
assert_patch(show_live, Routes.type_show_path(conn, :edit, type))
assert show_live
|> form("#type-form")
|> render_change(type: @invalid_attrs) =~ "can&#39;t be blank"
{:ok, _view, html} =
show_live
|> form("#type-form")
|> render_submit(type: @update_attrs)
|> follow_redirect(conn, Routes.type_show_path(conn, :show, type))
type = type.id |> Ammo.get_type!(current_user)
assert html =~ "#{type.name} updated successfully"
assert html =~ "some updated bullet_type"
end
end
describe "Show type with pack" do
setup [:register_and_log_in_user, :create_type, :create_pack]
test "displays pack", %{
conn: conn,
type: %{name: type_name} = type,
container: %{name: container_name}
} do
{:ok, _show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ type_name
assert html =~ "\n20\n"
assert html =~ container_name
end
test "displays pack in table",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ container_name
end
end
describe "Show type with empty pack" do
setup [:register_and_log_in_user, :create_type, :create_empty_pack]
test "displays empty packs on toggle",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, html} = live(conn, Routes.type_show_path(conn, :show, type))
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
test "displays empty packs in table on toggle",
%{conn: conn, type: type, container: %{name: container_name}} do
{:ok, show_live, _html} = live(conn, Routes.type_show_path(conn, :show, type))
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|> render_click()
assert html =~ "Show used"
refute html =~ "\n20\n"
html =
show_live
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_show_used-label"}]/)
|> render_click()
assert html =~ "\n20\n"
assert html =~ "Empty"
assert html =~ container_name
end
end
end

View File

@ -8,10 +8,10 @@ defmodule Cannery.Fixtures do
alias Cannery.{ alias Cannery.{
Accounts, Accounts,
Accounts.User, Accounts.User,
ActivityLog.ShotGroup, ActivityLog.ShotRecord,
Ammo, Ammo,
Ammo.AmmoType,
Ammo.Pack, Ammo.Pack,
Ammo.Type,
Containers, Containers,
Containers.Container, Containers.Container,
Containers.Tag, Containers.Tag,
@ -69,18 +69,18 @@ defmodule Cannery.Fixtures do
end end
@doc """ @doc """
Generate a ShotGroup Generate a ShotRecord
""" """
@spec shot_group_fixture(User.t(), Pack.t()) :: ShotGroup.t() @spec shot_record_fixture(User.t(), Pack.t()) :: ShotRecord.t()
@spec shot_group_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotGroup.t() @spec shot_record_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotRecord.t()
def shot_group_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do def shot_record_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do
attrs attrs
|> Enum.into(%{ |> Enum.into(%{
count: 20, count: 20,
date: ~N[2022-02-13 03:17:00], date: ~N[2022-02-13 03:17:00],
notes: random_string() notes: random_string()
}) })
|> Cannery.ActivityLog.create_shot_group(user, pack) |> Cannery.ActivityLog.create_shot_record(user, pack)
|> unwrap_ok_tuple() |> unwrap_ok_tuple()
end end
@ -102,11 +102,11 @@ defmodule Cannery.Fixtures do
end end
@doc """ @doc """
Generate a AmmoType Generate a Type
""" """
@spec ammo_type_fixture(User.t()) :: AmmoType.t() @spec type_fixture(User.t()) :: Type.t()
@spec ammo_type_fixture(attrs :: map(), User.t()) :: AmmoType.t() @spec type_fixture(attrs :: map(), User.t()) :: Type.t()
def ammo_type_fixture(attrs \\ %{}, %User{} = user) do def type_fixture(attrs \\ %{}, %User{} = user) do
attrs attrs
|> Enum.into(%{ |> Enum.into(%{
name: random_string(), name: random_string(),
@ -142,34 +142,34 @@ defmodule Cannery.Fixtures do
manufacturer: random_string(), manufacturer: random_string(),
upc: random_string() upc: random_string()
}) })
|> Ammo.create_ammo_type(user) |> Ammo.create_type(user)
|> unwrap_ok_tuple() |> unwrap_ok_tuple()
end end
@doc """ @doc """
Generate a Pack Generate a Pack
""" """
@spec pack_fixture(AmmoType.t(), Container.t(), User.t()) :: @spec pack_fixture(Type.t(), Container.t(), User.t()) ::
{count :: non_neg_integer(), [Pack.t()]} {count :: non_neg_integer(), [Pack.t()]}
@spec pack_fixture(attrs :: map(), AmmoType.t(), Container.t(), User.t()) :: @spec pack_fixture(attrs :: map(), Type.t(), Container.t(), User.t()) ::
{count :: non_neg_integer(), [Pack.t()]} {count :: non_neg_integer(), [Pack.t()]}
@spec pack_fixture( @spec pack_fixture(
attrs :: map(), attrs :: map(),
multiplier :: non_neg_integer(), multiplier :: non_neg_integer(),
AmmoType.t(), Type.t(),
Container.t(), Container.t(),
User.t() User.t()
) :: {count :: non_neg_integer(), [Pack.t()]} ) :: {count :: non_neg_integer(), [Pack.t()]}
def pack_fixture( def pack_fixture(
attrs \\ %{}, attrs \\ %{},
multiplier \\ 1, multiplier \\ 1,
%AmmoType{id: ammo_type_id}, %Type{id: type_id},
%Container{id: container_id}, %Container{id: container_id},
%User{} = user %User{} = user
) do ) do
attrs attrs
|> Enum.into(%{ |> Enum.into(%{
ammo_type_id: ammo_type_id, type_id: type_id,
container_id: container_id, container_id: container_id,
count: 20, count: 20,
purchased_on: Date.utc_today() purchased_on: Date.utc_today()