diff --git a/CHANGELOG.md b/CHANGELOG.md index be4e1b4e..8203eef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # v0.9.12 +- Allow filtering ammo types when creating new packs - Add SlimSelect to select elements with user content - Fix registration page not offering all translations - Update deps diff --git a/lib/cannery/ammo.ex b/lib/cannery/ammo.ex index 3cbc60fe..aaee4fae 100644 --- a/lib/cannery/ammo.ex +++ b/lib/cannery/ammo.ex @@ -959,25 +959,79 @@ defmodule Cannery.Ammo do defp do_create_packs( %{"type_id" => type_id, "container_id" => container_id} = attrs, - _multiplier, + multiplier, user ) when is_binary(type_id) and is_binary(container_id) do - changeset = - %Pack{} - |> Pack.create_changeset( - get_type!(type_id, user), - Containers.get_container!(container_id, user), - user, - attrs - ) - |> Changeset.add_error(:multiplier, dgettext("errors", "Invalid multiplier")) - - {:error, changeset} + %Pack{} + |> Pack.create_changeset( + get_type!(type_id, user), + Containers.get_container!(container_id, user), + user, + attrs + ) + |> maybe_add_multiplier_error(multiplier) + |> Changeset.apply_action(:insert) end - defp do_create_packs(invalid_attrs, _multiplier, user) do - {:error, %Pack{} |> Pack.create_changeset(nil, nil, user, invalid_attrs)} + defp do_create_packs( + %{"type_id" => type_id} = attrs, + multiplier, + user + ) + when is_binary(type_id) do + %Pack{} + |> Pack.create_changeset( + get_type!(type_id, user), + nil, + user, + attrs + ) + |> maybe_add_multiplier_error(multiplier) + |> Changeset.apply_action(:insert) + end + + defp do_create_packs( + %{"container_id" => container_id} = attrs, + multiplier, + user + ) + when is_binary(container_id) do + %Pack{} + |> Pack.create_changeset( + nil, + Containers.get_container!(container_id, user), + user, + attrs + ) + |> maybe_add_multiplier_error(multiplier) + |> Changeset.apply_action(:insert) + end + + defp do_create_packs(invalid_attrs, multiplier, user) do + %Pack{} + |> Pack.create_changeset(nil, nil, user, invalid_attrs) + |> maybe_add_multiplier_error(multiplier) + |> Changeset.apply_action(:insert) + end + + defp maybe_add_multiplier_error(changeset, multiplier) + when multiplier >= 1 and + multiplier <= @pack_create_limit do + changeset + end + + defp maybe_add_multiplier_error(changeset, multiplier) do + changeset + |> Changeset.add_error( + :multiplier, + dgettext( + "errors", + "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}", + max: @pack_create_limit, + multiplier: multiplier + ) + ) end @spec preload_pack(Pack.t()) :: Pack.t() diff --git a/lib/cannery/ammo/pack.ex b/lib/cannery/ammo/pack.ex index 54fcdbe8..b88c38e2 100644 --- a/lib/cannery/ammo/pack.ex +++ b/lib/cannery/ammo/pack.ex @@ -70,36 +70,45 @@ defmodule Cannery.Ammo.Pack do ) :: changeset() def create_changeset( pack, - %Type{id: type_id}, - %Container{id: container_id, user_id: user_id}, + type, + container, %User{id: user_id}, attrs ) - when is_binary(type_id) and is_binary(container_id) and is_binary(user_id) do + when is_binary(user_id) do + type_id = + case type do + %Type{id: type_id} when is_binary(type_id) -> + type_id + + _invalid_type -> + nil + end + + container_id = + case container do + %Container{id: container_id, user_id: ^user_id} when is_binary(container_id) -> + container_id + + _invalid_container -> + nil + end + pack |> change(type_id: type_id) - |> change(user_id: user_id) |> change(container_id: container_id) - |> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on, :lot_number]) + |> change(user_id: user_id) + |> cast(attrs, [:count, :lot_number, :notes, :price_paid, :purchased_on, :staged]) + |> validate_required(:type_id, message: dgettext("errors", "Please select a valid type")) + |> validate_required(:container_id, + message: dgettext("errors", "Please select a valid container") + ) |> validate_number(:count, greater_than: 0) |> validate_number(:price_paid, greater_than_or_equal_to: 0) |> validate_length(:lot_number, max: 255) |> validate_required([:count, :staged, :purchased_on, :type_id, :container_id, :user_id]) end - @doc """ - Invalid changeset, used to prompt user to select type and container - """ - def create_changeset(pack, _invalid_type, _invalid_container, _invalid_user, attrs) do - pack - |> cast(attrs, [:type_id, :container_id]) - |> validate_required([:type_id, :container_id]) - |> validate_number(:count, greater_than: 0) - |> validate_number(:price_paid, greater_than_or_equal_to: 0) - |> validate_length(:lot_number, max: 255) - |> add_error(:invalid, dgettext("errors", "Please select a type and container")) - end - @doc false @spec update_changeset(t() | new_pack(), attrs :: map(), User.t()) :: changeset() def update_changeset(pack, attrs, user) do diff --git a/lib/cannery_web/live/pack_live/form_component.ex b/lib/cannery_web/live/pack_live/form_component.ex index c5364e88..7d41b100 100644 --- a/lib/cannery_web/live/pack_live/form_component.ex +++ b/lib/cannery_web/live/pack_live/form_component.ex @@ -9,7 +9,11 @@ defmodule CanneryWeb.PackLive.FormComponent do alias Ecto.Changeset alias Phoenix.LiveView.Socket - @pack_create_limit 10_000 + @impl true + @spec mount(Socket.t()) :: {:ok, Socket.t()} + def mount(socket) do + {:ok, socket |> assign(:class, :all)} + end @impl true @spec update( @@ -24,7 +28,6 @@ defmodule CanneryWeb.PackLive.FormComponent do def update(%{assigns: %{current_user: current_user}} = socket) do socket = socket - |> assign(:pack_create_limit, @pack_create_limit) |> assign(:types, Ammo.list_types(current_user)) |> assign_new(:containers, fn -> Containers.list_containers(current_user) end) @@ -33,7 +36,20 @@ defmodule CanneryWeb.PackLive.FormComponent do @impl true def handle_event("validate", %{"pack" => pack_params}, socket) do - {:noreply, socket |> assign_changeset(pack_params, :validate)} + matched_class = + case pack_params["class"] do + "rifle" -> :rifle + "shotgun" -> :shotgun + "pistol" -> :pistol + _other -> :all + end + + socket = + socket + |> assign_changeset(pack_params, :validate) + |> assign(:class, matched_class) + + {:noreply, socket} end def handle_event( @@ -51,11 +67,18 @@ 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 + @spec type_options([Type.t()], Type.class() | :all) :: + [{String.t(), Type.id()}] + defp type_options(types, :all) do types |> Enum.map(fn %{id: id, name: name} -> {name, id} end) end + defp type_options(types, selected_class) do + types + |> Enum.filter(fn %{class: class} -> class == selected_class end) + |> Enum.map(fn %{id: id, name: name} -> {name, id} end) + end + # Save Helpers defp assign_changeset( @@ -126,53 +149,15 @@ defmodule CanneryWeb.PackLive.FormComponent do end defp save_pack( - %{assigns: %{changeset: changeset}} = socket, + %{assigns: %{changeset: changeset, current_user: current_user, return_to: return_to}} = + socket, action, %{"multiplier" => multiplier_str} = pack_params ) when action in [:new, :clone] do socket = - case multiplier_str |> Integer.parse() do - {multiplier, _remainder} - when multiplier >= 1 and multiplier <= @pack_create_limit -> - socket |> create_multiple(pack_params, multiplier) - - {multiplier, _remainder} -> - error_msg = - dgettext( - "errors", - "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}", - max: @pack_create_limit, - multiplier: multiplier - ) - - save_multiplier_error(socket, changeset, error_msg) - - :error -> - error_msg = dgettext("errors", "Could not parse number of copies") - save_multiplier_error(socket, changeset, error_msg) - end - - {:noreply, socket} - end - - @spec save_multiplier_error(Socket.t(), Changeset.t(), String.t()) :: Socket.t() - defp save_multiplier_error(socket, changeset, error_msg) do - {:error, changeset} = - changeset - |> Changeset.add_error(:multiplier, error_msg) - |> Changeset.apply_action(:insert) - - socket |> assign(:changeset, changeset) - end - - defp create_multiple( - %{assigns: %{current_user: current_user, return_to: return_to}} = socket, - pack_params, - multiplier - ) do - case Ammo.create_packs(pack_params, multiplier, current_user) do - {:ok, {count, _packs}} -> + with {multiplier, _remainder} <- multiplier_str |> Integer.parse(), + {:ok, {count, _packs}} <- Ammo.create_packs(pack_params, multiplier, current_user) do prompt = dngettext( "prompts", @@ -182,9 +167,21 @@ defmodule CanneryWeb.PackLive.FormComponent do ) socket |> put_flash(:info, prompt) |> push_navigate(to: return_to) + else + {:error, %Changeset{} = changeset} -> + socket |> assign(changeset: changeset) - {:error, %Changeset{} = changeset} -> - socket |> assign(changeset: changeset) - end + :error -> + error_msg = dgettext("errors", "Could not parse number of copies") + + {:error, changeset} = + changeset + |> Changeset.add_error(:multiplier, error_msg) + |> Changeset.apply_action(:insert) + + socket |> assign(:changeset, changeset) + end + + {:noreply, socket} end end diff --git a/lib/cannery_web/live/pack_live/form_component.html.heex b/lib/cannery_web/live/pack_live/form_component.html.heex index 3744387a..8b0a8e7b 100644 --- a/lib/cannery_web/live/pack_live/form_component.html.heex +++ b/lib/cannery_web/live/pack_live/form_component.html.heex @@ -19,8 +19,23 @@ <%= changeset_errors(@changeset) %> + <%= label(f, :class, gettext("Class"), class: "title text-lg text-primary-600") %> + <%= select( + f, + :class, + [ + {gettext("Any"), :all}, + {gettext("Rifle"), :rifle}, + {gettext("Shotgun"), :shotgun}, + {gettext("Pistol"), :pistol} + ], + class: "text-center col-span-2 input input-primary", + value: @class + ) %> + <%= error_tag(f, :class, "col-span-3 text-center") %> + <%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %> - <%= select(f, :type_id, type_options(@types), + <%= select(f, :type_id, type_options(@types, @class), class: "text-center col-span-2 input input-primary", id: "pack-form-type-select", phx_hook: "SlimSelect" @@ -80,7 +95,6 @@ <%= label(f, :multiplier, gettext("Copies"), class: "title text-lg text-primary-600") %> <%= number_input(f, :multiplier, - max: @pack_create_limit, class: "text-center input input-primary", value: 1, phx_update: "ignore" diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot index 40604014..2f963de8 100644 --- a/priv/gettext/actions.pot +++ b/priv/gettext/actions.pot @@ -118,7 +118,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -178,7 +178,7 @@ msgstr "" msgid "add a container first" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "" diff --git a/priv/gettext/de/LC_MESSAGES/actions.po b/priv/gettext/de/LC_MESSAGES/actions.po index e5405898..bcb34070 100644 --- a/priv/gettext/de/LC_MESSAGES/actions.po +++ b/priv/gettext/de/LC_MESSAGES/actions.po @@ -131,7 +131,7 @@ msgstr "Passwort zurücksetzen" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -191,7 +191,7 @@ msgstr "In die Zwischenablage kopieren" msgid "add a container first" msgstr "Zuerst einen Behälter hinzufügen" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "Erstellen" diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 9de3f2fa..342126c8 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -86,7 +86,7 @@ msgstr "Gehäusematerial" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "Behälter" @@ -106,7 +106,7 @@ msgid "Corrosive" msgstr "Korrosiv" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "Anzahl" @@ -280,7 +280,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -305,7 +305,7 @@ msgid "Pressure" msgstr "Druck" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "Kaufpreis" @@ -393,7 +393,7 @@ msgstr "Leuchtspur" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "Art" @@ -653,7 +653,7 @@ msgstr "Passwort zurücksetzen" msgid "Record Shots" msgstr "Schüsse dokumentieren" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "Kopien" @@ -979,7 +979,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1265,6 +1265,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1290,6 +1291,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1344,6 +1346,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1388,6 +1391,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1433,7 +1437,7 @@ msgid "No Types" msgstr "Art" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1442,3 +1446,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/de/LC_MESSAGES/errors.po b/priv/gettext/de/LC_MESSAGES/errors.po index f81a16b5..2f6c11c4 100644 --- a/priv/gettext/de/LC_MESSAGES/errors.po +++ b/priv/gettext/de/LC_MESSAGES/errors.po @@ -158,23 +158,18 @@ msgstr "" msgid "Tag could not be removed" msgstr "Tag konnte nicht gelöscht werden" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "Konnte die Anzahl der Kopien nicht verstehen" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" "Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War " "%{multiplier}" -#: lib/cannery/ammo.ex:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -205,11 +200,6 @@ msgstr "Anzahl muss weniger als %{count} betragen" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format, fuzzy -msgid "Please select a type and container" -msgstr "" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format, fuzzy @@ -225,3 +215,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "" diff --git a/priv/gettext/de/LC_MESSAGES/prompts.po b/priv/gettext/de/LC_MESSAGES/prompts.po index 59007eb2..b56daedc 100644 --- a/priv/gettext/de/LC_MESSAGES/prompts.po +++ b/priv/gettext/de/LC_MESSAGES/prompts.po @@ -131,7 +131,7 @@ 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/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -219,7 +219,7 @@ msgstr "%{name} erfolgreich entfernt" msgid "You'll need to" msgstr "Sie müssen" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "Erstellen..." @@ -245,12 +245,12 @@ msgstr "Munitionsgruppe erfolgreich gelöscht" msgid "Ammo unstaged succesfully" msgstr "Munition erfolgreich demarkiert" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo updated successfully" msgstr "Munitionsgruppe erfolgreich aktualisiert" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index f8a81992..3d5f6422 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -82,7 +82,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "" @@ -102,7 +102,7 @@ msgid "Corrosive" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "" @@ -276,7 +276,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -301,7 +301,7 @@ msgid "Pressure" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "" @@ -387,7 +387,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -647,7 +647,7 @@ msgstr "" msgid "Record Shots" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "" @@ -973,7 +973,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1248,6 +1248,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1273,6 +1274,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1327,6 +1329,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1371,6 +1374,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1416,7 +1420,7 @@ msgid "No Types" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1425,3 +1429,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/actions.po b/priv/gettext/en/LC_MESSAGES/actions.po index 5f490790..8623ad46 100644 --- a/priv/gettext/en/LC_MESSAGES/actions.po +++ b/priv/gettext/en/LC_MESSAGES/actions.po @@ -118,7 +118,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -178,7 +178,7 @@ msgstr "" msgid "add a container first" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format, fuzzy msgid "Create" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 47377676..3853795e 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -82,7 +82,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "" @@ -102,7 +102,7 @@ msgid "Corrosive" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "" @@ -276,7 +276,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -301,7 +301,7 @@ msgid "Pressure" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "" @@ -387,7 +387,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -647,7 +647,7 @@ msgstr "" msgid "Record Shots" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "" @@ -973,7 +973,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1248,6 +1248,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1273,6 +1274,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1327,6 +1329,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1371,6 +1374,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1416,7 +1420,7 @@ msgid "No Types" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1425,3 +1429,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po index dd833a57..bbad3623 100644 --- a/priv/gettext/en/LC_MESSAGES/errors.po +++ b/priv/gettext/en/LC_MESSAGES/errors.po @@ -143,21 +143,16 @@ msgstr "" msgid "Tag could not be removed" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -188,11 +183,6 @@ msgstr "" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format, fuzzy -msgid "Please select a type and container" -msgstr "" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format, fuzzy @@ -208,3 +198,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/prompts.po b/priv/gettext/en/LC_MESSAGES/prompts.po index 03b0a1c6..0566fa79 100644 --- a/priv/gettext/en/LC_MESSAGES/prompts.po +++ b/priv/gettext/en/LC_MESSAGES/prompts.po @@ -112,7 +112,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -198,7 +198,7 @@ msgstr "" msgid "You'll need to" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format, fuzzy msgid "Creating..." msgstr "" @@ -224,12 +224,12 @@ msgstr "" msgid "Ammo unstaged succesfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo updated successfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot index ab9f9bbd..0383ff87 100644 --- a/priv/gettext/errors.pot +++ b/priv/gettext/errors.pot @@ -142,21 +142,16 @@ msgstr "" msgid "Tag could not be removed" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -187,11 +182,6 @@ msgstr "" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format -msgid "Please select a type and container" -msgstr "" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format @@ -207,3 +197,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format +msgid "Please select a valid container" +msgstr "" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format +msgid "Please select a valid type" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/actions.po b/priv/gettext/es/LC_MESSAGES/actions.po index c3d77a8a..a9a716c8 100644 --- a/priv/gettext/es/LC_MESSAGES/actions.po +++ b/priv/gettext/es/LC_MESSAGES/actions.po @@ -131,7 +131,7 @@ msgstr "Resetear contraseña" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -191,7 +191,7 @@ msgstr "Copiar al portapapeles" msgid "add a container first" msgstr "añade primero un contenedor" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "Crear" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index 8e592e1d..4a229f61 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -86,7 +86,7 @@ msgstr "Material del casquillo" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "Contenedor" @@ -106,7 +106,7 @@ msgid "Corrosive" msgstr "Corrosiva" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "Cantidad" @@ -280,7 +280,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -305,7 +305,7 @@ msgid "Pressure" msgstr "Presión" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "Precio pagado" @@ -394,7 +394,7 @@ msgstr "Trazadora" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "Tipo" @@ -654,7 +654,7 @@ msgstr "Reestablecer contraseña" msgid "Record Shots" msgstr "Tiros Récord" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "Copias" @@ -981,7 +981,7 @@ msgid "Never used" msgstr "Nunca usada" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "Comprada en" @@ -1267,6 +1267,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1292,6 +1293,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1346,6 +1348,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1390,6 +1393,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1435,7 +1439,7 @@ msgid "No Types" msgstr "Tipo" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1444,3 +1448,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/errors.po b/priv/gettext/es/LC_MESSAGES/errors.po index f08a7f53..50237946 100644 --- a/priv/gettext/es/LC_MESSAGES/errors.po +++ b/priv/gettext/es/LC_MESSAGES/errors.po @@ -158,21 +158,16 @@ msgstr "Debe confirmar su cuenta e iniciar sesión para acceder a esta página." msgid "Tag could not be removed" msgstr "La etiqueta no pudo ser eliminada" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "No se ha podido procesar el número de copias" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format 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:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "Multiplicador inválido" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -203,11 +198,6 @@ msgstr "El recuento debe ser menos de %{count}" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format, fuzzy -msgid "Please select a type and container" -msgstr "Por favor escoja un tipo de munición y un contenedor" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format, fuzzy @@ -223,3 +213,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "Por favor escoja un tipo de munición y un contenedor" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "Por favor escoja un usuario y tipo de munición valido" diff --git a/priv/gettext/es/LC_MESSAGES/prompts.po b/priv/gettext/es/LC_MESSAGES/prompts.po index edb1cef1..88216f2a 100644 --- a/priv/gettext/es/LC_MESSAGES/prompts.po +++ b/priv/gettext/es/LC_MESSAGES/prompts.po @@ -131,7 +131,7 @@ msgstr "Por favor chequea el correo para verificar tu cuenta" #: lib/cannery_web/components/add_shot_record_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -218,7 +218,7 @@ msgstr "%{name} eliminado exitosamente" msgid "You'll need to" msgstr "Necesitará hacerlo" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "Creando..." @@ -244,12 +244,12 @@ msgstr "Munición borrada exitosamente" msgid "Ammo unstaged succesfully" msgstr "Munición descargada exitosamente" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format msgid "Ammo updated successfully" msgstr "Munición actualizada exitosamente" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/fr/LC_MESSAGES/actions.po b/priv/gettext/fr/LC_MESSAGES/actions.po index bdd99adf..e1629373 100644 --- a/priv/gettext/fr/LC_MESSAGES/actions.po +++ b/priv/gettext/fr/LC_MESSAGES/actions.po @@ -131,7 +131,7 @@ msgstr "Réinitialisé le mot de passe" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -191,7 +191,7 @@ msgstr "Copier dans le presse-papier" msgid "add a container first" msgstr "ajouter un conteneur en premier" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "Créer" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 079aac90..27bbf8b4 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -86,7 +86,7 @@ msgstr "Matériau de la caisse" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "Conteneur" @@ -106,7 +106,7 @@ msgid "Corrosive" msgstr "Corrosive" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "Quantité" @@ -280,7 +280,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -305,7 +305,7 @@ msgid "Pressure" msgstr "Pression" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "Prix payé" @@ -395,7 +395,7 @@ msgstr "Traceuse" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "Type" @@ -655,7 +655,7 @@ msgstr "Réinitialiser votre mot de passe" msgid "Record Shots" msgstr "Enregistrer des tirs" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "Exemplaires" @@ -982,7 +982,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1268,6 +1268,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1293,6 +1294,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1347,6 +1349,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1391,6 +1394,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1436,7 +1440,7 @@ msgid "No Types" msgstr "Type" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1445,3 +1449,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/errors.po b/priv/gettext/fr/LC_MESSAGES/errors.po index 040b538c..e529a34a 100644 --- a/priv/gettext/fr/LC_MESSAGES/errors.po +++ b/priv/gettext/fr/LC_MESSAGES/errors.po @@ -159,21 +159,16 @@ msgstr "" msgid "Tag could not be removed" msgstr "Le tag n’a pas pu être retiré" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "Impossible d'analyser le nombre de copies" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format 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:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "Multiplicateur invalide" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -204,11 +199,6 @@ msgstr "La quantité doit être inférieur à %{count}" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format, fuzzy -msgid "Please select a type and container" -msgstr "Veuillez choisir un type de munitions et un conteneur" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format, fuzzy @@ -224,3 +214,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "Veuillez choisir un type de munitions et un conteneur" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "Veuillez choisir un utilisateur valide et un groupe de munitions" diff --git a/priv/gettext/fr/LC_MESSAGES/prompts.po b/priv/gettext/fr/LC_MESSAGES/prompts.po index e16478b8..4835e26a 100644 --- a/priv/gettext/fr/LC_MESSAGES/prompts.po +++ b/priv/gettext/fr/LC_MESSAGES/prompts.po @@ -132,7 +132,7 @@ 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/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -220,7 +220,7 @@ msgstr "%{name} retiré avec succès" msgid "You'll need to" msgstr "Vous aurez besoin de" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "Création en cours…" @@ -246,12 +246,12 @@ msgstr "Groupe de munition supprimé avec succès" msgid "Ammo unstaged succesfully" msgstr "Groupe de munition désélectionner avec succès" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo updated successfully" msgstr "Groupe de munition mis à jour avec succès" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format, fuzzy msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/ga/LC_MESSAGES/actions.po b/priv/gettext/ga/LC_MESSAGES/actions.po index e965607f..74e2c92a 100644 --- a/priv/gettext/ga/LC_MESSAGES/actions.po +++ b/priv/gettext/ga/LC_MESSAGES/actions.po @@ -129,7 +129,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -189,7 +189,7 @@ msgstr "" msgid "add a container first" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index f671910f..2c36d19d 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -84,7 +84,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "" @@ -104,7 +104,7 @@ msgid "Corrosive" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "" @@ -278,7 +278,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -303,7 +303,7 @@ msgid "Pressure" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "" @@ -389,7 +389,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -649,7 +649,7 @@ msgstr "" msgid "Record Shots" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "" @@ -975,7 +975,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1259,6 +1259,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1284,6 +1285,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1338,6 +1340,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1382,6 +1385,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1427,7 +1431,7 @@ msgid "No Types" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1436,3 +1440,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/errors.po b/priv/gettext/ga/LC_MESSAGES/errors.po index 1090d2ea..161538d3 100644 --- a/priv/gettext/ga/LC_MESSAGES/errors.po +++ b/priv/gettext/ga/LC_MESSAGES/errors.po @@ -158,21 +158,16 @@ msgstr "" msgid "Tag could not be removed" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -203,11 +198,6 @@ msgstr "" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format, fuzzy -msgid "Please select a type and container" -msgstr "" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format, fuzzy @@ -223,3 +213,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/prompts.po b/priv/gettext/ga/LC_MESSAGES/prompts.po index c7242bce..eed7920c 100644 --- a/priv/gettext/ga/LC_MESSAGES/prompts.po +++ b/priv/gettext/ga/LC_MESSAGES/prompts.po @@ -123,7 +123,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -209,7 +209,7 @@ msgstr "" msgid "You'll need to" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "" @@ -235,12 +235,12 @@ msgstr "" msgid "Ammo unstaged succesfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format msgid "Ammo updated successfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/it/LC_MESSAGES/actions.po b/priv/gettext/it/LC_MESSAGES/actions.po index cd94695f..d7eccef9 100644 --- a/priv/gettext/it/LC_MESSAGES/actions.po +++ b/priv/gettext/it/LC_MESSAGES/actions.po @@ -129,7 +129,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:57 #: lib/cannery_web/live/container_live/form_component.html.heex:59 #: lib/cannery_web/live/invite_live/form_component.html.heex:38 -#: lib/cannery_web/live/pack_live/form_component.html.heex:96 +#: lib/cannery_web/live/pack_live/form_component.html.heex:110 #: lib/cannery_web/live/range_live/form_component.html.heex:45 #: lib/cannery_web/live/tag_live/form_component.html.heex:41 #: lib/cannery_web/live/type_live/form_component.html.heex:386 @@ -189,7 +189,7 @@ msgstr "" msgid "add a container first" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:89 +#: lib/cannery_web/live/pack_live/form_component.html.heex:103 #, elixir-autogen, elixir-format msgid "Create" msgstr "" diff --git a/priv/gettext/it/LC_MESSAGES/default.po b/priv/gettext/it/LC_MESSAGES/default.po index 91d4169b..120e7c12 100644 --- a/priv/gettext/it/LC_MESSAGES/default.po +++ b/priv/gettext/it/LC_MESSAGES/default.po @@ -93,7 +93,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:64 #: lib/cannery_web/components/pack_table_component.ex:76 -#: lib/cannery_web/live/pack_live/form_component.html.heex:69 +#: lib/cannery_web/live/pack_live/form_component.html.heex:84 #, elixir-autogen, elixir-format msgid "Container" msgstr "" @@ -113,7 +113,7 @@ msgid "Corrosive" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:104 -#: lib/cannery_web/live/pack_live/form_component.html.heex:30 +#: lib/cannery_web/live/pack_live/form_component.html.heex:45 #, elixir-autogen, elixir-format msgid "Count" msgstr "" @@ -287,7 +287,7 @@ 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/live/pack_live/form_component.html.heex:60 +#: lib/cannery_web/live/pack_live/form_component.html.heex:75 #: lib/cannery_web/live/pack_live/show.ex:90 #: lib/cannery_web/live/range_live/form_component.html.heex:30 #, elixir-autogen, elixir-format @@ -312,7 +312,7 @@ msgid "Pressure" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:92 -#: lib/cannery_web/live/pack_live/form_component.html.heex:37 +#: lib/cannery_web/live/pack_live/form_component.html.heex:52 #, elixir-autogen, elixir-format msgid "Price paid" msgstr "" @@ -398,7 +398,7 @@ msgstr "" #: lib/cannery_web/components/move_pack_component.ex:65 #: lib/cannery_web/components/pack_table_component.ex:108 #: lib/cannery_web/live/container_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:22 +#: lib/cannery_web/live/pack_live/form_component.html.heex:37 #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -658,7 +658,7 @@ msgstr "" msgid "Record Shots" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:81 +#: lib/cannery_web/live/pack_live/form_component.html.heex:96 #, elixir-autogen, elixir-format msgid "Copies" msgstr "" @@ -984,7 +984,7 @@ msgid "Never used" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:71 -#: lib/cannery_web/live/pack_live/form_component.html.heex:52 +#: lib/cannery_web/live/pack_live/form_component.html.heex:67 #, elixir-autogen, elixir-format msgid "Purchased on" msgstr "" @@ -1259,6 +1259,7 @@ msgid "None specified" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:100 +#: lib/cannery_web/live/pack_live/form_component.html.heex:30 #: lib/cannery_web/live/pack_live/index.html.heex:61 #: lib/cannery_web/live/range_live/index.html.heex:94 #: lib/cannery_web/live/type_live/form_component.html.heex:28 @@ -1284,6 +1285,7 @@ msgid "Projectile" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:98 +#: lib/cannery_web/live/pack_live/form_component.html.heex:28 #: lib/cannery_web/live/pack_live/index.html.heex:59 #: lib/cannery_web/live/range_live/index.html.heex:92 #: lib/cannery_web/live/type_live/form_component.html.heex:26 @@ -1338,6 +1340,7 @@ msgid "Shot type:" msgstr "" #: lib/cannery_web/live/container_live/show.html.heex:99 +#: lib/cannery_web/live/pack_live/form_component.html.heex:29 #: lib/cannery_web/live/pack_live/index.html.heex:60 #: lib/cannery_web/live/range_live/index.html.heex:93 #: lib/cannery_web/live/type_live/form_component.html.heex:27 @@ -1382,6 +1385,7 @@ msgstr "" #: lib/cannery_web/components/type_table_component.ex:149 #: lib/cannery_web/live/container_live/show.html.heex:91 +#: lib/cannery_web/live/pack_live/form_component.html.heex:22 #: lib/cannery_web/live/pack_live/index.html.heex:50 #: lib/cannery_web/live/range_live/index.html.heex:83 #: lib/cannery_web/live/type_live/form_component.html.heex:21 @@ -1427,7 +1431,7 @@ msgid "No Types" msgstr "" #: lib/cannery_web/components/pack_table_component.ex:84 -#: lib/cannery_web/live/pack_live/form_component.html.heex:44 +#: lib/cannery_web/live/pack_live/form_component.html.heex:59 #, elixir-autogen, elixir-format msgid "Lot number" msgstr "" @@ -1436,3 +1440,8 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Lot number:" msgstr "" + +#: lib/cannery_web/live/pack_live/form_component.html.heex:27 +#, elixir-autogen, elixir-format +msgid "Any" +msgstr "" diff --git a/priv/gettext/it/LC_MESSAGES/errors.po b/priv/gettext/it/LC_MESSAGES/errors.po index b8ac8e1b..63602670 100644 --- a/priv/gettext/it/LC_MESSAGES/errors.po +++ b/priv/gettext/it/LC_MESSAGES/errors.po @@ -153,21 +153,16 @@ msgstr "" msgid "Tag could not be removed" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:152 +#: lib/cannery_web/live/pack_live/form_component.ex:175 #, elixir-autogen, elixir-format msgid "Could not parse number of copies" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:142 +#: lib/cannery/ammo.ex:1028 #, elixir-autogen, elixir-format msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgstr "" -#: lib/cannery/ammo.ex:974 -#, elixir-autogen, elixir-format -msgid "Invalid multiplier" -msgstr "" - #: lib/cannery_web/live/range_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Your browser does not support the canvas element." @@ -198,11 +193,6 @@ msgstr "" msgid "can't be blank" msgstr "" -#: lib/cannery/ammo/pack.ex:100 -#, elixir-autogen, elixir-format -msgid "Please select a type and container" -msgstr "" - #: lib/cannery_web/controllers/error_html.ex:11 #: lib/cannery_web/controllers/error_json.ex:9 #, elixir-autogen, elixir-format @@ -218,3 +208,13 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You must log in to access this page." msgstr "" + +#: lib/cannery/ammo/pack.ex:104 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid container" +msgstr "" + +#: lib/cannery/ammo/pack.ex:102 +#, elixir-autogen, elixir-format, fuzzy +msgid "Please select a valid type" +msgstr "" diff --git a/priv/gettext/it/LC_MESSAGES/prompts.po b/priv/gettext/it/LC_MESSAGES/prompts.po index 49912ae3..5df2b863 100644 --- a/priv/gettext/it/LC_MESSAGES/prompts.po +++ b/priv/gettext/it/LC_MESSAGES/prompts.po @@ -123,7 +123,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -209,7 +209,7 @@ msgstr "" msgid "You'll need to" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "" @@ -235,12 +235,12 @@ msgstr "" msgid "Ammo unstaged succesfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format msgid "Ammo updated successfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format msgid "Ammo added successfully" msgid_plural "Ammo added successfully" diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index fe8028ab..5803f1e1 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -112,7 +112,7 @@ msgstr "" #: lib/cannery_web/components/add_shot_record_component.html.heex:59 #: lib/cannery_web/live/container_live/form_component.html.heex:61 #: lib/cannery_web/live/invite_live/form_component.html.heex:40 -#: lib/cannery_web/live/pack_live/form_component.html.heex:97 +#: lib/cannery_web/live/pack_live/form_component.html.heex:111 #: lib/cannery_web/live/range_live/form_component.html.heex:47 #: lib/cannery_web/live/tag_live/form_component.html.heex:43 #: lib/cannery_web/live/type_live/form_component.html.heex:387 @@ -198,7 +198,7 @@ msgstr "" msgid "You'll need to" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.html.heex:90 +#: lib/cannery_web/live/pack_live/form_component.html.heex:104 #, elixir-autogen, elixir-format msgid "Creating..." msgstr "" @@ -224,12 +224,12 @@ msgstr "" msgid "Ammo unstaged succesfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:118 +#: lib/cannery_web/live/pack_live/form_component.ex:141 #, elixir-autogen, elixir-format msgid "Ammo updated successfully" msgstr "" -#: lib/cannery_web/live/pack_live/form_component.ex:177 +#: lib/cannery_web/live/pack_live/form_component.ex:162 #, elixir-autogen, elixir-format msgid "Ammo added successfully" msgid_plural "Ammo added successfully"