fix tests

This commit is contained in:
shibao 2022-02-19 00:31:17 -05:00
parent a19ec682e6
commit 91288a9ffa
14 changed files with 247 additions and 147 deletions

View File

@ -5,7 +5,7 @@ defmodule CanneryWeb.Components.ContainerCard do
use CanneryWeb, :component use CanneryWeb, :component
import CanneryWeb.Components.TagCard import CanneryWeb.Components.TagCard
alias Cannery.{Repo, Containers} alias Cannery.{Containers, Repo}
alias CanneryWeb.Endpoint alias CanneryWeb.Endpoint
def container_card(%{container: container} = assigns) do def container_card(%{container: container} = assigns) do

View File

@ -4,7 +4,7 @@ defmodule CanneryWeb.ContainerLive.EditTagsComponent do
""" """
use CanneryWeb, :live_component use CanneryWeb, :live_component
alias Cannery.{Accounts.User, Containers, Containers.Container, Tags, Tags.Tag, Repo} alias Cannery.{Accounts.User, Containers, Containers.Container, Repo, Tags, Tags.Tag}
alias Phoenix.LiveView.Socket alias Phoenix.LiveView.Socket
@impl true @impl true

View File

@ -9,7 +9,13 @@ defmodule CanneryWeb.HomeLive do
@impl true @impl true
def mount(_params, session, socket) do def mount(_params, session, socket) do
admins = Accounts.list_users_by_role(:admin) admins = Accounts.list_users_by_role(:admin)
{:ok, socket |> assign_defaults(session) |> assign(query: "", results: %{}, admins: admins)}
socket =
socket
|> assign_defaults(session)
|> assign(page_title: "Home", query: "", results: %{}, admins: admins)
{:ok, socket}
end end
@impl true @impl true

View File

@ -5,7 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<%= csrf_meta_tag() %> <%= csrf_meta_tag() %>
<%= live_title_tag(assigns[:page_title], suffix: " | Cannery") %> <%= if(assigns |> Map.has_key?(:page_title),
do: "#{assigns.page_title} | Cannery",
else: "Cannery"
)
|> live_title_tag(suffix: "") %>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} /> <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/css/app.css")} />
<script <script
defer defer

View File

@ -11,12 +11,12 @@ msgid ""
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:57 #: lib/cannery_web/live/home_live.ex:63
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day" msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:79 #: lib/cannery_web/live/home_live.ex:85
msgid "Access from any internet-capable device" msgid "Access from any internet-capable device"
msgstr "" msgstr ""
@ -26,7 +26,7 @@ msgid "Admins"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:93 #: lib/cannery_web/live/home_live.ex:99
msgid "Admins:" msgid "Admins:"
msgstr "" msgstr ""
@ -44,7 +44,7 @@ msgid "Ammo type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:78 #: lib/cannery_web/live/ammo_type_live/show.html.heex:94
msgid "Average Price paid" msgid "Average Price paid"
msgstr "" msgstr ""
@ -150,7 +150,7 @@ msgid "Disable"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:54 #: lib/cannery_web/live/home_live.ex:60
msgid "Easy to Use:" msgid "Easy to Use:"
msgstr "" msgstr ""
@ -206,7 +206,7 @@ msgid "Incendiary"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:88 #: lib/cannery_web/live/home_live.ex:94
msgid "Instance Information" msgid "Instance Information"
msgstr "" msgstr ""
@ -216,7 +216,7 @@ msgid "Invite Disabled"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:119 #: lib/cannery_web/live/home_live.ex:125
msgid "Invite Only" msgid "Invite Only"
msgstr "" msgstr ""
@ -330,7 +330,7 @@ msgid "No Ammo Types"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98 #: lib/cannery_web/live/ammo_type_live/show.html.heex:114
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "" msgstr ""
@ -401,17 +401,17 @@ msgid "Primer type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118 #: lib/cannery_web/live/home_live.ex:124
msgid "Public Signups" msgid "Public Signups"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:66 #: lib/cannery_web/live/home_live.ex:72
msgid "Secure:" msgid "Secure:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69 #: lib/cannery_web/live/home_live.ex:75
msgid "Self-host your own instance, or use an instance from someone you trust." msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr "" msgstr ""
@ -436,7 +436,7 @@ msgid "Show Ammo type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:76 #: lib/cannery_web/live/home_live.ex:82
msgid "Simple:" msgid "Simple:"
msgstr "" msgstr ""
@ -467,7 +467,7 @@ msgid "Text color"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:45 #: lib/cannery_web/live/home_live.ex:51
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "" msgstr ""
@ -511,12 +511,12 @@ msgid "Uses left"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:41 #: lib/cannery_web/live/home_live.ex:47
msgid "Welcome to %{name}" msgid "Welcome to %{name}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:70 #: lib/cannery_web/live/home_live.ex:76
msgid "Your data stays with you, period" msgid "Your data stays with you, period"
msgstr "" msgstr ""
@ -649,7 +649,7 @@ msgstr ""
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64 #: lib/cannery_web/live/ammo_group_live/index.html.heex:64
#: lib/cannery_web/live/ammo_group_live/show.html.heex:32 #: lib/cannery_web/live/ammo_group_live/show.html.heex:32
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39 #: lib/cannery_web/live/ammo_group_live/show.html.heex:39
#: lib/cannery_web/live/ammo_type_live/show.html.heex:82 #: lib/cannery_web/live/ammo_type_live/show.html.heex:98
msgid "$%{amount}" msgid "$%{amount}"
msgstr "" msgstr ""
@ -759,7 +759,7 @@ msgid "Show %{name}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:88 #: lib/cannery_web/live/ammo_type_live/show.html.heex:104
msgid "No cost information" msgid "No cost information"
msgstr "" msgstr ""
@ -792,3 +792,18 @@ msgstr ""
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111 #: lib/cannery_web/live/ammo_group_live/show.html.heex:111
msgid "Rounds used" msgid "Rounds used"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
msgid "Current # of rounds:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
msgid "Total # of rounds"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
msgid "Total rounds shot:"
msgstr ""

View File

@ -32,14 +32,14 @@ msgid "Add your first type!"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:17 #: lib/cannery_web/templates/user_settings/edit.html.heex:16
#: lib/cannery_web/templates/user_settings/edit.html.heex:46 #: lib/cannery_web/templates/user_settings/edit.html.heex:45
msgid "Change email" msgid "Change email"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:61 #: lib/cannery_web/templates/user_settings/edit.html.heex:60
#: lib/cannery_web/templates/user_settings/edit.html.heex:102 #: lib/cannery_web/templates/user_settings/edit.html.heex:101
msgid "Change password" msgid "Change password"
msgstr "" msgstr ""
@ -49,14 +49,14 @@ msgid "Create Invite"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:109 #: lib/cannery_web/templates/user_settings/edit.html.heex:108
msgid "Delete User" msgid "Delete User"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_registration/new.html.heex:43
#: lib/cannery_web/templates/user_reset_password/new.html.heex:3 #: lib/cannery_web/templates/user_reset_password/new.html.heex:3
#: lib/cannery_web/templates/user_session/new.html.heex:46 #: lib/cannery_web/templates/user_session/new.html.heex:45
msgid "Forgot your password?" msgid "Forgot your password?"
msgstr "" msgstr ""
@ -67,12 +67,12 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:108 #: lib/cannery_web/components/topbar.ex:108
#: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:40 #: lib/cannery_web/templates/user_registration/new.html.heex:39
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:49 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
#: lib/cannery_web/templates/user_reset_password/new.html.heex:31 #: lib/cannery_web/templates/user_reset_password/new.html.heex:30
#: lib/cannery_web/templates/user_session/new.html.heex:3 #: lib/cannery_web/templates/user_session/new.html.heex:3
#: lib/cannery_web/templates/user_session/new.html.heex:34 #: lib/cannery_web/templates/user_session/new.html.heex:33
msgid "Log in" msgid "Log in"
msgstr "" msgstr ""
@ -103,31 +103,31 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:101 #: lib/cannery_web/components/topbar.ex:101
#: lib/cannery_web/templates/user_confirmation/new.html.heex:26 #: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:34 #: lib/cannery_web/templates/user_registration/new.html.heex:33
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:43
#: lib/cannery_web/templates/user_reset_password/new.html.heex:26 #: lib/cannery_web/templates/user_reset_password/new.html.heex:25
#: lib/cannery_web/templates/user_session/new.html.heex:41 #: lib/cannery_web/templates/user_session/new.html.heex:40
msgid "Register" msgid "Register"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_confirmation/new.html.heex:3 #: lib/cannery_web/templates/user_confirmation/new.html.heex:3
#: lib/cannery_web/templates/user_confirmation/new.html.heex:17 #: lib/cannery_web/templates/user_confirmation/new.html.heex:16
msgid "Resend confirmation instructions" msgid "Resend confirmation instructions"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:3 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:3
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:35 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:34
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.html.heex:42 #: lib/cannery_web/components/add_shot_group_component.html.heex:42
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:175 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:172
#: lib/cannery_web/live/container_live/form_component.html.heex:50 #: lib/cannery_web/live/container_live/form_component.html.heex:50
#: lib/cannery_web/live/invite_live/form_component.html.heex:28 #: lib/cannery_web/live/invite_live/form_component.html.heex:28
#: lib/cannery_web/live/range_live/form_component.html.heex:40 #: lib/cannery_web/live/range_live/form_component.html.heex:40
@ -136,7 +136,7 @@ msgid "Save"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_reset_password/new.html.heex:17 #: lib/cannery_web/templates/user_reset_password/new.html.heex:16
msgid "Send instructions to reset password" msgid "Send instructions to reset password"
msgstr "" msgstr ""
@ -146,7 +146,7 @@ msgid "Why not add one?"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:17 #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:52
msgid "Add" msgid "Add"
msgstr "" msgstr ""
@ -162,13 +162,13 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:85 #: lib/cannery_web/live/ammo_group_live/index.html.heex:85
#: lib/cannery_web/live/ammo_group_live/show.html.heex:67 #: lib/cannery_web/live/ammo_group_live/show.html.heex:86
#: lib/cannery_web/live/range_live/index.html.heex:36 #: lib/cannery_web/live/range_live/index.html.heex:36
msgid "Record shots" msgid "Record shots"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31 #: lib/cannery_web/live/ammo_group_live/show.html.heex:50
msgid "Ammo Details" msgid "Ammo Details"
msgstr "" msgstr ""
@ -178,7 +178,7 @@ msgid "Add another container!"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:61 #: lib/cannery_web/live/ammo_group_live/show.html.heex:80
msgid "Move containers" msgid "Move containers"
msgstr "" msgstr ""

View File

@ -12,12 +12,12 @@ msgstr ""
"Plural-Forms: nplurals=2\n" "Plural-Forms: nplurals=2\n"
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:57 #: lib/cannery_web/live/home_live.ex:63
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day" msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:79 #: lib/cannery_web/live/home_live.ex:85
msgid "Access from any internet-capable device" msgid "Access from any internet-capable device"
msgstr "" msgstr ""
@ -27,7 +27,7 @@ msgid "Admins"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:93 #: lib/cannery_web/live/home_live.ex:99
msgid "Admins:" msgid "Admins:"
msgstr "" msgstr ""
@ -55,14 +55,14 @@ msgid "Background color"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:154
#: lib/cannery_web/live/ammo_type_live/index.ex:67 #: lib/cannery_web/live/ammo_type_live/index.ex:67
#: lib/cannery_web/live/ammo_type_live/show.html.heex:55
msgid "Blank" msgid "Blank"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:74
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:102
msgid "Brass" msgid "Brass"
msgstr "" msgstr ""
@ -115,8 +115,9 @@ msgid "Containers"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:161 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:158
#: lib/cannery_web/live/ammo_type_live/index.ex:68 #: lib/cannery_web/live/ammo_type_live/index.ex:68
#: lib/cannery_web/live/ammo_type_live/show.html.heex:56
msgid "Corrosive" msgid "Corrosive"
msgstr "" msgstr ""
@ -139,7 +140,7 @@ msgid "Description"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/container_card.ex:27 #: lib/cannery_web/components/container_card.ex:31
#: lib/cannery_web/live/container_live/show.html.heex:8 #: lib/cannery_web/live/container_live/show.html.heex:8
msgid "Description:" msgid "Description:"
msgstr "" msgstr ""
@ -150,7 +151,7 @@ msgid "Disable"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:54 #: lib/cannery_web/live/home_live.ex:60
msgid "Easy to Use:" msgid "Easy to Use:"
msgstr "" msgstr ""
@ -166,12 +167,6 @@ msgstr ""
msgid "Edit Ammo type" msgid "Edit Ammo type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:24
#: lib/cannery_web/live/container_live/show.ex:89
msgid "Edit Container"
msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/invite_live/index.ex:35 #: lib/cannery_web/live/invite_live/index.ex:35
msgid "Edit Invite" msgid "Edit Invite"
@ -198,20 +193,21 @@ msgid "FMJ"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:116 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:113
#: lib/cannery_web/live/ammo_type_live/index.ex:61 #: lib/cannery_web/live/ammo_type_live/index.ex:61
#: lib/cannery_web/live/ammo_type_live/show.html.heex:49 #: lib/cannery_web/live/ammo_type_live/show.html.heex:49
msgid "Grains" msgid "Grains"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:153 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:150
#: lib/cannery_web/live/ammo_type_live/index.ex:66 #: lib/cannery_web/live/ammo_type_live/index.ex:66
#: lib/cannery_web/live/ammo_type_live/show.html.heex:54
msgid "Incendiary" msgid "Incendiary"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:88 #: lib/cannery_web/live/home_live.ex:94
msgid "Instance Information" msgid "Instance Information"
msgstr "" msgstr ""
@ -221,7 +217,7 @@ msgid "Invite Disabled"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:119 #: lib/cannery_web/live/home_live.ex:125
msgid "Invite Only" msgid "Invite Only"
msgstr "" msgstr ""
@ -232,7 +228,7 @@ msgid "Invites"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_session/new.html.heex:29 #: lib/cannery_web/templates/user_session/new.html.heex:28
msgid "Keep me logged in for 60 days" msgid "Keep me logged in for 60 days"
msgstr "" msgstr ""
@ -242,7 +238,7 @@ msgid "Listing Ammo types"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:33 #: lib/cannery_web/live/container_live/index.ex:38
msgid "Listing Containers" msgid "Listing Containers"
msgstr "" msgstr ""
@ -263,7 +259,7 @@ msgid "Location"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/container_card.ex:39 #: lib/cannery_web/components/container_card.ex:43
#: lib/cannery_web/live/container_live/show.html.heex:20 #: lib/cannery_web/live/container_live/show.html.heex:20
msgid "Location:" msgid "Location:"
msgstr "" msgstr ""
@ -279,8 +275,9 @@ msgid "Manage"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:165 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:162
#: lib/cannery_web/live/ammo_type_live/index.ex:69 #: lib/cannery_web/live/ammo_type_live/index.ex:69
#: lib/cannery_web/live/ammo_type_live/show.html.heex:57
msgid "Manufacturer" msgid "Manufacturer"
msgstr "" msgstr ""
@ -309,7 +306,7 @@ msgid "New Ammo type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:29 #: lib/cannery_web/live/container_live/index.ex:33
msgid "New Container" msgid "New Container"
msgstr "" msgstr ""
@ -334,12 +331,12 @@ msgid "No Ammo Types"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:109 #: lib/cannery_web/live/ammo_type_live/show.html.heex:114
msgid "No ammo for this type" msgid "No ammo for this type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.html.heex:88 #: lib/cannery_web/live/container_live/show.html.heex:77
msgid "No ammo groups in this container" msgid "No ammo groups in this container"
msgstr "" msgstr ""
@ -354,6 +351,7 @@ msgid "No invites"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:30
#: lib/cannery_web/live/tag_live/index.html.heex:10 #: lib/cannery_web/live/tag_live/index.html.heex:10
msgid "No tags" msgid "No tags"
msgstr "" msgstr ""
@ -361,7 +359,7 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.html.heex:30 #: lib/cannery_web/components/add_shot_group_component.html.heex:30
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:41
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36 #: lib/cannery_web/live/ammo_group_live/show.html.heex:122
#: lib/cannery_web/live/range_live/form_component.html.heex:29 #: lib/cannery_web/live/range_live/form_component.html.heex:29
#: lib/cannery_web/live/range_live/index.html.heex:67 #: lib/cannery_web/live/range_live/index.html.heex:67
msgid "Notes" msgid "Notes"
@ -369,7 +367,7 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/ammo_group_card.ex:35 #: lib/cannery_web/components/ammo_group_card.ex:35
#: lib/cannery_web/live/ammo_group_live/show.html.heex:14 #: lib/cannery_web/live/ammo_group_live/show.html.heex:24
msgid "Notes:" msgid "Notes:"
msgstr "" msgstr ""
@ -379,7 +377,7 @@ msgid "On the bookshelf"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:124 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:121
#: lib/cannery_web/live/ammo_type_live/index.ex:62 #: lib/cannery_web/live/ammo_type_live/index.ex:62
#: lib/cannery_web/live/ammo_type_live/show.html.heex:50 #: lib/cannery_web/live/ammo_type_live/show.html.heex:50
msgid "Pressure" msgid "Pressure"
@ -393,34 +391,28 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/ammo_group_card.ex:42 #: lib/cannery_web/components/ammo_group_card.ex:42
#: lib/cannery_web/live/ammo_group_live/show.html.heex:21
msgid "Price paid:" msgid "Price paid:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:131 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:128
#: lib/cannery_web/live/ammo_type_live/index.ex:63 #: lib/cannery_web/live/ammo_type_live/index.ex:63
#: lib/cannery_web/live/ammo_type_live/show.html.heex:51 #: lib/cannery_web/live/ammo_type_live/show.html.heex:51
msgid "Primer type" msgid "Primer type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118 #: lib/cannery_web/live/home_live.ex:124
msgid "Public Signups" msgid "Public Signups"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/index.ex:64 #: lib/cannery_web/live/home_live.ex:72
msgid "Rimfire"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:66
msgid "Secure:" msgid "Secure:"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69 #: lib/cannery_web/live/home_live.ex:75
msgid "Self-host your own instance, or use an instance from someone you trust." msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr "" msgstr ""
@ -445,12 +437,7 @@ msgid "Show Ammo type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.ex:88 #: lib/cannery_web/live/home_live.ex:82
msgid "Show Container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:76
msgid "Simple:" msgid "Simple:"
msgstr "" msgstr ""
@ -460,13 +447,12 @@ msgid "Steel"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:79 #: lib/cannery_web/live/ammo_group_live/show.html.heex:98
msgid "Stored in" msgid "Stored in"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:40 #: lib/cannery_web/components/topbar.ex:40
#: lib/cannery_web/live/container_live/show.html.heex:60
#: lib/cannery_web/live/tag_live/index.html.heex:3 #: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags" msgid "Tags"
msgstr "" msgstr ""
@ -482,18 +468,19 @@ msgid "Text color"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:45 #: lib/cannery_web/live/home_live.ex:51
msgid "The self-hosted firearm tracker website" msgid "The self-hosted firearm tracker website"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:84 #: lib/cannery_web/live/ammo_group_live/show.html.heex:103
msgid "This ammo group is not in a container" msgid "This ammo group is not in a container"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:149 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:146
#: lib/cannery_web/live/ammo_type_live/index.ex:65 #: lib/cannery_web/live/ammo_type_live/index.ex:65
#: lib/cannery_web/live/ammo_type_live/show.html.heex:53
msgid "Tracer" msgid "Tracer"
msgstr "" msgstr ""
@ -504,7 +491,7 @@ msgid "Type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/container_card.ex:33 #: lib/cannery_web/components/container_card.ex:37
#: lib/cannery_web/live/container_live/show.html.heex:14 #: lib/cannery_web/live/container_live/show.html.heex:14
msgid "Type:" msgid "Type:"
msgstr "" msgstr ""
@ -525,20 +512,15 @@ msgid "Uses left"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:41 #: lib/cannery_web/live/home_live.ex:47
msgid "Welcome to %{name}" msgid "Welcome to %{name}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:70 #: lib/cannery_web/live/home_live.ex:76
msgid "Your data stays with you, period" msgid "Your data stays with you, period"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.ex:90
msgid "Add Tag to Container"
msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.html.heex:49 #: lib/cannery_web/live/container_live/show.html.heex:49
msgid "No tags for this container" msgid "No tags for this container"
@ -556,6 +538,7 @@ msgid "Range day"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:125
#: lib/cannery_web/live/range_live/index.html.heex:70 #: lib/cannery_web/live/range_live/index.html.heex:70
msgid "Date" msgid "Date"
msgstr "" msgstr ""
@ -571,13 +554,13 @@ msgid "No ammo staged"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:58 #: lib/cannery_web/live/ammo_group_live/show.html.heex:77
#: lib/cannery_web/live/range_live/index.html.heex:33 #: lib/cannery_web/live/range_live/index.html.heex:33
msgid "Stage for range" msgid "Stage for range"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:57 #: lib/cannery_web/live/ammo_group_live/show.html.heex:76
#: lib/cannery_web/live/range_live/index.html.heex:32 #: lib/cannery_web/live/range_live/index.html.heex:32
msgid "Unstage from range" msgid "Unstage from range"
msgstr "" msgstr ""
@ -631,6 +614,7 @@ msgid "Rounds left"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:119
#: lib/cannery_web/live/range_live/index.html.heex:64 #: lib/cannery_web/live/range_live/index.html.heex:64
msgid "Rounds shot" msgid "Rounds shot"
msgstr "" msgstr ""
@ -664,7 +648,8 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/ammo_group_card.ex:43 #: lib/cannery_web/components/ammo_group_card.ex:43
#: lib/cannery_web/live/ammo_group_live/index.html.heex:64 #: lib/cannery_web/live/ammo_group_live/index.html.heex:64
#: lib/cannery_web/live/ammo_group_live/show.html.heex:22 #: lib/cannery_web/live/ammo_group_live/show.html.heex:32
#: lib/cannery_web/live/ammo_group_live/show.html.heex:39
#: lib/cannery_web/live/ammo_type_live/show.html.heex:98 #: lib/cannery_web/live/ammo_type_live/show.html.heex:98
msgid "$%{amount}" msgid "$%{amount}"
msgstr "" msgstr ""
@ -689,7 +674,7 @@ msgid "Muzzle velocity"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:106 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
#: lib/cannery_web/live/ammo_type_live/index.ex:60 #: lib/cannery_web/live/ammo_type_live/index.ex:60
#: lib/cannery_web/live/ammo_type_live/show.html.heex:48 #: lib/cannery_web/live/ammo_type_live/show.html.heex:48
msgid "Powder grains per charge" msgid "Powder grains per charge"
@ -703,24 +688,25 @@ msgid "Powder type"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:171 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:168
#: lib/cannery_web/live/ammo_type_live/index.ex:70 #: lib/cannery_web/live/ammo_type_live/index.ex:70
#: lib/cannery_web/live/ammo_type_live/show.html.heex:58
msgid "UPC" msgid "UPC"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:81 #: lib/cannery_web/templates/user_settings/edit.html.heex:80
msgid "Confirm new password" msgid "Confirm new password"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:34 #: lib/cannery_web/templates/user_settings/edit.html.heex:33
#: lib/cannery_web/templates/user_settings/edit.html.heex:90 #: lib/cannery_web/templates/user_settings/edit.html.heex:89
msgid "Current password" msgid "Current password"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:74 #: lib/cannery_web/templates/user_settings/edit.html.heex:73
msgid "New password" msgid "New password"
msgstr "" msgstr ""
@ -735,7 +721,9 @@ msgid "Unstage"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:137
#: lib/cannery_web/live/ammo_type_live/index.ex:64
#: lib/cannery_web/live/ammo_type_live/show.html.heex:52
msgid "Firing type" msgid "Firing type"
msgstr "" msgstr ""
@ -748,3 +736,75 @@ msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:37 #: lib/cannery_web/templates/layout/live.html.heex:37
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:29
#: lib/cannery_web/live/container_live/show.ex:97
msgid "Edit %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:48
#: lib/cannery_web/live/container_live/show.ex:98
msgid "Edit %{name} tags"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/components/container_card.ex:50
msgid "Rounds:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.ex:96
msgid "Show %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:104
msgid "No cost information"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:36
msgid "% left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:38
msgid "Current value:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:31
msgid "Original cost:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:13
msgid "Original count:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/show.html.heex:18
msgid "Percentage left:"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/show.html.heex:111
msgid "Rounds used"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:77
msgid "Current # of rounds:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/index.html.heex:32
msgid "Total # of rounds"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:85
msgid "Total rounds shot:"
msgstr ""

View File

@ -11,18 +11,18 @@ msgstr ""
"Language: en\n" "Language: en\n"
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery/containers.ex:105 #: lib/cannery/containers.ex:122
msgid "Container must be empty before deleting" msgid "Container must be empty before deleting"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:55 #: lib/cannery_web/live/container_live/index.ex:71
#: lib/cannery_web/live/container_live/show.ex:74 #: lib/cannery_web/live/container_live/show.ex:73
msgid "Could not delete %{name}: %{error}" msgid "Could not delete %{name}: %{error}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:43 #: lib/cannery_web/live/container_live/index.ex:59
msgid "Could not find that container" msgid "Could not find that container"
msgstr "" msgstr ""
@ -57,10 +57,10 @@ msgid "Not found"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_registration/new.html.heex:17 #: lib/cannery_web/templates/user_registration/new.html.heex:16
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:17 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:16
#: lib/cannery_web/templates/user_settings/edit.html.heex:23 #: lib/cannery_web/templates/user_settings/edit.html.heex:22
#: lib/cannery_web/templates/user_settings/edit.html.heex:67 #: lib/cannery_web/templates/user_settings/edit.html.heex:66
msgid "Oops, something went wrong! Please check the errors below." msgid "Oops, something went wrong! Please check the errors below."
msgstr "" msgstr ""
@ -133,7 +133,7 @@ msgid "Tag not found"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/add_tag_component.ex:35 #: lib/cannery_web/live/container_live/edit_tags_component.ex:30
msgid "Tag could not be added" msgid "Tag could not be added"
msgstr "" msgstr ""
@ -153,3 +153,8 @@ msgstr ""
#: lib/cannery_web/controllers/user_auth.ex:161 #: lib/cannery_web/controllers/user_auth.ex:161
msgid "You must confirm your account and log in to access this page." msgid "You must confirm your account and log in to access this page."
msgstr "" msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/container_live/edit_tags_component.ex:52
msgid "Tag could not be removed"
msgstr ""

View File

@ -39,8 +39,8 @@ msgid "%{name} enabled succesfully"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/index.ex:48 #: lib/cannery_web/live/container_live/index.ex:64
#: lib/cannery_web/live/container_live/show.ex:64 #: lib/cannery_web/live/container_live/show.ex:63
msgid "%{name} has been deleted" msgid "%{name} has been deleted"
msgstr "" msgstr ""
@ -86,7 +86,7 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_type_live/show.html.heex:29 #: lib/cannery_web/live/ammo_type_live/show.html.heex:29
#: lib/cannery_web/live/container_live/index.html.heex:38 #: lib/cannery_web/live/container_live/index.html.heex:46
#: lib/cannery_web/live/container_live/show.html.heex:37 #: lib/cannery_web/live/container_live/show.html.heex:37
#: lib/cannery_web/live/tag_live/index.html.heex:38 #: lib/cannery_web/live/tag_live/index.html.heex:38
msgid "Are you sure you want to delete %{name}?" msgid "Are you sure you want to delete %{name}?"
@ -99,13 +99,13 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120 #: lib/cannery_web/live/ammo_group_live/index.html.heex:120
#: lib/cannery_web/live/ammo_group_live/show.html.heex:47 #: lib/cannery_web/live/ammo_group_live/show.html.heex:66
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68 #: lib/cannery_web/live/ammo_type_live/index.html.heex:75
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/templates/user_settings/edit.html.heex:113 #: lib/cannery_web/templates/user_settings/edit.html.heex:112
msgid "Are you sure you want to delete your account?" msgid "Are you sure you want to delete your account?"
msgstr "" msgstr ""
@ -155,14 +155,14 @@ msgid "Please check your email to verify your account"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:97 #: lib/cannery_web/live/home_live.ex:103
msgid "Register to setup %{name}" msgid "Register to setup %{name}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.html.heex:44 #: lib/cannery_web/components/add_shot_group_component.html.heex:44
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:176 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:173
#: lib/cannery_web/live/container_live/form_component.html.heex:52 #: lib/cannery_web/live/container_live/form_component.html.heex:52
#: lib/cannery_web/live/invite_live/form_component.html.heex:30 #: lib/cannery_web/live/invite_live/form_component.html.heex:30
#: lib/cannery_web/live/range_live/form_component.html.heex:42 #: lib/cannery_web/live/range_live/form_component.html.heex:42
@ -176,22 +176,22 @@ msgid "Your account has been deleted"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.html.heex:71 #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:16
msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?" msgid "Are you sure you want to remove the %{tag_name} tag from %{container_name}?"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/add_tag_component.ex:40 #: lib/cannery_web/live/container_live/edit_tags_component.ex:36
msgid "%{name} added successfully" msgid "%{name} added successfully"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/show.ex:40 #: lib/cannery_web/live/container_live/show.ex:39
msgid "%{tag_name} has been removed from %{container_name}" msgid "%{tag_name} has been removed from %{container_name}"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/container_live/add_tag_component.html.heex:19 #: lib/cannery_web/live/container_live/edit_tags_component.html.heex:54
msgid "Adding..." msgid "Adding..."
msgstr "" msgstr ""
@ -239,3 +239,8 @@ msgstr ""
#: lib/cannery_web/live/invite_live/index.ex:123 #: lib/cannery_web/live/invite_live/index.ex:123
msgid "Copied to clipboard" msgid "Copied to clipboard"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
msgid "%{name} removed successfully"
msgstr ""

View File

@ -99,7 +99,7 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/index.html.heex:120 #: lib/cannery_web/live/ammo_group_live/index.html.heex:120
#: lib/cannery_web/live/ammo_group_live/show.html.heex:66 #: lib/cannery_web/live/ammo_group_live/show.html.heex:66
#: lib/cannery_web/live/ammo_type_live/index.html.heex:68 #: lib/cannery_web/live/ammo_type_live/index.html.heex:75
msgid "Are you sure you want to delete this ammo?" msgid "Are you sure you want to delete this ammo?"
msgstr "" msgstr ""
@ -154,7 +154,7 @@ msgid "Please check your email to verify your account"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:97 #: lib/cannery_web/live/home_live.ex:103
msgid "Register to setup %{name}" msgid "Register to setup %{name}"
msgstr "" msgstr ""

View File

@ -120,12 +120,13 @@ defmodule Cannery.AmmoTest do
test "list_ammo_groups/0 returns all ammo_groups", test "list_ammo_groups/0 returns all ammo_groups",
%{ammo_group: ammo_group, current_user: current_user} do %{ammo_group: ammo_group, current_user: current_user} do
assert Ammo.list_ammo_groups(current_user) == [ammo_group] assert Ammo.list_ammo_groups(current_user) == [ammo_group] |> Repo.preload(:shot_groups)
end end
test "get_ammo_group!/1 returns the ammo_group with given id", test "get_ammo_group!/1 returns the ammo_group with given id",
%{ammo_group: ammo_group, current_user: current_user} do %{ammo_group: ammo_group, current_user: current_user} do
assert Ammo.get_ammo_group!(ammo_group.id, current_user) == ammo_group assert Ammo.get_ammo_group!(ammo_group.id, current_user) ==
ammo_group |> Repo.preload(:shot_groups)
end end
test "create_ammo_group/1 with valid data creates a ammo_group", test "create_ammo_group/1 with valid data creates a ammo_group",
@ -167,7 +168,8 @@ defmodule Cannery.AmmoTest do
assert {:error, %Changeset{}} = assert {:error, %Changeset{}} =
Ammo.update_ammo_group(ammo_group, @invalid_attrs, current_user) Ammo.update_ammo_group(ammo_group, @invalid_attrs, current_user)
assert ammo_group == Ammo.get_ammo_group!(ammo_group.id, current_user) assert ammo_group |> Repo.preload(:shot_groups) ==
Ammo.get_ammo_group!(ammo_group.id, current_user)
end end
test "delete_ammo_group/1 deletes the ammo_group", test "delete_ammo_group/1 deletes the ammo_group",

View File

@ -33,12 +33,14 @@ defmodule Cannery.ContainersTest do
test "list_containers/1 returns all containers", test "list_containers/1 returns all containers",
%{current_user: current_user, container: container} do %{current_user: current_user, container: container} do
assert Containers.list_containers(current_user) == [container] assert Containers.list_containers(current_user) ==
[container |> Repo.preload([:ammo_groups, :tags])]
end end
test "get_container!/1 returns the container with given id", test "get_container!/1 returns the container with given id",
%{current_user: current_user, container: container} do %{current_user: current_user, container: container} do
assert Containers.get_container!(container.id, current_user) == container assert Containers.get_container!(container.id, current_user) ==
container |> Repo.preload([:ammo_groups, :tags])
end end
test "create_container/1 with valid data creates a container", %{current_user: current_user} do test "create_container/1 with valid data creates a container", %{current_user: current_user} do
@ -73,7 +75,8 @@ defmodule Cannery.ContainersTest do
assert {:error, %Changeset{}} = assert {:error, %Changeset{}} =
Containers.update_container(container, current_user, @invalid_attrs) Containers.update_container(container, current_user, @invalid_attrs)
assert container == Containers.get_container!(container.id, current_user) assert container |> Repo.preload([:ammo_groups, :tags]) ==
Containers.get_container!(container.id, current_user)
end end
test "delete_container/1 deletes the container", test "delete_container/1 deletes the container",

View File

@ -50,7 +50,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index)) |> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo group created successfully") assert html =~ dgettext("prompts", "Ammo group created successfully")
assert html =~ "some notes" assert html =~ "42"
end end
test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do
@ -95,7 +95,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index)) |> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo group updated successfully") assert html =~ dgettext("prompts", "Ammo group updated successfully")
assert html =~ "some updated notes" assert html =~ "43"
end end
test "deletes ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do test "deletes ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do

View File

@ -70,7 +70,7 @@ defmodule CanneryWeb.ContainerLiveTest do
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index)) {:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~ assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~
gettext("Edit Container") gettext("Edit %{name}", name: container.name)
assert_patch(index_live, Routes.container_index_path(conn, :edit, container)) assert_patch(index_live, Routes.container_index_path(conn, :edit, container))
@ -103,7 +103,7 @@ defmodule CanneryWeb.ContainerLiveTest do
test "displays container", %{conn: conn, container: container} do test "displays container", %{conn: conn, container: container} do
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container)) {:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ gettext("Show Container") assert html =~ gettext("Show %{name}", name: container.name)
assert html =~ container.location assert html =~ container.location
end end
@ -115,7 +115,7 @@ defmodule CanneryWeb.ContainerLiveTest do
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container)) {:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
assert show_live |> element("[data-qa=\"edit\"]") |> render_click() =~ assert show_live |> element("[data-qa=\"edit\"]") |> render_click() =~
gettext("Edit Container") gettext("Edit %{name}", name: container.name)
assert_patch(show_live, Routes.container_show_path(conn, :edit, container)) assert_patch(show_live, Routes.container_show_path(conn, :edit, container))