rename ammo groups to packs everywhere

This commit is contained in:
shibao 2023-03-29 23:49:45 -04:00
parent 0544b58ab6
commit 4b6d0952f8
35 changed files with 160 additions and 168 deletions

View File

@ -76,8 +76,8 @@
- Add shading to table component - Add shading to table component
- Fix chart to sum by day - Fix chart to sum by day
- Fix whitespace when copying invite url - Fix whitespace when copying invite url
- Make ammo type show page also display ammo groups as table - Make ammo type show page also display packs as table
- Make container show page also display ammo groups as table - Make container show page also display packs as table
- Display CPR for ammo packs - Display CPR for ammo packs
- Add original count for ammo packs - Add original count for ammo packs
- Add ammo pack CPR and original count to json export - Add ammo pack CPR and original count to json export

View File

@ -4,7 +4,7 @@ defmodule Cannery.ActivityLog do
""" """
import Ecto.Query, warn: false import Ecto.Query, warn: false
alias Cannery.Ammo.{Pack, AmmoType} alias Cannery.Ammo.{AmmoType, Pack}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo} alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo}
alias Ecto.{Multi, Queryable} alias Ecto.{Multi, Queryable}
@ -269,7 +269,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the number of shot rounds for an ammo group Returns the number of shot rounds for a pack
""" """
@spec get_used_count(Pack.t(), User.t()) :: non_neg_integer() @spec get_used_count(Pack.t(), User.t()) :: non_neg_integer()
def get_used_count(%Pack{id: pack_id} = pack, user) do def get_used_count(%Pack{id: pack_id} = pack, user) do
@ -279,7 +279,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the number of shot rounds for multiple ammo groups Returns the number of shot rounds for multiple packs
""" """
@spec get_used_counts([Pack.t()], User.t()) :: @spec get_used_counts([Pack.t()], User.t()) ::
%{optional(Pack.id()) => non_neg_integer()} %{optional(Pack.id()) => non_neg_integer()}
@ -299,7 +299,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the last entered shot group date for an ammo group Returns the last entered shot group date for a pack
""" """
@spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil @spec get_last_used_date(Pack.t(), User.t()) :: Date.t() | nil
def get_last_used_date(%Pack{id: pack_id} = pack, user) do def get_last_used_date(%Pack{id: pack_id} = pack, user) do
@ -309,7 +309,7 @@ defmodule Cannery.ActivityLog do
end end
@doc """ @doc """
Returns the last entered shot group date for an ammo group Returns the last entered shot group date for a pack
""" """
@spec get_last_used_dates([Pack.t()], User.t()) :: %{optional(Pack.id()) => Date.t()} @spec get_last_used_dates([Pack.t()], User.t()) :: %{optional(Pack.id()) => Date.t()}
def get_last_used_dates(packs, %User{id: user_id}) do def get_last_used_dates(packs, %User{id: user_id}) do

View File

@ -8,7 +8,7 @@ defmodule Cannery.Ammo do
alias Cannery.{Accounts.User, Containers, Repo} alias Cannery.{Accounts.User, Containers, Repo}
alias Cannery.Containers.{Container, ContainerTag, Tag} alias Cannery.Containers.{Container, ContainerTag, Tag}
alias Cannery.{ActivityLog, ActivityLog.ShotGroup} alias Cannery.{ActivityLog, ActivityLog.ShotGroup}
alias Cannery.Ammo.{Pack, AmmoType} alias Cannery.Ammo.{AmmoType, Pack}
alias Ecto.{Changeset, Queryable} alias Ecto.{Changeset, Queryable}
@pack_create_limit 10_000 @pack_create_limit 10_000
@ -128,7 +128,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Gets the average cost of an ammo type from ammo groups with price information. Gets the average cost of an ammo type from packs with price information.
## Examples ## Examples
@ -147,7 +147,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Gets the average cost of ammo types from ammo groups with price information Gets the average cost of ammo types from packs with price information
for multiple ammo types. for multiple ammo types.
## Examples ## Examples
@ -745,7 +745,7 @@ defmodule Cannery.Ammo do
[%Pack{}, ...] [%Pack{}, ...]
iex> list_packs("cool", %User{id: 123}, true) iex> list_packs("cool", %User{id: 123}, true)
[%Pack{notes: "My cool ammo group"}, ...] [%Pack{notes: "My cool pack"}, ...]
""" """
@spec list_packs(search :: String.t() | nil, AmmoType.class() | :all, User.t()) :: @spec list_packs(search :: String.t() | nil, AmmoType.class() | :all, User.t()) ::
@ -864,7 +864,7 @@ defmodule Cannery.Ammo do
@doc """ @doc """
Gets a single pack. Gets a single pack.
Raises `KeyError` if the Ammo group does not exist. Raises `KeyError` if the pack does not exist.
## Examples ## Examples
@ -903,7 +903,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Calculates the percentage remaining of an ammo group out of 100 Calculates the percentage remaining of a pack out of 100
## Examples ## Examples
@ -922,7 +922,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Calculates the percentages remaining of multiple ammo groups out of 100 Calculates the percentages remaining of multiple packs out of 100
## Examples ## Examples
@ -951,7 +951,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Gets the original count for an ammo group Gets the original count for a pack
## Examples ## Examples
@ -970,7 +970,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Gets the original counts for multiple ammo groups Gets the original counts for multiple packs
## Examples ## Examples
@ -993,7 +993,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Calculates the CPR for a single ammo group Calculates the CPR for a single pack
## Examples ## Examples
@ -1012,7 +1012,7 @@ defmodule Cannery.Ammo do
end end
@doc """ @doc """
Calculates the CPR for multiple ammo groups Calculates the CPR for multiple packs
## Examples ## Examples

View File

@ -113,7 +113,7 @@ defmodule Cannery.Ammo.Pack do
end end
@doc """ @doc """
This range changeset is used when "using up" ammo groups, and allows for This range changeset is used when "using up" packs, and allows for
updating the count to 0 updating the count to 0
""" """
@spec range_changeset(t() | new_pack(), attrs :: map()) :: changeset() @spec range_changeset(t() | new_pack(), attrs :: map()) :: changeset()

View File

@ -1,6 +1,6 @@
defmodule CanneryWeb.Components.MovePackComponent do defmodule CanneryWeb.Components.MovePackComponent do
@moduledoc """ @moduledoc """
Livecomponent that can move an ammo group to another container Livecomponent that can move a pack to another container
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component

View File

@ -1,6 +1,6 @@
defmodule CanneryWeb.Components.PackTableComponent do defmodule CanneryWeb.Components.PackTableComponent do
@moduledoc """ @moduledoc """
A component that displays a list of ammo groups A component that displays a list of packs
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, Ammo.Pack, ComparableDate} alias Cannery.{Accounts.User, Ammo.Pack, ComparableDate}

View File

@ -203,9 +203,7 @@
navigate={Routes.pack_show_path(Endpoint, :show, pack)} navigate={Routes.pack_show_path(Endpoint, :show, pack)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "View ammo group of %{pack_count} bullets", dgettext("actions", "View pack of %{pack_count} bullets", pack_count: pack_count)
pack_count: pack_count
)
} }
> >
<i class="fa-fw fa-lg fas fa-eye"></i> <i class="fa-fw fa-lg fas fa-eye"></i>

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.PackLive.FormComponent do
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.Ammo.{Pack, AmmoType} alias Cannery.Ammo.{AmmoType, Pack}
alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container} alias Cannery.{Accounts.User, Ammo, Containers, Containers.Container}
alias Ecto.Changeset alias Ecto.Changeset
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket

View File

@ -148,7 +148,7 @@ defmodule CanneryWeb.PackLive.Index do
} }
} = socket } = socket
) do ) do
# get total number of ammo groups to determine whether to display onboarding # get total number of packs to determine whether to display onboarding
# prompts # prompts
packs_count = Ammo.get_packs_count!(current_user, true) packs_count = Ammo.get_packs_count!(current_user, true)
packs = Ammo.list_packs(search, class, current_user, show_used) packs = Ammo.list_packs(search, class, current_user, show_used)

View File

@ -151,9 +151,7 @@
navigate={Routes.pack_show_path(Endpoint, :show, pack)} navigate={Routes.pack_show_path(Endpoint, :show, pack)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "View ammo group of %{pack_count} bullets", dgettext("actions", "View pack of %{pack_count} bullets", pack_count: pack_count)
pack_count: pack_count
)
} }
> >
<i class="fa-fw fa-lg fas fa-eye"></i> <i class="fa-fw fa-lg fas fa-eye"></i>
@ -163,9 +161,7 @@
patch={Routes.pack_index_path(Endpoint, :edit, pack)} patch={Routes.pack_index_path(Endpoint, :edit, pack)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "Edit ammo group of %{pack_count} bullets", dgettext("actions", "Edit pack of %{pack_count} bullets", pack_count: pack_count)
pack_count: pack_count
)
} }
> >
<i class="fa-fw fa-lg fas fa-edit"></i> <i class="fa-fw fa-lg fas fa-edit"></i>
@ -175,7 +171,7 @@
patch={Routes.pack_index_path(Endpoint, :clone, pack)} patch={Routes.pack_index_path(Endpoint, :clone, pack)}
class="text-primary-600 link" class="text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "Clone ammo group of %{pack_count} bullets", dgettext("actions", "Clone pack of %{pack_count} bullets",
pack_count: pack_count pack_count: pack_count
) )
} }
@ -190,7 +186,7 @@
phx-value-id={pack.id} phx-value-id={pack.id}
data-confirm={dgettext("prompts", "Are you sure you want to delete this ammo?")} data-confirm={dgettext("prompts", "Are you sure you want to delete this ammo?")}
aria-label={ aria-label={
dgettext("actions", "Delete ammo group of %{pack_count} bullets", dgettext("actions", "Delete pack of %{pack_count} bullets",
pack_count: pack_count pack_count: pack_count
) )
} }

View File

@ -59,7 +59,7 @@
patch={Routes.pack_show_path(Endpoint, :edit, @pack)} patch={Routes.pack_show_path(Endpoint, :edit, @pack)}
class="mx-4 my-2 text-primary-600 link" class="mx-4 my-2 text-primary-600 link"
aria-label={ aria-label={
dgettext("actions", "Edit ammo group of %{pack_count} bullets", pack_count: @pack.count) dgettext("actions", "Edit pack of %{pack_count} bullets", pack_count: @pack.count)
} }
> >
<i class="fa-fw fa-lg fas fa-edit"></i> <i class="fa-fw fa-lg fas fa-edit"></i>
@ -71,9 +71,7 @@
phx-click="delete" phx-click="delete"
data-confirm={dgettext("prompts", "Are you sure you want to delete this ammo?")} data-confirm={dgettext("prompts", "Are you sure you want to delete this ammo?")}
aria-label={ aria-label={
dgettext("actions", "Delete ammo group of %{pack_count} bullets", dgettext("actions", "Delete pack of %{pack_count} bullets", pack_count: @pack.count)
pack_count: @pack.count
)
} }
> >
<i class="fa-fw fa-lg fas fa-trash"></i> <i class="fa-fw fa-lg fas fa-trash"></i>

View File

@ -157,7 +157,7 @@ msgid "Why not get some ready to shoot?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -210,7 +210,7 @@ msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "" msgstr ""
@ -220,13 +220,13 @@ msgstr ""
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -336,25 +336,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -170,7 +170,7 @@ msgid "Why not get some ready to shoot?"
msgstr "Warum nicht einige für den Schießstand auswählen?" msgstr "Warum nicht einige für den Schießstand auswählen?"
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -223,7 +223,7 @@ msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "" msgstr ""
@ -233,13 +233,13 @@ msgstr ""
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -349,25 +349,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -366,7 +366,7 @@ msgstr "Einfach:"
msgid "Steel" msgid "Steel"
msgstr "Stahl" msgstr "Stahl"
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "Gelagert in" msgstr "Gelagert in"
@ -647,7 +647,7 @@ msgstr "Ursprüngliche Anzahl:"
msgid "Percentage left:" msgid "Percentage left:"
msgstr "Prozent verbleibend:" msgstr "Prozent verbleibend:"
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds used" msgid "Rounds used"
msgstr "Patronen verbraucht" msgstr "Patronen verbraucht"
@ -762,7 +762,7 @@ msgstr "Keine Munitionsgruppe in diesem Behälter"
msgid "Show Ammo" msgid "Show Ammo"
msgstr "Zeige Munitionsarten" msgstr "Zeige Munitionsarten"
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "Diese Munitionsgruppe ist nicht in einem Behälter" msgstr "Diese Munitionsgruppe ist nicht in einem Behälter"

View File

@ -73,7 +73,7 @@ msgstr ""
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?" msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -360,7 +360,7 @@ msgstr ""
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "" msgstr ""
@ -641,7 +641,7 @@ msgstr ""
msgid "Percentage left:" msgid "Percentage left:"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds used" msgid "Rounds used"
msgstr "" msgstr ""
@ -756,7 +756,7 @@ msgstr ""
msgid "Show Ammo" msgid "Show Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "" msgstr ""

View File

@ -157,7 +157,7 @@ msgid "Why not get some ready to shoot?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -210,7 +210,7 @@ msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "" msgstr ""
@ -220,13 +220,13 @@ msgstr ""
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -336,25 +336,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -360,7 +360,7 @@ msgstr ""
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "" msgstr ""
@ -641,7 +641,7 @@ msgstr ""
msgid "Percentage left:" msgid "Percentage left:"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Rounds used" msgid "Rounds used"
msgstr "" msgstr ""
@ -756,7 +756,7 @@ msgstr ""
msgid "Show Ammo" msgid "Show Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "" msgstr ""

View File

@ -58,7 +58,7 @@ msgstr ""
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -170,7 +170,7 @@ msgid "Why not get some ready to shoot?"
msgstr "¿Por qué no preparar parte para disparar?" msgstr "¿Por qué no preparar parte para disparar?"
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -223,7 +223,7 @@ msgstr "añade primero un tipo de munición"
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "Mover munición" msgstr "Mover munición"
@ -233,13 +233,13 @@ msgstr "Mover munición"
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "Activar ilimitados" msgstr "Activar ilimitados"
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "Preparar para el campo de tiro" msgstr "Preparar para el campo de tiro"
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -349,25 +349,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -366,7 +366,7 @@ msgstr "Simple:"
msgid "Steel" msgid "Steel"
msgstr "Acero" msgstr "Acero"
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "Guardado en" msgstr "Guardado en"
@ -648,7 +648,7 @@ msgstr "Cantidad original:"
msgid "Percentage left:" msgid "Percentage left:"
msgstr "Pocentaje restante:" msgstr "Pocentaje restante:"
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds used" msgid "Rounds used"
msgstr "Balas usadas" msgstr "Balas usadas"
@ -763,7 +763,7 @@ msgstr "No hay munición en este contenedor"
msgid "Show Ammo" msgid "Show Ammo"
msgstr "Mostrar Munición" msgstr "Mostrar Munición"
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "Esta munición no está en un contenedor" msgstr "Esta munición no está en un contenedor"

View File

@ -73,7 +73,7 @@ msgstr "Está seguro que desea eliminar %{email}? Esta acción es permanente!"
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "Está seguro que desea eliminar %{name}?" msgstr "Está seguro que desea eliminar %{name}?"
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -170,7 +170,7 @@ msgid "Why not get some ready to shoot?"
msgstr "Pourquoi pas en préparer pour tirer?" msgstr "Pourquoi pas en préparer pour tirer?"
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -223,7 +223,7 @@ msgstr "Ajoutez d'abord un type de munitions"
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "" msgstr ""
@ -233,13 +233,13 @@ msgstr ""
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -349,25 +349,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -366,7 +366,7 @@ msgstr "Simple:"
msgid "Steel" msgid "Steel"
msgstr "Acier" msgstr "Acier"
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "Est stocké dans" msgstr "Est stocké dans"
@ -649,7 +649,7 @@ msgstr "Nombre original:"
msgid "Percentage left:" msgid "Percentage left:"
msgstr "Pourcentage restant:" msgstr "Pourcentage restant:"
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds used" msgid "Rounds used"
msgstr "Cartouches utilisées" msgstr "Cartouches utilisées"
@ -764,7 +764,7 @@ msgstr "Aucun groupe de munition pour ce conteneur"
msgid "Show Ammo" msgid "Show Ammo"
msgstr "Montrer le type de munition" msgstr "Montrer le type de munition"
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "Ce groupe de munition nest pas dans un conteneur" msgstr "Ce groupe de munition nest pas dans un conteneur"

View File

@ -74,7 +74,7 @@ msgstr ""
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "Êtes-vous certain·e de supprimer %{name}?" msgstr "Êtes-vous certain·e de supprimer %{name}?"
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -168,7 +168,7 @@ msgid "Why not get some ready to shoot?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:127 #: lib/cannery_web/live/pack_live/index.html.heex:127
#: lib/cannery_web/live/pack_live/show.html.heex:98 #: lib/cannery_web/live/pack_live/show.html.heex:96
#: lib/cannery_web/live/range_live/index.html.heex:45 #: lib/cannery_web/live/range_live/index.html.heex:45
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record shots" msgid "Record shots"
@ -221,7 +221,7 @@ msgstr ""
#: lib/cannery_web/components/move_pack_component.ex:78 #: lib/cannery_web/components/move_pack_component.ex:78
#: lib/cannery_web/live/pack_live/index.html.heex:144 #: lib/cannery_web/live/pack_live/index.html.heex:144
#: lib/cannery_web/live/pack_live/show.html.heex:91 #: lib/cannery_web/live/pack_live/show.html.heex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Move ammo" msgid "Move ammo"
msgstr "" msgstr ""
@ -231,13 +231,13 @@ msgstr ""
msgid "Set Unlimited" msgid "Set Unlimited"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:87 #: lib/cannery_web/live/pack_live/show.html.heex:85
#: lib/cannery_web/live/range_live/index.html.heex:38 #: lib/cannery_web/live/range_live/index.html.heex:38
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:86 #: lib/cannery_web/live/pack_live/show.html.heex:84
#: lib/cannery_web/live/range_live/index.html.heex:37 #: lib/cannery_web/live/range_live/index.html.heex:37
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Unstage from range" msgid "Unstage from range"
@ -347,25 +347,25 @@ msgstr ""
msgid "View %{ammo_type_name}" msgid "View %{ammo_type_name}"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:178 #: lib/cannery_web/live/pack_live/index.html.heex:174
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Clone ammo group of %{pack_count} bullets" msgid "Clone pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:193 #: lib/cannery_web/live/pack_live/index.html.heex:189
#: lib/cannery_web/live/pack_live/show.html.heex:74 #: lib/cannery_web/live/pack_live/show.html.heex:74
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Delete ammo group of %{pack_count} bullets" msgid "Delete pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:166 #: lib/cannery_web/live/pack_live/index.html.heex:164
#: lib/cannery_web/live/pack_live/show.html.heex:62 #: lib/cannery_web/live/pack_live/show.html.heex:62
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "Edit ammo group of %{pack_count} bullets" msgid "Edit pack of %{pack_count} bullets"
msgstr "" msgstr ""
#: lib/cannery_web/live/ammo_type_live/show.html.heex:206 #: lib/cannery_web/live/ammo_type_live/show.html.heex:206
#: lib/cannery_web/live/pack_live/index.html.heex:154 #: lib/cannery_web/live/pack_live/index.html.heex:154
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "View ammo group of %{pack_count} bullets" msgid "View pack of %{pack_count} bullets"
msgstr "" msgstr ""

View File

@ -362,7 +362,7 @@ msgstr ""
msgid "Steel" msgid "Steel"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:108 #: lib/cannery_web/live/pack_live/show.html.heex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Stored in" msgid "Stored in"
msgstr "" msgstr ""
@ -643,7 +643,7 @@ msgstr ""
msgid "Percentage left:" msgid "Percentage left:"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:121 #: lib/cannery_web/live/pack_live/show.html.heex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rounds used" msgid "Rounds used"
msgstr "" msgstr ""
@ -758,7 +758,7 @@ msgstr ""
msgid "Show Ammo" msgid "Show Ammo"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/show.html.heex:113 #: lib/cannery_web/live/pack_live/show.html.heex:111
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This ammo is not in a container" msgid "This ammo is not in a container"
msgstr "" msgstr ""

View File

@ -69,7 +69,7 @@ msgstr ""
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -58,7 +58,7 @@ msgstr ""
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
msgstr "" msgstr ""
#: lib/cannery_web/live/pack_live/index.html.heex:191 #: lib/cannery_web/live/pack_live/index.html.heex:187
#: lib/cannery_web/live/pack_live/show.html.heex:72 #: lib/cannery_web/live/pack_live/show.html.heex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"

View File

@ -59,7 +59,7 @@ defmodule Cannery.ActivityLogTest do
assert shot_group.notes == "some notes" assert shot_group.notes == "some notes"
end end
test "create_shot_group/3 removes corresponding count from ammo group", test "create_shot_group/3 removes corresponding count from pack",
%{ %{
current_user: current_user, current_user: current_user,
pack: %{id: pack_id, count: org_count} = pack pack: %{id: pack_id, count: org_count} = pack
@ -75,7 +75,7 @@ defmodule Cannery.ActivityLogTest do
assert new_count == 10 assert new_count == 10
end end
test "create_shot_group/3 does not remove more than ammo group amount", test "create_shot_group/3 does not remove more tha pack amount",
%{current_user: current_user, pack: %{id: pack_id} = pack} do %{current_user: current_user, pack: %{id: pack_id} = pack} do
valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"} valid_attrs = %{count: 20, date: ~D[2022-02-13], notes: "some notes"}
@ -302,7 +302,7 @@ defmodule Cannery.ActivityLogTest do
[ammo_type, another_ammo_type] [ammo_type, another_ammo_type]
|> ActivityLog.get_used_count_for_ammo_types(current_user) |> ActivityLog.get_used_count_for_ammo_types(current_user)
# use generated ammo group # use generated pack
shot_group_fixture(%{count: 5}, current_user, pack) shot_group_fixture(%{count: 5}, current_user, pack)
used_counts = used_counts =
@ -311,7 +311,7 @@ defmodule Cannery.ActivityLogTest do
assert %{^ammo_type_id => 5} = used_counts assert %{^ammo_type_id => 5} = used_counts
assert %{^another_ammo_type_id => 5} = used_counts assert %{^another_ammo_type_id => 5} = used_counts
# use generated ammo group again # use generated pack again
shot_group_fixture(%{count: 1}, current_user, pack) shot_group_fixture(%{count: 1}, current_user, pack)
used_counts = used_counts =
@ -407,7 +407,7 @@ defmodule Cannery.ActivityLogTest do
# notes # notes
assert ActivityLog.list_shot_groups("amazing", :all, current_user) == [shot_group_a] assert ActivityLog.list_shot_groups("amazing", :all, current_user) == [shot_group_a]
# ammo group attributes # pack attributes
assert ActivityLog.list_shot_groups("stupendous", :all, current_user) == [shot_group_b] assert ActivityLog.list_shot_groups("stupendous", :all, current_user) == [shot_group_b]
# ammo type attributes # ammo type attributes

View File

@ -4,7 +4,7 @@ defmodule Cannery.AmmoTest do
""" """
use Cannery.DataCase use Cannery.DataCase
alias Cannery.{Ammo, Ammo.Pack, Ammo.AmmoType, Containers} alias Cannery.{Ammo, Ammo.AmmoType, Ammo.Pack, Containers}
alias Ecto.Changeset alias Ecto.Changeset
@moduletag :ammo_test @moduletag :ammo_test
@ -211,7 +211,7 @@ defmodule Cannery.AmmoTest do
end end
end end
describe "ammo types with ammo groups" do describe "ammo types with packs" do
setup do setup do
current_user = user_fixture() current_user = user_fixture()
ammo_type = ammo_type_fixture(current_user) ammo_type = ammo_type_fixture(current_user)
@ -516,14 +516,14 @@ defmodule Cannery.AmmoTest do
[ammo_type, another_ammo_type] [ammo_type, another_ammo_type]
|> Ammo.get_used_packs_count_for_types(current_user) |> Ammo.get_used_packs_count_for_types(current_user)
# testing ammo type with ammo group # testing ammo type with pack
{1, [first_pack]} = pack_fixture(%{count: 1}, ammo_type, container, current_user) {1, [first_pack]} = pack_fixture(%{count: 1}, ammo_type, container, current_user)
assert %{} == assert %{} ==
[ammo_type, another_ammo_type] [ammo_type, another_ammo_type]
|> Ammo.get_used_packs_count_for_types(current_user) |> Ammo.get_used_packs_count_for_types(current_user)
# testing ammo type with used ammo group # testing ammo type with used pack
{1, [another_pack]} = pack_fixture(%{count: 50}, another_ammo_type, container, current_user) {1, [another_pack]} = pack_fixture(%{count: 50}, another_ammo_type, container, current_user)
shot_group_fixture(%{count: 50}, current_user, another_pack) shot_group_fixture(%{count: 50}, current_user, another_pack)
@ -532,7 +532,7 @@ defmodule Cannery.AmmoTest do
[ammo_type, another_ammo_type] [ammo_type, another_ammo_type]
|> Ammo.get_used_packs_count_for_types(current_user) |> Ammo.get_used_packs_count_for_types(current_user)
# testing two ammo types with zero and one used ammo groups # testing two ammo types with zero and one used packs
{1, [pack]} = pack_fixture(%{count: 50}, ammo_type, container, current_user) {1, [pack]} = pack_fixture(%{count: 50}, ammo_type, container, current_user)
shot_group_fixture(%{count: 50}, current_user, pack) shot_group_fixture(%{count: 50}, current_user, pack)
@ -542,7 +542,7 @@ defmodule Cannery.AmmoTest do
assert %{^ammo_type_id => 1} = used_counts assert %{^ammo_type_id => 1} = used_counts
assert %{^another_ammo_type_id => 1} = used_counts assert %{^another_ammo_type_id => 1} = used_counts
# testing two ammo type with one and two used ammo groups # testing two ammo type with one and two used packs
shot_group_fixture(%{count: 1}, current_user, first_pack) shot_group_fixture(%{count: 1}, current_user, first_pack)
used_counts = used_counts =
@ -778,14 +778,14 @@ defmodule Cannery.AmmoTest do
assert pack in packs assert pack in packs
end end
test "list_packs/4 returns relevant ammo groups when searched", %{ test "list_packs/4 returns relevant packs when searched", %{
ammo_type: ammo_type, ammo_type: ammo_type,
pack: pack, pack: pack,
container: container, container: container,
current_user: current_user current_user: current_user
} do } do
{1, [another_pack]} = {1, [another_pack]} =
%{count: 49, notes: "cool ammo group"} %{count: 49, notes: "cool pack"}
|> pack_fixture(ammo_type, container, current_user) |> pack_fixture(ammo_type, container, current_user)
another_ammo_type = ammo_type_fixture(%{name: "amazing ammo"}, current_user) another_ammo_type = ammo_type_fixture(%{name: "amazing ammo"}, current_user)
@ -806,7 +806,7 @@ defmodule Cannery.AmmoTest do
assert another_pack in packs assert another_pack in packs
assert pack in packs assert pack in packs
# search works for ammo group attributes # search works for pack attributes
assert Ammo.list_packs("cool", :all, current_user, true) == [another_pack] assert Ammo.list_packs("cool", :all, current_user, true) == [another_pack]
# search works for ammo type attributes # search works for ammo type attributes

View File

@ -34,7 +34,7 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
grains: nil grains: nil
} }
@pack_attrs %{ @pack_attrs %{
notes: "some ammo group", notes: "some pack",
count: 20 count: 20
} }
@shot_group_attrs %{ @shot_group_attrs %{
@ -248,10 +248,10 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
end end
end end
describe "Index with ammo group" do describe "Index with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack] setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "shows used ammo groups on toggle", test "shows used packs on toggle",
%{conn: conn, pack: pack, current_user: current_user} do %{conn: conn, pack: pack, current_user: current_user} do
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index)) {:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
@ -327,10 +327,10 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
end end
end end
describe "Show ammo type with ammo group" do describe "Show ammo type with pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_pack] setup [:register_and_log_in_user, :create_ammo_type, :create_pack]
test "displays ammo group", %{ test "displays pack", %{
conn: conn, conn: conn,
ammo_type: %{name: ammo_type_name} = ammo_type, ammo_type: %{name: ammo_type_name} = ammo_type,
container: %{name: container_name} container: %{name: container_name}
@ -342,7 +342,7 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
assert html =~ container_name assert html =~ container_name
end end
test "displays ammo group in table", test "displays pack in table",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do %{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)) {:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
@ -356,10 +356,10 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
end end
end end
describe "Show ammo type with empty ammo group" do describe "Show ammo type with empty pack" do
setup [:register_and_log_in_user, :create_ammo_type, :create_empty_pack] setup [:register_and_log_in_user, :create_ammo_type, :create_empty_pack]
test "displays empty ammo groups on toggle", test "displays empty packs on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do %{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)) {:ok, show_live, html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))
assert html =~ "Show used" assert html =~ "Show used"
@ -375,7 +375,7 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
assert html =~ container_name assert html =~ container_name
end end
test "displays empty ammo groups in table on toggle", test "displays empty packs in table on toggle",
%{conn: conn, ammo_type: ammo_type, container: %{name: container_name}} do %{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)) {:ok, show_live, _html} = live(conn, Routes.ammo_type_show_path(conn, :show, ammo_type))

View File

@ -31,7 +31,7 @@ defmodule CanneryWeb.ContainerLiveTest do
grains: 120 grains: 120
} }
@pack_attrs %{ @pack_attrs %{
notes: "some ammo group", notes: "some pack",
count: 20 count: 20
} }
@ -298,10 +298,10 @@ defmodule CanneryWeb.ContainerLiveTest do
end end
end end
describe "Show with ammo group" do describe "Show with pack" do
setup [:register_and_log_in_user, :create_container, :create_pack] setup [:register_and_log_in_user, :create_container, :create_pack]
test "displays ammo group", test "displays pack",
%{conn: conn, ammo_type: %{name: ammo_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)) {:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
@ -309,7 +309,7 @@ defmodule CanneryWeb.ContainerLiveTest do
assert html =~ "\n20\n" assert html =~ "\n20\n"
end end
test "displays ammo group in table", test "displays pack in table",
%{conn: conn, ammo_type: %{name: ammo_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)) {:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))

View File

@ -1,6 +1,6 @@
defmodule CanneryWeb.PackLiveTest do defmodule CanneryWeb.PackLiveTest do
@moduledoc """ @moduledoc """
Tests ammo group live pages Tests pack live pages
""" """
use CanneryWeb.ConnCase use CanneryWeb.ConnCase
@ -52,7 +52,7 @@ defmodule CanneryWeb.PackLiveTest do
[empty_pack: pack, shot_group: shot_group] [empty_pack: pack, shot_group: shot_group]
end end
describe "Index of ammo group" do describe "Index of pack" do
setup [:register_and_log_in_user, :create_pack] setup [:register_and_log_in_user, :create_pack]
test "lists all packs", %{conn: conn, pack: pack} do test "lists all packs", %{conn: conn, pack: pack} do
@ -213,7 +213,7 @@ defmodule CanneryWeb.PackLiveTest do
{:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index))
assert index_live assert index_live
|> element(~s/a[aria-label="Edit ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Edit pack of #{pack.count} bullets"]/)
|> render_click() =~ "Edit ammo" |> render_click() =~ "Edit ammo"
assert_patch(index_live, Routes.pack_index_path(conn, :edit, pack)) assert_patch(index_live, Routes.pack_index_path(conn, :edit, pack))
@ -237,7 +237,7 @@ defmodule CanneryWeb.PackLiveTest do
html = html =
index_live index_live
|> element(~s/a[aria-label="Clone ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Clone pack of #{pack.count} bullets"]/)
|> render_click() |> render_click()
assert html =~ "Add Ammo" assert html =~ "Add Ammo"
@ -261,7 +261,7 @@ defmodule CanneryWeb.PackLiveTest do
html = html =
index_live index_live
|> element(~s/a[aria-label="Clone ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Clone pack of #{pack.count} bullets"]/)
|> render_click() |> render_click()
assert html =~ "Add Ammo" assert html =~ "Add Ammo"
@ -279,7 +279,7 @@ defmodule CanneryWeb.PackLiveTest do
html = html =
index_live index_live
|> element(~s/a[aria-label="Clone ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Clone pack of #{pack.count} bullets"]/)
|> render_click() |> render_click()
assert html =~ "Add Ammo" assert html =~ "Add Ammo"
@ -305,7 +305,7 @@ defmodule CanneryWeb.PackLiveTest do
{:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.pack_index_path(conn, :index))
assert index_live assert index_live
|> element(~s/a[aria-label="Delete ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Delete pack of #{pack.count} bullets"]/)
|> render_click() |> render_click()
refute has_element?(index_live, "#pack-#{pack.id}") refute has_element?(index_live, "#pack-#{pack.id}")
@ -334,10 +334,10 @@ defmodule CanneryWeb.PackLiveTest do
defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2) defp display_currency(float), do: :erlang.float_to_binary(float, decimals: 2)
end end
describe "Index of empty ammo group" do describe "Index of empty pack" do
setup [:register_and_log_in_user, :create_pack, :create_empty_pack] setup [:register_and_log_in_user, :create_pack, :create_empty_pack]
test "hides empty ammo groups by default", %{ test "hides empty packs by default", %{
conn: conn, conn: conn,
empty_pack: pack, empty_pack: pack,
current_user: current_user current_user: current_user
@ -361,7 +361,7 @@ defmodule CanneryWeb.PackLiveTest do
end end
end end
describe "Show ammo group" do describe "Show pack" do
setup [:register_and_log_in_user, :create_pack] setup [:register_and_log_in_user, :create_pack]
test "displays pack", %{conn: conn, pack: pack} do test "displays pack", %{conn: conn, pack: pack} do
@ -375,7 +375,7 @@ defmodule CanneryWeb.PackLiveTest do
{:ok, show_live, _html} = live(conn, Routes.pack_show_path(conn, :show, pack)) {:ok, show_live, _html} = live(conn, Routes.pack_show_path(conn, :show, pack))
assert show_live assert show_live
|> element(~s/a[aria-label="Edit ammo group of #{pack.count} bullets"]/) |> element(~s/a[aria-label="Edit pack of #{pack.count} bullets"]/)
|> render_click() =~ "Edit Ammo" |> render_click() =~ "Edit Ammo"
assert_patch(show_live, Routes.pack_show_path(conn, :edit, pack)) assert_patch(show_live, Routes.pack_show_path(conn, :edit, pack))
@ -414,7 +414,7 @@ defmodule CanneryWeb.PackLiveTest do
end end
end end
describe "Show ammo group with shot group" do describe "Show pack with shot group" do
setup [:register_and_log_in_user, :create_pack, :create_shot_group] setup [:register_and_log_in_user, :create_pack, :create_shot_group]
test "updates shot_group in listing", test "updates shot_group in listing",

View File

@ -10,8 +10,8 @@ defmodule Cannery.Fixtures do
Accounts.User, Accounts.User,
ActivityLog.ShotGroup, ActivityLog.ShotGroup,
Ammo, Ammo,
Ammo.Pack,
Ammo.AmmoType, Ammo.AmmoType,
Ammo.Pack,
Containers, Containers,
Containers.Container, Containers.Container,
Containers.Tag, Containers.Tag,