Compare commits
No commits in common. "9835fe3f5e4e0ac1ad2dbbedf56574fc56be5ad5" and "32801828fa6056e46c14738285480dd0bb3d47a9" have entirely different histories.
9835fe3f5e
...
32801828fa
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,7 +1,6 @@
|
||||
# v0.9.1
|
||||
- Rename ammo type's "type" to "class" to avoid confusion
|
||||
- Rename "ammo type" to "type" to avoid confusion
|
||||
- Fixes type search
|
||||
- Fixes ammo type search
|
||||
- Fixes shot records table disappearing after selecting an empty ammo class
|
||||
- Code quality improvements
|
||||
|
||||
@ -58,7 +57,7 @@
|
||||
# v0.8.0
|
||||
- Add search to catalog, ammo, container, tag and range index pages
|
||||
- Tweak urls for catalog, ammo, containers, tags and shot records
|
||||
- Fix bug with shot record chart not drawing lines between days correctly
|
||||
- Fix bug with shot group chart not drawing lines between days correctly
|
||||
- Improve cards across app (make them line up with each other)
|
||||
- Update translations and add spanish!!! (thank you Brea and Hannah!)
|
||||
|
||||
@ -70,7 +69,7 @@
|
||||
- Fix toggle button styling
|
||||
- Miscellanous code improvements
|
||||
- Improve container index table
|
||||
- Fix bug with ammo not updating after deleting shot record
|
||||
- Fix bug with ammo not updating after deleting shot group
|
||||
- Replace ammo "added on" with "purchased on"
|
||||
- Miscellaneous wording improvements
|
||||
- Update translations
|
||||
@ -104,7 +103,7 @@
|
||||
- Add ammo type cloning
|
||||
- Add container cloning
|
||||
- Fix bug with moving ammo packs between containers
|
||||
- Add button to set rounds left to 0 when creating a shot record
|
||||
- Add button to set rounds left to 0 when creating a shot group
|
||||
- Update project dependencies
|
||||
|
||||
# v0.5.4
|
||||
@ -156,8 +155,8 @@
|
||||
# v0.3.0
|
||||
- Fix ammo type counts not showing when count is 0
|
||||
- Add prompt to create first container before first ammo group
|
||||
- Edit and delete shot records from ammo group show page
|
||||
- Use today's date when adding new shot records
|
||||
- Edit and delete shot groups from ammo group show page
|
||||
- Use today's date when adding new shot groups
|
||||
- Create multiple ammo groups at one time
|
||||
|
||||
# v0.2.3
|
||||
|
@ -13,8 +13,8 @@ The self-hosted firearm tracker website.
|
||||
# Features
|
||||
|
||||
- Create containers to store your ammunition, and tag them with custom tags
|
||||
- Add ammunition types to Cannery, and then ammo packs to your containers
|
||||
- Stage ammo packs for range day and track your usage with shot records
|
||||
- Add ammunition types to Cannery, and then ammunition groups to your containers
|
||||
- Stage groups of ammo for range day and record your ammo usage
|
||||
- Invitations via invite tokens or public registration
|
||||
|
||||
# Installation
|
||||
|
@ -4,50 +4,50 @@ defmodule Cannery.ActivityLog do
|
||||
"""
|
||||
|
||||
import Ecto.Query, warn: false
|
||||
alias Cannery.Ammo.{Pack, Type}
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Repo}
|
||||
alias Cannery.Ammo.{AmmoType, Pack}
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo}
|
||||
alias Ecto.{Multi, Queryable}
|
||||
|
||||
@doc """
|
||||
Returns the list of shot_records.
|
||||
Returns the list of shot_groups.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_shot_records(:all, %User{id: 123})
|
||||
[%ShotRecord{}, ...]
|
||||
iex> list_shot_groups(:all, %User{id: 123})
|
||||
[%ShotGroup{}, ...]
|
||||
|
||||
iex> list_shot_records("cool", :all, %User{id: 123})
|
||||
[%ShotRecord{notes: "My cool shot record"}, ...]
|
||||
iex> list_shot_groups("cool", :all, %User{id: 123})
|
||||
[%ShotGroup{notes: "My cool shot group"}, ...]
|
||||
|
||||
iex> list_shot_records("cool", :rifle, %User{id: 123})
|
||||
[%ShotRecord{notes: "Shot some rifle rounds"}, ...]
|
||||
iex> list_shot_groups("cool", :rifle, %User{id: 123})
|
||||
[%ShotGroup{notes: "Shot some rifle rounds"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_shot_records(Type.class() | :all, User.t()) :: [ShotRecord.t()]
|
||||
@spec list_shot_records(search :: nil | String.t(), Type.class() | :all, User.t()) ::
|
||||
[ShotRecord.t()]
|
||||
def list_shot_records(search \\ nil, type, %{id: user_id}) do
|
||||
from(sg in ShotRecord,
|
||||
@spec list_shot_groups(AmmoType.class() | :all, User.t()) :: [ShotGroup.t()]
|
||||
@spec list_shot_groups(search :: nil | String.t(), AmmoType.class() | :all, User.t()) ::
|
||||
[ShotGroup.t()]
|
||||
def list_shot_groups(search \\ nil, type, %{id: user_id}) do
|
||||
from(sg in ShotGroup,
|
||||
as: :sg,
|
||||
left_join: ag in Pack,
|
||||
as: :ag,
|
||||
on: sg.pack_id == ag.id,
|
||||
left_join: at in Type,
|
||||
left_join: at in AmmoType,
|
||||
as: :at,
|
||||
on: ag.type_id == at.id,
|
||||
on: ag.ammo_type_id == at.id,
|
||||
where: sg.user_id == ^user_id,
|
||||
distinct: sg.id
|
||||
)
|
||||
|> list_shot_records_search(search)
|
||||
|> list_shot_records_filter_type(type)
|
||||
|> list_shot_groups_search(search)
|
||||
|> list_shot_groups_filter_type(type)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec list_shot_records_search(Queryable.t(), search :: String.t() | nil) ::
|
||||
@spec list_shot_groups_search(Queryable.t(), search :: String.t() | nil) ::
|
||||
Queryable.t()
|
||||
defp list_shot_records_search(query, search) when search in ["", nil], do: query
|
||||
defp list_shot_groups_search(query, search) when search in ["", nil], do: query
|
||||
|
||||
defp list_shot_records_search(query, search) when search |> is_binary() do
|
||||
defp list_shot_groups_search(query, search) when search |> is_binary() do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
query
|
||||
@ -79,18 +79,18 @@ defmodule Cannery.ActivityLog do
|
||||
})
|
||||
end
|
||||
|
||||
@spec list_shot_records_filter_type(Queryable.t(), Type.class() | :all) ::
|
||||
@spec list_shot_groups_filter_type(Queryable.t(), AmmoType.class() | :all) ::
|
||||
Queryable.t()
|
||||
defp list_shot_records_filter_type(query, :rifle),
|
||||
defp list_shot_groups_filter_type(query, :rifle),
|
||||
do: query |> where([at: at], at.class == :rifle)
|
||||
|
||||
defp list_shot_records_filter_type(query, :pistol),
|
||||
defp list_shot_groups_filter_type(query, :pistol),
|
||||
do: query |> where([at: at], at.class == :pistol)
|
||||
|
||||
defp list_shot_records_filter_type(query, :shotgun),
|
||||
defp list_shot_groups_filter_type(query, :shotgun),
|
||||
do: query |> where([at: at], at.class == :shotgun)
|
||||
|
||||
defp list_shot_records_filter_type(query, _all), do: query
|
||||
defp list_shot_groups_filter_type(query, _all), do: query
|
||||
|
||||
@doc """
|
||||
Returns a count of shot records.
|
||||
@ -104,43 +104,43 @@ defmodule Cannery.ActivityLog do
|
||||
@spec get_shot_record_count!(User.t()) :: integer()
|
||||
def get_shot_record_count!(%User{id: user_id}) do
|
||||
Repo.one(
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: sg.user_id == ^user_id,
|
||||
select: count(sg.id),
|
||||
distinct: true
|
||||
) || 0
|
||||
end
|
||||
|
||||
@spec list_shot_records_for_pack(Pack.t(), User.t()) :: [ShotRecord.t()]
|
||||
def list_shot_records_for_pack(
|
||||
@spec list_shot_groups_for_pack(Pack.t(), User.t()) :: [ShotGroup.t()]
|
||||
def list_shot_groups_for_pack(
|
||||
%Pack{id: pack_id, user_id: user_id},
|
||||
%User{id: user_id}
|
||||
) do
|
||||
Repo.all(
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: sg.pack_id == ^pack_id,
|
||||
where: sg.user_id == ^user_id
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single shot_record.
|
||||
Gets a single shot_group.
|
||||
|
||||
Raises `Ecto.NoResultsError` if the shot record does not exist.
|
||||
Raises `Ecto.NoResultsError` if the Shot group does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_shot_record!(123, %User{id: 123})
|
||||
%ShotRecord{}
|
||||
iex> get_shot_group!(123, %User{id: 123})
|
||||
%ShotGroup{}
|
||||
|
||||
iex> get_shot_record!(456, %User{id: 123})
|
||||
iex> get_shot_group!(456, %User{id: 123})
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
@spec get_shot_record!(ShotRecord.id(), User.t()) :: ShotRecord.t()
|
||||
def get_shot_record!(id, %User{id: user_id}) do
|
||||
@spec get_shot_group!(ShotGroup.id(), User.t()) :: ShotGroup.t()
|
||||
def get_shot_group!(id, %User{id: user_id}) do
|
||||
Repo.one!(
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: sg.id == ^id,
|
||||
where: sg.user_id == ^user_id,
|
||||
order_by: sg.date
|
||||
@ -148,28 +148,28 @@ defmodule Cannery.ActivityLog do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a shot_record.
|
||||
Creates a shot_group.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> create_shot_record(%{field: value}, %User{id: 123})
|
||||
{:ok, %ShotRecord{}}
|
||||
iex> create_shot_group(%{field: value}, %User{id: 123})
|
||||
{:ok, %ShotGroup{}}
|
||||
|
||||
iex> create_shot_record(%{field: bad_value}, %User{id: 123})
|
||||
iex> create_shot_group(%{field: bad_value}, %User{id: 123})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
@spec create_shot_record(attrs :: map(), User.t(), Pack.t()) ::
|
||||
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
|
||||
def create_shot_record(attrs, user, pack) do
|
||||
@spec create_shot_group(attrs :: map(), User.t(), Pack.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
|
||||
def create_shot_group(attrs, user, pack) do
|
||||
Multi.new()
|
||||
|> Multi.insert(
|
||||
:create_shot_record,
|
||||
%ShotRecord{} |> ShotRecord.create_changeset(user, pack, attrs)
|
||||
:create_shot_group,
|
||||
%ShotGroup{} |> ShotGroup.create_changeset(user, pack, attrs)
|
||||
)
|
||||
|> Multi.run(
|
||||
:pack,
|
||||
fn _repo, %{create_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
|
||||
fn _repo, %{create_shot_group: %{pack_id: pack_id, user_id: user_id}} ->
|
||||
pack =
|
||||
Repo.one(
|
||||
from ag in Pack,
|
||||
@ -182,52 +182,52 @@ defmodule Cannery.ActivityLog do
|
||||
)
|
||||
|> Multi.update(
|
||||
:update_pack,
|
||||
fn %{create_shot_record: %{count: shot_record_count}, pack: %{count: pack_count}} ->
|
||||
pack |> Pack.range_changeset(%{"count" => pack_count - shot_record_count})
|
||||
fn %{create_shot_group: %{count: shot_group_count}, pack: %{count: pack_count}} ->
|
||||
pack |> Pack.range_changeset(%{"count" => pack_count - shot_group_count})
|
||||
end
|
||||
)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
{:ok, %{create_shot_record: shot_record}} -> {:ok, shot_record}
|
||||
{:error, :create_shot_record, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:ok, %{create_shot_group: shot_group}} -> {:ok, shot_group}
|
||||
{:error, :create_shot_group, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
Updates a shot_record.
|
||||
Updates a shot_group.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> update_shot_record(shot_record, %{field: new_value}, %User{id: 123})
|
||||
{:ok, %ShotRecord{}}
|
||||
iex> update_shot_group(shot_group, %{field: new_value}, %User{id: 123})
|
||||
{:ok, %ShotGroup{}}
|
||||
|
||||
iex> update_shot_record(shot_record, %{field: bad_value}, %User{id: 123})
|
||||
iex> update_shot_group(shot_group, %{field: bad_value}, %User{id: 123})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
@spec update_shot_record(ShotRecord.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset() | nil}
|
||||
def update_shot_record(
|
||||
%ShotRecord{count: count, user_id: user_id} = shot_record,
|
||||
@spec update_shot_group(ShotGroup.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
|
||||
def update_shot_group(
|
||||
%ShotGroup{count: count, user_id: user_id} = shot_group,
|
||||
attrs,
|
||||
%User{id: user_id} = user
|
||||
) do
|
||||
Multi.new()
|
||||
|> Multi.update(
|
||||
:update_shot_record,
|
||||
shot_record |> ShotRecord.update_changeset(user, attrs)
|
||||
:update_shot_group,
|
||||
shot_group |> ShotGroup.update_changeset(user, attrs)
|
||||
)
|
||||
|> Multi.run(
|
||||
:pack,
|
||||
fn repo, %{update_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
|
||||
fn repo, %{update_shot_group: %{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)}
|
||||
end
|
||||
)
|
||||
|> Multi.update(
|
||||
:update_pack,
|
||||
fn %{
|
||||
update_shot_record: %{count: new_count},
|
||||
update_shot_group: %{count: new_count},
|
||||
pack: %{count: pack_count} = pack
|
||||
} ->
|
||||
shot_diff_to_add = new_count - count
|
||||
@ -237,42 +237,42 @@ defmodule Cannery.ActivityLog do
|
||||
)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
{:ok, %{update_shot_record: shot_record}} -> {:ok, shot_record}
|
||||
{:error, :update_shot_record, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:ok, %{update_shot_group: shot_group}} -> {:ok, shot_group}
|
||||
{:error, :update_shot_group, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
Deletes a shot_record.
|
||||
Deletes a shot_group.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> delete_shot_record(shot_record, %User{id: 123})
|
||||
{:ok, %ShotRecord{}}
|
||||
iex> delete_shot_group(shot_group, %User{id: 123})
|
||||
{:ok, %ShotGroup{}}
|
||||
|
||||
iex> delete_shot_record(shot_record, %User{id: 123})
|
||||
iex> delete_shot_group(shot_group, %User{id: 123})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
@spec delete_shot_record(ShotRecord.t(), User.t()) ::
|
||||
{:ok, ShotRecord.t()} | {:error, ShotRecord.changeset()}
|
||||
def delete_shot_record(
|
||||
%ShotRecord{user_id: user_id} = shot_record,
|
||||
@spec delete_shot_group(ShotGroup.t(), User.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset()}
|
||||
def delete_shot_group(
|
||||
%ShotGroup{user_id: user_id} = shot_group,
|
||||
%User{id: user_id}
|
||||
) do
|
||||
Multi.new()
|
||||
|> Multi.delete(:delete_shot_record, shot_record)
|
||||
|> Multi.delete(:delete_shot_group, shot_group)
|
||||
|> Multi.run(
|
||||
:pack,
|
||||
fn repo, %{delete_shot_record: %{pack_id: pack_id, user_id: user_id}} ->
|
||||
fn repo, %{delete_shot_group: %{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)}
|
||||
end
|
||||
)
|
||||
|> Multi.update(
|
||||
:update_pack,
|
||||
fn %{
|
||||
delete_shot_record: %{count: count},
|
||||
delete_shot_group: %{count: count},
|
||||
pack: %{count: pack_count} = pack
|
||||
} ->
|
||||
new_pack_count = pack_count + count
|
||||
@ -281,8 +281,8 @@ defmodule Cannery.ActivityLog do
|
||||
)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
{:ok, %{delete_shot_record: shot_record}} -> {:ok, shot_record}
|
||||
{:error, :delete_shot_record, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:ok, %{delete_shot_group: shot_group}} -> {:ok, shot_group}
|
||||
{:error, :delete_shot_group, changeset, _changes_so_far} -> {:error, changeset}
|
||||
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
|
||||
end
|
||||
end
|
||||
@ -308,7 +308,7 @@ defmodule Cannery.ActivityLog do
|
||||
|> Enum.map(fn %{id: pack_id} -> pack_id end)
|
||||
|
||||
Repo.all(
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: sg.pack_id in ^pack_ids,
|
||||
where: sg.user_id == ^user_id,
|
||||
group_by: sg.pack_id,
|
||||
@ -318,7 +318,7 @@ defmodule Cannery.ActivityLog do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the last entered shot record date for a pack
|
||||
Returns the last entered shot group date for a pack
|
||||
"""
|
||||
@spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil
|
||||
def get_last_used_date(%Pack{id: pack_id} = pack, user) do
|
||||
@ -328,7 +328,7 @@ defmodule Cannery.ActivityLog do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the last entered shot record date for a pack
|
||||
Returns the last entered shot group date for a pack
|
||||
"""
|
||||
@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
|
||||
@ -337,7 +337,7 @@ defmodule Cannery.ActivityLog do
|
||||
|> Enum.map(fn %Pack{id: pack_id, user_id: ^user_id} -> pack_id end)
|
||||
|
||||
Repo.all(
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: sg.pack_id in ^pack_ids,
|
||||
where: sg.user_id == ^user_id,
|
||||
group_by: sg.pack_id,
|
||||
@ -347,50 +347,50 @@ defmodule Cannery.ActivityLog do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds shot for a type
|
||||
Gets the total number of rounds shot for an ammo type
|
||||
|
||||
Raises `Ecto.NoResultsError` if the type does not exist.
|
||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_used_count_for_type(123, %User{id: 123})
|
||||
iex> get_used_count_for_ammo_type(123, %User{id: 123})
|
||||
35
|
||||
|
||||
iex> get_used_count_for_type(456, %User{id: 123})
|
||||
iex> get_used_count_for_ammo_type(456, %User{id: 123})
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
@spec get_used_count_for_type(Type.t(), User.t()) :: non_neg_integer()
|
||||
def get_used_count_for_type(%Type{id: type_id} = type, user) do
|
||||
[type]
|
||||
|> get_used_count_for_types(user)
|
||||
|> Map.get(type_id, 0)
|
||||
@spec get_used_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_used_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
|
||||
[ammo_type]
|
||||
|> get_used_count_for_ammo_types(user)
|
||||
|> Map.get(ammo_type_id, 0)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds shot for multiple types
|
||||
Gets the total number of rounds shot for multiple ammo types
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_used_count_for_types(123, %User{id: 123})
|
||||
iex> get_used_count_for_ammo_types(123, %User{id: 123})
|
||||
35
|
||||
|
||||
"""
|
||||
@spec get_used_count_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
def get_used_count_for_types(types, %User{id: user_id}) do
|
||||
type_ids =
|
||||
types
|
||||
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
|
||||
@spec get_used_count_for_ammo_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
def get_used_count_for_ammo_types(ammo_types, %User{id: user_id}) do
|
||||
ammo_type_ids =
|
||||
ammo_types
|
||||
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
|
||||
|
||||
Repo.all(
|
||||
from ag in Pack,
|
||||
left_join: sg in ShotRecord,
|
||||
left_join: sg in ShotGroup,
|
||||
on: ag.id == sg.pack_id,
|
||||
where: ag.type_id in ^type_ids,
|
||||
where: ag.ammo_type_id in ^ammo_type_ids,
|
||||
where: not (sg.count |> is_nil()),
|
||||
group_by: ag.type_id,
|
||||
select: {ag.type_id, sum(sg.count)}
|
||||
group_by: ag.ammo_type_id,
|
||||
select: {ag.ammo_type_id, sum(sg.count)}
|
||||
)
|
||||
|> Map.new()
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
defmodule Cannery.ActivityLog.ShotRecord do
|
||||
defmodule Cannery.ActivityLog.ShotGroup do
|
||||
@moduledoc """
|
||||
A shot record records a group of ammo shot during a range trip
|
||||
A shot group records a group of ammo shot during a range trip
|
||||
"""
|
||||
|
||||
use Ecto.Schema
|
||||
@ -19,7 +19,7 @@ defmodule Cannery.ActivityLog.ShotRecord do
|
||||
]}
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
@foreign_key_type :binary_id
|
||||
schema "shot_records" do
|
||||
schema "shot_groups" do
|
||||
field :count, :integer
|
||||
field :date, :date
|
||||
field :notes, :string
|
||||
@ -40,41 +40,41 @@ defmodule Cannery.ActivityLog.ShotRecord do
|
||||
inserted_at: NaiveDateTime.t(),
|
||||
updated_at: NaiveDateTime.t()
|
||||
}
|
||||
@type new_shot_record :: %__MODULE__{}
|
||||
@type new_shot_group :: %__MODULE__{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_shot_record())
|
||||
@type changeset :: Changeset.t(t() | new_shot_group())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(
|
||||
new_shot_record(),
|
||||
new_shot_group(),
|
||||
User.t() | any(),
|
||||
Pack.t() | any(),
|
||||
attrs :: map()
|
||||
) :: changeset()
|
||||
def create_changeset(
|
||||
shot_record,
|
||||
shot_group,
|
||||
%User{id: user_id},
|
||||
%Pack{id: pack_id, user_id: user_id} = pack,
|
||||
attrs
|
||||
) do
|
||||
shot_record
|
||||
shot_group
|
||||
|> change(user_id: user_id)
|
||||
|> change(pack_id: pack_id)
|
||||
|> cast(attrs, [:count, :notes, :date])
|
||||
|> validate_length(:notes, max: 255)
|
||||
|> validate_create_shot_record_count(pack)
|
||||
|> validate_create_shot_group_count(pack)
|
||||
|> validate_required([:date, :pack_id, :user_id])
|
||||
end
|
||||
|
||||
def create_changeset(shot_record, _invalid_user, _invalid_pack, attrs) do
|
||||
shot_record
|
||||
def create_changeset(shot_group, _invalid_user, _invalid_pack, attrs) do
|
||||
shot_group
|
||||
|> cast(attrs, [:count, :notes, :date])
|
||||
|> validate_length(:notes, max: 255)
|
||||
|> validate_required([:pack_id, :user_id])
|
||||
|> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo pack"))
|
||||
end
|
||||
|
||||
defp validate_create_shot_record_count(changeset, %Pack{count: pack_count}) do
|
||||
defp validate_create_shot_group_count(changeset, %Pack{count: pack_count}) do
|
||||
case changeset |> Changeset.get_field(:count) do
|
||||
nil ->
|
||||
changeset |> Changeset.add_error(:ammo_left, dgettext("errors", "can't be blank"))
|
||||
@ -95,25 +95,25 @@ defmodule Cannery.ActivityLog.ShotRecord do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_shot_record(), User.t(), attrs :: map()) :: changeset()
|
||||
def update_changeset(%__MODULE__{} = shot_record, user, attrs) do
|
||||
shot_record
|
||||
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) :: changeset()
|
||||
def update_changeset(%__MODULE__{} = shot_group, user, attrs) do
|
||||
shot_group
|
||||
|> cast(attrs, [:count, :notes, :date])
|
||||
|> validate_length(:notes, max: 255)
|
||||
|> validate_number(:count, greater_than: 0)
|
||||
|> validate_required([:count, :date])
|
||||
|> validate_update_shot_record_count(shot_record, user)
|
||||
|> validate_update_shot_group_count(shot_group, user)
|
||||
end
|
||||
|
||||
defp validate_update_shot_record_count(
|
||||
defp validate_update_shot_group_count(
|
||||
changeset,
|
||||
%__MODULE__{pack_id: pack_id, count: count},
|
||||
user
|
||||
) do
|
||||
%{count: pack_count} = Ammo.get_pack!(pack_id, user)
|
||||
|
||||
new_shot_record_count = changeset |> Changeset.get_field(:count)
|
||||
shot_diff_to_add = new_shot_record_count - count
|
||||
new_shot_group_count = changeset |> Changeset.get_field(:count)
|
||||
shot_diff_to_add = new_shot_group_count - count
|
||||
|
||||
if shot_diff_to_add > pack_count do
|
||||
error = dgettext("errors", "Count can be at most %{count} shots", count: pack_count + count)
|
@ -7,47 +7,47 @@ defmodule Cannery.Ammo do
|
||||
import Ecto.Query, warn: false
|
||||
alias Cannery.{Accounts.User, Containers, Repo}
|
||||
alias Cannery.Containers.{Container, ContainerTag, Tag}
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
|
||||
alias Cannery.Ammo.{Pack, Type}
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
|
||||
alias Cannery.Ammo.{AmmoType, Pack}
|
||||
alias Ecto.{Changeset, Queryable}
|
||||
|
||||
@pack_create_limit 10_000
|
||||
@pack_preloads [:type]
|
||||
@type_preloads [:packs]
|
||||
@pack_preloads [:ammo_type]
|
||||
@ammo_type_preloads [:packs]
|
||||
|
||||
@doc """
|
||||
Returns the list of types.
|
||||
Returns the list of ammo_types.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_types(%User{id: 123}, :all)
|
||||
[%Type{}, ...]
|
||||
iex> list_ammo_types(%User{id: 123}, :all)
|
||||
[%AmmoType{}, ...]
|
||||
|
||||
iex> list_types("cool", %User{id: 123}, :shotgun)
|
||||
[%Type{name: "My cool type", class: :shotgun}, ...]
|
||||
iex> list_ammo_types("cool", %User{id: 123}, :shotgun)
|
||||
[%AmmoType{name: "My cool ammo type", class: :shotgun}, ...]
|
||||
|
||||
"""
|
||||
@spec list_types(User.t(), Type.class() | :all) :: [Type.t()]
|
||||
@spec list_types(search :: nil | String.t(), User.t(), Type.class() | :all) ::
|
||||
[Type.t()]
|
||||
def list_types(search \\ nil, user, type)
|
||||
@spec list_ammo_types(User.t(), AmmoType.class() | :all) :: [AmmoType.t()]
|
||||
@spec list_ammo_types(search :: nil | String.t(), User.t(), AmmoType.class() | :all) ::
|
||||
[AmmoType.t()]
|
||||
def list_ammo_types(search \\ nil, user, type)
|
||||
|
||||
def list_types(search, %{id: user_id}, type) do
|
||||
from(at in Type,
|
||||
def list_ammo_types(search, %{id: user_id}, type) do
|
||||
from(at in AmmoType,
|
||||
as: :at,
|
||||
where: at.user_id == ^user_id,
|
||||
preload: ^@type_preloads
|
||||
preload: ^@ammo_type_preloads
|
||||
)
|
||||
|> list_types_filter_type(type)
|
||||
|> list_types_filter_search(search)
|
||||
|> list_ammo_types_filter_type(type)
|
||||
|> list_ammo_types_filter_search(search)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec list_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t()
|
||||
defp list_types_filter_search(query, search) when search in ["", nil],
|
||||
@spec list_ammo_types_filter_search(Queryable.t(), search :: String.t() | nil) :: Queryable.t()
|
||||
defp list_ammo_types_filter_search(query, search) when search in ["", nil],
|
||||
do: query |> order_by([at: at], at.name)
|
||||
|
||||
defp list_types_filter_search(query, search) when search |> is_binary() do
|
||||
defp list_ammo_types_filter_search(query, search) when search |> is_binary() do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
query
|
||||
@ -72,31 +72,31 @@ defmodule Cannery.Ammo do
|
||||
)
|
||||
end
|
||||
|
||||
@spec list_types_filter_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
|
||||
defp list_types_filter_type(query, :rifle),
|
||||
@spec list_ammo_types_filter_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t()
|
||||
defp list_ammo_types_filter_type(query, :rifle),
|
||||
do: query |> where([at: at], at.class == :rifle)
|
||||
|
||||
defp list_types_filter_type(query, :pistol),
|
||||
defp list_ammo_types_filter_type(query, :pistol),
|
||||
do: query |> where([at: at], at.class == :pistol)
|
||||
|
||||
defp list_types_filter_type(query, :shotgun),
|
||||
defp list_ammo_types_filter_type(query, :shotgun),
|
||||
do: query |> where([at: at], at.class == :shotgun)
|
||||
|
||||
defp list_types_filter_type(query, _all), do: query
|
||||
defp list_ammo_types_filter_type(query, _all), do: query
|
||||
|
||||
@doc """
|
||||
Returns a count of types.
|
||||
Returns a count of ammo_types.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_types_count!(%User{id: 123})
|
||||
iex> get_ammo_types_count!(%User{id: 123})
|
||||
3
|
||||
|
||||
"""
|
||||
@spec get_types_count!(User.t()) :: integer()
|
||||
def get_types_count!(%User{id: user_id}) do
|
||||
@spec get_ammo_types_count!(User.t()) :: integer()
|
||||
def get_ammo_types_count!(%User{id: user_id}) do
|
||||
Repo.one(
|
||||
from at in Type,
|
||||
from at in AmmoType,
|
||||
where: at.user_id == ^user_id,
|
||||
select: count(at.id),
|
||||
distinct: true
|
||||
@ -104,70 +104,70 @@ defmodule Cannery.Ammo do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single type.
|
||||
Gets a single ammo_type.
|
||||
|
||||
Raises `Ecto.NoResultsError` if the type does not exist.
|
||||
Raises `Ecto.NoResultsError` if the Ammo type does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_type!(123, %User{id: 123})
|
||||
%Type{}
|
||||
iex> get_ammo_type!(123, %User{id: 123})
|
||||
%AmmoType{}
|
||||
|
||||
iex> get_type!(456, %User{id: 123})
|
||||
iex> get_ammo_type!(456, %User{id: 123})
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
@spec get_type!(Type.id(), User.t()) :: Type.t()
|
||||
def get_type!(id, %User{id: user_id}) do
|
||||
@spec get_ammo_type!(AmmoType.id(), User.t()) :: AmmoType.t()
|
||||
def get_ammo_type!(id, %User{id: user_id}) do
|
||||
Repo.one!(
|
||||
from at in Type,
|
||||
from at in AmmoType,
|
||||
where: at.id == ^id,
|
||||
where: at.user_id == ^user_id,
|
||||
preload: ^@type_preloads
|
||||
preload: ^@ammo_type_preloads
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the average cost of a type from packs with price information.
|
||||
Gets the average cost of an ammo type from packs with price information.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_average_cost_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
iex> get_average_cost_for_ammo_type(
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
1.50
|
||||
|
||||
"""
|
||||
@spec get_average_cost_for_type(Type.t(), User.t()) :: float() | nil
|
||||
def get_average_cost_for_type(%Type{id: type_id} = type, user) do
|
||||
[type]
|
||||
|> get_average_cost_for_types(user)
|
||||
|> Map.get(type_id)
|
||||
@spec get_average_cost_for_ammo_type(AmmoType.t(), User.t()) :: float() | nil
|
||||
def get_average_cost_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
|
||||
[ammo_type]
|
||||
|> get_average_cost_for_ammo_types(user)
|
||||
|> Map.get(ammo_type_id)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the average cost of types from packs with price information
|
||||
for multiple types.
|
||||
Gets the average cost of ammo types from packs with price information
|
||||
for multiple ammo types.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_average_cost_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
iex> get_average_cost_for_ammo_types(
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
1.50
|
||||
|
||||
"""
|
||||
@spec get_average_cost_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => float()}
|
||||
def get_average_cost_for_types(types, %User{id: user_id}) do
|
||||
type_ids =
|
||||
types
|
||||
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
|
||||
@spec get_average_cost_for_ammo_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => float()}
|
||||
def get_average_cost_for_ammo_types(ammo_types, %User{id: user_id}) do
|
||||
ammo_type_ids =
|
||||
ammo_types
|
||||
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
|
||||
|
||||
sg_total_query =
|
||||
from sg in ShotRecord,
|
||||
from sg in ShotGroup,
|
||||
where: not (sg.count |> is_nil()),
|
||||
group_by: sg.pack_id,
|
||||
select: %{pack_id: sg.pack_id, total: sum(sg.count)}
|
||||
@ -177,200 +177,202 @@ defmodule Cannery.Ammo do
|
||||
as: :pack,
|
||||
left_join: sg_query in subquery(sg_total_query),
|
||||
on: ag.id == sg_query.pack_id,
|
||||
where: ag.type_id in ^type_ids,
|
||||
group_by: ag.type_id,
|
||||
where: ag.ammo_type_id in ^ammo_type_ids,
|
||||
group_by: ag.ammo_type_id,
|
||||
where: not (ag.price_paid |> is_nil()),
|
||||
select: {ag.type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
|
||||
select:
|
||||
{ag.ammo_type_id, sum(ag.price_paid) / sum(ag.count + coalesce(sg_query.total, 0))}
|
||||
)
|
||||
|> Map.new()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds for a type
|
||||
Gets the total number of rounds for an ammo type
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_round_count_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
iex> get_round_count_for_ammo_type(
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
35
|
||||
|
||||
"""
|
||||
@spec get_round_count_for_type(Type.t(), User.t()) :: non_neg_integer()
|
||||
def get_round_count_for_type(%Type{id: type_id} = type, user) do
|
||||
[type]
|
||||
|> get_round_count_for_types(user)
|
||||
|> Map.get(type_id, 0)
|
||||
@spec get_round_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_round_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
|
||||
[ammo_type]
|
||||
|> get_round_count_for_ammo_types(user)
|
||||
|> Map.get(ammo_type_id, 0)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of rounds for multiple types
|
||||
Gets the total number of rounds for multiple ammo types
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_round_count_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
iex> get_round_count_for_ammo_types(
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
%{123 => 35}
|
||||
|
||||
"""
|
||||
@spec get_round_count_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
def get_round_count_for_types(types, %User{id: user_id}) do
|
||||
type_ids =
|
||||
types
|
||||
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
|
||||
@spec get_round_count_for_ammo_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
def get_round_count_for_ammo_types(ammo_types, %User{id: user_id}) do
|
||||
ammo_type_ids =
|
||||
ammo_types
|
||||
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
|
||||
|
||||
Repo.all(
|
||||
from ag in Pack,
|
||||
where: ag.type_id in ^type_ids,
|
||||
where: ag.ammo_type_id in ^ammo_type_ids,
|
||||
where: ag.user_id == ^user_id,
|
||||
group_by: ag.type_id,
|
||||
select: {ag.type_id, sum(ag.count)}
|
||||
group_by: ag.ammo_type_id,
|
||||
select: {ag.ammo_type_id, sum(ag.count)}
|
||||
)
|
||||
|> Map.new()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of ammo ever bought for a type
|
||||
Gets the total number of ammo ever bought for an ammo type
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_historical_count_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
iex> get_historical_count_for_ammo_type(
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
5
|
||||
|
||||
"""
|
||||
@spec get_historical_count_for_type(Type.t(), User.t()) :: non_neg_integer()
|
||||
def get_historical_count_for_type(%Type{id: type_id} = type, user) do
|
||||
[type]
|
||||
|> get_historical_count_for_types(user)
|
||||
|> Map.get(type_id, 0)
|
||||
@spec get_historical_count_for_ammo_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_historical_count_for_ammo_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
|
||||
[ammo_type]
|
||||
|> get_historical_count_for_ammo_types(user)
|
||||
|> Map.get(ammo_type_id, 0)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets the total number of ammo ever bought for multiple types
|
||||
Gets the total number of ammo ever bought for multiple ammo types
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_historical_count_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
iex> get_historical_count_for_ammo_types(
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
%{123 => 5}
|
||||
|
||||
"""
|
||||
@spec get_historical_count_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
def get_historical_count_for_types(types, %User{id: user_id} = user) do
|
||||
used_counts = types |> ActivityLog.get_used_count_for_types(user)
|
||||
round_counts = types |> get_round_count_for_types(user)
|
||||
@spec get_historical_count_for_ammo_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
def get_historical_count_for_ammo_types(ammo_types, %User{id: user_id} = user) do
|
||||
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(user)
|
||||
round_counts = ammo_types |> get_round_count_for_ammo_types(user)
|
||||
|
||||
types
|
||||
|> Enum.filter(fn %Type{id: type_id, user_id: ^user_id} ->
|
||||
Map.has_key?(used_counts, type_id) or Map.has_key?(round_counts, type_id)
|
||||
ammo_types
|
||||
|> Enum.filter(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} ->
|
||||
Map.has_key?(used_counts, ammo_type_id) or Map.has_key?(round_counts, ammo_type_id)
|
||||
end)
|
||||
|> Map.new(fn %{id: type_id} ->
|
||||
historical_count = Map.get(used_counts, type_id, 0) + Map.get(round_counts, type_id, 0)
|
||||
|> Map.new(fn %{id: ammo_type_id} ->
|
||||
historical_count =
|
||||
Map.get(used_counts, ammo_type_id, 0) + Map.get(round_counts, ammo_type_id, 0)
|
||||
|
||||
{type_id, historical_count}
|
||||
{ammo_type_id, historical_count}
|
||||
end)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Creates a type.
|
||||
Creates a ammo_type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> create_type(%{field: value}, %User{id: 123})
|
||||
{:ok, %Type{}}
|
||||
iex> create_ammo_type(%{field: value}, %User{id: 123})
|
||||
{:ok, %AmmoType{}}
|
||||
|
||||
iex> create_type(%{field: bad_value}, %User{id: 123})
|
||||
iex> create_ammo_type(%{field: bad_value}, %User{id: 123})
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec create_type(attrs :: map(), User.t()) ::
|
||||
{:ok, Type.t()} | {:error, Type.changeset()}
|
||||
def create_type(attrs \\ %{}, %User{} = user) do
|
||||
%Type{}
|
||||
|> Type.create_changeset(user, attrs)
|
||||
@spec create_ammo_type(attrs :: map(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
def create_ammo_type(attrs \\ %{}, %User{} = user) do
|
||||
%AmmoType{}
|
||||
|> AmmoType.create_changeset(user, attrs)
|
||||
|> Repo.insert()
|
||||
|> case do
|
||||
{:ok, type} -> {:ok, type |> preload_type()}
|
||||
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
|
||||
{:error, changeset} -> {:error, changeset}
|
||||
end
|
||||
end
|
||||
|
||||
@spec preload_type(Type.t()) :: Type.t()
|
||||
@spec preload_type([Type.t()]) :: [Type.t()]
|
||||
defp preload_type(type_or_types) do
|
||||
type_or_types |> Repo.preload(@type_preloads)
|
||||
@spec preload_ammo_type(AmmoType.t()) :: AmmoType.t()
|
||||
@spec preload_ammo_type([AmmoType.t()]) :: [AmmoType.t()]
|
||||
defp preload_ammo_type(ammo_type_or_ammo_types) do
|
||||
ammo_type_or_ammo_types |> Repo.preload(@ammo_type_preloads)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Updates a type.
|
||||
Updates a ammo_type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> update_type(type, %{field: new_value}, %User{id: 123})
|
||||
{:ok, %Type{}}
|
||||
iex> update_ammo_type(ammo_type, %{field: new_value}, %User{id: 123})
|
||||
{:ok, %AmmoType{}}
|
||||
|
||||
iex> update_type(type, %{field: bad_value}, %User{id: 123})
|
||||
iex> update_ammo_type(ammo_type, %{field: bad_value}, %User{id: 123})
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec update_type(Type.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, Type.t()} | {:error, Type.changeset()}
|
||||
def update_type(%Type{user_id: user_id} = type, attrs, %User{id: user_id}) do
|
||||
type
|
||||
|> Type.update_changeset(attrs)
|
||||
@spec update_ammo_type(AmmoType.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
def update_ammo_type(%AmmoType{user_id: user_id} = ammo_type, attrs, %User{id: user_id}) do
|
||||
ammo_type
|
||||
|> AmmoType.update_changeset(attrs)
|
||||
|> Repo.update()
|
||||
|> case do
|
||||
{:ok, type} -> {:ok, type |> preload_type()}
|
||||
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
|
||||
{:error, changeset} -> {:error, changeset}
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
Deletes a type.
|
||||
Deletes a ammo_type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> delete_type(type, %User{id: 123})
|
||||
{:ok, %Type{}}
|
||||
iex> delete_ammo_type(ammo_type, %User{id: 123})
|
||||
{:ok, %AmmoType{}}
|
||||
|
||||
iex> delete_type(type, %User{id: 123})
|
||||
iex> delete_ammo_type(ammo_type, %User{id: 123})
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec delete_type(Type.t(), User.t()) ::
|
||||
{:ok, Type.t()} | {:error, Type.changeset()}
|
||||
def delete_type(%Type{user_id: user_id} = type, %User{id: user_id}) do
|
||||
type
|
||||
@spec delete_ammo_type(AmmoType.t(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
def delete_ammo_type(%AmmoType{user_id: user_id} = ammo_type, %User{id: user_id}) do
|
||||
ammo_type
|
||||
|> Repo.delete()
|
||||
|> case do
|
||||
{:ok, type} -> {:ok, type |> preload_type()}
|
||||
{:ok, ammo_type} -> {:ok, ammo_type |> preload_ammo_type()}
|
||||
{:error, changeset} -> {:error, changeset}
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
Deletes a type.
|
||||
Deletes a ammo_type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> delete_type!(type, %User{id: 123})
|
||||
%Type{}
|
||||
iex> delete_ammo_type!(ammo_type, %User{id: 123})
|
||||
%AmmoType{}
|
||||
|
||||
"""
|
||||
@spec delete_type!(Type.t(), User.t()) :: Type.t()
|
||||
def delete_type!(type, user) do
|
||||
{:ok, type} = delete_type(type, user)
|
||||
type
|
||||
@spec delete_ammo_type!(AmmoType.t(), User.t()) :: AmmoType.t()
|
||||
def delete_ammo_type!(ammo_type, user) do
|
||||
{:ok, ammo_type} = delete_ammo_type(ammo_type, user)
|
||||
ammo_type
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -379,32 +381,32 @@ defmodule Cannery.Ammo do
|
||||
## Examples
|
||||
|
||||
iex> list_packs_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
[%Pack{}, ...]
|
||||
|
||||
iex> list_packs_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456},
|
||||
...> true
|
||||
...> )
|
||||
[%Pack{}, %Pack{}, ...]
|
||||
|
||||
"""
|
||||
@spec list_packs_for_type(Type.t(), User.t()) :: [Pack.t()]
|
||||
@spec list_packs_for_type(Type.t(), User.t(), show_used :: boolean()) ::
|
||||
@spec list_packs_for_type(AmmoType.t(), User.t()) :: [Pack.t()]
|
||||
@spec list_packs_for_type(AmmoType.t(), User.t(), show_used :: boolean()) ::
|
||||
[Pack.t()]
|
||||
def list_packs_for_type(type, user, show_used \\ false)
|
||||
def list_packs_for_type(ammo_type, user, show_used \\ false)
|
||||
|
||||
def list_packs_for_type(
|
||||
%Type{id: type_id, user_id: user_id},
|
||||
%AmmoType{id: ammo_type_id, user_id: user_id},
|
||||
%User{id: user_id},
|
||||
show_used
|
||||
) do
|
||||
from(ag in Pack,
|
||||
as: :ag,
|
||||
where: ag.type_id == ^type_id,
|
||||
where: ag.ammo_type_id == ^ammo_type_id,
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: ^@pack_preloads
|
||||
)
|
||||
@ -441,7 +443,7 @@ defmodule Cannery.Ammo do
|
||||
"""
|
||||
@spec list_packs_for_container(
|
||||
Container.t(),
|
||||
Type.t() | :all,
|
||||
AmmoType.t() | :all,
|
||||
User.t()
|
||||
) :: [Pack.t()]
|
||||
def list_packs_for_container(
|
||||
@ -451,7 +453,7 @@ defmodule Cannery.Ammo do
|
||||
) do
|
||||
from(ag in Pack,
|
||||
as: :ag,
|
||||
join: at in assoc(ag, :type),
|
||||
join: at in assoc(ag, :ammo_type),
|
||||
as: :at,
|
||||
where: ag.container_id == ^container_id,
|
||||
where: ag.user_id == ^user_id,
|
||||
@ -462,7 +464,7 @@ defmodule Cannery.Ammo do
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec list_packs_for_container_filter_type(Queryable.t(), Type.class() | :all) ::
|
||||
@spec list_packs_for_container_filter_type(Queryable.t(), AmmoType.class() | :all) ::
|
||||
Queryable.t()
|
||||
defp list_packs_for_container_filter_type(query, :rifle),
|
||||
do: query |> where([at: at], at.class == :rifle)
|
||||
@ -507,71 +509,71 @@ defmodule Cannery.Ammo do
|
||||
defp get_packs_count_show_used(query, _true), do: query
|
||||
|
||||
@doc """
|
||||
Returns the count of packs for a type.
|
||||
Returns the count of packs for an ammo type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_packs_count_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
3
|
||||
|
||||
iex> get_packs_count_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456},
|
||||
...> true
|
||||
...> )
|
||||
5
|
||||
|
||||
"""
|
||||
@spec get_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
|
||||
@spec get_packs_count_for_type(Type.t(), User.t(), show_used :: boolean()) ::
|
||||
@spec get_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
@spec get_packs_count_for_type(AmmoType.t(), User.t(), show_used :: boolean()) ::
|
||||
non_neg_integer()
|
||||
def get_packs_count_for_type(
|
||||
%Type{id: type_id} = type,
|
||||
%AmmoType{id: ammo_type_id} = ammo_type,
|
||||
user,
|
||||
show_used \\ false
|
||||
) do
|
||||
[type]
|
||||
[ammo_type]
|
||||
|> get_packs_count_for_types(user, show_used)
|
||||
|> Map.get(type_id, 0)
|
||||
|> Map.get(ammo_type_id, 0)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the count of packs for multiple types.
|
||||
Returns the count of packs for multiple ammo types.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_packs_count_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
3
|
||||
|
||||
iex> get_packs_count_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456},
|
||||
...> true
|
||||
...> )
|
||||
5
|
||||
|
||||
"""
|
||||
@spec get_packs_count_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
@spec get_packs_count_for_types([Type.t()], User.t(), show_used :: boolean()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
def get_packs_count_for_types(types, %User{id: user_id}, show_used \\ false) do
|
||||
type_ids =
|
||||
types
|
||||
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
|
||||
@spec get_packs_count_for_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
@spec get_packs_count_for_types([AmmoType.t()], User.t(), show_used :: boolean()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
def get_packs_count_for_types(ammo_types, %User{id: user_id}, show_used \\ false) do
|
||||
ammo_type_ids =
|
||||
ammo_types
|
||||
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
|
||||
|
||||
from(ag in Pack,
|
||||
as: :ag,
|
||||
where: ag.user_id == ^user_id,
|
||||
where: ag.type_id in ^type_ids,
|
||||
group_by: ag.type_id,
|
||||
select: {ag.type_id, count(ag.id)}
|
||||
where: ag.ammo_type_id in ^ammo_type_ids,
|
||||
group_by: ag.ammo_type_id,
|
||||
select: {ag.ammo_type_id, count(ag.id)}
|
||||
)
|
||||
|> get_packs_count_for_types_maybe_show_used(show_used)
|
||||
|> Repo.all()
|
||||
@ -587,50 +589,50 @@ defmodule Cannery.Ammo do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the count of used packs for a type.
|
||||
Returns the count of used packs for an ammo type.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_used_packs_count_for_type(
|
||||
...> %Type{id: 123, user_id: 456},
|
||||
...> %AmmoType{id: 123, user_id: 456},
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
3
|
||||
|
||||
"""
|
||||
@spec get_used_packs_count_for_type(Type.t(), User.t()) :: non_neg_integer()
|
||||
def get_used_packs_count_for_type(%Type{id: type_id} = type, user) do
|
||||
[type]
|
||||
@spec get_used_packs_count_for_type(AmmoType.t(), User.t()) :: non_neg_integer()
|
||||
def get_used_packs_count_for_type(%AmmoType{id: ammo_type_id} = ammo_type, user) do
|
||||
[ammo_type]
|
||||
|> get_used_packs_count_for_types(user)
|
||||
|> Map.get(type_id, 0)
|
||||
|> Map.get(ammo_type_id, 0)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the count of used packs for multiple types.
|
||||
Returns the count of used packs for multiple ammo types.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_used_packs_count_for_types(
|
||||
...> [%Type{id: 123, user_id: 456}],
|
||||
...> [%AmmoType{id: 123, user_id: 456}],
|
||||
...> %User{id: 456}
|
||||
...> )
|
||||
%{123 => 3}
|
||||
|
||||
"""
|
||||
@spec get_used_packs_count_for_types([Type.t()], User.t()) ::
|
||||
%{optional(Type.id()) => non_neg_integer()}
|
||||
def get_used_packs_count_for_types(types, %User{id: user_id}) do
|
||||
type_ids =
|
||||
types
|
||||
|> Enum.map(fn %Type{id: type_id, user_id: ^user_id} -> type_id end)
|
||||
@spec get_used_packs_count_for_types([AmmoType.t()], User.t()) ::
|
||||
%{optional(AmmoType.id()) => non_neg_integer()}
|
||||
def get_used_packs_count_for_types(ammo_types, %User{id: user_id}) do
|
||||
ammo_type_ids =
|
||||
ammo_types
|
||||
|> Enum.map(fn %AmmoType{id: ammo_type_id, user_id: ^user_id} -> ammo_type_id end)
|
||||
|
||||
Repo.all(
|
||||
from ag in Pack,
|
||||
where: ag.user_id == ^user_id,
|
||||
where: ag.type_id in ^type_ids,
|
||||
where: ag.ammo_type_id in ^ammo_type_ids,
|
||||
where: ag.count == 0,
|
||||
group_by: ag.type_id,
|
||||
select: {ag.type_id, count(ag.id)}
|
||||
group_by: ag.ammo_type_id,
|
||||
select: {ag.ammo_type_id, count(ag.id)}
|
||||
)
|
||||
|> Map.new()
|
||||
end
|
||||
@ -746,18 +748,18 @@ defmodule Cannery.Ammo do
|
||||
[%Pack{notes: "My cool pack"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_packs(search :: String.t() | nil, Type.class() | :all, User.t()) ::
|
||||
@spec list_packs(search :: String.t() | nil, AmmoType.class() | :all, User.t()) ::
|
||||
[Pack.t()]
|
||||
@spec list_packs(
|
||||
search :: nil | String.t(),
|
||||
Type.class() | :all,
|
||||
AmmoType.class() | :all,
|
||||
User.t(),
|
||||
show_used :: boolean()
|
||||
) :: [Pack.t()]
|
||||
def list_packs(search, type, %{id: user_id}, show_used \\ false) do
|
||||
from(ag in Pack,
|
||||
as: :ag,
|
||||
join: at in assoc(ag, :type),
|
||||
join: at in assoc(ag, :ammo_type),
|
||||
as: :at,
|
||||
join: c in Container,
|
||||
on: ag.container_id == c.id,
|
||||
@ -779,7 +781,7 @@ defmodule Cannery.Ammo do
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec list_packs_filter_on_type(Queryable.t(), Type.class() | :all) :: Queryable.t()
|
||||
@spec list_packs_filter_on_type(Queryable.t(), AmmoType.class() | :all) :: Queryable.t()
|
||||
defp list_packs_filter_on_type(query, :rifle),
|
||||
do: query |> where([at: at], at.class == :rifle)
|
||||
|
||||
@ -1061,13 +1063,13 @@ defmodule Cannery.Ammo do
|
||||
end
|
||||
|
||||
defp do_create_packs(
|
||||
%{"type_id" => type_id, "container_id" => container_id} = attrs,
|
||||
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
|
||||
multiplier,
|
||||
user
|
||||
)
|
||||
when multiplier >= 1 and
|
||||
multiplier <= @pack_create_limit and
|
||||
type_id |> is_binary() and
|
||||
ammo_type_id |> is_binary() and
|
||||
container_id |> is_binary() do
|
||||
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
|
||||
|
||||
@ -1075,7 +1077,7 @@ defmodule Cannery.Ammo do
|
||||
Enum.map(1..multiplier, fn _count ->
|
||||
%Pack{}
|
||||
|> Pack.create_changeset(
|
||||
get_type!(type_id, user),
|
||||
get_ammo_type!(ammo_type_id, user),
|
||||
Containers.get_container!(container_id, user),
|
||||
user,
|
||||
attrs
|
||||
@ -1105,15 +1107,15 @@ defmodule Cannery.Ammo do
|
||||
end
|
||||
|
||||
defp do_create_packs(
|
||||
%{"type_id" => type_id, "container_id" => container_id} = attrs,
|
||||
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
|
||||
_multiplier,
|
||||
user
|
||||
)
|
||||
when is_binary(type_id) and is_binary(container_id) do
|
||||
when is_binary(ammo_type_id) and is_binary(container_id) do
|
||||
changeset =
|
||||
%Pack{}
|
||||
|> Pack.create_changeset(
|
||||
get_type!(type_id, user),
|
||||
get_ammo_type!(ammo_type_id, user),
|
||||
Containers.get_container!(container_id, user),
|
||||
user,
|
||||
attrs
|
||||
|
@ -1,4 +1,4 @@
|
||||
defmodule Cannery.Ammo.Type do
|
||||
defmodule Cannery.Ammo.AmmoType do
|
||||
@moduledoc """
|
||||
An ammunition type.
|
||||
|
||||
@ -38,7 +38,7 @@ defmodule Cannery.Ammo.Type do
|
||||
]}
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
@foreign_key_type :binary_id
|
||||
schema "types" do
|
||||
schema "ammo_types" do
|
||||
field :name, :string
|
||||
field :desc, :string
|
||||
|
||||
@ -127,9 +127,9 @@ defmodule Cannery.Ammo.Type do
|
||||
inserted_at: NaiveDateTime.t(),
|
||||
updated_at: NaiveDateTime.t()
|
||||
}
|
||||
@type new_type :: %__MODULE__{}
|
||||
@type new_ammo_type :: %__MODULE__{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_type())
|
||||
@type changeset :: Changeset.t(t() | new_ammo_type())
|
||||
@type class :: :rifle | :shotgun | :pistol | nil
|
||||
|
||||
@spec changeset_fields() :: [atom()]
|
||||
@ -197,10 +197,10 @@ defmodule Cannery.Ammo.Type do
|
||||
]
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(new_type(), User.t(), attrs :: map()) :: changeset()
|
||||
def create_changeset(type, %User{id: user_id}, attrs) do
|
||||
@spec create_changeset(new_ammo_type(), User.t(), attrs :: map()) :: changeset()
|
||||
def create_changeset(ammo_type, %User{id: user_id}, attrs) do
|
||||
changeset =
|
||||
type
|
||||
ammo_type
|
||||
|> change(user_id: user_id)
|
||||
|> cast(attrs, changeset_fields())
|
||||
|
||||
@ -210,10 +210,10 @@ defmodule Cannery.Ammo.Type do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_type(), attrs :: map()) :: changeset()
|
||||
def update_changeset(type, attrs) do
|
||||
@spec update_changeset(t() | new_ammo_type(), attrs :: map()) :: changeset()
|
||||
def update_changeset(ammo_type, attrs) do
|
||||
changeset =
|
||||
type
|
||||
ammo_type
|
||||
|> cast(attrs, changeset_fields())
|
||||
|
||||
string_fields()
|
@ -9,7 +9,7 @@ defmodule Cannery.Ammo.Pack do
|
||||
use Ecto.Schema
|
||||
import CanneryWeb.Gettext
|
||||
import Ecto.Changeset
|
||||
alias Cannery.Ammo.Type
|
||||
alias Cannery.Ammo.AmmoType
|
||||
alias Cannery.{Accounts.User, Containers, Containers.Container}
|
||||
alias Ecto.{Changeset, UUID}
|
||||
|
||||
@ -20,7 +20,7 @@ defmodule Cannery.Ammo.Pack do
|
||||
:notes,
|
||||
:price_paid,
|
||||
:staged,
|
||||
:type_id,
|
||||
:ammo_type_id,
|
||||
:container_id
|
||||
]}
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
@ -32,7 +32,7 @@ defmodule Cannery.Ammo.Pack do
|
||||
field :staged, :boolean, default: false
|
||||
field :purchased_on, :date
|
||||
|
||||
belongs_to :type, Type
|
||||
belongs_to :ammo_type, AmmoType
|
||||
field :container_id, :binary_id
|
||||
field :user_id, :binary_id
|
||||
|
||||
@ -46,8 +46,8 @@ defmodule Cannery.Ammo.Pack do
|
||||
price_paid: float() | nil,
|
||||
staged: boolean(),
|
||||
purchased_on: Date.t(),
|
||||
type: Type.t() | nil,
|
||||
type_id: Type.id(),
|
||||
ammo_type: AmmoType.t() | nil,
|
||||
ammo_type_id: AmmoType.id(),
|
||||
container_id: Container.id(),
|
||||
user_id: User.id(),
|
||||
inserted_at: NaiveDateTime.t(),
|
||||
@ -60,36 +60,36 @@ defmodule Cannery.Ammo.Pack do
|
||||
@doc false
|
||||
@spec create_changeset(
|
||||
new_pack(),
|
||||
Type.t() | nil,
|
||||
AmmoType.t() | nil,
|
||||
Container.t() | nil,
|
||||
User.t(),
|
||||
attrs :: map()
|
||||
) :: changeset()
|
||||
def create_changeset(
|
||||
pack,
|
||||
%Type{id: type_id},
|
||||
%AmmoType{id: ammo_type_id},
|
||||
%Container{id: container_id, user_id: user_id},
|
||||
%User{id: user_id},
|
||||
attrs
|
||||
)
|
||||
when is_binary(type_id) and is_binary(container_id) and is_binary(user_id) do
|
||||
when is_binary(ammo_type_id) and is_binary(container_id) and is_binary(user_id) do
|
||||
pack
|
||||
|> change(type_id: type_id)
|
||||
|> change(ammo_type_id: ammo_type_id)
|
||||
|> change(user_id: user_id)
|
||||
|> change(container_id: container_id)
|
||||
|> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on])
|
||||
|> validate_number(:count, greater_than: 0)
|
||||
|> validate_required([:count, :staged, :purchased_on, :type_id, :container_id, :user_id])
|
||||
|> validate_required([:count, :staged, :purchased_on, :ammo_type_id, :container_id, :user_id])
|
||||
end
|
||||
|
||||
@doc """
|
||||
Invalid changeset, used to prompt user to select type and container
|
||||
Invalid changeset, used to prompt user to select ammo type and container
|
||||
"""
|
||||
def create_changeset(pack, _invalid_type, _invalid_container, _invalid_user, attrs) do
|
||||
def create_changeset(pack, _invalid_ammo_type, _invalid_container, _invalid_user, attrs) do
|
||||
pack
|
||||
|> cast(attrs, [:type_id, :container_id])
|
||||
|> validate_required([:type_id, :container_id])
|
||||
|> add_error(:invalid, dgettext("errors", "Please select a type and container"))
|
||||
|> cast(attrs, [:ammo_type_id, :container_id])
|
||||
|> validate_required([:ammo_type_id, :container_id])
|
||||
|> add_error(:invalid, dgettext("errors", "Please select an ammo type and container"))
|
||||
end
|
||||
|
||||
@doc false
|
||||
|
@ -1,10 +1,10 @@
|
||||
defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
defmodule CanneryWeb.Components.AddShotGroupComponent do
|
||||
@moduledoc """
|
||||
Livecomponent that can create a ShotRecord
|
||||
Livecomponent that can create a ShotGroup
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo.Pack}
|
||||
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo.Pack}
|
||||
alias Ecto.Changeset
|
||||
alias Phoenix.LiveView.{JS, Socket}
|
||||
|
||||
@ -19,8 +19,8 @@ defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{pack: pack, current_user: current_user} = assigns, socket) do
|
||||
changeset =
|
||||
%ShotRecord{date: Date.utc_today()}
|
||||
|> ShotRecord.create_changeset(current_user, pack, %{})
|
||||
%ShotGroup{date: Date.utc_today()}
|
||||
|> ShotGroup.create_changeset(current_user, pack, %{})
|
||||
|
||||
{:ok, socket |> assign(assigns) |> assign(:changeset, changeset)}
|
||||
end
|
||||
@ -28,12 +28,12 @@ defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
@impl true
|
||||
def handle_event(
|
||||
"validate",
|
||||
%{"shot_record" => shot_record_params},
|
||||
%{"shot_group" => shot_group_params},
|
||||
%{assigns: %{pack: pack, current_user: current_user}} = socket
|
||||
) do
|
||||
params = shot_record_params |> process_params(pack)
|
||||
params = shot_group_params |> process_params(pack)
|
||||
|
||||
changeset = %ShotRecord{} |> ShotRecord.create_changeset(current_user, pack, params)
|
||||
changeset = %ShotGroup{} |> ShotGroup.create_changeset(current_user, pack, params)
|
||||
|
||||
changeset =
|
||||
case changeset |> Changeset.apply_action(:validate) do
|
||||
@ -46,17 +46,17 @@ defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
|
||||
def handle_event(
|
||||
"save",
|
||||
%{"shot_record" => shot_record_params},
|
||||
%{"shot_group" => shot_group_params},
|
||||
%{
|
||||
assigns: %{pack: pack, current_user: current_user, return_to: return_to}
|
||||
} = socket
|
||||
) do
|
||||
socket =
|
||||
shot_record_params
|
||||
shot_group_params
|
||||
|> process_params(pack)
|
||||
|> ActivityLog.create_shot_record(current_user, pack)
|
||||
|> ActivityLog.create_shot_group(current_user, pack)
|
||||
|> case do
|
||||
{:ok, _shot_record} ->
|
||||
{:ok, _shot_group} ->
|
||||
prompt = dgettext("prompts", "Shots recorded successfully")
|
||||
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
|
||||
|
||||
@ -69,7 +69,7 @@ defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
|
||||
# calculate count from shots left
|
||||
defp process_params(params, %Pack{count: count}) do
|
||||
shot_record_count =
|
||||
shot_group_count =
|
||||
if params |> Map.get("ammo_left", "") == "" do
|
||||
nil
|
||||
else
|
||||
@ -77,6 +77,6 @@ defmodule CanneryWeb.Components.AddShotRecordComponent do
|
||||
count - new_count
|
||||
end
|
||||
|
||||
params |> Map.put("count", shot_record_count)
|
||||
params |> Map.put("count", shot_group_count)
|
||||
end
|
||||
end
|
@ -6,7 +6,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={@changeset}
|
||||
id="shot-record-form"
|
||||
id="shot-group-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"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
@ -29,7 +29,7 @@
|
||||
<button
|
||||
type="button"
|
||||
class="mx-2 my-1 text-sm btn btn-primary"
|
||||
phx-click={JS.dispatch("cannery:set-zero", to: "#shot-record-form_ammo_left")}
|
||||
phx-click={JS.dispatch("cannery:set-zero", to: "#shot-group-form_ammo_left")}
|
||||
>
|
||||
<%= gettext("Used up!") %>
|
||||
</button>
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :notes,
|
||||
id: "add-shot-record-form-notes",
|
||||
id: "add-shot-group-form-notes",
|
||||
class: "input input-primary col-span-2",
|
||||
maxlength: 255,
|
||||
placeholder: gettext("Really great weather"),
|
@ -1,9 +1,9 @@
|
||||
defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
defmodule CanneryWeb.Components.AmmoTypeTableComponent do
|
||||
@moduledoc """
|
||||
A component that displays a list of types
|
||||
A component that displays a list of ammo type
|
||||
"""
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.Type}
|
||||
alias Cannery.{Accounts.User, ActivityLog, Ammo, Ammo.AmmoType}
|
||||
alias CanneryWeb.Components.TableComponent
|
||||
alias Ecto.UUID
|
||||
alias Phoenix.LiveView.{Rendered, Socket}
|
||||
@ -13,30 +13,30 @@ defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
%{
|
||||
required(:id) => UUID.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:class) => Type.class() | nil,
|
||||
optional(:class) => AmmoType.class() | nil,
|
||||
optional(:show_used) => boolean(),
|
||||
optional(:types) => [Type.t()],
|
||||
optional(:ammo_types) => [AmmoType.t()],
|
||||
optional(:actions) => Rendered.t(),
|
||||
optional(any()) => any()
|
||||
},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{id: _id, types: _types, current_user: _current_user} = assigns, socket) do
|
||||
def update(%{id: _id, ammo_types: _ammo_types, current_user: _current_user} = assigns, socket) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:show_used, fn -> false end)
|
||||
|> assign_new(:class, fn -> :all end)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
|> display_types()
|
||||
|> display_ammo_types()
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
defp display_types(
|
||||
defp display_ammo_types(
|
||||
%{
|
||||
assigns: %{
|
||||
types: types,
|
||||
ammo_types: ammo_types,
|
||||
current_user: current_user,
|
||||
show_used: show_used,
|
||||
class: class,
|
||||
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
# remove columns if all values match defaults
|
||||
default_value = if type == :atom, do: false, else: nil
|
||||
|
||||
types
|
||||
|> Enum.any?(fn type -> Map.get(type, key, default_value) != default_value end)
|
||||
ammo_types
|
||||
|> Enum.any?(fn ammo_type -> Map.get(ammo_type, key, default_value) != default_value end)
|
||||
end)
|
||||
|
||||
columns =
|
||||
@ -152,17 +152,17 @@ defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
)
|
||||
|> TableComponent.maybe_compose_columns(%{label: gettext("Name"), key: :name, type: :name})
|
||||
|
||||
round_counts = types |> Ammo.get_round_count_for_types(current_user)
|
||||
packs_count = types |> Ammo.get_packs_count_for_types(current_user)
|
||||
average_costs = types |> Ammo.get_average_cost_for_types(current_user)
|
||||
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user)
|
||||
packs_count = ammo_types |> Ammo.get_packs_count_for_types(current_user)
|
||||
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user)
|
||||
|
||||
[used_counts, historical_round_counts, historical_pack_counts, used_pack_counts] =
|
||||
if show_used do
|
||||
[
|
||||
types |> ActivityLog.get_used_count_for_types(current_user),
|
||||
types |> Ammo.get_historical_count_for_types(current_user),
|
||||
types |> Ammo.get_packs_count_for_types(current_user, true),
|
||||
types |> Ammo.get_used_packs_count_for_types(current_user)
|
||||
ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user),
|
||||
ammo_types |> Ammo.get_historical_count_for_ammo_types(current_user),
|
||||
ammo_types |> Ammo.get_packs_count_for_types(current_user, true),
|
||||
ammo_types |> Ammo.get_used_packs_count_for_types(current_user)
|
||||
]
|
||||
else
|
||||
[nil, nil, nil, nil]
|
||||
@ -181,9 +181,9 @@ defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
}
|
||||
|
||||
rows =
|
||||
types
|
||||
|> Enum.map(fn type ->
|
||||
type |> get_type_values(columns, extra_data)
|
||||
ammo_types
|
||||
|> Enum.map(fn ammo_type ->
|
||||
ammo_type |> get_ammo_type_values(columns, extra_data)
|
||||
end)
|
||||
|
||||
socket |> assign(columns: columns, rows: rows)
|
||||
@ -198,92 +198,92 @@ defmodule CanneryWeb.Components.TypeTableComponent do
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_type_values(type, columns, extra_data) do
|
||||
defp get_ammo_type_values(ammo_type, columns, extra_data) do
|
||||
columns
|
||||
|> Map.new(fn %{key: key, type: column_type} ->
|
||||
{key, get_type_value(column_type, key, type, extra_data)}
|
||||
|> Map.new(fn %{key: key, type: type} ->
|
||||
{key, get_ammo_type_value(type, key, ammo_type, extra_data)}
|
||||
end)
|
||||
end
|
||||
|
||||
defp get_type_value(:atom, key, type, _other_data),
|
||||
do: type |> Map.get(key) |> humanize()
|
||||
defp get_ammo_type_value(:atom, key, ammo_type, _other_data),
|
||||
do: ammo_type |> Map.get(key) |> humanize()
|
||||
|
||||
defp get_type_value(:round_count, _key, %{id: type_id}, %{round_counts: round_counts}),
|
||||
do: Map.get(round_counts, type_id, 0)
|
||||
defp get_ammo_type_value(:round_count, _key, %{id: ammo_type_id}, %{round_counts: round_counts}),
|
||||
do: Map.get(round_counts, ammo_type_id, 0)
|
||||
|
||||
defp get_type_value(
|
||||
defp get_ammo_type_value(
|
||||
:historical_round_count,
|
||||
_key,
|
||||
%{id: type_id},
|
||||
%{id: ammo_type_id},
|
||||
%{historical_round_counts: historical_round_counts}
|
||||
) do
|
||||
Map.get(historical_round_counts, type_id, 0)
|
||||
Map.get(historical_round_counts, ammo_type_id, 0)
|
||||
end
|
||||
|
||||
defp get_type_value(
|
||||
defp get_ammo_type_value(
|
||||
:used_round_count,
|
||||
_key,
|
||||
%{id: type_id},
|
||||
%{id: ammo_type_id},
|
||||
%{used_counts: used_counts}
|
||||
) do
|
||||
Map.get(used_counts, type_id, 0)
|
||||
Map.get(used_counts, ammo_type_id, 0)
|
||||
end
|
||||
|
||||
defp get_type_value(
|
||||
defp get_ammo_type_value(
|
||||
:historical_pack_count,
|
||||
_key,
|
||||
%{id: type_id},
|
||||
%{id: ammo_type_id},
|
||||
%{historical_pack_counts: historical_pack_counts}
|
||||
) do
|
||||
Map.get(historical_pack_counts, type_id, 0)
|
||||
Map.get(historical_pack_counts, ammo_type_id, 0)
|
||||
end
|
||||
|
||||
defp get_type_value(
|
||||
defp get_ammo_type_value(
|
||||
:used_pack_count,
|
||||
_key,
|
||||
%{id: type_id},
|
||||
%{id: ammo_type_id},
|
||||
%{used_pack_counts: used_pack_counts}
|
||||
) do
|
||||
Map.get(used_pack_counts, type_id, 0)
|
||||
Map.get(used_pack_counts, ammo_type_id, 0)
|
||||
end
|
||||
|
||||
defp get_type_value(:ammo_count, _key, %{id: type_id}, %{packs_count: packs_count}),
|
||||
do: Map.get(packs_count, type_id)
|
||||
defp get_ammo_type_value(:ammo_count, _key, %{id: ammo_type_id}, %{packs_count: packs_count}),
|
||||
do: Map.get(packs_count, ammo_type_id)
|
||||
|
||||
defp get_type_value(
|
||||
defp get_ammo_type_value(
|
||||
:avg_price_paid,
|
||||
_key,
|
||||
%{id: type_id},
|
||||
%{id: ammo_type_id},
|
||||
%{average_costs: average_costs}
|
||||
) do
|
||||
case Map.get(average_costs, type_id) do
|
||||
case Map.get(average_costs, ammo_type_id) do
|
||||
nil -> {0, gettext("No cost information")}
|
||||
count -> {count, gettext("$%{amount}", amount: display_currency(count))}
|
||||
end
|
||||
end
|
||||
|
||||
defp get_type_value(:name, _key, %{name: type_name} = type, _other_data) do
|
||||
assigns = %{type: type}
|
||||
defp get_ammo_type_value(:name, _key, %{name: ammo_type_name} = ammo_type, _other_data) do
|
||||
assigns = %{ammo_type: ammo_type}
|
||||
|
||||
{type_name,
|
||||
{ammo_type_name,
|
||||
~H"""
|
||||
<.link navigate={Routes.type_show_path(Endpoint, :show, @type)} class="link">
|
||||
<%= @type.name %>
|
||||
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)} class="link">
|
||||
<%= @ammo_type.name %>
|
||||
</.link>
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_type_value(:actions, _key, type, %{actions: actions}) do
|
||||
assigns = %{actions: actions, type: type}
|
||||
defp get_ammo_type_value(:actions, _key, ammo_type, %{actions: actions}) do
|
||||
assigns = %{actions: actions, ammo_type: ammo_type}
|
||||
|
||||
~H"""
|
||||
<%= render_slot(@actions, @type) %>
|
||||
<%= render_slot(@actions, @ammo_type) %>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_type_value(nil, _key, _type, _other_data), do: nil
|
||||
defp get_ammo_type_value(nil, _key, _ammo_type, _other_data), do: nil
|
||||
|
||||
defp get_type_value(_other, key, type, _other_data), do: type |> Map.get(key)
|
||||
defp get_ammo_type_value(_other, key, ammo_type, _other_data), do: ammo_type |> Map.get(key)
|
||||
|
||||
@spec display_currency(float()) :: String.t()
|
||||
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)
|
@ -7,7 +7,7 @@
|
||||
>
|
||||
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="mb-2 link">
|
||||
<h1 class="title text-xl title-primary-500">
|
||||
<%= @pack.type.name %>
|
||||
<%= @pack.ammo_type.name %>
|
||||
</h1>
|
||||
</.link>
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
</li>
|
||||
<li class="mx-2 my-1">
|
||||
<.link
|
||||
navigate={Routes.type_index_path(Endpoint, :index)}
|
||||
navigate={Routes.ammo_type_index_path(Endpoint, :index)}
|
||||
class="text-white hover:underline"
|
||||
>
|
||||
<%= gettext("Catalog") %>
|
||||
|
@ -16,7 +16,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
required(:current_user) => User.t(),
|
||||
required(:packs) => [Pack.t()],
|
||||
required(:show_used) => boolean(),
|
||||
optional(:type) => Rendered.t(),
|
||||
optional(:ammo_type) => Rendered.t(),
|
||||
optional(:range) => Rendered.t(),
|
||||
optional(:container) => Rendered.t(),
|
||||
optional(:actions) => Rendered.t(),
|
||||
@ -31,7 +31,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:type, fn -> [] end)
|
||||
|> assign_new(:ammo_type, fn -> [] end)
|
||||
|> assign_new(:range, fn -> [] end)
|
||||
|> assign_new(:container, fn -> [] end)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
@ -45,7 +45,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
assigns: %{
|
||||
packs: packs,
|
||||
current_user: current_user,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
range: range,
|
||||
container: container,
|
||||
actions: actions,
|
||||
@ -92,8 +92,8 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
key: :count
|
||||
})
|
||||
|> TableComponent.maybe_compose_columns(
|
||||
%{label: gettext("Type"), key: :type},
|
||||
type != []
|
||||
%{label: gettext("Ammo type"), key: :ammo_type},
|
||||
ammo_type != []
|
||||
)
|
||||
|
||||
containers =
|
||||
@ -103,7 +103,7 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
|
||||
extra_data = %{
|
||||
current_user: current_user,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
columns: columns,
|
||||
container: container,
|
||||
containers: containers,
|
||||
@ -144,15 +144,15 @@ defmodule CanneryWeb.Components.PackTableComponent do
|
||||
@spec get_value_for_key(atom(), Pack.t(), additional_data :: map()) ::
|
||||
any() | {any(), Rendered.t()}
|
||||
defp get_value_for_key(
|
||||
:type,
|
||||
%{type: %{name: type_name} = type},
|
||||
%{type: type_block}
|
||||
:ammo_type,
|
||||
%{ammo_type: %{name: ammo_type_name} = ammo_type},
|
||||
%{ammo_type: ammo_type_block}
|
||||
) do
|
||||
assigns = %{type: type, type_block: type_block}
|
||||
assigns = %{ammo_type: ammo_type, ammo_type_block: ammo_type_block}
|
||||
|
||||
{type_name,
|
||||
{ammo_type_name,
|
||||
~H"""
|
||||
<%= render_slot(@type_block, @type) %>
|
||||
<%= render_slot(@ammo_type_block, @ammo_type) %>
|
||||
"""}
|
||||
end
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
defmodule CanneryWeb.Components.ShotRecordTableComponent do
|
||||
defmodule CanneryWeb.Components.ShotGroupTableComponent do
|
||||
@moduledoc """
|
||||
A component that displays a list of shot records
|
||||
A component that displays a list of shot groups
|
||||
"""
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotRecord, Ammo, ComparableDate}
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo, ComparableDate}
|
||||
alias Ecto.UUID
|
||||
alias Phoenix.LiveView.{Rendered, Socket}
|
||||
|
||||
@ -12,29 +12,26 @@ defmodule CanneryWeb.Components.ShotRecordTableComponent do
|
||||
%{
|
||||
required(:id) => UUID.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:shot_records) => [ShotRecord.t()],
|
||||
optional(:shot_groups) => [ShotGroup.t()],
|
||||
optional(:actions) => Rendered.t(),
|
||||
optional(any()) => any()
|
||||
},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(
|
||||
%{id: _id, shot_records: _shot_records, current_user: _current_user} = assigns,
|
||||
socket
|
||||
) do
|
||||
def update(%{id: _id, shot_groups: _shot_groups, current_user: _current_user} = assigns, socket) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
|> display_shot_records()
|
||||
|> display_shot_groups()
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
defp display_shot_records(
|
||||
defp display_shot_groups(
|
||||
%{
|
||||
assigns: %{
|
||||
shot_records: shot_records,
|
||||
shot_groups: shot_groups,
|
||||
current_user: current_user,
|
||||
actions: actions
|
||||
}
|
||||
@ -49,16 +46,16 @@ defmodule CanneryWeb.Components.ShotRecordTableComponent do
|
||||
]
|
||||
|
||||
packs =
|
||||
shot_records
|
||||
shot_groups
|
||||
|> Enum.map(fn %{pack_id: pack_id} -> pack_id end)
|
||||
|> Ammo.get_packs(current_user)
|
||||
|
||||
extra_data = %{current_user: current_user, actions: actions, packs: packs}
|
||||
|
||||
rows =
|
||||
shot_records
|
||||
|> Enum.map(fn shot_record ->
|
||||
shot_record |> get_row_data_for_shot_record(columns, extra_data)
|
||||
shot_groups
|
||||
|> Enum.map(fn shot_group ->
|
||||
shot_group |> get_row_data_for_shot_group(columns, extra_data)
|
||||
end)
|
||||
|
||||
socket
|
||||
@ -84,22 +81,22 @@ defmodule CanneryWeb.Components.ShotRecordTableComponent do
|
||||
"""
|
||||
end
|
||||
|
||||
@spec get_row_data_for_shot_record(ShotRecord.t(), columns :: [map()], extra_data :: map()) ::
|
||||
@spec get_row_data_for_shot_group(ShotGroup.t(), columns :: [map()], extra_data :: map()) ::
|
||||
map()
|
||||
defp get_row_data_for_shot_record(shot_record, columns, extra_data) do
|
||||
defp get_row_data_for_shot_group(shot_group, columns, extra_data) do
|
||||
columns
|
||||
|> Map.new(fn %{key: key} ->
|
||||
{key, get_row_value(key, shot_record, extra_data)}
|
||||
{key, get_row_value(key, shot_group, extra_data)}
|
||||
end)
|
||||
end
|
||||
|
||||
defp get_row_value(:name, %{pack_id: pack_id}, %{packs: packs}) do
|
||||
assigns = %{pack: pack = Map.fetch!(packs, pack_id)}
|
||||
|
||||
{pack.type.name,
|
||||
{pack.ammo_type.name,
|
||||
~H"""
|
||||
<.link navigate={Routes.pack_show_path(Endpoint, :show, @pack)} class="link">
|
||||
<%= @pack.type.name %>
|
||||
<%= @pack.ammo_type.name %>
|
||||
</.link>
|
||||
"""}
|
||||
end
|
||||
@ -111,13 +108,13 @@ defmodule CanneryWeb.Components.ShotRecordTableComponent do
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_row_value(:actions, shot_record, %{actions: actions}) do
|
||||
assigns = %{actions: actions, shot_record: shot_record}
|
||||
defp get_row_value(:actions, shot_group, %{actions: actions}) do
|
||||
assigns = %{actions: actions, shot_group: shot_group}
|
||||
|
||||
~H"""
|
||||
<%= render_slot(@actions, @shot_record) %>
|
||||
<%= render_slot(@actions, @shot_group) %>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_row_value(key, shot_record, _extra_data), do: shot_record |> Map.get(key)
|
||||
defp get_row_value(key, shot_group, _extra_data), do: shot_group |> Map.get(key)
|
||||
end
|
@ -3,27 +3,27 @@ defmodule CanneryWeb.ExportController do
|
||||
alias Cannery.{ActivityLog, Ammo, Containers}
|
||||
|
||||
def export(%{assigns: %{current_user: current_user}} = conn, %{"mode" => "json"}) do
|
||||
types = Ammo.list_types(current_user, :all)
|
||||
used_counts = types |> ActivityLog.get_used_count_for_types(current_user)
|
||||
round_counts = types |> Ammo.get_round_count_for_types(current_user)
|
||||
pack_counts = types |> Ammo.get_packs_count_for_types(current_user)
|
||||
ammo_types = Ammo.list_ammo_types(current_user, :all)
|
||||
used_counts = ammo_types |> ActivityLog.get_used_count_for_ammo_types(current_user)
|
||||
round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user)
|
||||
pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user)
|
||||
|
||||
total_pack_counts = types |> Ammo.get_packs_count_for_types(current_user, true)
|
||||
total_pack_counts = ammo_types |> Ammo.get_packs_count_for_types(current_user, true)
|
||||
|
||||
average_costs = types |> Ammo.get_average_cost_for_types(current_user)
|
||||
average_costs = ammo_types |> Ammo.get_average_cost_for_ammo_types(current_user)
|
||||
|
||||
types =
|
||||
types
|
||||
|> Enum.map(fn %{id: type_id} = type ->
|
||||
type
|
||||
ammo_types =
|
||||
ammo_types
|
||||
|> Enum.map(fn %{id: ammo_type_id} = ammo_type ->
|
||||
ammo_type
|
||||
|> Jason.encode!()
|
||||
|> Jason.decode!()
|
||||
|> Map.merge(%{
|
||||
"average_cost" => Map.get(average_costs, type_id),
|
||||
"round_count" => Map.get(round_counts, type_id, 0),
|
||||
"used_count" => Map.get(used_counts, type_id, 0),
|
||||
"pack_count" => Map.get(pack_counts, type_id, 0),
|
||||
"total_pack_count" => Map.get(total_pack_counts, type_id, 0)
|
||||
"average_cost" => Map.get(average_costs, ammo_type_id),
|
||||
"round_count" => Map.get(round_counts, ammo_type_id, 0),
|
||||
"used_count" => Map.get(used_counts, ammo_type_id, 0),
|
||||
"pack_count" => Map.get(pack_counts, ammo_type_id, 0),
|
||||
"total_pack_count" => Map.get(total_pack_counts, ammo_type_id, 0)
|
||||
})
|
||||
end)
|
||||
|
||||
@ -47,7 +47,7 @@ defmodule CanneryWeb.ExportController do
|
||||
})
|
||||
end)
|
||||
|
||||
shot_records = ActivityLog.list_shot_records(:all, current_user)
|
||||
shot_groups = ActivityLog.list_shot_groups(:all, current_user)
|
||||
|
||||
containers =
|
||||
Containers.list_containers(current_user)
|
||||
@ -66,9 +66,9 @@ defmodule CanneryWeb.ExportController do
|
||||
|
||||
json(conn, %{
|
||||
user: current_user,
|
||||
types: types,
|
||||
ammo_types: ammo_types,
|
||||
packs: packs,
|
||||
shot_records: shot_records,
|
||||
shot_groups: shot_groups,
|
||||
containers: containers
|
||||
})
|
||||
end
|
||||
|
@ -1,16 +1,16 @@
|
||||
defmodule CanneryWeb.TypeLive.FormComponent do
|
||||
defmodule CanneryWeb.AmmoTypeLive.FormComponent do
|
||||
@moduledoc """
|
||||
Livecomponent that can update or create an Cannery.Ammo.Type
|
||||
Livecomponent that can update or create an Cannery.Ammo.AmmoType
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, Ammo, Ammo.Type}
|
||||
alias Cannery.{Accounts.User, Ammo, Ammo.AmmoType}
|
||||
alias Ecto.Changeset
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{:type => Type.t(), :current_user => User.t(), optional(any) => any},
|
||||
%{:ammo_type => AmmoType.t(), :current_user => User.t(), optional(any) => any},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{current_user: _current_user} = assigns, socket) do
|
||||
@ -18,21 +18,21 @@ defmodule CanneryWeb.TypeLive.FormComponent do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("validate", %{"type" => type_params}, socket) do
|
||||
{:noreply, socket |> assign_changeset(type_params)}
|
||||
def handle_event("validate", %{"ammo_type" => ammo_type_params}, socket) do
|
||||
{:noreply, socket |> assign_changeset(ammo_type_params)}
|
||||
end
|
||||
|
||||
def handle_event(
|
||||
"save",
|
||||
%{"type" => type_params},
|
||||
%{"ammo_type" => ammo_type_params},
|
||||
%{assigns: %{action: action}} = socket
|
||||
) do
|
||||
save_type(socket, action, type_params)
|
||||
save_ammo_type(socket, action, ammo_type_params)
|
||||
end
|
||||
|
||||
defp assign_changeset(
|
||||
%{assigns: %{action: action, type: type, current_user: user}} = socket,
|
||||
type_params
|
||||
%{assigns: %{action: action, ammo_type: ammo_type, current_user: user}} = socket,
|
||||
ammo_type_params
|
||||
) do
|
||||
changeset_action =
|
||||
case action do
|
||||
@ -43,10 +43,10 @@ defmodule CanneryWeb.TypeLive.FormComponent do
|
||||
changeset =
|
||||
case action do
|
||||
create when create in [:new, :clone] ->
|
||||
type |> Type.create_changeset(user, type_params)
|
||||
ammo_type |> AmmoType.create_changeset(user, ammo_type_params)
|
||||
|
||||
:edit ->
|
||||
type |> Type.update_changeset(type_params)
|
||||
ammo_type |> AmmoType.update_changeset(ammo_type_params)
|
||||
end
|
||||
|
||||
changeset =
|
||||
@ -58,15 +58,16 @@ defmodule CanneryWeb.TypeLive.FormComponent do
|
||||
socket |> assign(changeset: changeset)
|
||||
end
|
||||
|
||||
defp save_type(
|
||||
%{assigns: %{type: type, current_user: current_user, return_to: return_to}} = socket,
|
||||
defp save_ammo_type(
|
||||
%{assigns: %{ammo_type: ammo_type, current_user: current_user, return_to: return_to}} =
|
||||
socket,
|
||||
:edit,
|
||||
type_params
|
||||
ammo_type_params
|
||||
) do
|
||||
socket =
|
||||
case Ammo.update_type(type, type_params, current_user) do
|
||||
{:ok, %{name: type_name}} ->
|
||||
prompt = dgettext("prompts", "%{name} updated successfully", name: type_name)
|
||||
case Ammo.update_ammo_type(ammo_type, ammo_type_params, current_user) do
|
||||
{:ok, %{name: ammo_type_name}} ->
|
||||
prompt = dgettext("prompts", "%{name} updated successfully", name: ammo_type_name)
|
||||
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
|
||||
|
||||
{:error, %Changeset{} = changeset} ->
|
||||
@ -76,16 +77,16 @@ defmodule CanneryWeb.TypeLive.FormComponent do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
defp save_type(
|
||||
defp save_ammo_type(
|
||||
%{assigns: %{current_user: current_user, return_to: return_to}} = socket,
|
||||
action,
|
||||
type_params
|
||||
ammo_type_params
|
||||
)
|
||||
when action in [:new, :clone] do
|
||||
socket =
|
||||
case Ammo.create_type(type_params, current_user) do
|
||||
{:ok, %{name: type_name}} ->
|
||||
prompt = dgettext("prompts", "%{name} created successfully", name: type_name)
|
||||
case Ammo.create_ammo_type(ammo_type_params, current_user) do
|
||||
{:ok, %{name: ammo_type_name}} ->
|
||||
prompt = dgettext("prompts", "%{name} created successfully", name: ammo_type_name)
|
||||
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
|
||||
|
||||
{:error, %Changeset{} = changeset} ->
|
@ -5,7 +5,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={@changeset}
|
||||
id="type-form"
|
||||
id="ammo_type-form"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
phx-submit="save"
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :desc,
|
||||
id: "type-form-desc",
|
||||
id: "ammo-type-form-desc",
|
||||
class: "text-center col-span-2 input input-primary",
|
||||
phx_hook: "MaintainAttrs",
|
||||
phx_update: "ignore"
|
@ -1,18 +1,18 @@
|
||||
defmodule CanneryWeb.TypeLive.Index do
|
||||
defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
@moduledoc """
|
||||
Liveview for showing a Cannery.Ammo.Type index
|
||||
Liveview for showing a Cannery.Ammo.AmmoType index
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
alias Cannery.{Ammo, Ammo.Type}
|
||||
alias Cannery.{Ammo, Ammo.AmmoType}
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_types()}
|
||||
{:ok, socket |> assign(class: :all, show_used: false, search: search) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_types()}
|
||||
{:ok, socket |> assign(class: :all, show_used: false, search: nil) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -21,28 +21,28 @@ defmodule CanneryWeb.TypeLive.Index do
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
%{name: type_name} = type = Ammo.get_type!(id, current_user)
|
||||
%{name: ammo_type_name} = ammo_type = Ammo.get_ammo_type!(id, current_user)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit %{type_name}", type_name: type_name),
|
||||
type: type
|
||||
page_title: gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name),
|
||||
ammo_type: ammo_type
|
||||
)
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Type"),
|
||||
type: %{Ammo.get_type!(id, current_user) | id: nil}
|
||||
page_title: gettext("New Ammo type"),
|
||||
ammo_type: %{Ammo.get_ammo_type!(id, current_user) | id: nil}
|
||||
)
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Type"),
|
||||
type: %Type{}
|
||||
page_title: gettext("New Ammo type"),
|
||||
ammo_type: %AmmoType{}
|
||||
)
|
||||
end
|
||||
|
||||
@ -51,9 +51,9 @@ defmodule CanneryWeb.TypeLive.Index do
|
||||
|> assign(
|
||||
page_title: gettext("Catalog"),
|
||||
search: nil,
|
||||
type: nil
|
||||
ammo_type: nil
|
||||
)
|
||||
|> list_types()
|
||||
|> list_ammo_types()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
@ -61,54 +61,54 @@ defmodule CanneryWeb.TypeLive.Index do
|
||||
|> assign(
|
||||
page_title: gettext("Catalog"),
|
||||
search: search,
|
||||
type: nil
|
||||
ammo_type: nil
|
||||
)
|
||||
|> list_types()
|
||||
|> list_ammo_types()
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
|
||||
%{name: name} = Ammo.get_type!(id, current_user) |> Ammo.delete_type!(current_user)
|
||||
%{name: name} = Ammo.get_ammo_type!(id, current_user) |> Ammo.delete_ammo_type!(current_user)
|
||||
prompt = dgettext("prompts", "%{name} deleted succesfully", name: name)
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> list_types()}
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> list_types()}
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.type_index_path(Endpoint, :index))}
|
||||
{:noreply, socket |> push_patch(to: Routes.ammo_type_index_path(Endpoint, :index))}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
search_path = Routes.type_index_path(Endpoint, :search, search_term)
|
||||
search_path = Routes.ammo_type_index_path(Endpoint, :search, search_term)
|
||||
{:noreply, socket |> push_patch(to: search_path)}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> list_types()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> list_types()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> list_types()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> list_types()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
defp list_types(
|
||||
defp list_ammo_types(
|
||||
%{assigns: %{class: class, search: search, current_user: current_user}} = socket
|
||||
) do
|
||||
socket
|
||||
|> assign(
|
||||
types: Ammo.list_types(search, current_user, class),
|
||||
types_count: Ammo.get_types_count!(current_user)
|
||||
ammo_types: Ammo.list_ammo_types(search, current_user, class),
|
||||
ammo_types_count: Ammo.get_ammo_types_count!(current_user)
|
||||
)
|
||||
end
|
||||
end
|
@ -3,25 +3,25 @@
|
||||
<%= gettext("Catalog") %>
|
||||
</h1>
|
||||
|
||||
<%= if @types_count == 0 do %>
|
||||
<%= if @ammo_types_count == 0 do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Types") %>
|
||||
<%= gettext("No Ammo types") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
|
||||
<.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Add your first type!") %>
|
||||
</.link>
|
||||
<% else %>
|
||||
<.link patch={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "New Type") %>
|
||||
<.link patch={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "New Ammo type") %>
|
||||
</.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">
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:type}
|
||||
as={:ammo_type}
|
||||
phx-change="change_class"
|
||||
phx-submit="change_class"
|
||||
class="flex items-center"
|
||||
@ -66,43 +66,49 @@
|
||||
</.toggle_button>
|
||||
</div>
|
||||
|
||||
<%= if @types |> Enum.empty?() do %>
|
||||
<%= if @ammo_types |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Types") %>
|
||||
<%= gettext("No Ammo types") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TypeTableComponent}
|
||||
id="types_index_table"
|
||||
module={CanneryWeb.Components.AmmoTypeTableComponent}
|
||||
id="ammo_types_index_table"
|
||||
action={@live_action}
|
||||
types={@types}
|
||||
ammo_types={@ammo_types}
|
||||
current_user={@current_user}
|
||||
show_used={@show_used}
|
||||
class={@class}
|
||||
>
|
||||
<:actions :let={type}>
|
||||
<:actions :let={ammo_type}>
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
navigate={Routes.type_show_path(Endpoint, :show, type)}
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={dgettext("actions", "View %{type_name}", type_name: type.name)}
|
||||
aria-label={
|
||||
dgettext("actions", "View %{ammo_type_name}", ammo_type_name: ammo_type.name)
|
||||
}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-eye"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.type_index_path(Endpoint, :edit, type)}
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :edit, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={dgettext("actions", "Edit %{type_name}", type_name: type.name)}
|
||||
aria-label={
|
||||
dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)
|
||||
}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.type_index_path(Endpoint, :clone, type)}
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :clone, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={dgettext("actions", "Clone %{type_name}", type_name: type.name)}
|
||||
aria-label={
|
||||
dgettext("actions", "Clone %{ammo_type_name}", ammo_type_name: ammo_type.name)
|
||||
}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-copy"></i>
|
||||
</.link>
|
||||
@ -111,15 +117,17 @@
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={type.id}
|
||||
phx-value-id={ammo_type.id}
|
||||
data-confirm={
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
|
||||
name: type.name
|
||||
name: ammo_type.name
|
||||
)
|
||||
}
|
||||
aria-label={dgettext("actions", "Delete %{type_name}", type_name: type.name)}
|
||||
aria-label={
|
||||
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: ammo_type.name)
|
||||
}
|
||||
>
|
||||
<i class="fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
@ -132,15 +140,15 @@
|
||||
|
||||
<.modal
|
||||
:if={@live_action in [:new, :edit, :clone]}
|
||||
return_to={Routes.type_index_path(Endpoint, :index)}
|
||||
return_to={Routes.ammo_type_index_path(Endpoint, :index)}
|
||||
>
|
||||
<.live_component
|
||||
module={CanneryWeb.TypeLive.FormComponent}
|
||||
id={@type.id || :new}
|
||||
module={CanneryWeb.AmmoTypeLive.FormComponent}
|
||||
id={@ammo_type.id || :new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
type={@type}
|
||||
return_to={Routes.type_index_path(Endpoint, :index)}
|
||||
ammo_type={@ammo_type}
|
||||
return_to={Routes.ammo_type_index_path(Endpoint, :index)}
|
||||
current_user={@current_user}
|
||||
}
|
||||
/>
|
@ -1,10 +1,10 @@
|
||||
defmodule CanneryWeb.TypeLive.Show do
|
||||
defmodule CanneryWeb.AmmoTypeLive.Show do
|
||||
@moduledoc """
|
||||
Liveview for showing and editing an Cannery.Ammo.Type
|
||||
Liveview for showing and editing an Cannery.Ammo.AmmoType
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
alias Cannery.{ActivityLog, Ammo, Ammo.Type, Containers}
|
||||
alias Cannery.{ActivityLog, Ammo, Ammo.AmmoType, Containers}
|
||||
alias CanneryWeb.Endpoint
|
||||
|
||||
@impl true
|
||||
@ -13,49 +13,49 @@ defmodule CanneryWeb.TypeLive.Show do
|
||||
|
||||
@impl true
|
||||
def handle_params(%{"id" => id}, _params, socket) do
|
||||
{:noreply, socket |> display_type(id)}
|
||||
{:noreply, socket |> display_ammo_type(id)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
"delete",
|
||||
_params,
|
||||
%{assigns: %{type: type, current_user: current_user}} = socket
|
||||
%{assigns: %{ammo_type: ammo_type, current_user: current_user}} = socket
|
||||
) do
|
||||
%{name: type_name} = type |> Ammo.delete_type!(current_user)
|
||||
%{name: ammo_type_name} = ammo_type |> Ammo.delete_ammo_type!(current_user)
|
||||
|
||||
prompt = dgettext("prompts", "%{name} deleted succesfully", name: type_name)
|
||||
redirect_to = Routes.type_index_path(socket, :index)
|
||||
prompt = dgettext("prompts", "%{name} deleted succesfully", name: ammo_type_name)
|
||||
redirect_to = Routes.ammo_type_index_path(socket, :index)
|
||||
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> push_navigate(to: redirect_to)}
|
||||
end
|
||||
|
||||
def handle_event("toggle_show_used", _params, %{assigns: %{show_used: show_used}} = socket) do
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> display_type()}
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> display_ammo_type()}
|
||||
end
|
||||
|
||||
def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do
|
||||
{:noreply, socket |> assign(:view_table, !view_table)}
|
||||
end
|
||||
|
||||
defp display_type(
|
||||
defp display_ammo_type(
|
||||
%{assigns: %{live_action: live_action, current_user: current_user, show_used: show_used}} =
|
||||
socket,
|
||||
%Type{name: type_name} = type
|
||||
%AmmoType{name: ammo_type_name} = ammo_type
|
||||
) do
|
||||
custom_fields? =
|
||||
fields_to_display(type)
|
||||
|> Enum.any?(fn %{key: field, type: column_type} ->
|
||||
fields_to_display(ammo_type)
|
||||
|> Enum.any?(fn %{key: field, type: type} ->
|
||||
default_value =
|
||||
case column_type do
|
||||
case type do
|
||||
:boolean -> false
|
||||
_other_type -> nil
|
||||
end
|
||||
|
||||
type |> Map.get(field) != default_value
|
||||
ammo_type |> Map.get(field) != default_value
|
||||
end)
|
||||
|
||||
packs = type |> Ammo.list_packs_for_type(current_user, show_used)
|
||||
packs = ammo_type |> Ammo.list_packs_for_type(current_user, show_used)
|
||||
|
||||
[
|
||||
original_counts,
|
||||
@ -67,10 +67,10 @@ defmodule CanneryWeb.TypeLive.Show do
|
||||
if show_used do
|
||||
[
|
||||
packs |> Ammo.get_original_counts(current_user),
|
||||
type |> Ammo.get_used_packs_count_for_type(current_user),
|
||||
type |> Ammo.get_packs_count_for_type(current_user, true),
|
||||
type |> ActivityLog.get_used_count_for_type(current_user),
|
||||
type |> Ammo.get_historical_count_for_type(current_user)
|
||||
ammo_type |> Ammo.get_used_packs_count_for_type(current_user),
|
||||
ammo_type |> Ammo.get_packs_count_for_type(current_user, true),
|
||||
ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user),
|
||||
ammo_type |> Ammo.get_historical_count_for_ammo_type(current_user)
|
||||
]
|
||||
else
|
||||
[nil, nil, nil, nil, nil]
|
||||
@ -78,8 +78,8 @@ defmodule CanneryWeb.TypeLive.Show do
|
||||
|
||||
page_title =
|
||||
case live_action do
|
||||
:show -> type_name
|
||||
:edit -> gettext("Edit %{type_name}", type_name: type_name)
|
||||
:show -> ammo_type_name
|
||||
:edit -> gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name)
|
||||
end
|
||||
|
||||
containers =
|
||||
@ -90,33 +90,33 @@ defmodule CanneryWeb.TypeLive.Show do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: page_title,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
packs: packs,
|
||||
containers: containers,
|
||||
cprs: packs |> Ammo.get_cprs(current_user),
|
||||
last_used_dates: packs |> ActivityLog.get_last_used_dates(current_user),
|
||||
avg_cost_per_round: type |> Ammo.get_average_cost_for_type(current_user),
|
||||
rounds: type |> Ammo.get_round_count_for_type(current_user),
|
||||
avg_cost_per_round: ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user),
|
||||
rounds: ammo_type |> Ammo.get_round_count_for_ammo_type(current_user),
|
||||
original_counts: original_counts,
|
||||
used_rounds: used_rounds,
|
||||
historical_round_count: historical_round_count,
|
||||
packs_count: type |> Ammo.get_packs_count_for_type(current_user),
|
||||
packs_count: ammo_type |> Ammo.get_packs_count_for_type(current_user),
|
||||
used_packs_count: used_packs_count,
|
||||
historical_packs_count: historical_packs_count,
|
||||
fields_to_display: fields_to_display(type),
|
||||
fields_to_display: fields_to_display(ammo_type),
|
||||
custom_fields?: custom_fields?
|
||||
)
|
||||
end
|
||||
|
||||
defp display_type(%{assigns: %{current_user: current_user}} = socket, type_id) do
|
||||
socket |> display_type(Ammo.get_type!(type_id, current_user))
|
||||
defp display_ammo_type(%{assigns: %{current_user: current_user}} = socket, ammo_type_id) do
|
||||
socket |> display_ammo_type(Ammo.get_ammo_type!(ammo_type_id, current_user))
|
||||
end
|
||||
|
||||
defp display_type(%{assigns: %{type: type}} = socket) do
|
||||
socket |> display_type(type)
|
||||
defp display_ammo_type(%{assigns: %{ammo_type: ammo_type}} = socket) do
|
||||
socket |> display_ammo_type(ammo_type)
|
||||
end
|
||||
|
||||
defp fields_to_display(%Type{class: class}) do
|
||||
defp fields_to_display(%AmmoType{class: class}) do
|
||||
[
|
||||
%{label: gettext("Cartridge:"), key: :cartridge, type: :string},
|
||||
%{
|
@ -1,22 +1,22 @@
|
||||
<div class="space-y-4 flex flex-col justify-center items-center">
|
||||
<h1 class="title text-2xl title-primary-500">
|
||||
<%= @type.name %>
|
||||
<%= @ammo_type.name %>
|
||||
</h1>
|
||||
|
||||
<span
|
||||
:if={@type.desc}
|
||||
:if={@ammo_type.desc}
|
||||
class="max-w-2xl w-full px-8 py-4 rounded-lg
|
||||
text-center title text-lg
|
||||
border border-primary-600"
|
||||
>
|
||||
<%= @type.desc %>
|
||||
<%= @ammo_type.desc %>
|
||||
</span>
|
||||
|
||||
<div class="flex space-x-4 justify-center items-center text-primary-600">
|
||||
<.link
|
||||
patch={Routes.type_show_path(Endpoint, :edit, @type)}
|
||||
patch={Routes.ammo_type_show_path(Endpoint, :edit, @ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={dgettext("actions", "Edit %{type_name}", type_name: @type.name)}
|
||||
aria-label={dgettext("actions", "Edit %{ammo_type_name}", ammo_type_name: @ammo_type.name)}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
@ -29,10 +29,12 @@
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
|
||||
name: @type.name
|
||||
name: @ammo_type.name
|
||||
)
|
||||
}
|
||||
aria-label={dgettext("actions", "Delete %{type_name}", type_name: @type.name)}
|
||||
aria-label={
|
||||
dgettext("actions", "Delete %{ammo_type_name}", ammo_type_name: @ammo_type.name)
|
||||
}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
@ -40,14 +42,14 @@
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<%= if @type.class || @custom_fields? do %>
|
||||
<%= if @ammo_type.class || @custom_fields? do %>
|
||||
<div class="grid sm:grid-cols-2 gap-4 text-center justify-center items-center">
|
||||
<h3 class="title text-lg">
|
||||
<%= gettext("Class") %>
|
||||
</h3>
|
||||
|
||||
<span class="text-primary-600">
|
||||
<%= case @type.class do %>
|
||||
<%= case @ammo_type.class do %>
|
||||
<% :shotgun -> %>
|
||||
<%= gettext("Shotgun") %>
|
||||
<% :rifle -> %>
|
||||
@ -60,7 +62,7 @@
|
||||
</span>
|
||||
|
||||
<%= for %{label: label, key: key, type: type} <- @fields_to_display do %>
|
||||
<%= if @type |> Map.get(key) do %>
|
||||
<%= if @ammo_type |> Map.get(key) do %>
|
||||
<h3 class="title text-lg">
|
||||
<%= label %>
|
||||
</h3>
|
||||
@ -68,9 +70,9 @@
|
||||
<span class="text-primary-600">
|
||||
<%= case type do %>
|
||||
<% :boolean -> %>
|
||||
<%= @type |> Map.get(key) |> humanize() %>
|
||||
<%= @ammo_type |> Map.get(key) |> humanize() %>
|
||||
<% _ -> %>
|
||||
<%= @type |> Map.get(key) %>
|
||||
<%= @ammo_type |> Map.get(key) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
@ -138,7 +140,7 @@
|
||||
</h3>
|
||||
|
||||
<span class="text-primary-600">
|
||||
<.datetime id={"#{@type.id}-inserted-at"} datetime={@type.inserted_at} />
|
||||
<.datetime id={"#{@ammo_type.id}-inserted-at"} datetime={@ammo_type.inserted_at} />
|
||||
</span>
|
||||
|
||||
<%= if @avg_cost_per_round do %>
|
||||
@ -182,7 +184,7 @@
|
||||
<%= if @view_table do %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.PackTableComponent}
|
||||
id="type-show-table"
|
||||
id="ammo-type-show-table"
|
||||
packs={@packs}
|
||||
current_user={@current_user}
|
||||
show_used={@show_used}
|
||||
@ -226,14 +228,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<.modal :if={@live_action == :edit} return_to={Routes.type_show_path(Endpoint, :show, @type)}>
|
||||
<.modal
|
||||
:if={@live_action == :edit}
|
||||
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
|
||||
>
|
||||
<.live_component
|
||||
module={CanneryWeb.TypeLive.FormComponent}
|
||||
id={@type.id}
|
||||
module={CanneryWeb.AmmoTypeLive.FormComponent}
|
||||
id={@ammo_type.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
type={@type}
|
||||
return_to={Routes.type_show_path(Endpoint, :show, @type)}
|
||||
ammo_type={@ammo_type}
|
||||
return_to={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
@ -86,19 +86,19 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
{:noreply, socket |> assign(:view_table, !view_table) |> render_container()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> render_container()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> render_container()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> render_container()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> render_container()}
|
||||
end
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:type}
|
||||
as={:ammo_type}
|
||||
phx-change="change_class"
|
||||
phx-submit="change_class"
|
||||
class="flex items-center"
|
||||
@ -126,16 +126,16 @@
|
||||
<%= if @view_table do %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.PackTableComponent}
|
||||
id="type-show-table"
|
||||
id="ammo-type-show-table"
|
||||
packs={@packs}
|
||||
current_user={@current_user}
|
||||
show_used={false}
|
||||
>
|
||||
<:type :let={%{name: type_name} = type}>
|
||||
<.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
|
||||
<%= type_name %>
|
||||
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}>
|
||||
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link">
|
||||
<%= ammo_type_name %>
|
||||
</.link>
|
||||
</:type>
|
||||
</:ammo_type>
|
||||
</.live_component>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center items-stretch">
|
||||
|
@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.FormComponent do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.Ammo.{Pack, Type}
|
||||
alias Cannery.Ammo.{AmmoType, Pack}
|
||||
alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container}
|
||||
alias Ecto.Changeset
|
||||
alias Phoenix.LiveView.Socket
|
||||
@ -22,17 +22,17 @@ defmodule CanneryWeb.PackLive.FormComponent do
|
||||
|
||||
@spec update(Socket.t()) :: {:ok, Socket.t()}
|
||||
def update(%{assigns: %{current_user: current_user}} = socket) do
|
||||
%{assigns: %{types: types, containers: containers}} =
|
||||
%{assigns: %{ammo_types: ammo_types, containers: containers}} =
|
||||
socket =
|
||||
socket
|
||||
|> assign(:pack_create_limit, @pack_create_limit)
|
||||
|> assign(:types, Ammo.list_types(current_user, :all))
|
||||
|> assign(:ammo_types, Ammo.list_ammo_types(current_user, :all))
|
||||
|> assign_new(:containers, fn -> Containers.list_containers(current_user) end)
|
||||
|
||||
params =
|
||||
if types |> List.first() |> is_nil(),
|
||||
if ammo_types |> List.first() |> is_nil(),
|
||||
do: %{},
|
||||
else: %{} |> Map.put("type_id", types |> List.first() |> Map.get(:id))
|
||||
else: %{} |> Map.put("ammo_type_id", ammo_types |> List.first() |> Map.get(:id))
|
||||
|
||||
params =
|
||||
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)
|
||||
end
|
||||
|
||||
@spec type_options([Type.t()]) :: [{String.t(), Type.id()}]
|
||||
defp type_options(types) do
|
||||
types |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
||||
@spec ammo_type_options([AmmoType.t()]) :: [{String.t(), AmmoType.id()}]
|
||||
defp ammo_type_options(ammo_types) do
|
||||
ammo_types |> Enum.map(fn %{id: id, name: name} -> {name, id} end)
|
||||
end
|
||||
|
||||
# Save Helpers
|
||||
@ -83,9 +83,9 @@ defmodule CanneryWeb.PackLive.FormComponent do
|
||||
changeset =
|
||||
case default_action do
|
||||
:insert ->
|
||||
type = maybe_get_type(pack_params, user)
|
||||
ammo_type = maybe_get_ammo_type(pack_params, user)
|
||||
container = maybe_get_container(pack_params, user)
|
||||
pack |> Pack.create_changeset(type, container, user, pack_params)
|
||||
pack |> Pack.create_changeset(ammo_type, container, user, pack_params)
|
||||
|
||||
:update ->
|
||||
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_type(%{"type_id" => type_id}, user)
|
||||
when is_binary(type_id) do
|
||||
type_id |> Ammo.get_type!(user)
|
||||
defp maybe_get_ammo_type(%{"ammo_type_id" => ammo_type_id}, user)
|
||||
when is_binary(ammo_type_id) do
|
||||
ammo_type_id |> Ammo.get_ammo_type!(user)
|
||||
end
|
||||
|
||||
defp maybe_get_type(_params_not_found, _user), do: nil
|
||||
defp maybe_get_ammo_type(_params_not_found, _user), do: nil
|
||||
|
||||
defp save_pack(
|
||||
%{assigns: %{pack: pack, current_user: current_user, return_to: return_to}} = socket,
|
||||
|
@ -19,11 +19,11 @@
|
||||
<%= changeset_errors(@changeset) %>
|
||||
</div>
|
||||
|
||||
<%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %>
|
||||
<%= select(f, :type_id, type_options(@types),
|
||||
<%= label(f, :ammo_type_id, gettext("Ammo type"), class: "title text-lg text-primary-600") %>
|
||||
<%= select(f, :ammo_type_id, ammo_type_options(@ammo_types),
|
||||
class: "text-center col-span-2 input input-primary"
|
||||
) %>
|
||||
<%= error_tag(f, :type_id, "col-span-3 text-center") %>
|
||||
<%= error_tag(f, :ammo_type_id, "col-span-3 text-center") %>
|
||||
|
||||
<%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %>
|
||||
<%= number_input(f, :count,
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :notes,
|
||||
id: "pack-form-notes",
|
||||
id: "ammo-group-form-notes",
|
||||
class: "text-center col-span-2 input input-primary",
|
||||
phx_hook: "MaintainAttrs",
|
||||
phx_update: "ignore"
|
||||
|
@ -27,7 +27,7 @@ defmodule CanneryWeb.PackLive.Index do
|
||||
|
||||
defp apply_action(
|
||||
%{assigns: %{current_user: current_user}} = socket,
|
||||
:add_shot_record,
|
||||
:add_shot_group,
|
||||
%{"id" => id}
|
||||
) do
|
||||
socket
|
||||
@ -122,19 +122,19 @@ defmodule CanneryWeb.PackLive.Index do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> display_packs()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> display_packs()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> display_packs()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> display_packs()}
|
||||
end
|
||||
|
||||
@ -152,13 +152,13 @@ defmodule CanneryWeb.PackLive.Index do
|
||||
# prompts
|
||||
packs_count = Ammo.get_packs_count!(current_user, true)
|
||||
packs = Ammo.list_packs(search, class, current_user, show_used)
|
||||
types_count = Ammo.get_types_count!(current_user)
|
||||
ammo_types_count = Ammo.get_ammo_types_count!(current_user)
|
||||
containers_count = Containers.get_containers_count!(current_user)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
packs: packs,
|
||||
types_count: types_count,
|
||||
ammo_types_count: ammo_types_count,
|
||||
containers_count: containers_count,
|
||||
packs_count: packs_count
|
||||
)
|
||||
|
@ -14,14 +14,14 @@
|
||||
<%= dgettext("actions", "add a container first") %>
|
||||
</.link>
|
||||
</div>
|
||||
<% @types_count == 0 -> %>
|
||||
<% @ammo_types_count == 0 -> %>
|
||||
<div class="flex justify-center items-center">
|
||||
<h2 class="m-2 title text-md text-primary-600">
|
||||
<%= dgettext("prompts", "You'll need to") %>
|
||||
</h2>
|
||||
|
||||
<.link navigate={Routes.type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "add a type first") %>
|
||||
<.link navigate={Routes.ammo_type_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "add an ammo type first") %>
|
||||
</.link>
|
||||
</div>
|
||||
<% @packs_count == 0 -> %>
|
||||
@ -42,7 +42,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:type}
|
||||
as={:ammo_type}
|
||||
phx-change="change_class"
|
||||
phx-submit="change_class"
|
||||
class="flex items-center"
|
||||
@ -97,16 +97,16 @@
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.PackTableComponent}
|
||||
id="pack-index-table"
|
||||
id="ammo-group-index-table"
|
||||
packs={@packs}
|
||||
current_user={@current_user}
|
||||
show_used={@show_used}
|
||||
>
|
||||
<:type :let={%{name: type_name} = type}>
|
||||
<.link navigate={Routes.type_show_path(Endpoint, :show, type)} class="link">
|
||||
<%= type_name %>
|
||||
<:ammo_type :let={%{name: ammo_type_name} = ammo_type}>
|
||||
<.link navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)} class="link">
|
||||
<%= ammo_type_name %>
|
||||
</.link>
|
||||
</:type>
|
||||
</:ammo_type>
|
||||
<:range :let={pack}>
|
||||
<div class="min-w-20 py-2 px-4 h-full flex flew-wrap justify-center items-center">
|
||||
<button
|
||||
@ -121,7 +121,7 @@
|
||||
</button>
|
||||
|
||||
<.link
|
||||
patch={Routes.pack_index_path(Endpoint, :add_shot_record, pack)}
|
||||
patch={Routes.pack_index_path(Endpoint, :add_shot_group, pack)}
|
||||
class="mx-2 my-1 text-sm btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "Record shots") %>
|
||||
@ -213,10 +213,10 @@
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% :add_shot_record -> %>
|
||||
<% :add_shot_group -> %>
|
||||
<.modal return_to={Routes.pack_index_path(Endpoint, :index)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.AddShotRecordComponent}
|
||||
module={CanneryWeb.Components.AddShotGroupComponent}
|
||||
id={:new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotRecord}
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
|
||||
alias Cannery.{Ammo, Ammo.Pack}
|
||||
alias Cannery.{ComparableDate, Containers}
|
||||
alias CanneryWeb.Endpoint
|
||||
@ -15,15 +15,15 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
|
||||
@impl true
|
||||
def handle_params(
|
||||
%{"id" => id, "shot_record_id" => shot_record_id},
|
||||
%{"id" => id, "shot_group_id" => shot_group_id},
|
||||
_url,
|
||||
%{assigns: %{live_action: live_action, current_user: current_user}} = socket
|
||||
) do
|
||||
shot_record = ActivityLog.get_shot_record!(shot_record_id, current_user)
|
||||
shot_group = ActivityLog.get_shot_group!(shot_group_id, current_user)
|
||||
|
||||
socket =
|
||||
socket
|
||||
|> assign(page_title: page_title(live_action), shot_record: shot_record)
|
||||
|> assign(page_title: page_title(live_action), shot_group: shot_group)
|
||||
|> display_pack(id)
|
||||
|
||||
{:noreply, socket}
|
||||
@ -38,8 +38,8 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
defp page_title(:add_shot_record), do: gettext("Record Shots")
|
||||
defp page_title(:edit_shot_record), do: gettext("Edit Shot Record")
|
||||
defp page_title(:add_shot_group), do: gettext("Record Shots")
|
||||
defp page_title(:edit_shot_group), do: gettext("Edit Shot Records")
|
||||
defp page_title(:move), do: gettext("Move Ammo")
|
||||
defp page_title(:show), do: gettext("Show Ammo")
|
||||
defp page_title(:edit), do: gettext("Edit Ammo")
|
||||
@ -69,13 +69,13 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
end
|
||||
|
||||
def handle_event(
|
||||
"delete_shot_record",
|
||||
"delete_shot_group",
|
||||
%{"id" => id},
|
||||
%{assigns: %{pack: %{id: pack_id}, current_user: current_user}} = socket
|
||||
) do
|
||||
{:ok, _} =
|
||||
ActivityLog.get_shot_record!(id, current_user)
|
||||
|> ActivityLog.delete_shot_record(current_user)
|
||||
ActivityLog.get_shot_group!(id, current_user)
|
||||
|> ActivityLog.delete_shot_group(current_user)
|
||||
|
||||
prompt = dgettext("prompts", "Shot records deleted succesfully")
|
||||
{: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}
|
||||
]
|
||||
|
||||
shot_records = ActivityLog.list_shot_records_for_pack(pack, current_user)
|
||||
shot_groups = ActivityLog.list_shot_groups_for_pack(pack, current_user)
|
||||
|
||||
rows =
|
||||
shot_records
|
||||
|> Enum.map(fn shot_record ->
|
||||
pack |> get_table_row_for_shot_record(shot_record, columns)
|
||||
shot_groups
|
||||
|> Enum.map(fn shot_group ->
|
||||
pack |> get_table_row_for_shot_group(shot_group, columns)
|
||||
end)
|
||||
|
||||
socket
|
||||
@ -107,7 +107,7 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
original_count: Ammo.get_original_count(pack, current_user),
|
||||
percentage_remaining: Ammo.get_percentage_remaining(pack, current_user),
|
||||
container: container_id && Containers.get_container!(container_id, current_user),
|
||||
shot_records: shot_records,
|
||||
shot_groups: shot_groups,
|
||||
columns: columns,
|
||||
rows: rows
|
||||
)
|
||||
@ -119,9 +119,9 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
@spec display_currency(float()) :: String.t()
|
||||
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)
|
||||
|
||||
@spec get_table_row_for_shot_record(Pack.t(), ShotRecord.t(), [map()]) :: map()
|
||||
defp get_table_row_for_shot_record(pack, %{id: id, date: date} = shot_record, columns) do
|
||||
assigns = %{pack: pack, shot_record: shot_record}
|
||||
@spec get_table_row_for_shot_group(Pack.t(), ShotGroup.t(), [map()]) :: map()
|
||||
defp get_table_row_for_shot_group(pack, %{id: id, date: date} = shot_group, columns) do
|
||||
assigns = %{pack: pack, shot_group: shot_group}
|
||||
|
||||
columns
|
||||
|> Map.new(fn %{key: key} ->
|
||||
@ -139,11 +139,11 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
~H"""
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
patch={Routes.pack_show_path(Endpoint, :edit_shot_record, @pack, @shot_record)}
|
||||
patch={Routes.pack_show_path(Endpoint, :edit_shot_group, @pack, @shot_group)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={
|
||||
dgettext("actions", "Edit shot record of %{shot_record_count} shots",
|
||||
shot_record_count: @shot_record.count
|
||||
dgettext("actions", "Edit shot group of %{shot_group_count} shots",
|
||||
shot_group_count: @shot_group.count
|
||||
)
|
||||
}
|
||||
>
|
||||
@ -153,12 +153,12 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete_shot_record"
|
||||
phx-value-id={@shot_record.id}
|
||||
phx-click="delete_shot_group"
|
||||
phx-value-id={@shot_group.id}
|
||||
data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")}
|
||||
aria-label={
|
||||
dgettext("actions", "Delete shot record of %{shot_record_count} shots",
|
||||
shot_record_count: @shot_record.count
|
||||
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
|
||||
shot_group_count: @shot_group.count
|
||||
)
|
||||
}
|
||||
>
|
||||
@ -168,7 +168,7 @@ defmodule CanneryWeb.PackLive.Show do
|
||||
"""
|
||||
|
||||
key ->
|
||||
shot_record |> Map.get(key)
|
||||
shot_group |> Map.get(key)
|
||||
end
|
||||
|
||||
{key, value}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<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">
|
||||
<%= @pack.type.name %>
|
||||
<%= @pack.ammo_type.name %>
|
||||
</h1>
|
||||
|
||||
<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-wrap justify-center items-center text-primary-600">
|
||||
<.link
|
||||
navigate={Routes.type_show_path(Endpoint, :show, @pack.type)}
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, @pack.ammo_type)}
|
||||
class="mx-4 my-2 btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "View in Catalog") %>
|
||||
@ -90,7 +90,7 @@
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.pack_show_path(Endpoint, :add_shot_record, @pack)}
|
||||
patch={Routes.pack_show_path(Endpoint, :add_shot_group, @pack)}
|
||||
class="mx-4 my-2 btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "Record shots") %>
|
||||
@ -112,7 +112,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= unless @shot_records |> Enum.empty?() do %>
|
||||
<%= unless @shot_groups |> Enum.empty?() do %>
|
||||
<hr class="mb-4 w-full" />
|
||||
|
||||
<h1 class="mb-4 px-4 py-2 text-center rounded-lg title text-xl">
|
||||
@ -121,7 +121,7 @@
|
||||
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id="pack_shot_records_table"
|
||||
id="pack_shot_groups_table"
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
@ -141,22 +141,22 @@
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% :edit_shot_record -> %>
|
||||
<% :edit_shot_group -> %>
|
||||
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.RangeLive.FormComponent}
|
||||
id={@shot_record.id}
|
||||
id={@shot_group.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
shot_record={@shot_record}
|
||||
shot_group={@shot_group}
|
||||
return_to={Routes.pack_show_path(Endpoint, :show, @pack)}
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% :add_shot_record -> %>
|
||||
<% :add_shot_group -> %>
|
||||
<.modal return_to={Routes.pack_show_path(Endpoint, :show, @pack)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.AddShotRecordComponent}
|
||||
module={CanneryWeb.Components.AddShotGroupComponent}
|
||||
id={:new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
@ -1,10 +1,10 @@
|
||||
defmodule CanneryWeb.RangeLive.FormComponent do
|
||||
@moduledoc """
|
||||
Livecomponent that can update a ShotRecord
|
||||
Livecomponent that can update a ShotGroup
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotRecord, Ammo, Ammo.Pack}
|
||||
alias Cannery.{Accounts.User, ActivityLog, ActivityLog.ShotGroup, Ammo, Ammo.Pack}
|
||||
alias Ecto.Changeset
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@ -14,7 +14,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
|
||||
@impl true
|
||||
@spec update(
|
||||
%{
|
||||
required(:shot_record) => ShotRecord.t(),
|
||||
required(:shot_group) => ShotGroup.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:pack) => Pack.t(),
|
||||
optional(any()) => any()
|
||||
@ -23,7 +23,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(
|
||||
%{
|
||||
shot_record: %ShotRecord{pack_id: pack_id},
|
||||
shot_group: %ShotGroup{pack_id: pack_id},
|
||||
current_user: current_user
|
||||
} = assigns,
|
||||
socket
|
||||
@ -33,24 +33,24 @@ defmodule CanneryWeb.RangeLive.FormComponent do
|
||||
{:ok, socket |> assign(assigns) |> assign(:pack, pack) |> assign_changeset(%{})}
|
||||
end
|
||||
|
||||
def update(%{shot_record: %ShotRecord{}} = assigns, socket) do
|
||||
def update(%{shot_group: %ShotGroup{}} = assigns, socket) do
|
||||
{:ok, socket |> assign(assigns) |> assign_changeset(%{})}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("validate", %{"shot_record" => shot_record_params}, socket) do
|
||||
{:noreply, socket |> assign_changeset(shot_record_params, :validate)}
|
||||
def handle_event("validate", %{"shot_group" => shot_group_params}, socket) do
|
||||
{:noreply, socket |> assign_changeset(shot_group_params, :validate)}
|
||||
end
|
||||
|
||||
def handle_event(
|
||||
"save",
|
||||
%{"shot_record" => shot_record_params},
|
||||
%{assigns: %{shot_record: shot_record, current_user: current_user, return_to: return_to}} =
|
||||
%{"shot_group" => shot_group_params},
|
||||
%{assigns: %{shot_group: shot_group, current_user: current_user, return_to: return_to}} =
|
||||
socket
|
||||
) do
|
||||
socket =
|
||||
case ActivityLog.update_shot_record(shot_record, shot_record_params, current_user) do
|
||||
{:ok, _shot_record} ->
|
||||
case ActivityLog.update_shot_group(shot_group, shot_group_params, current_user) do
|
||||
{:ok, _shot_group} ->
|
||||
prompt = dgettext("prompts", "Shot records updated successfully")
|
||||
socket |> put_flash(:info, prompt) |> push_navigate(to: return_to)
|
||||
|
||||
@ -67,22 +67,22 @@ defmodule CanneryWeb.RangeLive.FormComponent do
|
||||
action: live_action,
|
||||
current_user: user,
|
||||
pack: pack,
|
||||
shot_record: shot_record
|
||||
shot_group: shot_group
|
||||
}
|
||||
} = socket,
|
||||
shot_record_params,
|
||||
shot_group_params,
|
||||
action \\ nil
|
||||
) do
|
||||
default_action =
|
||||
case live_action do
|
||||
:add_shot_record -> :insert
|
||||
editing when editing in [:edit, :edit_shot_record] -> :update
|
||||
:add_shot_group -> :insert
|
||||
editing when editing in [:edit, :edit_shot_group] -> :update
|
||||
end
|
||||
|
||||
changeset =
|
||||
case default_action do
|
||||
:insert -> shot_record |> ShotRecord.create_changeset(user, pack, shot_record_params)
|
||||
:update -> shot_record |> ShotRecord.update_changeset(user, shot_record_params)
|
||||
:insert -> shot_group |> ShotGroup.create_changeset(user, pack, shot_group_params)
|
||||
:update -> shot_group |> ShotGroup.update_changeset(user, shot_group_params)
|
||||
end
|
||||
|
||||
changeset =
|
||||
|
@ -6,7 +6,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={@changeset}
|
||||
id="shot-record-form"
|
||||
id="shot-group-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"
|
||||
phx-target={@myself}
|
||||
phx-change="validate"
|
||||
@ -22,14 +22,14 @@
|
||||
<%= label(f, :count, gettext("Shots fired"), class: "title text-lg text-primary-600") %>
|
||||
<%= number_input(f, :count,
|
||||
min: 1,
|
||||
max: @shot_record.count + @pack.count,
|
||||
max: @shot_group.count + @pack.count,
|
||||
class: "input input-primary col-span-2"
|
||||
) %>
|
||||
<%= error_tag(f, :count, "col-span-3") %>
|
||||
|
||||
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
|
||||
<%= textarea(f, :notes,
|
||||
id: "shot-record-form-notes",
|
||||
id: "shot-group-form-notes",
|
||||
class: "input input-primary col-span-2",
|
||||
maxlength: 255,
|
||||
placeholder: gettext("Really great weather"),
|
||||
|
@ -4,17 +4,17 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo}
|
||||
alias CanneryWeb.Endpoint
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(class: :all, search: search) |> display_shot_records()}
|
||||
{:ok, socket |> assign(class: :all, search: search) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(class: :all, search: nil) |> display_shot_records()}
|
||||
{:ok, socket |> assign(class: :all, search: nil) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -24,7 +24,7 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
|
||||
defp apply_action(
|
||||
%{assigns: %{current_user: current_user}} = socket,
|
||||
:add_shot_record,
|
||||
:add_shot_group,
|
||||
%{"id" => id}
|
||||
) do
|
||||
socket
|
||||
@ -37,8 +37,8 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit Shot Record"),
|
||||
shot_record: ActivityLog.get_shot_record!(id, current_user)
|
||||
page_title: gettext("Edit Shot Records"),
|
||||
shot_group: ActivityLog.get_shot_group!(id, current_user)
|
||||
)
|
||||
end
|
||||
|
||||
@ -46,7 +46,7 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Shot Records"),
|
||||
shot_record: %ShotRecord{}
|
||||
shot_group: %ShotGroup{}
|
||||
)
|
||||
end
|
||||
|
||||
@ -55,9 +55,9 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
|> assign(
|
||||
page_title: gettext("Shot Records"),
|
||||
search: nil,
|
||||
shot_record: nil
|
||||
shot_group: nil
|
||||
)
|
||||
|> display_shot_records()
|
||||
|> display_shot_groups()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
@ -65,19 +65,19 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
|> assign(
|
||||
page_title: gettext("Shot Records"),
|
||||
search: search,
|
||||
shot_record: nil
|
||||
shot_group: nil
|
||||
)
|
||||
|> display_shot_records()
|
||||
|> display_shot_groups()
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do
|
||||
{:ok, _} =
|
||||
ActivityLog.get_shot_record!(id, current_user)
|
||||
|> ActivityLog.delete_shot_record(current_user)
|
||||
ActivityLog.get_shot_group!(id, current_user)
|
||||
|> ActivityLog.delete_shot_group(current_user)
|
||||
|
||||
prompt = dgettext("prompts", "Shot records deleted succesfully")
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def handle_event(
|
||||
@ -90,7 +90,7 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
{:ok, _pack} = pack |> Ammo.update_pack(%{"staged" => !pack.staged}, current_user)
|
||||
|
||||
prompt = dgettext("prompts", "Ammo unstaged succesfully")
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_records()}
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
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))}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> display_shot_records()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "rifle"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :rifle) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> display_shot_records()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "shotgun"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :shotgun) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> display_shot_records()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => "pistol"}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :pistol) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def handle_event("change_class", %{"type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> display_shot_records()}
|
||||
def handle_event("change_class", %{"ammo_type" => %{"class" => _all}}, socket) do
|
||||
{:noreply, socket |> assign(:class, :all) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
@spec display_shot_records(Socket.t()) :: Socket.t()
|
||||
defp display_shot_records(
|
||||
@spec display_shot_groups(Socket.t()) :: Socket.t()
|
||||
defp display_shot_groups(
|
||||
%{assigns: %{class: class, search: search, current_user: current_user}} = socket
|
||||
) do
|
||||
shot_records = ActivityLog.list_shot_records(search, class, current_user)
|
||||
shot_groups = ActivityLog.list_shot_groups(search, class, current_user)
|
||||
packs = Ammo.list_staged_packs(current_user)
|
||||
chart_data = shot_records |> get_chart_data_for_shot_record()
|
||||
chart_data = shot_groups |> get_chart_data_for_shot_group()
|
||||
original_counts = packs |> Ammo.get_original_counts(current_user)
|
||||
cprs = packs |> Ammo.get_cprs(current_user)
|
||||
last_used_dates = packs |> ActivityLog.get_last_used_dates(current_user)
|
||||
@ -136,14 +136,14 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
cprs: cprs,
|
||||
last_used_dates: last_used_dates,
|
||||
chart_data: chart_data,
|
||||
shot_records: shot_records,
|
||||
shot_groups: shot_groups,
|
||||
shot_record_count: shot_record_count
|
||||
)
|
||||
end
|
||||
|
||||
@spec get_chart_data_for_shot_record([ShotRecord.t()]) :: [map()]
|
||||
defp get_chart_data_for_shot_record(shot_records) do
|
||||
shot_records
|
||||
@spec get_chart_data_for_shot_group([ShotGroup.t()]) :: [map()]
|
||||
defp get_chart_data_for_shot_group(shot_groups) do
|
||||
shot_groups
|
||||
|> Enum.group_by(fn %{date: date} -> date end, fn %{count: count} -> count end)
|
||||
|> Enum.map(fn {date, rounds} ->
|
||||
sum = Enum.sum(rounds)
|
||||
|
@ -39,7 +39,7 @@
|
||||
</button>
|
||||
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :add_shot_record, pack)}
|
||||
patch={Routes.range_index_path(Endpoint, :add_shot_group, pack)}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "Record shots") %>
|
||||
@ -78,7 +78,7 @@
|
||||
<.form
|
||||
:let={f}
|
||||
for={%{}}
|
||||
as={:type}
|
||||
as={:ammo_type}
|
||||
phx-change="change_class"
|
||||
phx-submit="change_class"
|
||||
class="flex items-center"
|
||||
@ -117,26 +117,26 @@
|
||||
</.form>
|
||||
</div>
|
||||
|
||||
<%= if @shot_records |> Enum.empty?() do %>
|
||||
<%= if @shot_groups |> Enum.empty?() do %>
|
||||
<h1 class="title text-xl text-primary-600">
|
||||
<%= gettext("No shots recorded") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.ShotRecordTableComponent}
|
||||
id="shot_records_index_table"
|
||||
shot_records={@shot_records}
|
||||
module={CanneryWeb.Components.ShotGroupTableComponent}
|
||||
id="shot_groups_index_table"
|
||||
shot_groups={@shot_groups}
|
||||
current_user={@current_user}
|
||||
>
|
||||
<:actions :let={shot_record}>
|
||||
<:actions :let={shot_group}>
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :edit, shot_record)}
|
||||
patch={Routes.range_index_path(Endpoint, :edit, shot_group)}
|
||||
class="text-primary-600 link"
|
||||
aria-label={
|
||||
dgettext("actions", "Edit shot record of %{shot_record_count} shots",
|
||||
shot_record_count: shot_record.count
|
||||
dgettext("actions", "Edit shot record of %{shot_group_count} shots",
|
||||
shot_group_count: shot_group.count
|
||||
)
|
||||
}
|
||||
>
|
||||
@ -147,13 +147,13 @@
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={shot_record.id}
|
||||
phx-value-id={shot_group.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete this shot record?")
|
||||
}
|
||||
aria-label={
|
||||
dgettext("actions", "Delete shot record of %{shot_record_count} shots",
|
||||
shot_record_count: shot_record.count
|
||||
dgettext("actions", "Delete shot record of %{shot_group_count} shots",
|
||||
shot_group_count: shot_group.count
|
||||
)
|
||||
}
|
||||
>
|
||||
@ -171,18 +171,18 @@
|
||||
<.modal return_to={Routes.range_index_path(Endpoint, :index)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.RangeLive.FormComponent}
|
||||
id={@shot_record.id}
|
||||
id={@shot_group.id}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
shot_record={@shot_record}
|
||||
shot_group={@shot_group}
|
||||
return_to={Routes.range_index_path(Endpoint, :index)}
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% :add_shot_record -> %>
|
||||
<% :add_shot_group -> %>
|
||||
<.modal return_to={Routes.range_index_path(Endpoint, :index)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.AddShotRecordComponent}
|
||||
module={CanneryWeb.Components.AddShotGroupComponent}
|
||||
id={:new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
@ -69,14 +69,14 @@ defmodule CanneryWeb.Router do
|
||||
live "/tags/edit/:id", TagLive.Index, :edit
|
||||
live "/tags/search/:search", TagLive.Index, :search
|
||||
|
||||
live "/catalog", TypeLive.Index, :index
|
||||
live "/catalog/new", TypeLive.Index, :new
|
||||
live "/catalog/clone/:id", TypeLive.Index, :clone
|
||||
live "/catalog/edit/:id", TypeLive.Index, :edit
|
||||
live "/catalog/search/:search", TypeLive.Index, :search
|
||||
live "/catalog", AmmoTypeLive.Index, :index
|
||||
live "/catalog/new", AmmoTypeLive.Index, :new
|
||||
live "/catalog/clone/:id", AmmoTypeLive.Index, :clone
|
||||
live "/catalog/edit/:id", AmmoTypeLive.Index, :edit
|
||||
live "/catalog/search/:search", AmmoTypeLive.Index, :search
|
||||
|
||||
live "/type/:id", TypeLive.Show, :show
|
||||
live "/type/:id/edit", TypeLive.Show, :edit
|
||||
live "/type/:id", AmmoTypeLive.Show, :show
|
||||
live "/type/:id/edit", AmmoTypeLive.Show, :edit
|
||||
|
||||
live "/containers", ContainerLive.Index, :index
|
||||
live "/containers/new", ContainerLive.Index, :new
|
||||
@ -93,19 +93,19 @@ defmodule CanneryWeb.Router do
|
||||
live "/ammo/new", PackLive.Index, :new
|
||||
live "/ammo/edit/:id", PackLive.Index, :edit
|
||||
live "/ammo/clone/:id", PackLive.Index, :clone
|
||||
live "/ammo/add_shot_record/:id", PackLive.Index, :add_shot_record
|
||||
live "/ammo/add_shot_group/:id", PackLive.Index, :add_shot_group
|
||||
live "/ammo/move/:id", PackLive.Index, :move
|
||||
live "/ammo/search/:search", PackLive.Index, :search
|
||||
|
||||
live "/ammo/show/:id", PackLive.Show, :show
|
||||
live "/ammo/show/edit/:id", PackLive.Show, :edit
|
||||
live "/ammo/show/add_shot_record/:id", PackLive.Show, :add_shot_record
|
||||
live "/ammo/show/add_shot_group/:id", PackLive.Show, :add_shot_group
|
||||
live "/ammo/show/move/:id", PackLive.Show, :move
|
||||
live "/ammo/show/:id/edit/:shot_record_id", PackLive.Show, :edit_shot_record
|
||||
live "/ammo/show/:id/edit/:shot_group_id", PackLive.Show, :edit_shot_group
|
||||
|
||||
live "/range", RangeLive.Index, :index
|
||||
live "/range/edit/:id", RangeLive.Index, :edit
|
||||
live "/range/add_shot_record/:id", RangeLive.Index, :add_shot_record
|
||||
live "/range/add_shot_group/:id", RangeLive.Index, :add_shot_group
|
||||
live "/range/search/:search", RangeLive.Index, :search
|
||||
end
|
||||
|
||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
|
||||
def project do
|
||||
[
|
||||
app: :cannery,
|
||||
version: "0.9.1",
|
||||
version: "0.9.0",
|
||||
elixir: "1.14.1",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
compilers: Mix.compilers(),
|
||||
|
@ -27,7 +27,7 @@ msgstr ""
|
||||
msgid "Add your first container!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr ""
|
||||
@ -82,6 +82,11 @@ msgstr ""
|
||||
msgid "Make your first tag!"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -115,13 +120,13 @@ msgstr ""
|
||||
msgid "Reset password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
@ -198,6 +203,11 @@ msgstr ""
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -227,6 +237,11 @@ msgstr ""
|
||||
msgid "Export Data as JSON"
|
||||
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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -238,6 +253,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -255,6 +276,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -272,6 +305,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
@ -288,6 +331,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -305,52 +353,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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 ""
|
||||
|
@ -40,7 +40,7 @@ msgstr "Fügen Sie ihre erste Box hinzu!"
|
||||
msgid "Add your first container!"
|
||||
msgstr "Fügen Sie ihren ersten Behälter hinzu!"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr "Fügen Sie ihre erste Munitionsart hinzu!"
|
||||
@ -95,6 +95,11 @@ msgstr "Einloggen"
|
||||
msgid "Make your first 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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -128,13 +133,13 @@ msgstr "Bestätigungsmail erneut senden"
|
||||
msgid "Reset password"
|
||||
msgstr "Passwort zurücksetzen"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
@ -211,6 +216,11 @@ msgstr "Sprache wechseln"
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -240,6 +250,11 @@ msgstr ""
|
||||
msgid "Export Data as JSON"
|
||||
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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -251,6 +266,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -268,6 +289,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -285,6 +318,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Stage"
|
||||
@ -301,6 +344,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -318,52 +366,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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 ""
|
||||
|
@ -30,7 +30,7 @@ msgid "Admins:"
|
||||
msgstr "Admins:"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -38,48 +38,54 @@ msgstr "Admins:"
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr "Hintergrundfarbe"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr "Knallpatrone"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr "Messing"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr "Projektilkern"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr "Patronenart"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr "Kaliber"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr "Patrone"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr "Gehäusematerial"
|
||||
@ -99,8 +105,8 @@ msgstr "Behälter"
|
||||
msgid "Containers"
|
||||
msgstr "Behälter"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr "Korrosiv"
|
||||
@ -118,8 +124,8 @@ msgid "Count:"
|
||||
msgstr "Anzahl:"
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr "Beschreibung"
|
||||
@ -145,19 +151,19 @@ msgstr "Einladung bearbeiten"
|
||||
msgid "Edit Tag"
|
||||
msgstr "Tag bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr "VM"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr "Körner"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr "Brandmunition"
|
||||
@ -207,9 +213,9 @@ msgstr "Standort:"
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr "Magazin, Ladestreifen, Munitionskiste usw."
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr "Hersteller"
|
||||
@ -224,16 +230,22 @@ msgstr "Metallene Munitionskiste mit Anime-Girl-Sticker"
|
||||
msgid "My cool ammo can"
|
||||
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/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -255,7 +267,7 @@ msgstr "Neuer Tag"
|
||||
msgid "No Ammo"
|
||||
msgstr "Keine Munition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr "Keine Munition dieser Art"
|
||||
@ -278,8 +290,8 @@ msgstr "Keine Einladung"
|
||||
msgid "No tags"
|
||||
msgstr "Keine Tags"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -298,8 +310,8 @@ msgstr "Bemerkungen:"
|
||||
msgid "On the bookshelf"
|
||||
msgstr "Auf dem Bücherregal"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr "Druck"
|
||||
@ -315,8 +327,8 @@ msgstr "Kaufpreis"
|
||||
msgid "Price paid:"
|
||||
msgstr "Kaufpreis:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr "Zündertyp"
|
||||
@ -349,7 +361,7 @@ msgstr "Einstellungen"
|
||||
msgid "Simple:"
|
||||
msgstr "Einfach:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr "Stahl"
|
||||
@ -383,17 +395,15 @@ msgstr "Textfarbe"
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr "Leuchtspur"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr "Art"
|
||||
@ -435,8 +445,8 @@ msgstr "Schießplatz"
|
||||
msgid "Range day"
|
||||
msgstr "Range Day"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -453,12 +463,18 @@ msgstr "Schüsse abgegeben"
|
||||
msgid "No ammo staged"
|
||||
msgstr "Keine Munition selektiert"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -470,7 +486,13 @@ msgstr "Neue Schießkladde"
|
||||
msgid "No shots recorded"
|
||||
msgstr "Keine Schüsse dokumentiert"
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -498,48 +520,48 @@ msgstr "Kein weiterer Behälter"
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr "$%{amount}"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr "Bimetall"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr "Patronenhülse"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr "Mündungsgeschwindigkeit"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr "Pulverkörner pro Ladung"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr "Pulverart"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr "UPC"
|
||||
@ -562,8 +584,8 @@ msgstr "Derzeitiges Passwort"
|
||||
msgid "New password"
|
||||
msgstr "Neues Passwort"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr "Patronenhülsenform"
|
||||
@ -586,16 +608,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr "Editiere %{name} Tags"
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr "Keine Preisinformationen"
|
||||
@ -666,7 +688,7 @@ msgstr "Schüsse dokumentieren"
|
||||
msgid "Copies"
|
||||
msgstr "Kopien"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr "Hinzugefügt am:"
|
||||
@ -713,9 +735,9 @@ msgid "View the source code"
|
||||
msgstr "Quellcode ansehen"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr ""
|
||||
@ -746,8 +768,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr "Diese Munitionsgruppe ist nicht in einem Behälter"
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr ""
|
||||
@ -773,9 +795,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
@ -791,171 +813,182 @@ msgstr ""
|
||||
msgid "Rounds shot: %{count}"
|
||||
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/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:144
|
||||
#: lib/cannery_web/components/container_table_component.ex:65
|
||||
#: lib/cannery_web/components/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr "Summe aller Patronen"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds:"
|
||||
msgstr "Summe abgegebener Schüsse:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr "Patronen abgefeuert"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Blank:"
|
||||
msgstr "Knallpatrone"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet core:"
|
||||
msgstr "Projektilkern"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet type:"
|
||||
msgstr "Patronenart"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Caliber:"
|
||||
msgstr "Kaliber"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Cartridge:"
|
||||
msgstr "Patrone"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Case material:"
|
||||
msgstr "Gehäusematerial"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Corrosive:"
|
||||
msgstr "Korrosiv"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Firing type:"
|
||||
msgstr "Patronenhülsenform"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Grains:"
|
||||
msgstr "Körner"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Incendiary:"
|
||||
msgstr "Brandmunition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Jacket type:"
|
||||
msgstr "Patronenhülse"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Manufacturer:"
|
||||
msgstr "Hersteller"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr "Mündungsgeschwindigkeit"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr "Pulverkörner pro Ladung"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder type:"
|
||||
msgstr "Pulverart"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Pressure:"
|
||||
msgstr "Druck"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer type:"
|
||||
msgstr "Zündertyp"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Tracer:"
|
||||
msgstr "Leuchtspur"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "UPC:"
|
||||
msgstr "UPC"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1019,7 +1052,13 @@ msgstr ""
|
||||
msgid "Edit ammo"
|
||||
msgstr "Munitionstyp bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1148,42 +1187,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1210,76 +1249,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Brass height"
|
||||
msgstr "Messing"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1289,175 +1328,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr "Keine Munition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder"
|
||||
msgstr "Pulverart"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer"
|
||||
msgstr "Zündertyp"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size"
|
||||
msgstr "Schüsse abgegeben"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size:"
|
||||
msgstr "Schüsse abgegeben"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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"
|
||||
|
@ -69,7 +69,7 @@ msgstr "Ungültige Mailadresse oder Passwort"
|
||||
msgid "Not found"
|
||||
msgstr "Nicht gefunden"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_settings/edit.html.heex:22
|
||||
@ -173,42 +173,42 @@ msgstr ""
|
||||
"Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War "
|
||||
"%{multiplier}"
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr "Anzahl muss weniger als %{count} betragen"
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/pack.ex:92
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a type and container"
|
||||
msgstr ""
|
||||
|
@ -23,17 +23,17 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## 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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} erfolgreich gelöscht"
|
||||
@ -44,10 +44,10 @@ msgstr "%{name} erfolgreich gelöscht"
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
msgstr "%{name} erfolgreich aktualisiert"
|
||||
@ -128,13 +128,13 @@ msgstr "Passwort erfolgreich geändert."
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr "Speichere..."
|
||||
@ -166,7 +166,7 @@ msgstr "%{tag_name} wurde von %{container_name} entfernt"
|
||||
msgid "Adding..."
|
||||
msgstr "Füge hinzu..."
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr "Schüsse erfolgreich dokumentiert"
|
||||
@ -257,8 +257,8 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] "Munitionsgruppe erfolgreich aktualisiert"
|
||||
msgstr[1] "Munitionsgruppe erfolgreich aktualisiert"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
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?"
|
||||
|
@ -26,7 +26,7 @@ msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -34,48 +34,54 @@ msgstr ""
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -95,8 +101,8 @@ msgstr ""
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -114,8 +120,8 @@ msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -141,19 +147,19 @@ msgstr ""
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -203,9 +209,9 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -220,16 +226,22 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:153
|
||||
#: lib/cannery_web/components/container_table_component.ex:45
|
||||
#: lib/cannery_web/components/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -251,7 +263,7 @@ msgstr ""
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
@ -274,8 +286,8 @@ msgstr ""
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -294,8 +306,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -311,8 +323,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -343,7 +355,7 @@ msgstr ""
|
||||
msgid "Simple:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
@ -377,17 +389,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -429,8 +439,8 @@ msgstr ""
|
||||
msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -447,12 +457,18 @@ msgstr ""
|
||||
msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -464,7 +480,13 @@ msgstr ""
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -492,48 +514,48 @@ msgstr ""
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -556,8 +578,8 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -580,16 +602,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr ""
|
||||
@ -660,7 +682,7 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr ""
|
||||
@ -707,9 +729,9 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr ""
|
||||
@ -740,8 +762,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr ""
|
||||
@ -767,9 +789,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
@ -785,171 +807,182 @@ msgstr ""
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:123
|
||||
#: lib/cannery_web/components/container_table_component.ex:64
|
||||
#: lib/cannery_web/components/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:144
|
||||
#: lib/cannery_web/components/container_table_component.ex:65
|
||||
#: lib/cannery_web/components/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1013,7 +1046,13 @@ msgstr ""
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1131,42 +1170,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1193,76 +1232,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1272,175 +1311,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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 ""
|
||||
|
@ -27,7 +27,7 @@ msgstr ""
|
||||
msgid "Add your first container!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr ""
|
||||
@ -82,6 +82,11 @@ msgstr ""
|
||||
msgid "Make your first tag!"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -115,13 +120,13 @@ msgstr ""
|
||||
msgid "Reset password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
@ -198,6 +203,11 @@ msgstr ""
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -227,6 +237,11 @@ msgstr ""
|
||||
msgid "Export Data as JSON"
|
||||
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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -238,6 +253,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -255,6 +276,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -272,6 +305,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Stage"
|
||||
@ -288,6 +331,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -305,52 +353,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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 ""
|
||||
|
@ -26,7 +26,7 @@ msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -34,48 +34,54 @@ msgstr ""
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -95,8 +101,8 @@ msgstr ""
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -114,8 +120,8 @@ msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -141,19 +147,19 @@ msgstr ""
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -203,9 +209,9 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -220,16 +226,22 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:153
|
||||
#: lib/cannery_web/components/container_table_component.ex:45
|
||||
#: lib/cannery_web/components/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -251,7 +263,7 @@ msgstr ""
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
@ -274,8 +286,8 @@ msgstr ""
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -294,8 +306,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -311,8 +323,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -343,7 +355,7 @@ msgstr ""
|
||||
msgid "Simple:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
@ -377,17 +389,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -429,8 +439,8 @@ msgstr ""
|
||||
msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -447,12 +457,18 @@ msgstr ""
|
||||
msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -464,7 +480,13 @@ msgstr ""
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -492,48 +514,48 @@ msgstr ""
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -556,8 +578,8 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -580,16 +602,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr ""
|
||||
@ -660,7 +682,7 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr ""
|
||||
@ -707,9 +729,9 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr ""
|
||||
@ -740,8 +762,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr ""
|
||||
@ -767,9 +789,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
@ -785,171 +807,182 @@ msgstr ""
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:123
|
||||
#: lib/cannery_web/components/container_table_component.ex:64
|
||||
#: lib/cannery_web/components/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:144
|
||||
#: lib/cannery_web/components/container_table_component.ex:65
|
||||
#: lib/cannery_web/components/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Blank:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet core:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Caliber:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Cartridge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Case material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Corrosive:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Firing type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Grains:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Incendiary:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Jacket type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Manufacturer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Pressure:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Tracer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1013,7 +1046,13 @@ msgstr ""
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1131,42 +1170,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1193,76 +1232,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Brass height"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1272,175 +1311,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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 ""
|
||||
|
@ -56,7 +56,7 @@ msgstr ""
|
||||
msgid "Not found"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_settings/edit.html.heex:22
|
||||
@ -156,42 +156,42 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/pack.ex:92
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a type and container"
|
||||
msgstr ""
|
||||
|
@ -10,17 +10,17 @@ msgid ""
|
||||
msgstr ""
|
||||
"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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -31,10 +31,10 @@ msgstr ""
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
msgstr ""
|
||||
@ -109,13 +109,13 @@ msgstr ""
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
@ -145,7 +145,7 @@ msgstr ""
|
||||
msgid "Adding..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
msgstr ""
|
||||
|
@ -56,7 +56,7 @@ msgstr ""
|
||||
msgid "Not found"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_settings/edit.html.heex:22
|
||||
@ -155,42 +155,42 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/pack.ex:92
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select a type and container"
|
||||
msgstr ""
|
||||
|
@ -40,7 +40,7 @@ msgstr "¡Añade tu primera caja!"
|
||||
msgid "Add your first container!"
|
||||
msgstr "¡Añade tu primer contenedor!"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr "¡Añade tu primer tipo!"
|
||||
@ -95,6 +95,11 @@ msgstr "Entrar"
|
||||
msgid "Make your first tag!"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -128,13 +133,13 @@ msgstr "Reenviar instrucciones de confirmación"
|
||||
msgid "Reset password"
|
||||
msgstr "Resetear contraseña"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
@ -211,6 +216,11 @@ msgstr "Cambiar lenguaje"
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -240,6 +250,11 @@ msgstr "Desmontar del campo de tiro"
|
||||
msgid "Export Data as 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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -251,6 +266,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -268,6 +289,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -285,6 +318,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Stage"
|
||||
@ -301,6 +344,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -318,52 +366,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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"
|
||||
|
@ -30,7 +30,7 @@ msgid "Admins:"
|
||||
msgstr "Aministradores:"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -38,48 +38,54 @@ msgstr "Aministradores:"
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr "Color de fondo"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr "Fogueo"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr "Latón"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr "Núcleo de bala"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr "Tipo de bala"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr "Calibre"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr "Cartucho"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr "Material del casquillo"
|
||||
@ -99,8 +105,8 @@ msgstr "Contenedor"
|
||||
msgid "Containers"
|
||||
msgstr "Contenedores"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr "Corrosiva"
|
||||
@ -118,8 +124,8 @@ msgid "Count:"
|
||||
msgstr "Cantidad:"
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr "Descripción"
|
||||
@ -145,19 +151,19 @@ msgstr "Editar Invitación"
|
||||
msgid "Edit Tag"
|
||||
msgstr "Editar Etiqueta"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr "Bala encamisada"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr "Grano"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr "Incendiaria"
|
||||
@ -207,9 +213,9 @@ msgstr "Localización:"
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr "Cargador, Clip, Caja de Munición, etc"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr "Fabricante"
|
||||
@ -224,16 +230,22 @@ msgstr "Lata de munición metálica con la pegatina de chica de anime"
|
||||
msgid "My cool ammo can"
|
||||
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/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -255,7 +267,7 @@ msgstr "Nueva Etiqueta"
|
||||
msgid "No Ammo"
|
||||
msgstr "Sin Munición"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr "Sin munición para este tipo"
|
||||
@ -278,8 +290,8 @@ msgstr "Sin invitaciones"
|
||||
msgid "No tags"
|
||||
msgstr "Sin etiquetas"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -298,8 +310,8 @@ msgstr "Notas:"
|
||||
msgid "On the bookshelf"
|
||||
msgstr "En la estantería"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr "Presión"
|
||||
@ -315,8 +327,8 @@ msgstr "Precio pagado"
|
||||
msgid "Price paid:"
|
||||
msgstr "Precio pagado:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr "Tipo de espoleta"
|
||||
@ -349,7 +361,7 @@ msgstr "Ajustes"
|
||||
msgid "Simple:"
|
||||
msgstr "Simple:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr "Acero"
|
||||
@ -384,17 +396,15 @@ msgstr "Color del texto"
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr "La página de seguimiento de armas autogestionada"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr "Trazadora"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
@ -436,8 +446,8 @@ msgstr "Campo de tiro"
|
||||
msgid "Range day"
|
||||
msgstr "Día de disparar"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -454,12 +464,18 @@ msgstr "Tiros disparados"
|
||||
msgid "No ammo staged"
|
||||
msgstr "No hay munición preparada"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -471,7 +487,13 @@ msgstr "Nuevos Tiros Récord"
|
||||
msgid "No shots recorded"
|
||||
msgstr "No se han grabado tiros"
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -499,48 +521,48 @@ msgstr "No hay otros contenedores"
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr "$%{amount}"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr "Bimetal"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr "Tipo de camisa"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr "Velocidad de boca"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr "Granos de polvora por carga"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr "Tipo de polvora"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -563,8 +585,8 @@ msgstr "Contraseña actual"
|
||||
msgid "New password"
|
||||
msgstr "Nueva contraseña"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr "Tipo de fuego"
|
||||
@ -587,16 +609,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr "Editar etiquetas de %{name}"
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr "No hay información de coste"
|
||||
@ -667,7 +689,7 @@ msgstr "Tiros Récord"
|
||||
msgid "Copies"
|
||||
msgstr "Copias"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr "Añadido en:"
|
||||
@ -714,9 +736,9 @@ msgid "View the source code"
|
||||
msgstr "Ver código fuente"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr "Catálogo"
|
||||
@ -747,8 +769,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr "Esta munición no está en un contenedor"
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr "Paquetes:"
|
||||
@ -775,9 +797,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr "Mostrar usadas"
|
||||
@ -793,171 +815,182 @@ msgstr "%{percentage}%"
|
||||
msgid "Rounds shot: %{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/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
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/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr "Ver como tabla"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr "Paquetes totales"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr "Paquetes totales:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr "Balas totales"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever rounds:"
|
||||
msgstr "Balas totales:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr "Paquetes usados"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr "Paquetes usados:"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr "Balas usadas"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr "Tabla de disparos"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank:"
|
||||
msgstr "En blanco:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core:"
|
||||
msgstr "Núcleo de bala:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type:"
|
||||
msgstr "Tipo de bala:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber:"
|
||||
msgstr "Calibre:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge:"
|
||||
msgstr "Cartucho:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material:"
|
||||
msgstr "Material de la camisa:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive:"
|
||||
msgstr "Corrosiva:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type:"
|
||||
msgstr "Tipo de fuego:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains:"
|
||||
msgstr "Granos:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary:"
|
||||
msgstr "Incendiarias:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type:"
|
||||
msgstr "Tipo de camisa:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer:"
|
||||
msgstr "Fabricante:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr "Velocidad de boca:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr "Granos de polvora por carga:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type:"
|
||||
msgstr "Tipo de polvora:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure:"
|
||||
msgstr "Presión:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type:"
|
||||
msgstr "Tipo de espoleta:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer:"
|
||||
msgstr "Trazadora:"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1021,7 +1054,13 @@ msgstr "Comprada en:"
|
||||
msgid "Edit ammo"
|
||||
msgstr "Editar munición"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1150,42 +1189,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1212,76 +1251,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Brass height"
|
||||
msgstr "Latón"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1291,175 +1330,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr "Sin Munición"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder"
|
||||
msgstr "Tipo de polvora"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer"
|
||||
msgstr "Tipo de espoleta"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size"
|
||||
msgstr "Tiros disparados"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size:"
|
||||
msgstr "Tiros disparados"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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"
|
||||
|
@ -69,7 +69,7 @@ msgstr "Correo o contraseña incorrecta"
|
||||
msgid "Not found"
|
||||
msgstr "No se encontró"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_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}"
|
||||
msgstr "Número inválido de copias, debe ser entre 1 y %{max}. Fue %{multiplier"
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr "Su navegador no es compatible con el elemento lienzo."
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr "Por favor escoja un usuario y tipo de munición valido"
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr "El recuento debe ser menos de %{count}"
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
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"
|
||||
|
@ -23,17 +23,17 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## 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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} borrado exitosamente"
|
||||
@ -44,10 +44,10 @@ msgstr "%{name} borrado exitosamente"
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
msgstr "%{name} actualizado exitosamente"
|
||||
@ -128,13 +128,13 @@ msgstr "Contraseña cambiada exitosamente."
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr "Por favor chequea el correo para verificar tu cuenta"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr "Guardando..."
|
||||
@ -165,7 +165,7 @@ msgstr "se ha removido %{tag_name} de %{container_name}"
|
||||
msgid "Adding..."
|
||||
msgstr "Añadiendo..."
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr "Tiros registrados exitosamente"
|
||||
@ -256,8 +256,8 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] "Munición añadida exitosamente"
|
||||
msgstr[1] "Municiones añadidas exitosamente"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
msgstr ""
|
||||
|
@ -40,7 +40,7 @@ msgstr "Ajoutez votre première caisse !"
|
||||
msgid "Add your first container!"
|
||||
msgstr "Ajoutez votre premier conteneur !"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr "Ajoutez votre premier type !"
|
||||
@ -95,6 +95,11 @@ msgstr "Se connecter"
|
||||
msgid "Make your first 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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -128,13 +133,13 @@ msgstr "Renvoyer les instructions de confirmation"
|
||||
msgid "Reset password"
|
||||
msgstr "Réinitialisé le mot de passe"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr "Sauvegarder"
|
||||
@ -211,6 +216,11 @@ msgstr "Changer la langue"
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -240,6 +250,11 @@ msgstr ""
|
||||
msgid "Export Data as JSON"
|
||||
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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -251,6 +266,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -268,6 +289,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -285,6 +318,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Stage"
|
||||
@ -301,6 +344,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -318,52 +366,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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"
|
||||
|
@ -30,7 +30,7 @@ msgid "Admins:"
|
||||
msgstr "Administrateur·ices :"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -38,48 +38,54 @@ msgstr "Administrateur·ices :"
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr "Couleur de fond"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr "Vide"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr "Cuivre"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr "Noyau de balle"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr "Type de balle"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr "Calibre"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr "Cartouche"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr "Matériau de la caisse"
|
||||
@ -99,8 +105,8 @@ msgstr "Conteneur"
|
||||
msgid "Containers"
|
||||
msgstr "Conteneurs"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr "Corrosive"
|
||||
@ -118,8 +124,8 @@ msgid "Count:"
|
||||
msgstr "Quantité :"
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
@ -145,19 +151,19 @@ msgstr "Modifier l’invitation"
|
||||
msgid "Edit Tag"
|
||||
msgstr "Modifier le tag"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr "FMJ"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr "Graines"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr "Incendiaire"
|
||||
@ -207,9 +213,9 @@ msgstr "Localisation :"
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr "Chargeur, lame-chargeur, boite de munition, etc."
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr "Fabricant"
|
||||
@ -224,16 +230,22 @@ msgstr "Boite de munition avec le sticker de fille d’animation"
|
||||
msgid "My cool ammo can"
|
||||
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/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -255,7 +267,7 @@ msgstr "Nouveau tag"
|
||||
msgid "No Ammo"
|
||||
msgstr "Aucune munition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr "Aucune munition pour ce type"
|
||||
@ -278,8 +290,8 @@ msgstr "Aucune invitation"
|
||||
msgid "No tags"
|
||||
msgstr "Aucun tag"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -298,8 +310,8 @@ msgstr "Notes :"
|
||||
msgid "On the bookshelf"
|
||||
msgstr "Sur l’étagère"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr "Pression"
|
||||
@ -315,8 +327,8 @@ msgstr "Prix payé"
|
||||
msgid "Price paid:"
|
||||
msgstr "Prix payé :"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr "Type d’amorce"
|
||||
@ -349,7 +361,7 @@ msgstr "Paramètres"
|
||||
msgid "Simple:"
|
||||
msgstr "Simple :"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr "Acier"
|
||||
@ -385,17 +397,15 @@ msgstr "Couleur du texte"
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr "Le site web de suivi d’arme à feux auto-hébergé"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr "Traceuse"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr "Type"
|
||||
@ -437,8 +447,8 @@ msgstr "Portée"
|
||||
msgid "Range day"
|
||||
msgstr "Journée de stand"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -455,12 +465,18 @@ msgstr "Tirs réalisés"
|
||||
msgid "No ammo staged"
|
||||
msgstr "Aucune munition sélectionnée"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -472,7 +488,13 @@ msgstr "Nouveaux enregistrements de tir"
|
||||
msgid "No shots recorded"
|
||||
msgstr "Aucun tir enregistré"
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -500,48 +522,48 @@ msgstr "Aucun autre conteneur"
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr "%{amount} $"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr "Bi-métal"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr "Type de douille"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr "Vélocité du canon"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr "Graines de poudre par charge"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr "Type de poudre"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr "UPC"
|
||||
@ -564,8 +586,8 @@ msgstr "Mot de passe actuel"
|
||||
msgid "New password"
|
||||
msgstr "Nouveau mot de passe"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr "Type d’allumage"
|
||||
@ -588,16 +610,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr "Éditer les tags de %{name}"
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr "Aucune information de prix"
|
||||
@ -668,7 +690,7 @@ msgstr "Enregistrer des tirs"
|
||||
msgid "Copies"
|
||||
msgstr "Exemplaires"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr "Ajouté le :"
|
||||
@ -715,9 +737,9 @@ msgid "View the source code"
|
||||
msgstr "Voir le code source"
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr "Catalogue"
|
||||
@ -748,8 +770,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr "Ce groupe de munition n’est pas dans un conteneur"
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr "Packages :"
|
||||
@ -776,9 +798,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
@ -794,171 +816,182 @@ msgstr ""
|
||||
msgid "Rounds shot: %{count}"
|
||||
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/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
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/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr "Quantité de cartouches"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds:"
|
||||
msgstr "Nombre totale de cartouches tirées :"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr "Cartouches tirées"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Blank:"
|
||||
msgstr "Vide"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet core:"
|
||||
msgstr "Noyau de balle"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet type:"
|
||||
msgstr "Type de balle"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Caliber:"
|
||||
msgstr "Calibre"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Cartridge:"
|
||||
msgstr "Cartouche"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Case material:"
|
||||
msgstr "Matériau de la caisse"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Corrosive:"
|
||||
msgstr "Corrosive"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Firing type:"
|
||||
msgstr "Type d’allumage"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Grains:"
|
||||
msgstr "Graines"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Incendiary:"
|
||||
msgstr "Incendiaire"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Jacket type:"
|
||||
msgstr "Type de douille"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Manufacturer:"
|
||||
msgstr "Fabricant"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr "Vélocité du canon"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr "Graines de poudre par charge"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder type:"
|
||||
msgstr "Type de poudre"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Pressure:"
|
||||
msgstr "Pression"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer type:"
|
||||
msgstr "Type d’amorce"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Tracer:"
|
||||
msgstr "Traceuse"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "UPC:"
|
||||
msgstr "UPC"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1022,7 +1055,13 @@ msgstr ""
|
||||
msgid "Edit ammo"
|
||||
msgstr "Éditer le type de munition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1151,42 +1190,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1213,76 +1252,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Brass height"
|
||||
msgstr "Cuivre"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1292,175 +1331,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr "Aucune munition"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder"
|
||||
msgstr "Type de poudre"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer"
|
||||
msgstr "Type d’amorce"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size"
|
||||
msgstr "Tirs réalisés"
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size:"
|
||||
msgstr "Tirs réalisés"
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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"
|
||||
|
@ -69,7 +69,7 @@ msgstr "Mél ou mot de passe invalide"
|
||||
msgid "Not found"
|
||||
msgstr "Pas trouvé"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_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}"
|
||||
msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}"
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr "Veuillez choisir un utilisateur valide et un groupe de munitions"
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr "La quantité doit être inférieur à %{count}"
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
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"
|
||||
|
@ -23,17 +23,17 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## 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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} supprimé· avec succès"
|
||||
@ -44,10 +44,10 @@ msgstr "%{name} supprimé· avec succès"
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
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"
|
||||
msgstr "Veuillez vérifier votre mél pour confirmer votre compte"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr "Sauvegarde en cours…"
|
||||
@ -167,7 +167,7 @@ msgstr "%{tag_name} a été retiré de %{container_name}"
|
||||
msgid "Adding..."
|
||||
msgstr "Ajout en cours…"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
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[1] "Groupe de munition mis à jour avec succès"
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
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} ?"
|
||||
|
@ -38,7 +38,7 @@ msgstr ""
|
||||
msgid "Add your first container!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:13
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add your first type!"
|
||||
msgstr ""
|
||||
@ -93,6 +93,11 @@ msgstr ""
|
||||
msgid "Make your first tag!"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
@ -126,13 +131,13 @@ msgstr ""
|
||||
msgid "Reset password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:57
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:35
|
||||
#: 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/tag_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:350
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
@ -209,6 +214,11 @@ msgstr ""
|
||||
msgid "View in Catalog"
|
||||
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/live/pack_live/index.html.heex:144
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:89
|
||||
@ -238,6 +248,11 @@ msgstr ""
|
||||
msgid "Export Data as JSON"
|
||||
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:145
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -249,6 +264,12 @@ msgstr ""
|
||||
msgid "Copy invite link for %{invite_name}"
|
||||
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:162
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:48
|
||||
@ -266,6 +287,18 @@ msgstr ""
|
||||
msgid "Delete invite for %{invite_name}"
|
||||
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:135
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:35
|
||||
@ -283,6 +316,16 @@ msgstr ""
|
||||
msgid "Edit invite for %{invite_name}"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Stage"
|
||||
@ -299,6 +342,11 @@ msgstr ""
|
||||
msgid "Unstage"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Clone pack of %{pack_count} bullets"
|
||||
@ -316,52 +364,8 @@ msgstr ""
|
||||
msgid "Edit pack of %{pack_count} bullets"
|
||||
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/type_live/show.html.heex:204
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "View pack of %{pack_count} bullets"
|
||||
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 ""
|
||||
|
@ -28,7 +28,7 @@ msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:58
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:44
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: 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.html.heex:3
|
||||
@ -36,48 +36,54 @@ msgstr ""
|
||||
msgid "Ammo"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:87
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:324
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:87
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:324
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:171
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:121
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:68
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:49
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:52
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:67
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:167
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:167
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -97,8 +103,8 @@ msgstr ""
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:88
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:328
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:88
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:328
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -116,8 +122,8 @@ msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/form_component.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -143,19 +149,19 @@ msgstr ""
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:59
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:112
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:112
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:86
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:320
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:320
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -205,9 +211,9 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:89
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:336
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:333
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:336
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -222,16 +228,22 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:153
|
||||
#: lib/cannery_web/components/container_table_component.ex:45
|
||||
#: lib/cannery_web/components/type_table_component.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:31
|
||||
#: 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/tag_live/form_component.html.heex:21
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
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:39
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -253,7 +265,7 @@ msgstr ""
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:180
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
@ -276,8 +288,8 @@ msgstr ""
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:46
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:38
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/pack_live/form_component.html.heex:50
|
||||
#: lib/cannery_web/live/pack_live/show.ex:91
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:30
|
||||
@ -296,8 +308,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:80
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:257
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:257
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -313,8 +325,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:83
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:296
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:83
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:296
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -345,7 +357,7 @@ msgstr ""
|
||||
msgid "Simple:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:151
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Steel"
|
||||
msgstr ""
|
||||
@ -379,17 +391,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:85
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:316
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:85
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:316
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: 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/pack_live/form_component.html.heex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -431,8 +441,8 @@ msgstr ""
|
||||
msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:47
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:49
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/pack_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:41
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -449,12 +459,18 @@ msgstr ""
|
||||
msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:3
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/pack_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
@ -466,7 +482,13 @@ msgstr ""
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:45
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:22
|
||||
#: 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/range_live/index.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -494,48 +516,48 @@ msgstr ""
|
||||
msgid "Shot log"
|
||||
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:47
|
||||
#: lib/cannery_web/components/pack_table_component.ex:163
|
||||
#: lib/cannery_web/components/pack_table_component.ex:246
|
||||
#: lib/cannery_web/components/type_table_component.ex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/pack_live/show.html.heex:42
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:150
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:160
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:160
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:66
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:156
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:82
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:279
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:82
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:279
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:76
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:244
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:76
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:244
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:74
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:236
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:74
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:236
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:343
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:343
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -558,8 +580,8 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:84
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:304
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:84
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:304
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -582,16 +604,16 @@ msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds:"
|
||||
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:242
|
||||
#: lib/cannery_web/components/type_table_component.ex:260
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:156
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
msgstr ""
|
||||
@ -662,7 +684,7 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
msgstr ""
|
||||
@ -709,9 +731,9 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/core_components/topbar.html.heex:50
|
||||
#: lib/cannery_web/live/type_live/index.ex:52
|
||||
#: lib/cannery_web/live/type_live/index.ex:62
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
msgstr ""
|
||||
@ -742,8 +764,8 @@ msgid "This ammo is not in a container"
|
||||
msgstr ""
|
||||
|
||||
#: 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/type_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs:"
|
||||
msgstr ""
|
||||
@ -769,9 +791,9 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
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/type_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:164
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
@ -787,171 +809,182 @@ msgstr ""
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:123
|
||||
#: lib/cannery_web/components/container_table_component.ex:64
|
||||
#: lib/cannery_web/components/type_table_component.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:144
|
||||
#: lib/cannery_web/components/container_table_component.ex:65
|
||||
#: lib/cannery_web/components/type_table_component.ex:144
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
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/show.html.heex:115
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:170
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:108
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:129
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:129
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:116
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:137
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:137
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:94
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:96
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds:"
|
||||
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
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:154
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:154
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Blank:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:132
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet core:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:131
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:131
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Bullet type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Caliber:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:121
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:121
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Cartridge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:134
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:134
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Case material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:155
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:155
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Corrosive:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:151
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:151
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Firing type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:130
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:130
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Grains:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:153
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:153
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Incendiary:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:133
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:133
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Jacket type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:156
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:156
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Manufacturer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:149
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:149
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Muzzle velocity:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:143
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:143
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder grains per charge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:141
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:141
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:147
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:147
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Pressure:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:150
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:150
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer type:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:152
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Tracer:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:157
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:157
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:102
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:146
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:102
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
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/pack_table_component.ex:250
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -1015,7 +1048,13 @@ msgstr ""
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: 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
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
@ -1142,42 +1181,42 @@ msgstr ""
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:261
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:261
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "+P"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:75
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid ".223"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "5.56x46mm NATO"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:300
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:300
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Boxer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:308
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:308
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Centerfire"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:43
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:43
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Really great weather"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:67
|
||||
#: lib/cannery_web/components/move_pack_component.ex:68
|
||||
#: lib/cannery_web/components/pack_table_component.ex:59
|
||||
#: lib/cannery_web/components/shot_record_table_component.ex:48
|
||||
#: lib/cannery_web/components/type_table_component.ex:100
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:45
|
||||
#: lib/cannery_web/live/pack_live/show.ex:93
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Actions"
|
||||
@ -1204,76 +1243,76 @@ msgstr ""
|
||||
msgid "Close modal"
|
||||
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/pack_live/index.html.heex:58
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:313
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:313
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Attributes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:56
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:56
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Brass height"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:128
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Brass height:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:57
|
||||
#: lib/cannery_web/components/type_table_component.ex:58
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:96
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:57
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:129
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:129
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Chamber size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dimensions"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:81
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:266
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:81
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:266
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Dram equivalent:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:51
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:67
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:123
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Gauge:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:72
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:207
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:207
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:139
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:139
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Load grains:"
|
||||
msgstr ""
|
||||
@ -1283,175 +1322,140 @@ msgstr ""
|
||||
msgid "No ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "None specified"
|
||||
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/pack_live/index.html.heex:61
|
||||
#: 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
|
||||
msgid "Pistol"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:233
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:233
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Powder"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:293
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:293
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Primer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:109
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:109
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Projectile"
|
||||
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/pack_live/index.html.heex:59
|
||||
#: 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
|
||||
msgid "Rifle"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:73
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:215
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:215
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot charge weight:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:70
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:191
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:70
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:191
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:137
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot material:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:71
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:200
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:71
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:200
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:138
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:138
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Shot size:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:69
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:183
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:69
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:183
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot type:"
|
||||
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/pack_live/index.html.heex:60
|
||||
#: 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
|
||||
msgid "Shotgun"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:62
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:143
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:143
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Slug core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:187
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:187
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Target, bird, buck, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:127
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired length:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:55
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:80
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unfired shell length"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:68
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:176
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/show.ex:135
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:135
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wadding:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/type_table_component.ex:150
|
||||
#: lib/cannery_web/components/ammo_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/pack_live/index.html.heex:50
|
||||
#: 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
|
||||
msgid "Class"
|
||||
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 ""
|
||||
|
@ -70,7 +70,7 @@ msgstr "Seoladh email nó pasfhocal neamhbhailí"
|
||||
msgid "Not found"
|
||||
msgstr "Ní feidir é a fáil"
|
||||
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:18
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:18
|
||||
#: 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_settings/edit.html.heex:22
|
||||
@ -171,42 +171,42 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:1121
|
||||
#: lib/cannery/ammo.ex:1123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
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
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:74
|
||||
#: lib/cannery/activity_log/shot_group.ex:74
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:88
|
||||
#: lib/cannery/activity_log/shot_group.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left can be at most %{count} rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:84
|
||||
#: lib/cannery/activity_log/shot_group.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo left must be at least 0"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:119
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Count can be at most %{count} shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_record.ex:80
|
||||
#: lib/cannery/activity_log/shot_group.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "can't be blank"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/pack.ex:92
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a type and container"
|
||||
msgstr ""
|
||||
|
@ -21,17 +21,17 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## 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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -42,10 +42,10 @@ msgstr ""
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
msgstr ""
|
||||
@ -120,13 +120,13 @@ msgstr ""
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
@ -156,7 +156,7 @@ msgstr ""
|
||||
msgid "Adding..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
@ -250,8 +250,8 @@ msgstr[2] ""
|
||||
msgstr[3] ""
|
||||
msgstr[4] ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
msgstr ""
|
||||
|
@ -10,17 +10,17 @@
|
||||
msgid ""
|
||||
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/invite_live/form_component.ex:80
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:78
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:88
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} created successfully"
|
||||
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/type_live/index.ex:72
|
||||
#: lib/cannery_web/live/type_live/show.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -31,10 +31,10 @@ msgstr ""
|
||||
msgid "%{name} has been deleted"
|
||||
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/invite_live/form_component.ex:62
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:60
|
||||
#: lib/cannery_web/live/type_live/form_component.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} updated successfully"
|
||||
msgstr ""
|
||||
@ -109,13 +109,13 @@ msgstr ""
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.html.heex:59
|
||||
#: lib/cannery_web/components/add_shot_group_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/invite_live/form_component.html.heex:37
|
||||
#: 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/tag_live/form_component.html.heex:39
|
||||
#: lib/cannery_web/live/type_live/form_component.html.heex:351
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
@ -145,7 +145,7 @@ msgstr ""
|
||||
msgid "Adding..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_record_component.ex:60
|
||||
#: lib/cannery_web/components/add_shot_group_component.ex:60
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
@ -236,8 +236,8 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/type_live/index.html.heex:116
|
||||
#: lib/cannery_web/live/type_live/show.html.heex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:122
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
msgstr ""
|
||||
|
@ -2,6 +2,10 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
drop index(:ammo_types, [:type])
|
||||
|
||||
flush()
|
||||
|
||||
rename table(:ammo_types), :type, to: :class
|
||||
|
||||
alter table(:ammo_types) do
|
||||
@ -10,6 +14,8 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
|
||||
|
||||
flush()
|
||||
|
||||
create index(:ammo_types, [:class])
|
||||
|
||||
execute """
|
||||
ALTER TABLE ammo_types
|
||||
ADD COLUMN search tsvector
|
||||
@ -53,6 +59,10 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
|
||||
end
|
||||
|
||||
def down do
|
||||
drop index(:ammo_types, [:class])
|
||||
|
||||
flush()
|
||||
|
||||
rename table(:ammo_types), :class, to: :type
|
||||
|
||||
alter table(:ammo_types) do
|
||||
@ -61,6 +71,8 @@ defmodule Cannery.Repo.Migrations.RenameTypeToClass do
|
||||
|
||||
flush()
|
||||
|
||||
create index(:ammo_types, [:type])
|
||||
|
||||
execute """
|
||||
ALTER TABLE ammo_types
|
||||
ADD COLUMN search TSVECTOR
|
||||
|
@ -3,7 +3,11 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
|
||||
|
||||
def up do
|
||||
drop index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
|
||||
drop index(:shot_groups, [:user_id, :ammo_group_id])
|
||||
drop index(:ammo_groups, [:user_id, :ammo_type_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()
|
||||
|
||||
@ -12,11 +16,22 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
|
||||
flush()
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
def down do
|
||||
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()
|
||||
|
||||
@ -25,10 +40,12 @@ defmodule Cannery.Repo.Migrations.RenameAmmoGroupsToPacks do
|
||||
flush()
|
||||
|
||||
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
|
||||
|
||||
flush()
|
||||
|
||||
create index(:shot_groups, [:user_id, :ammo_group_id])
|
||||
end
|
||||
end
|
||||
|
@ -1,7 +0,0 @@
|
||||
defmodule Cannery.Repo.Migrations.RenameShotGroupsToShotRecords do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
rename table(:shot_groups), to: table(:shot_records)
|
||||
end
|
||||
end
|
@ -1,8 +0,0 @@
|
||||
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
|
@ -5,30 +5,31 @@ defmodule Cannery.ActivityLogTest do
|
||||
|
||||
use Cannery.DataCase
|
||||
import Cannery.Fixtures
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotRecord, Ammo}
|
||||
alias Cannery.{ActivityLog, ActivityLog.ShotGroup, Ammo}
|
||||
|
||||
@moduletag :activity_log_test
|
||||
|
||||
describe "shot_records" do
|
||||
describe "shot_groups" do
|
||||
setup do
|
||||
current_user = user_fixture()
|
||||
container = container_fixture(current_user)
|
||||
type = type_fixture(current_user)
|
||||
ammo_type = ammo_type_fixture(current_user)
|
||||
|
||||
{1, [%{id: pack_id} = pack]} = pack_fixture(%{count: 25}, type, container, current_user)
|
||||
{1, [%{id: pack_id} = pack]} =
|
||||
pack_fixture(%{count: 25}, ammo_type, container, current_user)
|
||||
|
||||
shot_record =
|
||||
shot_group =
|
||||
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|
||||
|> shot_record_fixture(current_user, pack)
|
||||
|> shot_group_fixture(current_user, pack)
|
||||
|
||||
pack = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
[
|
||||
current_user: current_user,
|
||||
container: container,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
pack: pack,
|
||||
shot_record: shot_record
|
||||
shot_group: shot_group
|
||||
]
|
||||
end
|
||||
|
||||
@ -36,96 +37,95 @@ defmodule Cannery.ActivityLogTest do
|
||||
%{pack: pack, current_user: current_user} do
|
||||
assert ActivityLog.get_shot_record_count!(current_user) == 1
|
||||
|
||||
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
|
||||
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
|
||||
assert ActivityLog.get_shot_record_count!(current_user) == 2
|
||||
|
||||
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
|
||||
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, current_user, pack)
|
||||
assert ActivityLog.get_shot_record_count!(current_user) == 3
|
||||
|
||||
other_user = user_fixture()
|
||||
assert ActivityLog.get_shot_record_count!(other_user) == 0
|
||||
|
||||
container = container_fixture(other_user)
|
||||
type = type_fixture(other_user)
|
||||
{1, [pack]} = pack_fixture(%{count: 25}, type, container, other_user)
|
||||
shot_record_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack)
|
||||
ammo_type = ammo_type_fixture(other_user)
|
||||
{1, [pack]} = pack_fixture(%{count: 25}, ammo_type, container, other_user)
|
||||
shot_group_fixture(%{count: 1, date: ~N[2022-02-13 03:17:00]}, other_user, pack)
|
||||
assert ActivityLog.get_shot_record_count!(other_user) == 1
|
||||
end
|
||||
|
||||
test "get_shot_record!/2 returns the shot_record with given id",
|
||||
%{shot_record: shot_record, current_user: current_user} do
|
||||
assert ActivityLog.get_shot_record!(shot_record.id, current_user) == shot_record
|
||||
test "get_shot_group!/2 returns the shot_group with given id",
|
||||
%{shot_group: shot_group, current_user: current_user} do
|
||||
assert ActivityLog.get_shot_group!(shot_group.id, current_user) == shot_group
|
||||
end
|
||||
|
||||
test "get_shot_record!/2 does not return a shot_record of another user",
|
||||
%{shot_record: shot_record} do
|
||||
test "get_shot_group!/2 does not return a shot_group of another user",
|
||||
%{shot_group: shot_group} do
|
||||
another_user = user_fixture()
|
||||
|
||||
assert_raise Ecto.NoResultsError, fn ->
|
||||
ActivityLog.get_shot_record!(shot_record.id, another_user)
|
||||
ActivityLog.get_shot_group!(shot_group.id, another_user)
|
||||
end
|
||||
end
|
||||
|
||||
test "create_shot_record/3 with valid data creates a shot_record",
|
||||
test "create_shot_group/3 with valid data creates a shot_group",
|
||||
%{current_user: current_user, pack: pack} do
|
||||
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
|
||||
|
||||
assert {:ok, %ShotRecord{} = shot_record} =
|
||||
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
ActivityLog.create_shot_group(valid_attrs, current_user, pack)
|
||||
|
||||
assert shot_record.count == 10
|
||||
assert shot_record.date == ~D[2022-02-13]
|
||||
assert shot_record.notes == "some notes"
|
||||
assert shot_group.count == 10
|
||||
assert shot_group.date == ~D[2022-02-13]
|
||||
assert shot_group.notes == "some notes"
|
||||
end
|
||||
|
||||
test "create_shot_record/3 removes corresponding count from pack",
|
||||
test "create_shot_group/3 removes corresponding count from pack",
|
||||
%{
|
||||
current_user: current_user,
|
||||
pack: %{id: pack_id, count: org_count} = pack
|
||||
} do
|
||||
valid_attrs = %{count: 10, date: ~D[2022-02-13], notes: "some notes"}
|
||||
|
||||
assert {:ok, %ShotRecord{} = shot_record} =
|
||||
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
ActivityLog.create_shot_group(valid_attrs, current_user, pack)
|
||||
|
||||
%{count: new_count} = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
assert org_count - shot_record.count == new_count
|
||||
assert org_count - shot_group.count == new_count
|
||||
assert new_count == 10
|
||||
end
|
||||
|
||||
test "create_shot_record/3 does not remove more tha pack amount",
|
||||
test "create_shot_group/3 does not remove more tha pack amount",
|
||||
%{current_user: current_user, pack: %{id: pack_id} = pack} do
|
||||
valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"}
|
||||
|
||||
assert {:ok, %ShotRecord{}} =
|
||||
ActivityLog.create_shot_record(valid_attrs, current_user, pack)
|
||||
assert {:ok, %ShotGroup{}} = ActivityLog.create_shot_group(valid_attrs, current_user, pack)
|
||||
|
||||
pack = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
assert pack.count == 0
|
||||
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
ActivityLog.create_shot_record(%{count: 1}, current_user, pack)
|
||||
ActivityLog.create_shot_group(%{count: 1}, current_user, pack)
|
||||
end
|
||||
|
||||
test "create_shot_record/3 with invalid data returns error changeset",
|
||||
test "create_shot_group/3 with invalid data returns error changeset",
|
||||
%{current_user: current_user, pack: pack} do
|
||||
invalid_params = %{count: nil, date: nil, notes: nil}
|
||||
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
ActivityLog.create_shot_record(invalid_params, current_user, pack)
|
||||
ActivityLog.create_shot_group(invalid_params, current_user, pack)
|
||||
end
|
||||
|
||||
test "update_shot_record/3 with valid data updates the shot_record and pack",
|
||||
test "update_shot_group/3 with valid data updates the shot_group and pack",
|
||||
%{
|
||||
shot_record: shot_record,
|
||||
shot_group: shot_group,
|
||||
pack: %{id: pack_id},
|
||||
current_user: current_user
|
||||
} do
|
||||
assert {:ok, %ShotRecord{} = shot_record} =
|
||||
ActivityLog.update_shot_record(
|
||||
shot_record,
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
ActivityLog.update_shot_group(
|
||||
shot_group,
|
||||
%{
|
||||
count: 10,
|
||||
date: ~D[2022-02-13],
|
||||
@ -136,14 +136,14 @@ defmodule Cannery.ActivityLogTest do
|
||||
|
||||
pack = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
assert shot_record.count == 10
|
||||
assert shot_group.count == 10
|
||||
assert pack.count == 15
|
||||
assert shot_record.date == ~D[2022-02-13]
|
||||
assert shot_record.notes == "some updated notes"
|
||||
assert shot_group.date == ~D[2022-02-13]
|
||||
assert shot_group.notes == "some updated notes"
|
||||
|
||||
assert {:ok, %ShotRecord{} = shot_record} =
|
||||
ActivityLog.update_shot_record(
|
||||
shot_record,
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
ActivityLog.update_shot_group(
|
||||
shot_group,
|
||||
%{
|
||||
count: 25,
|
||||
date: ~D[2022-02-13],
|
||||
@ -154,82 +154,83 @@ defmodule Cannery.ActivityLogTest do
|
||||
|
||||
pack = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
assert shot_record.count == 25
|
||||
assert shot_group.count == 25
|
||||
assert pack.count == 0
|
||||
end
|
||||
|
||||
test "update_shot_record/3 with invalid data returns error changeset",
|
||||
%{shot_record: shot_record, current_user: current_user} do
|
||||
test "update_shot_group/3 with invalid data returns error changeset",
|
||||
%{shot_group: shot_group, current_user: current_user} do
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
ActivityLog.update_shot_record(
|
||||
shot_record,
|
||||
ActivityLog.update_shot_group(
|
||||
shot_group,
|
||||
%{count: 26, date: nil, notes: nil},
|
||||
current_user
|
||||
)
|
||||
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
ActivityLog.update_shot_record(
|
||||
shot_record,
|
||||
ActivityLog.update_shot_group(
|
||||
shot_group,
|
||||
%{count: -1, date: nil, notes: nil},
|
||||
current_user
|
||||
)
|
||||
|
||||
assert shot_record == ActivityLog.get_shot_record!(shot_record.id, current_user)
|
||||
assert shot_group == ActivityLog.get_shot_group!(shot_group.id, current_user)
|
||||
end
|
||||
|
||||
test "delete_shot_record/2 deletes the shot_record and adds value back",
|
||||
%{shot_record: shot_record, current_user: current_user, pack: %{id: pack_id}} do
|
||||
assert {:ok, %ShotRecord{}} = ActivityLog.delete_shot_record(shot_record, current_user)
|
||||
test "delete_shot_group/2 deletes the shot_group and adds value back",
|
||||
%{shot_group: shot_group, current_user: current_user, pack: %{id: pack_id}} do
|
||||
assert {:ok, %ShotGroup{}} = ActivityLog.delete_shot_group(shot_group, current_user)
|
||||
|
||||
assert %{count: 25} = pack_id |> Ammo.get_pack!(current_user)
|
||||
|
||||
assert_raise Ecto.NoResultsError, fn ->
|
||||
ActivityLog.get_shot_record!(shot_record.id, current_user)
|
||||
ActivityLog.get_shot_group!(shot_group.id, current_user)
|
||||
end
|
||||
end
|
||||
|
||||
test "get_used_count/2 returns accurate used count", %{
|
||||
pack: pack,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [another_pack]} = pack_fixture(type, container, current_user)
|
||||
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
|
||||
assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
|
||||
assert 5 = pack |> ActivityLog.get_used_count(current_user)
|
||||
|
||||
shot_record_fixture(%{count: 15}, current_user, pack)
|
||||
shot_group_fixture(%{count: 15}, current_user, pack)
|
||||
assert 20 = pack |> ActivityLog.get_used_count(current_user)
|
||||
|
||||
shot_record_fixture(%{count: 10}, current_user, pack)
|
||||
shot_group_fixture(%{count: 10}, current_user, pack)
|
||||
assert 30 = pack |> ActivityLog.get_used_count(current_user)
|
||||
|
||||
{1, [another_pack]} = pack_fixture(type, container, current_user)
|
||||
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
|
||||
assert 0 = another_pack |> ActivityLog.get_used_count(current_user)
|
||||
end
|
||||
|
||||
test "get_used_counts/2 returns accurate used counts", %{
|
||||
pack: %{id: pack_id} = pack,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
|
||||
{1, [%{id: another_pack_id} = another_pack]} =
|
||||
pack_fixture(ammo_type, container, current_user)
|
||||
|
||||
assert %{pack_id => 5} ==
|
||||
[pack, another_pack] |> ActivityLog.get_used_counts(current_user)
|
||||
|
||||
shot_record_fixture(%{count: 5}, current_user, another_pack)
|
||||
shot_group_fixture(%{count: 5}, current_user, another_pack)
|
||||
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
|
||||
assert %{^pack_id => 5} = used_counts
|
||||
assert %{^another_pack_id => 5} = used_counts
|
||||
|
||||
shot_record_fixture(%{count: 15}, current_user, pack)
|
||||
shot_group_fixture(%{count: 15}, current_user, pack)
|
||||
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
|
||||
assert %{^pack_id => 20} = used_counts
|
||||
assert %{^another_pack_id => 5} = used_counts
|
||||
|
||||
shot_record_fixture(%{count: 10}, current_user, pack)
|
||||
shot_group_fixture(%{count: 10}, current_user, pack)
|
||||
used_counts = [pack, another_pack] |> ActivityLog.get_used_counts(current_user)
|
||||
assert %{^pack_id => 30} = used_counts
|
||||
assert %{^another_pack_id => 5} = used_counts
|
||||
@ -237,196 +238,200 @@ defmodule Cannery.ActivityLogTest do
|
||||
|
||||
test "get_last_used_date/2 returns accurate used count", %{
|
||||
pack: pack,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
container: container,
|
||||
shot_record: %{date: date},
|
||||
shot_group: %{date: date},
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [another_pack]} = pack_fixture(type, container, current_user)
|
||||
{1, [another_pack]} = pack_fixture(ammo_type, container, current_user)
|
||||
assert another_pack |> ActivityLog.get_last_used_date(current_user) |> is_nil()
|
||||
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
|
||||
|
||||
%{date: date} = shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
|
||||
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
|
||||
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
|
||||
|
||||
%{date: date} = shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
|
||||
%{date: date} = shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
|
||||
assert ^date = pack |> ActivityLog.get_last_used_date(current_user)
|
||||
end
|
||||
|
||||
test "get_last_used_dates/2 returns accurate used counts", %{
|
||||
pack: %{id: pack_id} = pack,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
container: container,
|
||||
shot_record: %{date: date},
|
||||
shot_group: %{date: date},
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [%{id: another_pack_id} = another_pack]} = pack_fixture(type, container, current_user)
|
||||
{1, [%{id: another_pack_id} = another_pack]} =
|
||||
pack_fixture(ammo_type, container, current_user)
|
||||
|
||||
# unset date
|
||||
assert %{pack_id => date} ==
|
||||
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
|
||||
|
||||
shot_record_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack)
|
||||
shot_group_fixture(%{date: ~D[2022-11-09]}, current_user, another_pack)
|
||||
|
||||
# setting initial date
|
||||
last_used_shot_records =
|
||||
last_used_shot_groups =
|
||||
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
|
||||
|
||||
assert %{^pack_id => ^date} = last_used_shot_records
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
|
||||
assert %{^pack_id => ^date} = last_used_shot_groups
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
|
||||
|
||||
# setting another date
|
||||
shot_record_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
|
||||
shot_group_fixture(%{date: ~D[2022-11-10]}, current_user, pack)
|
||||
|
||||
last_used_shot_records =
|
||||
last_used_shot_groups =
|
||||
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
|
||||
|
||||
assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_records
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
|
||||
assert %{^pack_id => ~D[2022-11-10]} = last_used_shot_groups
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
|
||||
|
||||
# setting yet another date
|
||||
shot_record_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
|
||||
shot_group_fixture(%{date: ~D[2022-11-11]}, current_user, pack)
|
||||
|
||||
last_used_shot_records =
|
||||
last_used_shot_groups =
|
||||
[pack, another_pack] |> ActivityLog.get_last_used_dates(current_user)
|
||||
|
||||
assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_records
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_records
|
||||
assert %{^pack_id => ~D[2022-11-11]} = last_used_shot_groups
|
||||
assert %{^another_pack_id => ~D[2022-11-09]} = last_used_shot_groups
|
||||
end
|
||||
|
||||
test "get_used_count_for_type/2 gets accurate used round count for type",
|
||||
%{type: type, pack: pack, current_user: current_user} do
|
||||
another_type = type_fixture(current_user)
|
||||
assert 0 = another_type |> ActivityLog.get_used_count_for_type(current_user)
|
||||
assert 5 = type |> ActivityLog.get_used_count_for_type(current_user)
|
||||
test "get_used_count_for_ammo_type/2 gets accurate used round count for ammo type",
|
||||
%{ammo_type: ammo_type, pack: pack, current_user: current_user} do
|
||||
another_ammo_type = ammo_type_fixture(current_user)
|
||||
assert 0 = another_ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
|
||||
assert 5 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
|
||||
|
||||
shot_record_fixture(%{count: 5}, current_user, pack)
|
||||
assert 10 = type |> ActivityLog.get_used_count_for_type(current_user)
|
||||
shot_group_fixture(%{count: 5}, current_user, pack)
|
||||
assert 10 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
|
||||
|
||||
shot_record_fixture(%{count: 1}, current_user, pack)
|
||||
assert 11 = type |> ActivityLog.get_used_count_for_type(current_user)
|
||||
shot_group_fixture(%{count: 1}, current_user, pack)
|
||||
assert 11 = ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user)
|
||||
end
|
||||
|
||||
test "get_used_count_for_types/2 gets accurate used round count for types", %{
|
||||
type: %{id: type_id} = type,
|
||||
test "get_used_count_for_ammo_types/2 gets accurate used round count for ammo types", %{
|
||||
ammo_type: %{id: ammo_type_id} = ammo_type,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
# testing unused type
|
||||
%{id: another_type_id} = another_type = type_fixture(current_user)
|
||||
{1, [pack]} = pack_fixture(another_type, container, current_user)
|
||||
# testing unused ammo type
|
||||
%{id: another_ammo_type_id} = another_ammo_type = ammo_type_fixture(current_user)
|
||||
{1, [pack]} = pack_fixture(another_ammo_type, container, current_user)
|
||||
|
||||
assert %{type_id => 5} ==
|
||||
[type, another_type]
|
||||
|> ActivityLog.get_used_count_for_types(current_user)
|
||||
assert %{ammo_type_id => 5} ==
|
||||
[ammo_type, another_ammo_type]
|
||||
|> ActivityLog.get_used_count_for_ammo_types(current_user)
|
||||
|
||||
# use generated pack
|
||||
shot_record_fixture(%{count: 5}, current_user, pack)
|
||||
shot_group_fixture(%{count: 5}, current_user, pack)
|
||||
|
||||
used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
|
||||
used_counts =
|
||||
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
|
||||
|
||||
assert %{^type_id => 5} = used_counts
|
||||
assert %{^another_type_id => 5} = used_counts
|
||||
assert %{^ammo_type_id => 5} = used_counts
|
||||
assert %{^another_ammo_type_id => 5} = used_counts
|
||||
|
||||
# use generated pack again
|
||||
shot_record_fixture(%{count: 1}, current_user, pack)
|
||||
shot_group_fixture(%{count: 1}, current_user, pack)
|
||||
|
||||
used_counts = [type, another_type] |> ActivityLog.get_used_count_for_types(current_user)
|
||||
used_counts =
|
||||
[ammo_type, another_ammo_type] |> ActivityLog.get_used_count_for_ammo_types(current_user)
|
||||
|
||||
assert %{^type_id => 5} = used_counts
|
||||
assert %{^another_type_id => 6} = used_counts
|
||||
assert %{^ammo_type_id => 5} = used_counts
|
||||
assert %{^another_ammo_type_id => 6} = used_counts
|
||||
end
|
||||
end
|
||||
|
||||
describe "list_shot_records/3" do
|
||||
describe "list_shot_groups/3" do
|
||||
setup do
|
||||
current_user = user_fixture()
|
||||
container = container_fixture(current_user)
|
||||
type = type_fixture(current_user)
|
||||
{1, [pack]} = pack_fixture(type, container, current_user)
|
||||
ammo_type = ammo_type_fixture(current_user)
|
||||
{1, [pack]} = pack_fixture(ammo_type, container, current_user)
|
||||
|
||||
[
|
||||
current_user: current_user,
|
||||
container: container,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
pack: pack
|
||||
]
|
||||
end
|
||||
|
||||
test "list_shot_records/3 returns relevant shot_records for a type",
|
||||
test "list_shot_groups/3 returns relevant shot_groups for a type",
|
||||
%{current_user: current_user, container: container} do
|
||||
other_user = user_fixture()
|
||||
other_container = container_fixture(other_user)
|
||||
|
||||
for class <- ["rifle", "shotgun", "pistol"] do
|
||||
other_type = type_fixture(%{class: class}, other_user)
|
||||
{1, [other_pack]} = pack_fixture(other_type, other_container, other_user)
|
||||
shot_record_fixture(other_user, other_pack)
|
||||
other_ammo_type = ammo_type_fixture(%{class: class}, other_user)
|
||||
{1, [other_pack]} = pack_fixture(other_ammo_type, other_container, other_user)
|
||||
shot_group_fixture(other_user, other_pack)
|
||||
end
|
||||
|
||||
rifle_type = type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
|
||||
rifle_shot_record = shot_record_fixture(current_user, rifle_pack)
|
||||
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user)
|
||||
rifle_shot_group = shot_group_fixture(current_user, rifle_pack)
|
||||
|
||||
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
|
||||
shotgun_shot_record = shot_record_fixture(current_user, shotgun_pack)
|
||||
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user)
|
||||
shotgun_shot_group = shot_group_fixture(current_user, shotgun_pack)
|
||||
|
||||
pistol_type = type_fixture(%{class: :pistol}, current_user)
|
||||
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
|
||||
pistol_shot_record = shot_record_fixture(current_user, pistol_pack)
|
||||
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user)
|
||||
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user)
|
||||
pistol_shot_group = shot_group_fixture(current_user, pistol_pack)
|
||||
|
||||
assert [^rifle_shot_record] = ActivityLog.list_shot_records(:rifle, current_user)
|
||||
assert [^shotgun_shot_record] = ActivityLog.list_shot_records(:shotgun, current_user)
|
||||
assert [^pistol_shot_record] = ActivityLog.list_shot_records(:pistol, current_user)
|
||||
assert [^rifle_shot_group] = ActivityLog.list_shot_groups(:rifle, current_user)
|
||||
assert [^shotgun_shot_group] = ActivityLog.list_shot_groups(:shotgun, current_user)
|
||||
assert [^pistol_shot_group] = ActivityLog.list_shot_groups(:pistol, current_user)
|
||||
|
||||
shot_records = ActivityLog.list_shot_records(:all, current_user)
|
||||
assert Enum.count(shot_records) == 3
|
||||
assert rifle_shot_record in shot_records
|
||||
assert shotgun_shot_record in shot_records
|
||||
assert pistol_shot_record in shot_records
|
||||
shot_groups = ActivityLog.list_shot_groups(:all, current_user)
|
||||
assert Enum.count(shot_groups) == 3
|
||||
assert rifle_shot_group in shot_groups
|
||||
assert shotgun_shot_group in shot_groups
|
||||
assert pistol_shot_group in shot_groups
|
||||
|
||||
shot_records = ActivityLog.list_shot_records(nil, current_user)
|
||||
assert Enum.count(shot_records) == 3
|
||||
assert rifle_shot_record in shot_records
|
||||
assert shotgun_shot_record in shot_records
|
||||
assert pistol_shot_record in shot_records
|
||||
shot_groups = ActivityLog.list_shot_groups(nil, current_user)
|
||||
assert Enum.count(shot_groups) == 3
|
||||
assert rifle_shot_group in shot_groups
|
||||
assert shotgun_shot_group in shot_groups
|
||||
assert pistol_shot_group in shot_groups
|
||||
end
|
||||
|
||||
test "list_shot_records/3 returns relevant shot_records for a search", %{
|
||||
type: type,
|
||||
test "list_shot_groups/3 returns relevant shot_groups for a search", %{
|
||||
ammo_type: ammo_type,
|
||||
pack: pack,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
shot_record_a = shot_record_fixture(%{notes: "amazing"}, current_user, pack)
|
||||
shot_group_a = shot_group_fixture(%{notes: "amazing"}, current_user, pack)
|
||||
|
||||
{1, [another_pack]} = pack_fixture(%{notes: "stupendous"}, type, container, current_user)
|
||||
{1, [another_pack]} =
|
||||
pack_fixture(%{notes: "stupendous"}, ammo_type, container, current_user)
|
||||
|
||||
shot_record_b = shot_record_fixture(current_user, another_pack)
|
||||
shot_group_b = shot_group_fixture(current_user, another_pack)
|
||||
|
||||
another_type = type_fixture(%{name: "fabulous ammo"}, current_user)
|
||||
another_ammo_type = ammo_type_fixture(%{name: "fabulous ammo"}, current_user)
|
||||
|
||||
{1, [yet_another_pack]} = pack_fixture(another_type, container, current_user)
|
||||
{1, [yet_another_pack]} = pack_fixture(another_ammo_type, container, current_user)
|
||||
|
||||
shot_record_c = shot_record_fixture(current_user, yet_another_pack)
|
||||
shot_group_c = shot_group_fixture(current_user, yet_another_pack)
|
||||
|
||||
another_user = user_fixture()
|
||||
another_container = container_fixture(another_user)
|
||||
another_type = type_fixture(another_user)
|
||||
another_ammo_type = ammo_type_fixture(another_user)
|
||||
|
||||
{1, [another_pack]} = pack_fixture(another_type, another_container, another_user)
|
||||
{1, [another_pack]} = pack_fixture(another_ammo_type, another_container, another_user)
|
||||
|
||||
_shouldnt_return = shot_record_fixture(another_user, another_pack)
|
||||
_shouldnt_return = shot_group_fixture(another_user, another_pack)
|
||||
|
||||
# notes
|
||||
assert ActivityLog.list_shot_records("amazing", :all, current_user) == [shot_record_a]
|
||||
assert ActivityLog.list_shot_groups("amazing", :all, current_user) == [shot_group_a]
|
||||
|
||||
# pack attributes
|
||||
assert ActivityLog.list_shot_records("stupendous", :all, current_user) == [shot_record_b]
|
||||
assert ActivityLog.list_shot_groups("stupendous", :all, current_user) == [shot_group_b]
|
||||
|
||||
# type attributes
|
||||
assert ActivityLog.list_shot_records("fabulous", :all, current_user) == [shot_record_c]
|
||||
# ammo type attributes
|
||||
assert ActivityLog.list_shot_groups("fabulous", :all, current_user) == [shot_group_c]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,19 +11,19 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
setup [:register_and_log_in_user]
|
||||
|
||||
defp add_data(%{current_user: current_user}) do
|
||||
type = type_fixture(current_user)
|
||||
ammo_type = ammo_type_fixture(current_user)
|
||||
container = container_fixture(current_user)
|
||||
tag = tag_fixture(current_user)
|
||||
Containers.add_tag!(container, tag, current_user)
|
||||
{1, [pack]} = pack_fixture(type, container, current_user)
|
||||
shot_record = shot_record_fixture(current_user, pack)
|
||||
{1, [pack]} = pack_fixture(ammo_type, container, current_user)
|
||||
shot_group = shot_group_fixture(current_user, pack)
|
||||
pack = pack |> Repo.reload!()
|
||||
|
||||
%{
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
pack: pack,
|
||||
container: container,
|
||||
shot_record: shot_record,
|
||||
shot_group: shot_group,
|
||||
tag: tag
|
||||
}
|
||||
end
|
||||
@ -35,15 +35,15 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
conn: conn,
|
||||
current_user: current_user,
|
||||
container: container,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
pack: pack,
|
||||
shot_record: shot_record,
|
||||
shot_group: shot_group,
|
||||
tag: tag
|
||||
} do
|
||||
conn = get(conn, Routes.export_path(conn, :export, :json))
|
||||
|
||||
ideal_pack = %{
|
||||
"type_id" => pack.type_id,
|
||||
"ammo_type_id" => pack.ammo_type_id,
|
||||
"container_id" => pack.container_id,
|
||||
"count" => pack.count,
|
||||
"id" => pack.id,
|
||||
@ -56,34 +56,34 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
"percentage_remaining" => pack |> Ammo.get_percentage_remaining(current_user)
|
||||
}
|
||||
|
||||
ideal_type = %{
|
||||
"blank" => type.blank,
|
||||
"bullet_core" => type.bullet_core,
|
||||
"bullet_type" => type.bullet_type,
|
||||
"caliber" => type.caliber,
|
||||
"cartridge" => type.cartridge,
|
||||
"case_material" => type.case_material,
|
||||
"corrosive" => type.corrosive,
|
||||
"desc" => type.desc,
|
||||
"firing_type" => type.firing_type,
|
||||
"grains" => type.grains,
|
||||
"id" => type.id,
|
||||
"incendiary" => type.incendiary,
|
||||
"jacket_type" => type.jacket_type,
|
||||
"manufacturer" => type.manufacturer,
|
||||
"muzzle_velocity" => type.muzzle_velocity,
|
||||
"name" => type.name,
|
||||
"powder_grains_per_charge" => type.powder_grains_per_charge,
|
||||
"powder_type" => type.powder_type,
|
||||
"pressure" => type.pressure,
|
||||
"primer_type" => type.primer_type,
|
||||
"tracer" => type.tracer,
|
||||
"upc" => type.upc,
|
||||
"average_cost" => type |> Ammo.get_average_cost_for_type(current_user),
|
||||
"round_count" => type |> Ammo.get_round_count_for_type(current_user),
|
||||
"used_count" => type |> ActivityLog.get_used_count_for_type(current_user),
|
||||
"pack_count" => type |> Ammo.get_packs_count_for_type(current_user),
|
||||
"total_pack_count" => type |> Ammo.get_packs_count_for_type(current_user, true)
|
||||
ideal_ammo_type = %{
|
||||
"blank" => ammo_type.blank,
|
||||
"bullet_core" => ammo_type.bullet_core,
|
||||
"bullet_type" => ammo_type.bullet_type,
|
||||
"caliber" => ammo_type.caliber,
|
||||
"cartridge" => ammo_type.cartridge,
|
||||
"case_material" => ammo_type.case_material,
|
||||
"corrosive" => ammo_type.corrosive,
|
||||
"desc" => ammo_type.desc,
|
||||
"firing_type" => ammo_type.firing_type,
|
||||
"grains" => ammo_type.grains,
|
||||
"id" => ammo_type.id,
|
||||
"incendiary" => ammo_type.incendiary,
|
||||
"jacket_type" => ammo_type.jacket_type,
|
||||
"manufacturer" => ammo_type.manufacturer,
|
||||
"muzzle_velocity" => ammo_type.muzzle_velocity,
|
||||
"name" => ammo_type.name,
|
||||
"powder_grains_per_charge" => ammo_type.powder_grains_per_charge,
|
||||
"powder_type" => ammo_type.powder_type,
|
||||
"pressure" => ammo_type.pressure,
|
||||
"primer_type" => ammo_type.primer_type,
|
||||
"tracer" => ammo_type.tracer,
|
||||
"upc" => ammo_type.upc,
|
||||
"average_cost" => ammo_type |> Ammo.get_average_cost_for_ammo_type(current_user),
|
||||
"round_count" => ammo_type |> Ammo.get_round_count_for_ammo_type(current_user),
|
||||
"used_count" => ammo_type |> ActivityLog.get_used_count_for_ammo_type(current_user),
|
||||
"pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user),
|
||||
"total_pack_count" => ammo_type |> Ammo.get_packs_count_for_type(current_user, true)
|
||||
}
|
||||
|
||||
ideal_container = %{
|
||||
@ -104,12 +104,12 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
"round_count" => container |> Ammo.get_round_count_for_container!(current_user)
|
||||
}
|
||||
|
||||
ideal_shot_record = %{
|
||||
"pack_id" => shot_record.pack_id,
|
||||
"count" => shot_record.count,
|
||||
"date" => to_string(shot_record.date),
|
||||
"id" => shot_record.id,
|
||||
"notes" => shot_record.notes
|
||||
ideal_shot_group = %{
|
||||
"pack_id" => shot_group.pack_id,
|
||||
"count" => shot_group.count,
|
||||
"date" => to_string(shot_group.date),
|
||||
"id" => shot_group.id,
|
||||
"notes" => shot_group.notes
|
||||
}
|
||||
|
||||
ideal_user = %{
|
||||
@ -125,9 +125,9 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
|
||||
json_resp = conn |> json_response(200)
|
||||
assert %{"packs" => [^ideal_pack]} = json_resp
|
||||
assert %{"types" => [^ideal_type]} = json_resp
|
||||
assert %{"ammo_types" => [^ideal_ammo_type]} = json_resp
|
||||
assert %{"containers" => [^ideal_container]} = json_resp
|
||||
assert %{"shot_records" => [^ideal_shot_record]} = json_resp
|
||||
assert %{"shot_groups" => [^ideal_shot_group]} = json_resp
|
||||
assert %{"user" => ^ideal_user} = json_resp
|
||||
end
|
||||
end
|
||||
|
400
test/cannery_web/live/ammo_type_live_test.exs
Normal file
400
test/cannery_web/live/ammo_type_live_test.exs
Normal file
@ -0,0 +1,400 @@
|
||||
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'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'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'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'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'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
|
@ -22,7 +22,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
type: "some updated type"
|
||||
}
|
||||
@invalid_attrs %{desc: nil, location: nil, name: nil, type: nil}
|
||||
@type_attrs %{
|
||||
@ammo_type_attrs %{
|
||||
bullet_type: "some bullet_type",
|
||||
case_material: "some case_material",
|
||||
desc: "some desc",
|
||||
@ -41,10 +41,10 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
end
|
||||
|
||||
defp create_pack(%{container: container, current_user: current_user}) do
|
||||
type = type_fixture(@type_attrs, current_user)
|
||||
{1, [pack]} = pack_fixture(@pack_attrs, type, container, current_user)
|
||||
ammo_type = ammo_type_fixture(@ammo_type_attrs, current_user)
|
||||
{1, [pack]} = pack_fixture(@pack_attrs, ammo_type, container, current_user)
|
||||
|
||||
[type: type, pack: pack]
|
||||
[ammo_type: ammo_type, pack: pack]
|
||||
end
|
||||
|
||||
describe "Index" do
|
||||
@ -245,56 +245,56 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
|
||||
test "can sort by type",
|
||||
%{conn: conn, container: container, current_user: current_user} do
|
||||
rifle_type = type_fixture(%{class: :rifle}, current_user)
|
||||
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
|
||||
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
|
||||
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
|
||||
pistol_type = type_fixture(%{class: :pistol}, current_user)
|
||||
pistol_type = ammo_type_fixture(%{class: :pistol}, 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))
|
||||
|
||||
assert html =~ "All"
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :rifle})
|
||||
|> render_change(ammo_type: %{class: :rifle})
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
refute html =~ shotgun_pack.type.name
|
||||
refute html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
refute html =~ shotgun_pack.ammo_type.name
|
||||
refute html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :shotgun})
|
||||
|> render_change(ammo_type: %{class: :shotgun})
|
||||
|
||||
refute html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
refute html =~ pistol_pack.type.name
|
||||
refute html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
refute html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :pistol})
|
||||
|> render_change(ammo_type: %{class: :pistol})
|
||||
|
||||
refute html =~ rifle_pack.type.name
|
||||
refute html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
refute html =~ rifle_pack.ammo_type.name
|
||||
refute html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :all})
|
||||
|> render_change(ammo_type: %{class: :all})
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
end
|
||||
end
|
||||
|
||||
@ -302,15 +302,15 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
setup [:register_and_log_in_user, :create_container, :create_pack]
|
||||
|
||||
test "displays pack",
|
||||
%{conn: conn, type: %{name: type_name}, container: container} do
|
||||
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do
|
||||
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
assert html =~ type_name
|
||||
assert html =~ ammo_type_name
|
||||
assert html =~ "\n20\n"
|
||||
end
|
||||
|
||||
test "displays pack in table",
|
||||
%{conn: conn, type: %{name: type_name}, container: container} do
|
||||
%{conn: conn, ammo_type: %{name: ammo_type_name}, container: container} do
|
||||
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
html =
|
||||
@ -318,7 +318,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
|> element(~s/input[type="checkbox"][aria-labelledby="toggle_table-label"}]/)
|
||||
|> render_click()
|
||||
|
||||
assert html =~ type_name
|
||||
assert html =~ ammo_type_name
|
||||
assert html =~ "\n20\n"
|
||||
end
|
||||
end
|
||||
|
@ -12,44 +12,44 @@ defmodule CanneryWeb.PackLiveTest do
|
||||
@update_attrs %{count: 43, notes: "some updated notes", price_paid: 456.7}
|
||||
@invalid_attrs %{count: nil, notes: nil, price_paid: nil}
|
||||
@pack_create_limit 10_000
|
||||
@shot_record_create_attrs %{ammo_left: 5, notes: "some notes"}
|
||||
@shot_record_update_attrs %{
|
||||
@shot_group_create_attrs %{ammo_left: 5, notes: "some notes"}
|
||||
@shot_group_update_attrs %{
|
||||
count: 5,
|
||||
date: ~N[2022-02-13 03:17:00],
|
||||
notes: "some updated notes"
|
||||
}
|
||||
@shot_record_invalid_attrs %{ammo_left: nil, count: nil, notes: nil}
|
||||
@shot_group_invalid_attrs %{ammo_left: nil, count: nil, notes: nil}
|
||||
@empty_attrs %{
|
||||
price_paid: 50,
|
||||
count: 20
|
||||
}
|
||||
@shot_record_attrs %{
|
||||
@shot_group_attrs %{
|
||||
price_paid: 50,
|
||||
count: 20
|
||||
}
|
||||
|
||||
defp create_pack(%{current_user: current_user}) do
|
||||
type = type_fixture(current_user)
|
||||
ammo_type = ammo_type_fixture(current_user)
|
||||
container = container_fixture(current_user)
|
||||
{1, [pack]} = pack_fixture(@create_attrs, type, container, current_user)
|
||||
[type: type, pack: pack, container: container]
|
||||
{1, [pack]} = pack_fixture(@create_attrs, ammo_type, container, current_user)
|
||||
[ammo_type: ammo_type, pack: pack, container: container]
|
||||
end
|
||||
|
||||
defp create_shot_record(%{current_user: current_user, pack: pack}) do
|
||||
shot_record = shot_record_fixture(@shot_record_update_attrs, current_user, pack)
|
||||
defp create_shot_group(%{current_user: current_user, pack: pack}) do
|
||||
shot_group = shot_group_fixture(@shot_group_update_attrs, current_user, pack)
|
||||
pack = pack |> Repo.reload!()
|
||||
[pack: pack, shot_record: shot_record]
|
||||
[pack: pack, shot_group: shot_group]
|
||||
end
|
||||
|
||||
defp create_empty_pack(%{
|
||||
current_user: current_user,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
container: container
|
||||
}) do
|
||||
{1, [pack]} = pack_fixture(@empty_attrs, type, container, current_user)
|
||||
shot_record = shot_record_fixture(@shot_record_attrs, current_user, pack)
|
||||
{1, [pack]} = pack_fixture(@empty_attrs, ammo_type, container, current_user)
|
||||
shot_group = shot_group_fixture(@shot_group_attrs, current_user, pack)
|
||||
pack = pack |> Repo.reload!()
|
||||
[empty_pack: pack, shot_record: shot_record]
|
||||
[empty_pack: pack, shot_group: shot_group]
|
||||
end
|
||||
|
||||
describe "Index of pack" do
|
||||
@ -57,92 +57,92 @@ defmodule CanneryWeb.PackLiveTest do
|
||||
|
||||
test "lists all packs", %{conn: conn, pack: pack} do
|
||||
{:ok, _index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
|
||||
pack = pack |> Repo.preload(:type)
|
||||
pack = pack |> Repo.preload(:ammo_type)
|
||||
assert html =~ "Ammo"
|
||||
assert html =~ pack.type.name
|
||||
assert html =~ pack.ammo_type.name
|
||||
end
|
||||
|
||||
test "can sort by type",
|
||||
%{conn: conn, container: container, current_user: current_user} do
|
||||
rifle_type = type_fixture(%{class: :rifle}, current_user)
|
||||
rifle_type = ammo_type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
|
||||
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
|
||||
shotgun_type = ammo_type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
|
||||
pistol_type = type_fixture(%{class: :pistol}, current_user)
|
||||
pistol_type = ammo_type_fixture(%{class: :pistol}, current_user)
|
||||
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
|
||||
|
||||
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
|
||||
|
||||
assert html =~ "All"
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :rifle})
|
||||
|> render_change(ammo_type: %{class: :rifle})
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
refute html =~ shotgun_pack.type.name
|
||||
refute html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
refute html =~ shotgun_pack.ammo_type.name
|
||||
refute html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :shotgun})
|
||||
|> render_change(ammo_type: %{class: :shotgun})
|
||||
|
||||
refute html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
refute html =~ pistol_pack.type.name
|
||||
refute html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
refute html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :pistol})
|
||||
|> render_change(ammo_type: %{class: :pistol})
|
||||
|
||||
refute html =~ rifle_pack.type.name
|
||||
refute html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
refute html =~ rifle_pack.ammo_type.name
|
||||
refute html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :all})
|
||||
|> render_change(ammo_type: %{class: :all})
|
||||
|
||||
assert html =~ rifle_pack.type.name
|
||||
assert html =~ shotgun_pack.type.name
|
||||
assert html =~ pistol_pack.type.name
|
||||
assert html =~ rifle_pack.ammo_type.name
|
||||
assert html =~ shotgun_pack.ammo_type.name
|
||||
assert html =~ pistol_pack.ammo_type.name
|
||||
end
|
||||
|
||||
test "can search for packs", %{conn: conn, pack: pack} do
|
||||
{:ok, index_live, html} = live(conn, Routes.pack_index_path(conn, :index))
|
||||
|
||||
pack = pack |> Repo.preload(:type)
|
||||
pack = pack |> Repo.preload(:ammo_type)
|
||||
|
||||
assert html =~ pack.type.name
|
||||
assert html =~ pack.ammo_type.name
|
||||
|
||||
assert index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: pack.type.name}) =~
|
||||
pack.type.name
|
||||
|> render_change(search: %{search_term: pack.ammo_type.name}) =~
|
||||
pack.ammo_type.name
|
||||
|
||||
assert_patch(
|
||||
index_live,
|
||||
Routes.pack_index_path(conn, :search, pack.type.name)
|
||||
Routes.pack_index_path(conn, :search, pack.ammo_type.name)
|
||||
)
|
||||
|
||||
refute index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: "something_else"}) =~
|
||||
pack.type.name
|
||||
pack.ammo_type.name
|
||||
|
||||
assert_patch(index_live, Routes.pack_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: ""}) =~ pack.type.name
|
||||
|> render_change(search: %{search_term: ""}) =~ pack.ammo_type.name
|
||||
|
||||
assert_patch(index_live, Routes.pack_index_path(conn, :index))
|
||||
end
|
||||
@ -311,20 +311,20 @@ defmodule CanneryWeb.PackLiveTest do
|
||||
refute has_element?(index_live, "#pack-#{pack.id}")
|
||||
end
|
||||
|
||||
test "saves new shot_record", %{conn: conn, pack: pack} do
|
||||
test "saves new shot_group", %{conn: conn, pack: pack} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index))
|
||||
|
||||
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
|
||||
assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_record, pack))
|
||||
assert_patch(index_live, Routes.pack_index_path(conn, :add_shot_group, pack))
|
||||
|
||||
assert index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank"
|
||||
|> form("#shot-group-form")
|
||||
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can't be blank"
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_submit(shot_record: @shot_record_create_attrs)
|
||||
|> form("#shot-group-form")
|
||||
|> render_submit(shot_group: @shot_group_create_attrs)
|
||||
|> follow_redirect(conn, Routes.pack_index_path(conn, :index))
|
||||
|
||||
assert html =~ "Shots recorded successfully"
|
||||
@ -366,9 +366,9 @@ defmodule CanneryWeb.PackLiveTest do
|
||||
|
||||
test "displays pack", %{conn: conn, pack: pack} do
|
||||
{:ok, _show_live, html} = live(conn, Routes.pack_show_path(conn, :show, pack))
|
||||
pack = pack |> Repo.preload(:type)
|
||||
pack = pack |> Repo.preload(:ammo_type)
|
||||
assert html =~ "Show Ammo"
|
||||
assert html =~ pack.type.name
|
||||
assert html =~ pack.ammo_type.name
|
||||
end
|
||||
|
||||
test "updates pack within modal", %{conn: conn, pack: pack} do
|
||||
@ -394,66 +394,66 @@ defmodule CanneryWeb.PackLiveTest do
|
||||
assert html =~ "some updated notes"
|
||||
end
|
||||
|
||||
test "saves new shot_record", %{conn: conn, pack: pack} do
|
||||
test "saves new shot_group", %{conn: conn, pack: pack} do
|
||||
{: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_patch(index_live, Routes.pack_show_path(conn, :add_shot_record, pack))
|
||||
assert_patch(index_live, Routes.pack_show_path(conn, :add_shot_group, pack))
|
||||
|
||||
assert index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank"
|
||||
|> form("#shot-group-form")
|
||||
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can't be blank"
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_submit(shot_record: @shot_record_create_attrs)
|
||||
|> form("#shot-group-form")
|
||||
|> render_submit(shot_group: @shot_group_create_attrs)
|
||||
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
|
||||
|
||||
assert html =~ "Shots recorded successfully"
|
||||
end
|
||||
end
|
||||
|
||||
describe "Show pack with shot record" do
|
||||
setup [:register_and_log_in_user, :create_pack, :create_shot_record]
|
||||
describe "Show pack with shot group" do
|
||||
setup [:register_and_log_in_user, :create_pack, :create_shot_group]
|
||||
|
||||
test "updates shot_record in listing",
|
||||
%{conn: conn, pack: pack, shot_record: shot_record} do
|
||||
test "updates shot_group in listing",
|
||||
%{conn: conn, pack: pack, shot_group: shot_group} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.pack_show_path(conn, :edit, pack))
|
||||
|
||||
assert index_live
|
||||
|> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|
||||
|> render_click() =~ "Edit Shot Record"
|
||||
|> element(~s/a[aria-label="Edit shot group of #{shot_group.count} shots"]/)
|
||||
|> render_click() =~ "Edit Shot Records"
|
||||
|
||||
assert_patch(
|
||||
index_live,
|
||||
Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record)
|
||||
Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group)
|
||||
)
|
||||
|
||||
assert index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_change(shot_record: @shot_record_invalid_attrs) =~ "can't be blank"
|
||||
|> form("#shot-group-form")
|
||||
|> render_change(shot_group: @shot_group_invalid_attrs) =~ "can't be blank"
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_submit(shot_record: @shot_record_update_attrs)
|
||||
|> form("#shot-group-form")
|
||||
|> render_submit(shot_group: @shot_group_update_attrs)
|
||||
|> follow_redirect(conn, Routes.pack_show_path(conn, :show, pack))
|
||||
|
||||
assert html =~ "Shot records updated successfully"
|
||||
assert html =~ "some updated notes"
|
||||
end
|
||||
|
||||
test "deletes shot_record in listing",
|
||||
%{conn: conn, pack: pack, shot_record: shot_record} do
|
||||
test "deletes shot_group in listing",
|
||||
%{conn: conn, pack: pack, shot_group: shot_group} do
|
||||
{:ok, index_live, _html} =
|
||||
live(conn, Routes.pack_show_path(conn, :edit_shot_record, pack, shot_record))
|
||||
live(conn, Routes.pack_show_path(conn, :edit_shot_group, pack, shot_group))
|
||||
|
||||
assert index_live
|
||||
|> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|
||||
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/)
|
||||
|> render_click()
|
||||
|
||||
refute has_element?(index_live, "#shot_record-#{shot_record.id}")
|
||||
refute has_element?(index_live, "#shot_group-#{shot_group.id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -12,156 +12,156 @@ defmodule CanneryWeb.RangeLiveTest do
|
||||
@update_attrs %{count: 16, notes: "some updated notes"}
|
||||
@invalid_attrs %{count: nil, notes: nil}
|
||||
|
||||
defp create_shot_record(%{current_user: current_user}) do
|
||||
defp create_shot_group(%{current_user: current_user}) do
|
||||
container = container_fixture(%{staged: true}, current_user)
|
||||
type = type_fixture(current_user)
|
||||
ammo_type = ammo_type_fixture(current_user)
|
||||
|
||||
{1, [pack]} = pack_fixture(%{staged: true}, type, container, current_user)
|
||||
{1, [pack]} = pack_fixture(%{staged: true}, ammo_type, container, current_user)
|
||||
|
||||
shot_record =
|
||||
shot_group =
|
||||
%{count: 5, date: ~N[2022-02-13 03:17:00], notes: "some notes"}
|
||||
|> shot_record_fixture(current_user, pack)
|
||||
|> shot_group_fixture(current_user, pack)
|
||||
|
||||
[
|
||||
container: container,
|
||||
type: type,
|
||||
ammo_type: ammo_type,
|
||||
pack: pack,
|
||||
shot_record: shot_record
|
||||
shot_group: shot_group
|
||||
]
|
||||
end
|
||||
|
||||
describe "Index" do
|
||||
setup [:register_and_log_in_user, :create_shot_record]
|
||||
setup [:register_and_log_in_user, :create_shot_group]
|
||||
|
||||
test "lists all shot_records", %{conn: conn, shot_record: shot_record} do
|
||||
test "lists all shot_groups", %{conn: conn, shot_group: shot_group} do
|
||||
{:ok, _index_live, html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert html =~ "Range day"
|
||||
assert html =~ shot_record.notes
|
||||
assert html =~ shot_group.notes
|
||||
end
|
||||
|
||||
test "can sort by type",
|
||||
%{conn: conn, container: container, current_user: current_user} do
|
||||
rifle_type = type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_type, container, current_user)
|
||||
rifle_ammo_type = ammo_type_fixture(%{class: :rifle}, current_user)
|
||||
{1, [rifle_pack]} = pack_fixture(rifle_ammo_type, container, current_user)
|
||||
|
||||
rifle_shot_record = shot_record_fixture(%{notes: "group_one"}, current_user, rifle_pack)
|
||||
rifle_shot_group = shot_group_fixture(%{notes: "group_one"}, current_user, rifle_pack)
|
||||
|
||||
shotgun_type = type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_type, container, current_user)
|
||||
shotgun_ammo_type = ammo_type_fixture(%{class: :shotgun}, current_user)
|
||||
{1, [shotgun_pack]} = pack_fixture(shotgun_ammo_type, container, current_user)
|
||||
|
||||
shotgun_shot_record = shot_record_fixture(%{notes: "group_two"}, current_user, shotgun_pack)
|
||||
shotgun_shot_group = shot_group_fixture(%{notes: "group_two"}, current_user, shotgun_pack)
|
||||
|
||||
pistol_type = type_fixture(%{class: :pistol}, current_user)
|
||||
{1, [pistol_pack]} = pack_fixture(pistol_type, container, current_user)
|
||||
pistol_ammo_type = ammo_type_fixture(%{class: :pistol}, current_user)
|
||||
{1, [pistol_pack]} = pack_fixture(pistol_ammo_type, container, current_user)
|
||||
|
||||
pistol_shot_record = shot_record_fixture(%{notes: "group_three"}, current_user, pistol_pack)
|
||||
pistol_shot_group = shot_group_fixture(%{notes: "group_three"}, current_user, pistol_pack)
|
||||
|
||||
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert html =~ "All"
|
||||
|
||||
assert html =~ rifle_shot_record.notes
|
||||
assert html =~ shotgun_shot_record.notes
|
||||
assert html =~ pistol_shot_record.notes
|
||||
assert html =~ rifle_shot_group.notes
|
||||
assert html =~ shotgun_shot_group.notes
|
||||
assert html =~ pistol_shot_group.notes
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :rifle})
|
||||
|> render_change(ammo_type: %{class: :rifle})
|
||||
|
||||
assert html =~ rifle_shot_record.notes
|
||||
refute html =~ shotgun_shot_record.notes
|
||||
refute html =~ pistol_shot_record.notes
|
||||
assert html =~ rifle_shot_group.notes
|
||||
refute html =~ shotgun_shot_group.notes
|
||||
refute html =~ pistol_shot_group.notes
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :shotgun})
|
||||
|> render_change(ammo_type: %{class: :shotgun})
|
||||
|
||||
refute html =~ rifle_shot_record.notes
|
||||
assert html =~ shotgun_shot_record.notes
|
||||
refute html =~ pistol_shot_record.notes
|
||||
refute html =~ rifle_shot_group.notes
|
||||
assert html =~ shotgun_shot_group.notes
|
||||
refute html =~ pistol_shot_group.notes
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :pistol})
|
||||
|> render_change(ammo_type: %{class: :pistol})
|
||||
|
||||
refute html =~ rifle_shot_record.notes
|
||||
refute html =~ shotgun_shot_record.notes
|
||||
assert html =~ pistol_shot_record.notes
|
||||
refute html =~ rifle_shot_group.notes
|
||||
refute html =~ shotgun_shot_group.notes
|
||||
assert html =~ pistol_shot_group.notes
|
||||
|
||||
html =
|
||||
index_live
|
||||
|> form(~s/form[phx-change="change_class"]/)
|
||||
|> render_change(type: %{class: :all})
|
||||
|> render_change(ammo_type: %{class: :all})
|
||||
|
||||
assert html =~ rifle_shot_record.notes
|
||||
assert html =~ shotgun_shot_record.notes
|
||||
assert html =~ pistol_shot_record.notes
|
||||
assert html =~ rifle_shot_group.notes
|
||||
assert html =~ shotgun_shot_group.notes
|
||||
assert html =~ pistol_shot_group.notes
|
||||
end
|
||||
|
||||
test "can search for shot_record", %{conn: conn, shot_record: shot_record} do
|
||||
test "can search for shot_group", %{conn: conn, shot_group: shot_group} do
|
||||
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert html =~ shot_record.notes
|
||||
assert html =~ shot_group.notes
|
||||
|
||||
assert index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: shot_record.notes}) =~ shot_record.notes
|
||||
|> render_change(search: %{search_term: shot_group.notes}) =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_record.notes))
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_group.notes))
|
||||
|
||||
refute index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: "something_else"}) =~ shot_record.notes
|
||||
|> render_change(search: %{search_term: "something_else"}) =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form(~s/form[phx-change="search"]/)
|
||||
|> render_change(search: %{search_term: ""}) =~ shot_record.notes
|
||||
|> render_change(search: %{search_term: ""}) =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves new shot_record", %{conn: conn, pack: pack} do
|
||||
test "saves new shot_group", %{conn: conn, pack: pack} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert index_live |> element("a", "Record shots") |> render_click() =~ "Record shots"
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :add_shot_record, pack))
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :add_shot_group, pack))
|
||||
|
||||
assert index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_change(shot_record: @invalid_attrs) =~ "can't be blank"
|
||||
|> form("#shot-group-form")
|
||||
|> render_change(shot_group: @invalid_attrs) =~ "can't be blank"
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_submit(shot_record: @create_attrs)
|
||||
|> form("#shot-group-form")
|
||||
|> render_submit(shot_group: @create_attrs)
|
||||
|> follow_redirect(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert html =~ "Shots recorded successfully"
|
||||
assert html =~ "some notes"
|
||||
end
|
||||
|
||||
test "updates shot_record in listing", %{conn: conn, shot_record: shot_record} do
|
||||
test "updates shot_group in listing", %{conn: conn, shot_group: shot_group} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert index_live
|
||||
|> element(~s/a[aria-label="Edit shot record of #{shot_record.count} shots"]/)
|
||||
|> render_click() =~ "Edit Shot Record"
|
||||
|> element(~s/a[aria-label="Edit shot record of #{shot_group.count} shots"]/)
|
||||
|> render_click() =~ "Edit Shot Records"
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_record))
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :edit, shot_group))
|
||||
|
||||
assert index_live
|
||||
|> form("#shot-record-form")
|
||||
|> render_change(shot_record: @invalid_attrs) =~ "can't be blank"
|
||||
|> form("#shot-group-form")
|
||||
|> render_change(shot_group: @invalid_attrs) =~ "can't be blank"
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#shot-record-form", shot_record: @update_attrs)
|
||||
|> form("#shot-group-form", shot_group: @update_attrs)
|
||||
|> render_submit()
|
||||
|> follow_redirect(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
@ -169,14 +169,14 @@ defmodule CanneryWeb.RangeLiveTest do
|
||||
assert html =~ "some updated notes"
|
||||
end
|
||||
|
||||
test "deletes shot_record in listing", %{conn: conn, shot_record: shot_record} do
|
||||
test "deletes shot_group in listing", %{conn: conn, shot_group: shot_group} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert index_live
|
||||
|> element(~s/a[aria-label="Delete shot record of #{shot_record.count} shots"]/)
|
||||
|> element(~s/a[aria-label="Delete shot record of #{shot_group.count} shots"]/)
|
||||
|> render_click()
|
||||
|
||||
refute has_element?(index_live, "#shot_record-#{shot_record.id}")
|
||||
refute has_element?(index_live, "#shot_group-#{shot_group.id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,400 +0,0 @@
|
||||
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'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'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'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'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'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
|
@ -8,10 +8,10 @@ defmodule Cannery.Fixtures do
|
||||
alias Cannery.{
|
||||
Accounts,
|
||||
Accounts.User,
|
||||
ActivityLog.ShotRecord,
|
||||
ActivityLog.ShotGroup,
|
||||
Ammo,
|
||||
Ammo.AmmoType,
|
||||
Ammo.Pack,
|
||||
Ammo.Type,
|
||||
Containers,
|
||||
Containers.Container,
|
||||
Containers.Tag,
|
||||
@ -69,18 +69,18 @@ defmodule Cannery.Fixtures do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Generate a ShotRecord
|
||||
Generate a ShotGroup
|
||||
"""
|
||||
@spec shot_record_fixture(User.t(), Pack.t()) :: ShotRecord.t()
|
||||
@spec shot_record_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotRecord.t()
|
||||
def shot_record_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do
|
||||
@spec shot_group_fixture(User.t(), Pack.t()) :: ShotGroup.t()
|
||||
@spec shot_group_fixture(attrs :: map(), User.t(), Pack.t()) :: ShotGroup.t()
|
||||
def shot_group_fixture(attrs \\ %{}, %User{} = user, %Pack{} = pack) do
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
count: 20,
|
||||
date: ~N[2022-02-13 03:17:00],
|
||||
notes: random_string()
|
||||
})
|
||||
|> Cannery.ActivityLog.create_shot_record(user, pack)
|
||||
|> Cannery.ActivityLog.create_shot_group(user, pack)
|
||||
|> unwrap_ok_tuple()
|
||||
end
|
||||
|
||||
@ -102,11 +102,11 @@ defmodule Cannery.Fixtures do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Generate a Type
|
||||
Generate a AmmoType
|
||||
"""
|
||||
@spec type_fixture(User.t()) :: Type.t()
|
||||
@spec type_fixture(attrs :: map(), User.t()) :: Type.t()
|
||||
def type_fixture(attrs \\ %{}, %User{} = user) do
|
||||
@spec ammo_type_fixture(User.t()) :: AmmoType.t()
|
||||
@spec ammo_type_fixture(attrs :: map(), User.t()) :: AmmoType.t()
|
||||
def ammo_type_fixture(attrs \\ %{}, %User{} = user) do
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
name: random_string(),
|
||||
@ -142,34 +142,34 @@ defmodule Cannery.Fixtures do
|
||||
manufacturer: random_string(),
|
||||
upc: random_string()
|
||||
})
|
||||
|> Ammo.create_type(user)
|
||||
|> Ammo.create_ammo_type(user)
|
||||
|> unwrap_ok_tuple()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Generate a Pack
|
||||
"""
|
||||
@spec pack_fixture(Type.t(), Container.t(), User.t()) ::
|
||||
@spec pack_fixture(AmmoType.t(), Container.t(), User.t()) ::
|
||||
{count :: non_neg_integer(), [Pack.t()]}
|
||||
@spec pack_fixture(attrs :: map(), Type.t(), Container.t(), User.t()) ::
|
||||
@spec pack_fixture(attrs :: map(), AmmoType.t(), Container.t(), User.t()) ::
|
||||
{count :: non_neg_integer(), [Pack.t()]}
|
||||
@spec pack_fixture(
|
||||
attrs :: map(),
|
||||
multiplier :: non_neg_integer(),
|
||||
Type.t(),
|
||||
AmmoType.t(),
|
||||
Container.t(),
|
||||
User.t()
|
||||
) :: {count :: non_neg_integer(), [Pack.t()]}
|
||||
def pack_fixture(
|
||||
attrs \\ %{},
|
||||
multiplier \\ 1,
|
||||
%Type{id: type_id},
|
||||
%AmmoType{id: ammo_type_id},
|
||||
%Container{id: container_id},
|
||||
%User{} = user
|
||||
) do
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
type_id: type_id,
|
||||
ammo_type_id: ammo_type_id,
|
||||
container_id: container_id,
|
||||
count: 20,
|
||||
purchased_on: Date.utc_today()
|
||||
|
Loading…
Reference in New Issue
Block a user