Compare commits
No commits in common. "16155687c9166e8abe1cdb85cb10496f3e22a860" and "20a23112298c6f50a061757c29755e738a9738d2" have entirely different histories.
16155687c9
...
20a2311229
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,13 +1,3 @@
|
||||
# v0.8.0
|
||||
- Add search to catalog, ammo, container, tag and range index pages
|
||||
- Tweak urls for catalog, ammo, containers, tags and shot records
|
||||
- Fix bug with shot group chart not drawing lines between days correctly
|
||||
- Improve cards across app (make them line up with each other)
|
||||
- Update translations (thank you Brea!)
|
||||
|
||||
# v0.7.2
|
||||
- Code improvements
|
||||
|
||||
# v0.7.1
|
||||
- Fix table component alignment and styling
|
||||
- Fix toggle button styling
|
||||
|
@ -17,8 +17,8 @@ If you're multilingual, this project can use your translations! Visit
|
||||
functions as short as possible while keeping variable names descriptive! For
|
||||
instance, use inline `do:` blocks for short functions and make your aliases as
|
||||
short as possible without introducing ambiguity.
|
||||
- I.e. since there's only one `AmmoGroup` in the app, please alias
|
||||
`AmmoGroup.t()` instead of using `Cannery.Ammo.AmmoGroup.t()`
|
||||
- I.e. since there's only one `Changeset` in the app, please alias
|
||||
`Changeset.t(Type.t())` instead of using `Ecto.Changeset.t(Long.Type.t())`
|
||||
- Use pipelines when possible. If only calling a single method, a pipeline isn't
|
||||
strictly necessary but still encouraged for future modification.
|
||||
- Please add typespecs to your functions! Even your private functions may be
|
||||
|
@ -80,27 +80,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
updateChart (el) {
|
||||
const data = JSON.parse(el.dataset.chartData)
|
||||
|
||||
this.el.chart.data = {
|
||||
datasets: [{
|
||||
label: el.dataset.label,
|
||||
data: data.map(({ date, count, label }) => ({
|
||||
label,
|
||||
x: date,
|
||||
y: count
|
||||
})),
|
||||
backgroundColor: `${el.dataset.color}77`,
|
||||
borderColor: el.dataset.color,
|
||||
fill: true,
|
||||
borderWidth: 3,
|
||||
pointBorderWidth: 1
|
||||
}]
|
||||
}
|
||||
|
||||
this.el.chart.update()
|
||||
},
|
||||
mounted () { this.initalizeChart(this.el) },
|
||||
updated () { this.updateChart(this.el) }
|
||||
updated () { this.initalizeChart(this.el) }
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ defmodule Cannery.Accounts do
|
||||
nil
|
||||
|
||||
"""
|
||||
@spec get_user_by_email(email :: String.t()) :: User.t() | nil
|
||||
@spec get_user_by_email(String.t()) :: User.t() | nil
|
||||
def get_user_by_email(email) when is_binary(email), do: Repo.get_by(User, email: email)
|
||||
|
||||
@doc """
|
||||
@ -38,7 +38,7 @@ defmodule Cannery.Accounts do
|
||||
nil
|
||||
|
||||
"""
|
||||
@spec get_user_by_email_and_password(email :: String.t(), password :: String.t()) ::
|
||||
@spec get_user_by_email_and_password(String.t(), String.t()) ::
|
||||
User.t() | nil
|
||||
def get_user_by_email_and_password(email, password)
|
||||
when is_binary(email) and is_binary(password) do
|
||||
@ -86,7 +86,7 @@ defmodule Cannery.Accounts do
|
||||
[%User{}]
|
||||
|
||||
"""
|
||||
@spec list_users_by_role(User.role()) :: [User.t()]
|
||||
@spec list_users_by_role(:admin | :user) :: [User.t()]
|
||||
def list_users_by_role(role) do
|
||||
role = role |> to_string()
|
||||
Repo.all(from u in User, where: u.role == ^role, order_by: u.email)
|
||||
@ -106,21 +106,15 @@ defmodule Cannery.Accounts do
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec register_user(attrs :: map()) :: {:ok, User.t()} | {:error, User.changeset()}
|
||||
@spec register_user(map()) :: {:ok, User.t()} | {:error, Changeset.t(User.new_user())}
|
||||
def register_user(attrs) do
|
||||
Multi.new()
|
||||
|> Multi.one(:users_count, from(u in User, select: count(u.id), distinct: true))
|
||||
|> Multi.insert(:add_user, fn %{users_count: count} ->
|
||||
# if no registered users, make first user an admin
|
||||
role = if count == 0, do: "admin", else: "user"
|
||||
# if no registered users, make first user an admin
|
||||
role =
|
||||
if Repo.one!(from u in User, select: count(u.id), distinct: true) == 0,
|
||||
do: "admin",
|
||||
else: "user"
|
||||
|
||||
User.registration_changeset(attrs) |> User.role_changeset(role)
|
||||
end)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
{:ok, %{add_user: user}} -> {:ok, user}
|
||||
{:error, :add_user, changeset, _changes_so_far} -> {:error, changeset}
|
||||
end
|
||||
%User{} |> User.registration_changeset(attrs |> Map.put("role", role)) |> Repo.insert()
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -132,10 +126,12 @@ defmodule Cannery.Accounts do
|
||||
%Changeset{data: %User{}}
|
||||
|
||||
"""
|
||||
@spec change_user_registration() :: User.changeset()
|
||||
@spec change_user_registration(attrs :: map()) :: User.changeset()
|
||||
def change_user_registration(attrs \\ %{}),
|
||||
do: User.registration_changeset(attrs, hash_password: false)
|
||||
@spec change_user_registration(User.t() | User.new_user()) ::
|
||||
Changeset.t(User.t() | User.new_user())
|
||||
@spec change_user_registration(User.t() | User.new_user(), map()) ::
|
||||
Changeset.t(User.t() | User.new_user())
|
||||
def change_user_registration(user, attrs \\ %{}),
|
||||
do: User.registration_changeset(user, attrs, hash_password: false)
|
||||
|
||||
## Settings
|
||||
|
||||
@ -148,8 +144,7 @@ defmodule Cannery.Accounts do
|
||||
%Changeset{data: %User{}}
|
||||
|
||||
"""
|
||||
@spec change_user_email(User.t()) :: User.changeset()
|
||||
@spec change_user_email(User.t(), attrs :: map()) :: User.changeset()
|
||||
@spec change_user_email(User.t(), map()) :: Changeset.t(User.t())
|
||||
def change_user_email(user, attrs \\ %{}), do: User.email_changeset(user, attrs)
|
||||
|
||||
@doc """
|
||||
@ -161,7 +156,7 @@ defmodule Cannery.Accounts do
|
||||
%Changeset{data: %User{}}
|
||||
|
||||
"""
|
||||
@spec change_user_role(User.t(), User.role()) :: User.changeset()
|
||||
@spec change_user_role(User.t(), atom()) :: Changeset.t(User.t())
|
||||
def change_user_role(user, role), do: User.role_changeset(user, role)
|
||||
|
||||
@doc """
|
||||
@ -177,8 +172,8 @@ defmodule Cannery.Accounts do
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec apply_user_email(User.t(), email :: String.t(), attrs :: map()) ::
|
||||
{:ok, User.t()} | {:error, User.changeset()}
|
||||
@spec apply_user_email(User.t(), String.t(), map()) ::
|
||||
{:ok, User.t()} | {:error, Changeset.t(User.t())}
|
||||
def apply_user_email(user, password, attrs) do
|
||||
user
|
||||
|> User.email_changeset(attrs)
|
||||
@ -192,7 +187,7 @@ defmodule Cannery.Accounts do
|
||||
If the token matches, the user email is updated and the token is deleted.
|
||||
The confirmed_at date is also updated to the current time.
|
||||
"""
|
||||
@spec update_user_email(User.t(), token :: String.t()) :: :ok | :error
|
||||
@spec update_user_email(User.t(), String.t()) :: :ok | :error
|
||||
def update_user_email(user, token) do
|
||||
context = "change:#{user.email}"
|
||||
|
||||
@ -205,7 +200,7 @@ defmodule Cannery.Accounts do
|
||||
end
|
||||
end
|
||||
|
||||
@spec user_email_multi(User.t(), email :: String.t(), context :: String.t()) :: Multi.t()
|
||||
@spec user_email_multi(User.t(), String.t(), String.t()) :: Multi.t()
|
||||
defp user_email_multi(user, email, context) do
|
||||
changeset = user |> User.email_changeset(%{email: email}) |> User.confirm_changeset()
|
||||
|
||||
@ -223,8 +218,7 @@ defmodule Cannery.Accounts do
|
||||
{:ok, %{to: ..., body: ...}}
|
||||
|
||||
"""
|
||||
@spec deliver_update_email_instructions(User.t(), current_email :: String.t(), function) ::
|
||||
Job.t()
|
||||
@spec deliver_update_email_instructions(User.t(), String.t(), function) :: Job.t()
|
||||
def deliver_update_email_instructions(user, current_email, update_email_url_fun)
|
||||
when is_function(update_email_url_fun, 1) do
|
||||
{encoded_token, user_token} = UserToken.build_email_token(user, "change:#{current_email}")
|
||||
@ -241,7 +235,7 @@ defmodule Cannery.Accounts do
|
||||
%Changeset{data: %User{}}
|
||||
|
||||
"""
|
||||
@spec change_user_password(User.t(), attrs :: map()) :: User.changeset()
|
||||
@spec change_user_password(User.t(), map()) :: Changeset.t(User.t())
|
||||
def change_user_password(user, attrs \\ %{}),
|
||||
do: User.password_changeset(user, attrs, hash_password: false)
|
||||
|
||||
@ -257,8 +251,8 @@ defmodule Cannery.Accounts do
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec update_user_password(User.t(), String.t(), attrs :: map()) ::
|
||||
{:ok, User.t()} | {:error, User.changeset()}
|
||||
@spec update_user_password(User.t(), String.t(), map()) ::
|
||||
{:ok, User.t()} | {:error, Changeset.t(User.t())}
|
||||
def update_user_password(user, password, attrs) do
|
||||
changeset =
|
||||
user
|
||||
@ -284,7 +278,7 @@ defmodule Cannery.Accounts do
|
||||
%Changeset{data: %User{}}
|
||||
|
||||
"""
|
||||
@spec change_user_locale(User.t()) :: User.changeset()
|
||||
@spec change_user_locale(User.t()) :: Changeset.t(User.t())
|
||||
def change_user_locale(%{locale: locale} = user), do: User.locale_changeset(user, locale)
|
||||
|
||||
@doc """
|
||||
@ -300,7 +294,7 @@ defmodule Cannery.Accounts do
|
||||
|
||||
"""
|
||||
@spec update_user_locale(User.t(), locale :: String.t()) ::
|
||||
{:ok, User.t()} | {:error, User.changeset()}
|
||||
{:ok, User.t()} | {:error, Changeset.t(User.t())}
|
||||
def update_user_locale(user, locale),
|
||||
do: user |> User.locale_changeset(locale) |> Repo.update()
|
||||
|
||||
@ -316,7 +310,7 @@ defmodule Cannery.Accounts do
|
||||
%User{}
|
||||
|
||||
"""
|
||||
@spec delete_user!(user_to_delete :: User.t(), User.t()) :: User.t()
|
||||
@spec delete_user!(User.t(), User.t()) :: User.t()
|
||||
def delete_user!(user, %User{role: :admin}), do: user |> Repo.delete!()
|
||||
def delete_user!(%User{id: user_id} = user, %User{id: user_id}), do: user |> Repo.delete!()
|
||||
|
||||
@ -335,7 +329,7 @@ defmodule Cannery.Accounts do
|
||||
@doc """
|
||||
Gets the user with the given signed token.
|
||||
"""
|
||||
@spec get_user_by_session_token(token :: String.t()) :: User.t()
|
||||
@spec get_user_by_session_token(String.t()) :: User.t()
|
||||
def get_user_by_session_token(token) do
|
||||
{:ok, query} = UserToken.verify_session_token_query(token)
|
||||
Repo.one(query)
|
||||
@ -344,7 +338,7 @@ defmodule Cannery.Accounts do
|
||||
@doc """
|
||||
Deletes the signed token with the given context.
|
||||
"""
|
||||
@spec delete_session_token(token :: String.t()) :: :ok
|
||||
@spec delete_session_token(String.t()) :: :ok
|
||||
def delete_session_token(token) do
|
||||
Repo.delete_all(UserToken.token_and_context_query(token, "session"))
|
||||
:ok
|
||||
@ -400,7 +394,7 @@ defmodule Cannery.Accounts do
|
||||
If the token matches, the user account is marked as confirmed
|
||||
and the token is deleted.
|
||||
"""
|
||||
@spec confirm_user(token :: String.t()) :: {:ok, User.t()} | :error
|
||||
@spec confirm_user(String.t()) :: {:ok, User.t()} | atom()
|
||||
def confirm_user(token) do
|
||||
with {:ok, query} <- UserToken.verify_email_token_query(token, "confirm"),
|
||||
%User{} = user <- Repo.one(query),
|
||||
@ -449,7 +443,7 @@ defmodule Cannery.Accounts do
|
||||
nil
|
||||
|
||||
"""
|
||||
@spec get_user_by_reset_password_token(token :: String.t()) :: User.t() | nil
|
||||
@spec get_user_by_reset_password_token(String.t()) :: User.t() | nil
|
||||
def get_user_by_reset_password_token(token) do
|
||||
with {:ok, query} <- UserToken.verify_email_token_query(token, "reset_password"),
|
||||
%User{} = user <- Repo.one(query) do
|
||||
@ -471,8 +465,7 @@ defmodule Cannery.Accounts do
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec reset_user_password(User.t(), attrs :: map()) ::
|
||||
{:ok, User.t()} | {:error, User.changeset()}
|
||||
@spec reset_user_password(User.t(), map()) :: {:ok, User.t()} | {:error, Changeset.t(User.t())}
|
||||
def reset_user_password(user, attrs) do
|
||||
Multi.new()
|
||||
|> Multi.update(:user, User.password_changeset(user, attrs))
|
||||
|
@ -39,7 +39,7 @@ defmodule Cannery.Accounts.User do
|
||||
password: String.t(),
|
||||
hashed_password: String.t(),
|
||||
confirmed_at: NaiveDateTime.t(),
|
||||
role: role(),
|
||||
role: atom(),
|
||||
locale: String.t() | nil,
|
||||
invites: [Invite.t()],
|
||||
inserted_at: NaiveDateTime.t(),
|
||||
@ -47,8 +47,6 @@ defmodule Cannery.Accounts.User do
|
||||
}
|
||||
@type new_user :: %User{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_user())
|
||||
@type role :: :admin | :user | String.t()
|
||||
|
||||
@doc """
|
||||
A user changeset for registration.
|
||||
@ -67,24 +65,26 @@ defmodule Cannery.Accounts.User do
|
||||
validations on a LiveView form), this option can be set to `false`.
|
||||
Defaults to `true`.
|
||||
"""
|
||||
@spec registration_changeset(attrs :: map()) :: changeset()
|
||||
@spec registration_changeset(attrs :: map(), opts :: keyword()) :: changeset()
|
||||
def registration_changeset(attrs, opts \\ []) do
|
||||
%User{}
|
||||
|> cast(attrs, [:email, :password, :locale])
|
||||
@spec registration_changeset(t() | new_user(), attrs :: map()) :: Changeset.t(t() | new_user())
|
||||
@spec registration_changeset(t() | new_user(), attrs :: map(), opts :: keyword()) ::
|
||||
Changeset.t(t() | new_user())
|
||||
def registration_changeset(user, attrs, opts \\ []) do
|
||||
user
|
||||
|> cast(attrs, [:email, :password, :role, :locale])
|
||||
|> validate_email()
|
||||
|> validate_password(opts)
|
||||
end
|
||||
|
||||
@doc """
|
||||
A user changeset for role.
|
||||
|
||||
"""
|
||||
@spec role_changeset(t() | new_user() | changeset(), role()) :: changeset()
|
||||
@spec role_changeset(t(), role :: atom()) :: Changeset.t(t())
|
||||
def role_changeset(user, role) do
|
||||
user |> cast(%{"role" => role}, [:role])
|
||||
end
|
||||
|
||||
@spec validate_email(changeset()) :: changeset()
|
||||
@spec validate_email(Changeset.t(t() | new_user())) :: Changeset.t(t() | new_user())
|
||||
defp validate_email(changeset) do
|
||||
changeset
|
||||
|> validate_required([:email])
|
||||
@ -96,8 +96,8 @@ defmodule Cannery.Accounts.User do
|
||||
|> unique_constraint(:email)
|
||||
end
|
||||
|
||||
@spec validate_password(changeset(), opts :: keyword()) ::
|
||||
changeset()
|
||||
@spec validate_password(Changeset.t(t() | new_user()), opts :: keyword()) ::
|
||||
Changeset.t(t() | new_user())
|
||||
defp validate_password(changeset, opts) do
|
||||
changeset
|
||||
|> validate_required([:password])
|
||||
@ -108,7 +108,8 @@ defmodule Cannery.Accounts.User do
|
||||
|> maybe_hash_password(opts)
|
||||
end
|
||||
|
||||
@spec maybe_hash_password(changeset(), opts :: keyword()) :: changeset()
|
||||
@spec maybe_hash_password(Changeset.t(t() | new_user()), opts :: keyword()) ::
|
||||
Changeset.t(t() | new_user())
|
||||
defp maybe_hash_password(changeset, opts) do
|
||||
hash_password? = Keyword.get(opts, :hash_password, true)
|
||||
password = get_change(changeset, :password)
|
||||
@ -127,7 +128,7 @@ defmodule Cannery.Accounts.User do
|
||||
|
||||
It requires the email to change otherwise an error is added.
|
||||
"""
|
||||
@spec email_changeset(t(), attrs :: map()) :: changeset()
|
||||
@spec email_changeset(t(), attrs :: map()) :: Changeset.t(t())
|
||||
def email_changeset(user, attrs) do
|
||||
user
|
||||
|> cast(attrs, [:email])
|
||||
@ -150,8 +151,8 @@ defmodule Cannery.Accounts.User do
|
||||
validations on a LiveView form), this option can be set to `false`.
|
||||
Defaults to `true`.
|
||||
"""
|
||||
@spec password_changeset(t(), attrs :: map()) :: changeset()
|
||||
@spec password_changeset(t(), attrs :: map(), opts :: keyword()) :: changeset()
|
||||
@spec password_changeset(t(), attrs :: map()) :: Changeset.t(t())
|
||||
@spec password_changeset(t(), attrs :: map(), opts :: keyword()) :: Changeset.t(t())
|
||||
def password_changeset(user, attrs, opts \\ []) do
|
||||
user
|
||||
|> cast(attrs, [:password])
|
||||
@ -162,7 +163,7 @@ defmodule Cannery.Accounts.User do
|
||||
@doc """
|
||||
Confirms the account by setting `confirmed_at`.
|
||||
"""
|
||||
@spec confirm_changeset(t() | changeset()) :: changeset()
|
||||
@spec confirm_changeset(t() | Changeset.t(t())) :: Changeset.t(t())
|
||||
def confirm_changeset(user_or_changeset) do
|
||||
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
|
||||
user_or_changeset |> change(confirmed_at: now)
|
||||
@ -188,7 +189,7 @@ defmodule Cannery.Accounts.User do
|
||||
@doc """
|
||||
Validates the current password otherwise adds an error to the changeset.
|
||||
"""
|
||||
@spec validate_current_password(changeset(), String.t()) :: changeset()
|
||||
@spec validate_current_password(Changeset.t(t()), String.t()) :: Changeset.t(t())
|
||||
def validate_current_password(changeset, password) do
|
||||
if valid_password?(changeset.data, password),
|
||||
do: changeset,
|
||||
@ -198,7 +199,7 @@ defmodule Cannery.Accounts.User do
|
||||
@doc """
|
||||
A changeset for changing the user's locale
|
||||
"""
|
||||
@spec locale_changeset(t() | changeset(), locale :: String.t() | nil) :: changeset()
|
||||
@spec locale_changeset(t() | Changeset.t(t()), locale :: String.t() | nil) :: Changeset.t(t())
|
||||
def locale_changeset(user_or_changeset, locale) do
|
||||
user_or_changeset
|
||||
|> cast(%{"locale" => locale}, [:locale])
|
||||
|
@ -5,7 +5,7 @@ defmodule Cannery.ActivityLog do
|
||||
|
||||
import Ecto.Query, warn: false
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo.AmmoGroup, Repo}
|
||||
alias Ecto.Multi
|
||||
alias Ecto.{Changeset, Multi}
|
||||
|
||||
@doc """
|
||||
Returns the list of shot_groups.
|
||||
@ -15,50 +15,10 @@ defmodule Cannery.ActivityLog do
|
||||
iex> list_shot_groups(%User{id: 123})
|
||||
[%ShotGroup{}, ...]
|
||||
|
||||
iex> list_shot_groups("cool", %User{id: 123})
|
||||
[%ShotGroup{notes: "My cool shot group"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_shot_groups(User.t()) :: [ShotGroup.t()]
|
||||
@spec list_shot_groups(search :: nil | String.t(), User.t()) :: [ShotGroup.t()]
|
||||
def list_shot_groups(search \\ nil, user)
|
||||
|
||||
def list_shot_groups(search, %{id: user_id}) when search |> is_nil() or search == "",
|
||||
do: Repo.all(from sg in ShotGroup, where: sg.user_id == ^user_id)
|
||||
|
||||
def list_shot_groups(search, %{id: user_id}) when search |> is_binary() do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
Repo.all(
|
||||
from sg in ShotGroup,
|
||||
left_join: ag in assoc(sg, :ammo_group),
|
||||
left_join: at in assoc(ag, :ammo_type),
|
||||
where: sg.user_id == ^user_id,
|
||||
where:
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
sg.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
ag.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
at.search,
|
||||
^trimmed_search
|
||||
),
|
||||
order_by: {
|
||||
:desc,
|
||||
fragment(
|
||||
"ts_rank_cd(?, websearch_to_tsquery('english', ?), 4)",
|
||||
sg.search,
|
||||
^trimmed_search
|
||||
)
|
||||
}
|
||||
)
|
||||
def list_shot_groups(%User{id: user_id}) do
|
||||
Repo.all(from(sg in ShotGroup, where: sg.user_id == ^user_id))
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -98,7 +58,7 @@ defmodule Cannery.ActivityLog do
|
||||
|
||||
"""
|
||||
@spec create_shot_group(attrs :: map(), User.t(), AmmoGroup.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
|
||||
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t()) | nil}
|
||||
def create_shot_group(attrs, user, ammo_group) do
|
||||
Multi.new()
|
||||
|> Multi.insert(
|
||||
@ -139,7 +99,7 @@ defmodule Cannery.ActivityLog do
|
||||
|
||||
"""
|
||||
@spec update_shot_group(ShotGroup.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset() | nil}
|
||||
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t()) | nil}
|
||||
def update_shot_group(
|
||||
%ShotGroup{count: count, user_id: user_id} = shot_group,
|
||||
attrs,
|
||||
@ -189,7 +149,7 @@ defmodule Cannery.ActivityLog do
|
||||
|
||||
"""
|
||||
@spec delete_shot_group(ShotGroup.t(), User.t()) ::
|
||||
{:ok, ShotGroup.t()} | {:error, ShotGroup.changeset()}
|
||||
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t())}
|
||||
def delete_shot_group(
|
||||
%ShotGroup{user_id: user_id} = shot_group,
|
||||
%User{id: user_id}
|
||||
|
@ -44,7 +44,6 @@ defmodule Cannery.ActivityLog.ShotGroup do
|
||||
}
|
||||
@type new_shot_group :: %ShotGroup{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_shot_group())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(
|
||||
@ -52,7 +51,8 @@ defmodule Cannery.ActivityLog.ShotGroup do
|
||||
User.t() | any(),
|
||||
AmmoGroup.t() | any(),
|
||||
attrs :: map()
|
||||
) :: changeset()
|
||||
) ::
|
||||
Changeset.t(new_shot_group())
|
||||
def create_changeset(
|
||||
shot_group,
|
||||
%User{id: user_id},
|
||||
@ -87,7 +87,8 @@ defmodule Cannery.ActivityLog.ShotGroup do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) :: changeset()
|
||||
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) ::
|
||||
Changeset.t(t() | new_shot_group())
|
||||
def update_changeset(
|
||||
%ShotGroup{user_id: user_id} = shot_group,
|
||||
%User{id: user_id} = user,
|
||||
|
@ -20,38 +20,11 @@ defmodule Cannery.Ammo do
|
||||
iex> list_ammo_types(%User{id: 123})
|
||||
[%AmmoType{}, ...]
|
||||
|
||||
iex> list_ammo_types("cool", %User{id: 123})
|
||||
[%AmmoType{name: "My cool ammo type"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_ammo_types(User.t()) :: [AmmoType.t()]
|
||||
@spec list_ammo_types(search :: nil | String.t(), User.t()) :: [AmmoType.t()]
|
||||
def list_ammo_types(search \\ nil, user)
|
||||
|
||||
def list_ammo_types(search, %{id: user_id}) when search |> is_nil() or search == "",
|
||||
def list_ammo_types(%User{id: user_id}),
|
||||
do: Repo.all(from at in AmmoType, where: at.user_id == ^user_id, order_by: at.name)
|
||||
|
||||
def list_ammo_types(search, %{id: user_id}) when search |> is_binary() do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
Repo.all(
|
||||
from at in AmmoType,
|
||||
where: at.user_id == ^user_id,
|
||||
where:
|
||||
fragment(
|
||||
"search @@ websearch_to_tsquery('english', ?)",
|
||||
^trimmed_search
|
||||
),
|
||||
order_by: {
|
||||
:desc,
|
||||
fragment(
|
||||
"ts_rank_cd(search, websearch_to_tsquery('english', ?), 4)",
|
||||
^trimmed_search
|
||||
)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns a count of ammo_types.
|
||||
|
||||
@ -209,7 +182,7 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec create_ammo_type(attrs :: map(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
{:ok, AmmoType.t()} | {:error, Changeset.t(AmmoType.new_ammo_type())}
|
||||
def create_ammo_type(attrs \\ %{}, %User{} = user),
|
||||
do: %AmmoType{} |> AmmoType.create_changeset(user, attrs) |> Repo.insert()
|
||||
|
||||
@ -226,7 +199,7 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec update_ammo_type(AmmoType.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
{:ok, AmmoType.t()} | {:error, Changeset.t(AmmoType.t())}
|
||||
def update_ammo_type(%AmmoType{user_id: user_id} = ammo_type, attrs, %User{id: user_id}),
|
||||
do: ammo_type |> AmmoType.update_changeset(attrs) |> Repo.update()
|
||||
|
||||
@ -243,7 +216,7 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec delete_ammo_type(AmmoType.t(), User.t()) ::
|
||||
{:ok, AmmoType.t()} | {:error, AmmoType.changeset()}
|
||||
{:ok, AmmoType.t()} | {:error, Changeset.t(AmmoType.t())}
|
||||
def delete_ammo_type(%AmmoType{user_id: user_id} = ammo_type, %User{id: user_id}),
|
||||
do: ammo_type |> Repo.delete()
|
||||
|
||||
@ -421,86 +394,36 @@ defmodule Cannery.Ammo do
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the list of ammo_groups.
|
||||
Returns the list of ammo_groups for a user.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_ammo_groups(%User{id: 123})
|
||||
[%AmmoGroup{}, ...]
|
||||
|
||||
iex> list_ammo_groups("cool", true, %User{id: 123})
|
||||
[%AmmoGroup{notes: "My cool ammo group"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_ammo_groups(User.t()) :: [AmmoGroup.t()]
|
||||
@spec list_ammo_groups(search :: nil | String.t(), User.t()) :: [AmmoGroup.t()]
|
||||
@spec list_ammo_groups(search :: nil | String.t(), include_empty :: boolean(), User.t()) ::
|
||||
[AmmoGroup.t()]
|
||||
def list_ammo_groups(search \\ nil, include_empty \\ false, %{id: user_id}) do
|
||||
from(
|
||||
ag in AmmoGroup,
|
||||
as: :ag,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
as: :sg,
|
||||
join: at in assoc(ag, :ammo_type),
|
||||
as: :at,
|
||||
join: c in assoc(ag, :container),
|
||||
as: :c,
|
||||
left_join: t in assoc(c, :tags),
|
||||
as: :t,
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: [shot_groups: sg, ammo_type: at, container: {c, tags: t}],
|
||||
order_by: ag.id
|
||||
@spec list_ammo_groups(User.t(), include_empty :: boolean()) :: [AmmoGroup.t()]
|
||||
def list_ammo_groups(user, include_empty \\ false)
|
||||
|
||||
def list_ammo_groups(%User{id: user_id}, true = _include_empty) do
|
||||
Repo.all(
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.user_id == ^user_id,
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
)
|
||||
|> list_ammo_groups_include_empty(include_empty)
|
||||
|> list_ammo_groups_search(search)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
defp list_ammo_groups_include_empty(query, true), do: query
|
||||
|
||||
defp list_ammo_groups_include_empty(query, false) do
|
||||
query |> where([ag], not (ag.count == 0))
|
||||
end
|
||||
|
||||
defp list_ammo_groups_search(query, nil), do: query
|
||||
defp list_ammo_groups_search(query, ""), do: query
|
||||
|
||||
defp list_ammo_groups_search(query, search) do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
query
|
||||
|> where(
|
||||
[ag: ag, at: at, c: c, t: t],
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
ag.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
at.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
c.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
t.search,
|
||||
^trimmed_search
|
||||
)
|
||||
)
|
||||
|> order_by(
|
||||
[ag: ag],
|
||||
desc:
|
||||
fragment(
|
||||
"ts_rank_cd(?, websearch_to_tsquery('english', ?), 4)",
|
||||
ag.search,
|
||||
^trimmed_search
|
||||
)
|
||||
def list_ammo_groups(%User{id: user_id}, false = _include_empty) do
|
||||
Repo.all(
|
||||
from ag in AmmoGroup,
|
||||
left_join: sg in assoc(ag, :shot_groups),
|
||||
where: ag.user_id == ^user_id,
|
||||
where: not (ag.count == 0),
|
||||
preload: [shot_groups: sg],
|
||||
order_by: ag.id
|
||||
)
|
||||
end
|
||||
|
||||
@ -626,7 +549,7 @@ defmodule Cannery.Ammo do
|
||||
"""
|
||||
@spec create_ammo_groups(attrs :: map(), multiplier :: non_neg_integer(), User.t()) ::
|
||||
{:ok, {count :: non_neg_integer(), [AmmoGroup.t()] | nil}}
|
||||
| {:error, AmmoGroup.changeset()}
|
||||
| {:error, Changeset.t(AmmoGroup.new_ammo_group())}
|
||||
def create_ammo_groups(
|
||||
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
|
||||
multiplier,
|
||||
@ -705,7 +628,7 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec update_ammo_group(AmmoGroup.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, AmmoGroup.t()} | {:error, AmmoGroup.changeset()}
|
||||
{:ok, AmmoGroup.t()} | {:error, Changeset.t(AmmoGroup.t())}
|
||||
def update_ammo_group(
|
||||
%AmmoGroup{user_id: user_id} = ammo_group,
|
||||
attrs,
|
||||
@ -726,7 +649,7 @@ defmodule Cannery.Ammo do
|
||||
|
||||
"""
|
||||
@spec delete_ammo_group(AmmoGroup.t(), User.t()) ::
|
||||
{:ok, AmmoGroup.t()} | {:error, AmmoGroup.changeset()}
|
||||
{:ok, AmmoGroup.t()} | {:error, Changeset.t(AmmoGroup.t())}
|
||||
def delete_ammo_group(%AmmoGroup{user_id: user_id} = ammo_group, %User{id: user_id}),
|
||||
do: ammo_group |> Repo.delete()
|
||||
|
||||
|
@ -59,7 +59,6 @@ defmodule Cannery.Ammo.AmmoGroup do
|
||||
}
|
||||
@type new_ammo_group :: %AmmoGroup{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_ammo_group())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(
|
||||
@ -68,7 +67,7 @@ defmodule Cannery.Ammo.AmmoGroup do
|
||||
Container.t() | nil,
|
||||
User.t(),
|
||||
attrs :: map()
|
||||
) :: changeset()
|
||||
) :: Changeset.t(new_ammo_group())
|
||||
def create_changeset(
|
||||
ammo_group,
|
||||
%AmmoType{id: ammo_type_id},
|
||||
@ -98,7 +97,8 @@ defmodule Cannery.Ammo.AmmoGroup do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_ammo_group(), attrs :: map(), User.t()) :: changeset()
|
||||
@spec update_changeset(t() | new_ammo_group(), attrs :: map(), User.t()) ::
|
||||
Changeset.t(t() | new_ammo_group())
|
||||
def update_changeset(ammo_group, attrs, user) do
|
||||
ammo_group
|
||||
|> cast(attrs, [:count, :price_paid, :notes, :staged, :purchased_on, :container_id])
|
||||
@ -121,7 +121,8 @@ defmodule Cannery.Ammo.AmmoGroup do
|
||||
This range changeset is used when "using up" ammo groups, and allows for
|
||||
updating the count to 0
|
||||
"""
|
||||
@spec range_changeset(t() | new_ammo_group(), attrs :: map()) :: changeset()
|
||||
@spec range_changeset(t() | new_ammo_group(), attrs :: map()) ::
|
||||
Changeset.t(t() | new_ammo_group())
|
||||
def range_changeset(ammo_group, attrs) do
|
||||
ammo_group
|
||||
|> cast(attrs, [:count, :staged])
|
||||
|
@ -102,7 +102,6 @@ defmodule Cannery.Ammo.AmmoType do
|
||||
}
|
||||
@type new_ammo_type :: %AmmoType{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_ammo_type())
|
||||
|
||||
@spec changeset_fields() :: [atom()]
|
||||
defp changeset_fields,
|
||||
@ -131,7 +130,8 @@ defmodule Cannery.Ammo.AmmoType do
|
||||
]
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(new_ammo_type(), User.t(), attrs :: map()) :: changeset()
|
||||
@spec create_changeset(new_ammo_type(), User.t(), attrs :: map()) ::
|
||||
Changeset.t(new_ammo_type())
|
||||
def create_changeset(ammo_type, %User{id: user_id}, attrs) do
|
||||
ammo_type
|
||||
|> change(user_id: user_id)
|
||||
@ -140,7 +140,8 @@ defmodule Cannery.Ammo.AmmoType do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_ammo_type(), attrs :: map()) :: changeset()
|
||||
@spec update_changeset(t() | new_ammo_type(), attrs :: map()) ::
|
||||
Changeset.t(t() | new_ammo_type())
|
||||
def update_changeset(ammo_type, attrs) do
|
||||
ammo_type
|
||||
|> cast(attrs, changeset_fields())
|
||||
|
@ -17,55 +17,16 @@ defmodule Cannery.Containers do
|
||||
iex> list_containers(%User{id: 123})
|
||||
[%Container{}, ...]
|
||||
|
||||
iex> list_containers("cool", %User{id: 123})
|
||||
[%Container{name: "my cool container"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_containers(User.t()) :: [Container.t()]
|
||||
@spec list_containers(search :: nil | String.t(), User.t()) :: [Container.t()]
|
||||
def list_containers(search \\ nil, %User{id: user_id}) do
|
||||
from(c in Container,
|
||||
as: :c,
|
||||
left_join: t in assoc(c, :tags),
|
||||
as: :t,
|
||||
left_join: ag in assoc(c, :ammo_groups),
|
||||
as: :ag,
|
||||
where: c.user_id == ^user_id,
|
||||
order_by: c.name,
|
||||
preload: [tags: t, ammo_groups: ag]
|
||||
)
|
||||
|> list_containers_search(search)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
defp list_containers_search(query, nil), do: query
|
||||
defp list_containers_search(query, ""), do: query
|
||||
|
||||
defp list_containers_search(query, search) do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
query
|
||||
|> where(
|
||||
[c: c, t: t],
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
c.search,
|
||||
^trimmed_search
|
||||
) or
|
||||
fragment(
|
||||
"? @@ websearch_to_tsquery('english', ?)",
|
||||
t.search,
|
||||
^trimmed_search
|
||||
)
|
||||
)
|
||||
|> order_by(
|
||||
[c: c],
|
||||
desc:
|
||||
fragment(
|
||||
"ts_rank_cd(?, websearch_to_tsquery('english', ?), 4)",
|
||||
c.search,
|
||||
^trimmed_search
|
||||
)
|
||||
def list_containers(%User{id: user_id}) do
|
||||
Repo.all(
|
||||
from c in Container,
|
||||
left_join: t in assoc(c, :tags),
|
||||
left_join: ag in assoc(c, :ammo_groups),
|
||||
where: c.user_id == ^user_id,
|
||||
order_by: c.name,
|
||||
preload: [tags: t, ammo_groups: ag]
|
||||
)
|
||||
end
|
||||
|
||||
@ -128,7 +89,7 @@ defmodule Cannery.Containers do
|
||||
|
||||
"""
|
||||
@spec create_container(attrs :: map(), User.t()) ::
|
||||
{:ok, Container.t()} | {:error, Container.changeset()}
|
||||
{:ok, Container.t()} | {:error, Changeset.t(Container.new_container())}
|
||||
def create_container(attrs, %User{} = user) do
|
||||
%Container{} |> Container.create_changeset(user, attrs) |> Repo.insert()
|
||||
end
|
||||
@ -146,7 +107,7 @@ defmodule Cannery.Containers do
|
||||
|
||||
"""
|
||||
@spec update_container(Container.t(), User.t(), attrs :: map()) ::
|
||||
{:ok, Container.t()} | {:error, Container.changeset()}
|
||||
{:ok, Container.t()} | {:error, Changeset.t(Container.t())}
|
||||
def update_container(%Container{user_id: user_id} = container, %User{id: user_id}, attrs) do
|
||||
container |> Container.update_changeset(attrs) |> Repo.update()
|
||||
end
|
||||
@ -164,7 +125,7 @@ defmodule Cannery.Containers do
|
||||
|
||||
"""
|
||||
@spec delete_container(Container.t(), User.t()) ::
|
||||
{:ok, Container.t()} | {:error, Container.changeset()}
|
||||
{:ok, Container.t()} | {:error, Changeset.t(Container.t())}
|
||||
def delete_container(%Container{user_id: user_id} = container, %User{id: user_id}) do
|
||||
Repo.one(
|
||||
from ag in AmmoGroup,
|
||||
|
@ -49,10 +49,10 @@ defmodule Cannery.Containers.Container do
|
||||
}
|
||||
@type new_container :: %Container{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_container())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(new_container(), User.t(), attrs :: map()) :: changeset()
|
||||
@spec create_changeset(new_container(), User.t(), attrs :: map()) ::
|
||||
Changeset.t(new_container())
|
||||
def create_changeset(container, %User{id: user_id}, attrs) do
|
||||
container
|
||||
|> change(user_id: user_id)
|
||||
@ -61,7 +61,8 @@ defmodule Cannery.Containers.Container do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_container(), attrs :: map()) :: changeset()
|
||||
@spec update_changeset(t() | new_container(), attrs :: map()) ::
|
||||
Changeset.t(t() | new_container())
|
||||
def update_changeset(container, attrs) do
|
||||
container
|
||||
|> cast(attrs, [:name, :desc, :type, :location])
|
||||
|
@ -29,10 +29,10 @@ defmodule Cannery.Containers.ContainerTag do
|
||||
}
|
||||
@type new_container_tag :: %ContainerTag{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_container_tag())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(new_container_tag(), Tag.t(), Container.t()) :: changeset()
|
||||
@spec create_changeset(new_container_tag(), Tag.t(), Container.t()) ::
|
||||
Changeset.t(new_container_tag())
|
||||
def create_changeset(
|
||||
container_tag,
|
||||
%Tag{id: tag_id, user_id: user_id},
|
||||
|
@ -5,6 +5,7 @@ defmodule Cannery.Invites do
|
||||
|
||||
import Ecto.Query, warn: false
|
||||
alias Cannery.{Accounts.User, Invites.Invite, Repo}
|
||||
alias Ecto.Changeset
|
||||
|
||||
@invite_token_length 20
|
||||
|
||||
@ -98,14 +99,14 @@ defmodule Cannery.Invites do
|
||||
|
||||
"""
|
||||
@spec create_invite(User.t(), attrs :: map()) ::
|
||||
{:ok, Invite.t()} | {:error, Invite.changeset()}
|
||||
{:ok, Invite.t()} | {:error, Changeset.t(Invite.new_invite())}
|
||||
def create_invite(%User{role: :admin} = user, attrs) do
|
||||
token =
|
||||
:crypto.strong_rand_bytes(@invite_token_length)
|
||||
|> Base.url_encode64()
|
||||
|> binary_part(0, @invite_token_length)
|
||||
|
||||
Invite.create_changeset(user, token, attrs) |> Repo.insert()
|
||||
%Invite{} |> Invite.create_changeset(user, token, attrs) |> Repo.insert()
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -121,7 +122,7 @@ defmodule Cannery.Invites do
|
||||
|
||||
"""
|
||||
@spec update_invite(Invite.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, Invite.t()} | {:error, Invite.changeset()}
|
||||
{:ok, Invite.t()} | {:error, Changeset.t(Invite.t())}
|
||||
def update_invite(invite, attrs, %User{role: :admin}),
|
||||
do: invite |> Invite.update_changeset(attrs) |> Repo.update()
|
||||
|
||||
@ -138,7 +139,7 @@ defmodule Cannery.Invites do
|
||||
|
||||
"""
|
||||
@spec delete_invite(Invite.t(), User.t()) ::
|
||||
{:ok, Invite.t()} | {:error, Invite.changeset()}
|
||||
{:ok, Invite.t()} | {:error, Changeset.t(Invite.t())}
|
||||
def delete_invite(invite, %User{role: :admin}), do: invite |> Repo.delete()
|
||||
|
||||
@doc """
|
||||
|
@ -36,12 +36,12 @@ defmodule Cannery.Invites.Invite do
|
||||
}
|
||||
@type new_invite :: %Invite{}
|
||||
@type id :: UUID.t()
|
||||
@type changeset :: Changeset.t(t() | new_invite())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(User.t(), token :: binary(), attrs :: map()) :: changeset()
|
||||
def create_changeset(%User{id: user_id}, token, attrs) do
|
||||
%Invite{}
|
||||
@spec create_changeset(new_invite(), User.t(), token :: binary(), attrs :: map()) ::
|
||||
Changeset.t(new_invite())
|
||||
def create_changeset(invite, %User{id: user_id}, token, attrs) do
|
||||
invite
|
||||
|> change(token: token, user_id: user_id)
|
||||
|> cast(attrs, [:name, :uses_left, :disabled_at])
|
||||
|> validate_required([:name, :token, :user_id])
|
||||
@ -49,7 +49,7 @@ defmodule Cannery.Invites.Invite do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_invite(), attrs :: map()) :: changeset()
|
||||
@spec update_changeset(t() | new_invite(), attrs :: map()) :: Changeset.t(t() | new_invite())
|
||||
def update_changeset(invite, attrs) do
|
||||
invite
|
||||
|> cast(attrs, [:name, :uses_left, :disabled_at])
|
||||
|
@ -6,6 +6,7 @@ defmodule Cannery.Tags do
|
||||
import Ecto.Query, warn: false
|
||||
import CanneryWeb.Gettext
|
||||
alias Cannery.{Accounts.User, Repo, Tags.Tag}
|
||||
alias Ecto.Changeset
|
||||
|
||||
@doc """
|
||||
Returns the list of tags.
|
||||
@ -15,38 +16,11 @@ defmodule Cannery.Tags do
|
||||
iex> list_tags(%User{id: 123})
|
||||
[%Tag{}, ...]
|
||||
|
||||
iex> list_tags("cool", %User{id: 123})
|
||||
[%Tag{name: "my cool tag"}, ...]
|
||||
|
||||
"""
|
||||
@spec list_tags(User.t()) :: [Tag.t()]
|
||||
@spec list_tags(search :: nil | String.t(), User.t()) :: [Tag.t()]
|
||||
def list_tags(search \\ nil, user)
|
||||
|
||||
def list_tags(search, %{id: user_id}) when search |> is_nil() or search == "",
|
||||
def list_tags(%{id: user_id}),
|
||||
do: Repo.all(from t in Tag, where: t.user_id == ^user_id, order_by: t.name)
|
||||
|
||||
def list_tags(search, %{id: user_id}) when search |> is_binary() do
|
||||
trimmed_search = String.trim(search)
|
||||
|
||||
Repo.all(
|
||||
from t in Tag,
|
||||
where: t.user_id == ^user_id,
|
||||
where:
|
||||
fragment(
|
||||
"search @@ websearch_to_tsquery('english', ?)",
|
||||
^trimmed_search
|
||||
),
|
||||
order_by: {
|
||||
:desc,
|
||||
fragment(
|
||||
"ts_rank_cd(search, websearch_to_tsquery('english', ?), 4)",
|
||||
^trimmed_search
|
||||
)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single tag.
|
||||
|
||||
@ -99,7 +73,7 @@ defmodule Cannery.Tags do
|
||||
|
||||
"""
|
||||
@spec create_tag(attrs :: map(), User.t()) ::
|
||||
{:ok, Tag.t()} | {:error, Tag.changeset()}
|
||||
{:ok, Tag.t()} | {:error, Changeset.t(Tag.new_tag())}
|
||||
def create_tag(attrs, %User{} = user),
|
||||
do: %Tag{} |> Tag.create_changeset(user, attrs) |> Repo.insert()
|
||||
|
||||
@ -116,7 +90,7 @@ defmodule Cannery.Tags do
|
||||
|
||||
"""
|
||||
@spec update_tag(Tag.t(), attrs :: map(), User.t()) ::
|
||||
{:ok, Tag.t()} | {:error, Tag.changeset()}
|
||||
{:ok, Tag.t()} | {:error, Changeset.t(Tag.t())}
|
||||
def update_tag(%Tag{user_id: user_id} = tag, attrs, %User{id: user_id}),
|
||||
do: tag |> Tag.update_changeset(attrs) |> Repo.update()
|
||||
|
||||
@ -132,7 +106,7 @@ defmodule Cannery.Tags do
|
||||
{:error, %Changeset{}}
|
||||
|
||||
"""
|
||||
@spec delete_tag(Tag.t(), User.t()) :: {:ok, Tag.t()} | {:error, Tag.changeset()}
|
||||
@spec delete_tag(Tag.t(), User.t()) :: {:ok, Tag.t()} | {:error, Changeset.t(Tag.t())}
|
||||
def delete_tag(%Tag{user_id: user_id} = tag, %User{id: user_id}), do: tag |> Repo.delete()
|
||||
|
||||
@doc """
|
||||
|
@ -40,10 +40,9 @@ defmodule Cannery.Tags.Tag do
|
||||
}
|
||||
@type new_tag() :: %Tag{}
|
||||
@type id() :: UUID.t()
|
||||
@type changeset() :: Changeset.t(t() | new_tag())
|
||||
|
||||
@doc false
|
||||
@spec create_changeset(new_tag(), User.t(), attrs :: map()) :: changeset()
|
||||
@spec create_changeset(new_tag(), User.t(), attrs :: map()) :: Changeset.t(new_tag())
|
||||
def create_changeset(tag, %User{id: user_id}, attrs) do
|
||||
tag
|
||||
|> change(user_id: user_id)
|
||||
@ -52,7 +51,7 @@ defmodule Cannery.Tags.Tag do
|
||||
end
|
||||
|
||||
@doc false
|
||||
@spec update_changeset(t() | new_tag(), attrs :: map()) :: changeset()
|
||||
@spec update_changeset(t() | new_tag(), attrs :: map()) :: Changeset.t(t() | new_tag())
|
||||
def update_changeset(tag, attrs) do
|
||||
tag
|
||||
|> cast(attrs, [:name, :bg_color, :text_color])
|
||||
|
@ -104,7 +104,6 @@ defmodule CanneryWeb do
|
||||
|
||||
# credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse
|
||||
import CanneryWeb.{ErrorHelpers, Gettext, LiveHelpers, ViewHelpers}
|
||||
alias CanneryWeb.Endpoint
|
||||
alias CanneryWeb.Router.Helpers, as: Routes
|
||||
end
|
||||
end
|
||||
|
@ -89,20 +89,19 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do
|
||||
[%{label: gettext("Ammo type"), key: :ammo_type} | columns]
|
||||
end
|
||||
|
||||
extra_data = %{
|
||||
current_user: current_user,
|
||||
ammo_type: ammo_type,
|
||||
columns: columns,
|
||||
container: container,
|
||||
actions: actions,
|
||||
range: range
|
||||
}
|
||||
|
||||
rows =
|
||||
ammo_groups
|
||||
|> Repo.preload([:ammo_type, :container])
|
||||
|> Enum.map(fn ammo_group ->
|
||||
ammo_group |> get_row_data_for_ammo_group(extra_data)
|
||||
ammo_group
|
||||
|> get_row_data_for_ammo_group(%{
|
||||
current_user: current_user,
|
||||
ammo_type: ammo_type,
|
||||
columns: columns,
|
||||
container: container,
|
||||
actions: actions,
|
||||
range: range
|
||||
})
|
||||
end)
|
||||
|
||||
socket |> assign(columns: columns, rows: rows)
|
||||
|
@ -1,209 +0,0 @@
|
||||
defmodule CanneryWeb.Components.AmmoTypeTableComponent do
|
||||
@moduledoc """
|
||||
A component that displays a list of ammo type
|
||||
"""
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, Ammo, Ammo.AmmoType}
|
||||
alias Ecto.UUID
|
||||
alias Phoenix.LiveView.{Rendered, Socket}
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{
|
||||
required(:id) => UUID.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:show_used) => boolean(),
|
||||
optional(:ammo_types) => [AmmoType.t()],
|
||||
optional(:actions) => Rendered.t(),
|
||||
optional(any()) => any()
|
||||
},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{id: _id, ammo_types: _ammo_types, current_user: _current_user} = assigns, socket) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:show_used, fn -> false end)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
|> display_ammo_types()
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
defp display_ammo_types(
|
||||
%{
|
||||
assigns: %{
|
||||
ammo_types: ammo_types,
|
||||
current_user: current_user,
|
||||
show_used: show_used,
|
||||
actions: actions
|
||||
}
|
||||
} = socket
|
||||
) do
|
||||
columns =
|
||||
[
|
||||
%{label: gettext("Name"), key: :name, type: :name},
|
||||
%{label: gettext("Bullet type"), key: :bullet_type, type: :string},
|
||||
%{label: gettext("Bullet core"), key: :bullet_core, type: :string},
|
||||
%{label: gettext("Cartridge"), key: :cartridge, type: :string},
|
||||
%{label: gettext("Caliber"), key: :caliber, type: :string},
|
||||
%{label: gettext("Case material"), key: :case_material, type: :string},
|
||||
%{label: gettext("Jacket type"), key: :jacket_type, type: :string},
|
||||
%{label: gettext("Muzzle velocity"), key: :muzzle_velocity, type: :string},
|
||||
%{label: gettext("Powder type"), key: :powder_type, type: :string},
|
||||
%{
|
||||
label: gettext("Powder grains per charge"),
|
||||
key: :powder_grains_per_charge,
|
||||
type: :string
|
||||
},
|
||||
%{label: gettext("Grains"), key: :grains, type: :string},
|
||||
%{label: gettext("Pressure"), key: :pressure, type: :string},
|
||||
%{label: gettext("Primer type"), key: :primer_type, type: :string},
|
||||
%{label: gettext("Firing type"), key: :firing_type, type: :string},
|
||||
%{label: gettext("Tracer"), key: :tracer, type: :boolean},
|
||||
%{label: gettext("Incendiary"), key: :incendiary, type: :boolean},
|
||||
%{label: gettext("Blank"), key: :blank, type: :boolean},
|
||||
%{label: gettext("Corrosive"), key: :corrosive, type: :boolean},
|
||||
%{label: gettext("Manufacturer"), key: :manufacturer, type: :string},
|
||||
%{label: gettext("UPC"), key: "upc", type: :string}
|
||||
]
|
||||
|> Enum.filter(fn %{key: key, type: type} ->
|
||||
# remove columns if all values match defaults
|
||||
default_value = if type == :boolean, do: false, else: nil
|
||||
|
||||
ammo_types
|
||||
|> Enum.any?(fn ammo_type ->
|
||||
not (ammo_type |> Map.get(key) == default_value)
|
||||
end)
|
||||
end)
|
||||
|> Kernel.++([
|
||||
%{label: gettext("Rounds"), key: :round_count, type: :round_count}
|
||||
])
|
||||
|> Kernel.++(
|
||||
if show_used do
|
||||
[
|
||||
%{
|
||||
label: gettext("Used rounds"),
|
||||
key: :used_round_count,
|
||||
type: :used_round_count
|
||||
},
|
||||
%{
|
||||
label: gettext("Total ever rounds"),
|
||||
key: :historical_round_count,
|
||||
type: :historical_round_count
|
||||
}
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
||||
)
|
||||
|> Kernel.++([%{label: gettext("Packs"), key: :ammo_count, type: :ammo_count}])
|
||||
|> Kernel.++(
|
||||
if show_used do
|
||||
[
|
||||
%{
|
||||
label: gettext("Used packs"),
|
||||
key: :used_ammo_count,
|
||||
type: :used_ammo_count
|
||||
},
|
||||
%{
|
||||
label: gettext("Total ever packs"),
|
||||
key: :historical_ammo_count,
|
||||
type: :historical_ammo_count
|
||||
}
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
||||
)
|
||||
|> Kernel.++([
|
||||
%{label: gettext("Average CPR"), key: :avg_price_paid, type: :avg_price_paid},
|
||||
%{label: nil, key: "actions", type: :actions, sortable: false}
|
||||
])
|
||||
|
||||
extra_data = %{actions: actions, current_user: current_user}
|
||||
|
||||
rows =
|
||||
ammo_types
|
||||
|> Enum.map(fn ammo_type ->
|
||||
ammo_type |> get_ammo_type_values(columns, extra_data)
|
||||
end)
|
||||
|
||||
socket |> assign(columns: columns, rows: rows)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div id={@id} class="w-full">
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id={"table-#{@id}"}
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_ammo_type_values(ammo_type, columns, extra_data) do
|
||||
columns
|
||||
|> Map.new(fn %{key: key, type: type} ->
|
||||
{key, get_ammo_type_value(type, key, ammo_type, extra_data)}
|
||||
end)
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(:boolean, key, ammo_type, _other_data),
|
||||
do: ammo_type |> Map.get(key) |> humanize()
|
||||
|
||||
defp get_ammo_type_value(:round_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_round_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:historical_round_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_historical_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:used_round_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_used_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:historical_ammo_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_ammo_groups_count_for_type(current_user, true)
|
||||
|
||||
defp get_ammo_type_value(:used_ammo_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_used_ammo_groups_count_for_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:ammo_count, _key, ammo_type, %{current_user: current_user}),
|
||||
do: ammo_type |> Ammo.get_ammo_groups_count_for_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:avg_price_paid, _key, ammo_type, %{current_user: current_user}) do
|
||||
case ammo_type |> Ammo.get_average_cost_for_ammo_type!(current_user) do
|
||||
nil -> gettext("No cost information")
|
||||
count -> gettext("$%{amount}", amount: count |> :erlang.float_to_binary(decimals: 2))
|
||||
end
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(:name, _key, ammo_type, _other_data) do
|
||||
assigns = %{ammo_type: ammo_type}
|
||||
|
||||
~H"""
|
||||
<.link
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
|
||||
class="link"
|
||||
data-qa={"view-name-#{@ammo_type.id}"}
|
||||
>
|
||||
<%= @ammo_type.name %>
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(:actions, _key, ammo_type, %{actions: actions}) do
|
||||
assigns = %{actions: actions, ammo_type: ammo_type}
|
||||
|
||||
~H"""
|
||||
<%= render_slot(@actions, @ammo_type) %>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(nil, _key, _ammo_type, _other_data), do: nil
|
||||
|
||||
defp get_ammo_type_value(_other, key, ammo_type, _other_data), do: ammo_type |> Map.get(key)
|
||||
end
|
@ -23,7 +23,7 @@ defmodule CanneryWeb.Components.ContainerCard do
|
||||
~H"""
|
||||
<div
|
||||
id={"container-#{@container.id}"}
|
||||
class="overflow-hidden max-w-full mx-4 mb-4 px-8 py-4 flex flex-col justify-center items-center space-y-4
|
||||
class="overflow-hidden max-w-full mx-4 my-2 px-8 py-4 flex flex-col justify-center items-center space-y-4
|
||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||
transition-all duration-300 ease-in-out"
|
||||
>
|
||||
|
@ -1,158 +0,0 @@
|
||||
defmodule CanneryWeb.Components.ContainerTableComponent do
|
||||
@moduledoc """
|
||||
A component that displays a list of containers
|
||||
"""
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, Containers, Containers.Container, Repo}
|
||||
alias CanneryWeb.Components.TagCard
|
||||
alias Ecto.UUID
|
||||
alias Phoenix.LiveView.{Rendered, Socket}
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{
|
||||
required(:id) => UUID.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:containers) => [Container.t()],
|
||||
optional(:tag_actions) => Rendered.t(),
|
||||
optional(:actions) => Rendered.t(),
|
||||
optional(any()) => any()
|
||||
},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{id: _id, containers: _containers, current_user: _current_user} = assigns, socket) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:tag_actions, fn -> [] end)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
|> display_containers()
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
defp display_containers(
|
||||
%{
|
||||
assigns: %{
|
||||
containers: containers,
|
||||
current_user: current_user,
|
||||
tag_actions: tag_actions,
|
||||
actions: actions
|
||||
}
|
||||
} = socket
|
||||
) do
|
||||
columns =
|
||||
[
|
||||
%{label: gettext("Name"), key: :name, type: :string},
|
||||
%{label: gettext("Description"), key: :desc, type: :string},
|
||||
%{label: gettext("Location"), key: :location, type: :string},
|
||||
%{label: gettext("Type"), key: :type, type: :string},
|
||||
%{label: gettext("Packs"), key: :packs, type: :integer},
|
||||
%{label: gettext("Rounds"), key: :rounds, type: :string},
|
||||
%{label: gettext("Tags"), key: :tags, type: :tags},
|
||||
%{label: nil, key: :actions, sortable: false, type: :actions}
|
||||
]
|
||||
|> Enum.filter(fn %{key: key, type: type} ->
|
||||
# remove columns if all values match defaults
|
||||
default_value =
|
||||
case type do
|
||||
:boolean -> false
|
||||
_other_type -> nil
|
||||
end
|
||||
|
||||
containers
|
||||
|> Enum.any?(fn container ->
|
||||
type in [:tags, :actions] or not (container |> Map.get(key) == default_value)
|
||||
end)
|
||||
end)
|
||||
|
||||
extra_data = %{
|
||||
current_user: current_user,
|
||||
tag_actions: tag_actions,
|
||||
actions: actions
|
||||
}
|
||||
|
||||
rows =
|
||||
containers
|
||||
|> Enum.map(fn container ->
|
||||
container |> get_row_data_for_container(columns, extra_data)
|
||||
end)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
columns: columns,
|
||||
rows: rows
|
||||
)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div id={@id} class="w-full">
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id={"table-#{@id}"}
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
@spec get_row_data_for_container(Container.t(), columns :: [map()], extra_data :: map) :: map()
|
||||
defp get_row_data_for_container(container, columns, extra_data) do
|
||||
container = container |> Repo.preload([:ammo_groups, :tags])
|
||||
|
||||
columns
|
||||
|> Map.new(fn %{key: key} -> {key, get_value_for_key(key, container, extra_data)} end)
|
||||
end
|
||||
|
||||
@spec get_value_for_key(atom(), Container.t(), extra_data :: map) :: any()
|
||||
defp get_value_for_key(:name, %{id: id, name: container_name}, _extra_data) do
|
||||
assigns = %{id: id, container_name: container_name}
|
||||
|
||||
{container_name,
|
||||
~H"""
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<.link navigate={Routes.container_show_path(Endpoint, :show, @id)} class="link">
|
||||
<%= @container_name %>
|
||||
</.link>
|
||||
</div>
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_value_for_key(:packs, container, _extra_data) do
|
||||
container |> Containers.get_container_ammo_group_count!()
|
||||
end
|
||||
|
||||
defp get_value_for_key(:rounds, container, _extra_data) do
|
||||
container |> Containers.get_container_rounds!()
|
||||
end
|
||||
|
||||
defp get_value_for_key(:tags, container, %{tag_actions: tag_actions}) do
|
||||
assigns = %{tag_actions: tag_actions, container: container}
|
||||
|
||||
{container.tags |> Enum.map(fn %{name: name} -> name end),
|
||||
~H"""
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= unless @container.tags |> Enum.empty?() do %>
|
||||
<%= for tag <- @container.tags do %>
|
||||
<TagCard.simple_tag_card tag={tag} />
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= render_slot(@tag_actions, @container) %>
|
||||
</div>
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_value_for_key(:actions, container, %{actions: actions}) do
|
||||
assigns = %{actions: actions, container: container}
|
||||
|
||||
~H"""
|
||||
<%= render_slot(@actions, @container) %>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_value_for_key(key, container, _extra_data), do: container |> Map.get(key)
|
||||
end
|
@ -1,117 +0,0 @@
|
||||
defmodule CanneryWeb.Components.ShotGroupTableComponent do
|
||||
@moduledoc """
|
||||
A component that displays a list of shot groups
|
||||
"""
|
||||
use CanneryWeb, :live_component
|
||||
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Repo}
|
||||
alias Ecto.UUID
|
||||
alias Phoenix.LiveView.{Rendered, Socket}
|
||||
|
||||
@impl true
|
||||
@spec update(
|
||||
%{
|
||||
required(:id) => UUID.t(),
|
||||
required(:current_user) => User.t(),
|
||||
optional(:shot_groups) => [ShotGroup.t()],
|
||||
optional(:actions) => Rendered.t(),
|
||||
optional(any()) => any()
|
||||
},
|
||||
Socket.t()
|
||||
) :: {:ok, Socket.t()}
|
||||
def update(%{id: _id, shot_groups: _shot_groups, current_user: _current_user} = assigns, socket) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(assigns)
|
||||
|> assign_new(:actions, fn -> [] end)
|
||||
|> display_shot_groups()
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
defp display_shot_groups(
|
||||
%{
|
||||
assigns: %{
|
||||
shot_groups: shot_groups,
|
||||
current_user: current_user,
|
||||
actions: actions
|
||||
}
|
||||
} = socket
|
||||
) do
|
||||
columns = [
|
||||
%{label: gettext("Ammo"), key: :name},
|
||||
%{label: gettext("Rounds shot"), key: :count},
|
||||
%{label: gettext("Notes"), key: :notes},
|
||||
%{label: gettext("Date"), key: :date},
|
||||
%{label: nil, key: :actions, sortable: false}
|
||||
]
|
||||
|
||||
extra_data = %{current_user: current_user, actions: actions}
|
||||
|
||||
rows =
|
||||
shot_groups
|
||||
|> Enum.map(fn shot_group ->
|
||||
shot_group |> get_row_data_for_shot_group(columns, extra_data)
|
||||
end)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
columns: columns,
|
||||
rows: rows
|
||||
)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div id={@id} class="w-full">
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id={"table-#{@id}"}
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
initial_key={:date}
|
||||
initial_sort_mode={:desc}
|
||||
/>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
@spec get_row_data_for_shot_group(ShotGroup.t(), columns :: [map()], extra_data :: map()) ::
|
||||
map()
|
||||
defp get_row_data_for_shot_group(shot_group, columns, extra_data) do
|
||||
shot_group = shot_group |> Repo.preload(ammo_group: :ammo_type)
|
||||
|
||||
columns
|
||||
|> Map.new(fn %{key: key} ->
|
||||
{key, get_row_value(key, shot_group, extra_data)}
|
||||
end)
|
||||
end
|
||||
|
||||
defp get_row_value(
|
||||
:name,
|
||||
%{ammo_group: %{ammo_type: %{name: ammo_type_name} = ammo_group}},
|
||||
_extra_data
|
||||
) do
|
||||
assigns = %{ammo_group: ammo_group, ammo_type_name: ammo_type_name}
|
||||
|
||||
name_block = ~H"""
|
||||
<.link navigate={Routes.ammo_group_show_path(Endpoint, :show, @ammo_group)} class="link">
|
||||
<%= @ammo_type_name %>
|
||||
</.link>
|
||||
"""
|
||||
|
||||
{ammo_type_name, name_block}
|
||||
end
|
||||
|
||||
defp get_row_value(:date, %{date: date}, _extra_data), do: date |> display_date()
|
||||
|
||||
defp get_row_value(:actions, shot_group, %{actions: actions}) do
|
||||
assigns = %{actions: actions, shot_group: shot_group}
|
||||
|
||||
~H"""
|
||||
<%= render_slot(@actions, @shot_group) %>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_row_value(key, shot_group, _extra_data), do: shot_group |> Map.get(key)
|
||||
end
|
@ -13,7 +13,7 @@ defmodule CanneryWeb.Components.TagCard do
|
||||
~H"""
|
||||
<div
|
||||
id={"tag-#{@tag.id}"}
|
||||
class="mx-4 mb-4 px-8 py-4 space-x-4 flex justify-center items-center
|
||||
class="mx-4 my-2 px-8 py-4 space-x-4 flex justify-center items-center
|
||||
border border-gray-400 rounded-lg shadow-lg hover:shadow-md
|
||||
transition-all duration-300 ease-in-out"
|
||||
>
|
||||
|
@ -23,7 +23,7 @@ defmodule CanneryWeb.ExportController do
|
||||
end)
|
||||
|
||||
ammo_groups =
|
||||
Ammo.list_ammo_groups(nil, true, current_user)
|
||||
Ammo.list_ammo_groups(current_user, true)
|
||||
|> Enum.map(fn ammo_group ->
|
||||
cpr = ammo_group |> Ammo.get_cpr()
|
||||
used_count = ammo_group |> Ammo.get_used_count()
|
||||
|
@ -2,6 +2,7 @@ defmodule CanneryWeb.UserRegistrationController do
|
||||
use CanneryWeb, :controller
|
||||
import CanneryWeb.Gettext
|
||||
alias Cannery.{Accounts, Invites}
|
||||
alias Cannery.Accounts.User
|
||||
alias CanneryWeb.{Endpoint, HomeLive}
|
||||
|
||||
def new(conn, %{"invite" => invite_token}) do
|
||||
@ -29,7 +30,7 @@ defmodule CanneryWeb.UserRegistrationController do
|
||||
# renders new user registration page
|
||||
defp render_new(conn, invite \\ nil) do
|
||||
render(conn, "new.html",
|
||||
changeset: Accounts.change_user_registration(),
|
||||
changeset: Accounts.change_user_registration(%User{}),
|
||||
invite: invite,
|
||||
page_title: gettext("Register")
|
||||
)
|
||||
|
@ -4,15 +4,12 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
alias Cannery.{Ammo, Ammo.AmmoGroup, Containers}
|
||||
alias Cannery.{Ammo, Ammo.AmmoGroup, Containers, Repo}
|
||||
alias CanneryWeb.Endpoint
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(show_used: false, search: search) |> display_ammo_groups()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(show_used: false, search: nil) |> display_ammo_groups()}
|
||||
{:ok, socket |> assign(show_used: false)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -26,60 +23,38 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
|
||||
%{"id" => id}
|
||||
) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Record shots"),
|
||||
ammo_group: Ammo.get_ammo_group!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Record shots"))
|
||||
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :move, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Move ammo"),
|
||||
ammo_group: Ammo.get_ammo_group!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Move ammo"))
|
||||
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit ammo"),
|
||||
ammo_group: Ammo.get_ammo_group!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Edit ammo"))
|
||||
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: dgettext("actions", "Add Ammo"),
|
||||
ammo_group: %{Ammo.get_ammo_group!(id, current_user) | id: nil}
|
||||
)
|
||||
|> assign(:page_title, dgettext("actions", "Add Ammo"))
|
||||
|> assign(:ammo_group, %{Ammo.get_ammo_group!(id, current_user) | id: nil})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: dgettext("actions", "Add Ammo"),
|
||||
ammo_group: %AmmoGroup{}
|
||||
)
|
||||
|> assign(:page_title, dgettext("actions", "Add Ammo"))
|
||||
|> assign(:ammo_group, %AmmoGroup{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Ammo"),
|
||||
search: nil,
|
||||
ammo_group: nil
|
||||
)
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Ammo"),
|
||||
search: search,
|
||||
ammo_group: nil
|
||||
)
|
||||
|> assign(:page_title, gettext("Ammo"))
|
||||
|> assign(:ammo_group, nil)
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -110,22 +85,13 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> display_ammo_groups()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.ammo_group_index_path(Endpoint, :index))}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
socket =
|
||||
socket |> push_patch(to: Routes.ammo_group_index_path(Endpoint, :search, search_term))
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
defp display_ammo_groups(
|
||||
%{assigns: %{search: search, current_user: current_user, show_used: show_used}} = socket
|
||||
%{assigns: %{current_user: current_user, show_used: show_used}} = socket
|
||||
) do
|
||||
ammo_groups = Ammo.list_ammo_groups(search, show_used, current_user)
|
||||
ammo_groups =
|
||||
Ammo.list_ammo_groups(current_user, show_used)
|
||||
|> Repo.preload([:ammo_type, :container], force: true)
|
||||
|
||||
ammo_types_count = Ammo.get_ammo_types_count!(current_user)
|
||||
containers_count = Containers.get_containers_count!(current_user)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<%= gettext("Ammo") %>
|
||||
</h1>
|
||||
|
||||
<%= if @ammo_groups |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<%= if @ammo_groups |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Ammo") %>
|
||||
<%= display_emoji("😔") %>
|
||||
@ -31,7 +31,7 @@
|
||||
<%= dgettext("actions", "add an ammo type first") %>
|
||||
</.link>
|
||||
</div>
|
||||
<% @ammo_groups |> Enum.empty?() and @search |> is_nil() -> %>
|
||||
<% @ammo_groups |> Enum.empty?() -> %>
|
||||
<.link patch={Routes.ammo_group_index_path(Endpoint, :new)} class="btn btn-primary">
|
||||
<%= dgettext("actions", "Add your first box!") %>
|
||||
</.link>
|
||||
@ -41,36 +41,15 @@
|
||||
</.link>
|
||||
<% end %>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
data-qa="ammo_group_search"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search ammo")
|
||||
) %>
|
||||
</.form>
|
||||
<%= unless @ammo_groups |> Enum.empty?() do %>
|
||||
<div class="flex flex-col space-y-4 justify-center items-center">
|
||||
<.toggle_button action="toggle_show_used" value={@show_used}>
|
||||
<span class="title text-lg text-primary-600">
|
||||
<%= gettext("Show used") %>
|
||||
</span>
|
||||
</.toggle_button>
|
||||
</div>
|
||||
|
||||
<.toggle_button action="toggle_show_used" value={@show_used}>
|
||||
<span class="title text-lg text-primary-600">
|
||||
<%= gettext("Show used") %>
|
||||
</span>
|
||||
</.toggle_button>
|
||||
</div>
|
||||
|
||||
<%= if @ammo_groups |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Ammo") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.AmmoGroupTableComponent}
|
||||
id="ammo-group-index-table"
|
||||
|
@ -4,15 +4,13 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
"""
|
||||
|
||||
use CanneryWeb, :live_view
|
||||
|
||||
alias Cannery.{Ammo, Ammo.AmmoType}
|
||||
alias CanneryWeb.Endpoint
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(show_used: false, search: search) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(show_used: false, search: nil) |> list_ammo_types()}
|
||||
{:ok, socket |> assign(:show_used, false) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -21,49 +19,25 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
%{name: ammo_type_name} = ammo_type = Ammo.get_ammo_type!(id, current_user)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type_name),
|
||||
ammo_type: ammo_type
|
||||
)
|
||||
|> assign(:page_title, gettext("Edit Ammo type"))
|
||||
|> assign(:ammo_type, Ammo.get_ammo_type!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :clone, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Ammo type"),
|
||||
ammo_type: %{Ammo.get_ammo_type!(id, current_user) | id: nil}
|
||||
)
|
||||
|> assign(:page_title, gettext("New Ammo type"))
|
||||
|> assign(:ammo_type, %{Ammo.get_ammo_type!(id, current_user) | id: nil})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Ammo type"),
|
||||
ammo_type: %AmmoType{}
|
||||
)
|
||||
|> assign(:page_title, gettext("New Ammo type"))
|
||||
|> assign(:ammo_type, %AmmoType{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Catalog"),
|
||||
search: nil,
|
||||
ammo_type: nil
|
||||
)
|
||||
|> list_ammo_types()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Catalog"),
|
||||
search: search,
|
||||
ammo_type: nil
|
||||
)
|
||||
|> list_ammo_types()
|
||||
socket |> assign(:page_title, gettext("Ammo types")) |> assign(:ammo_type, nil)
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -80,17 +54,196 @@ defmodule CanneryWeb.AmmoTypeLive.Index do
|
||||
{:noreply, socket |> assign(:show_used, !show_used) |> list_ammo_types()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.ammo_type_index_path(Endpoint, :index))}
|
||||
defp list_ammo_types(%{assigns: %{current_user: current_user, show_used: show_used}} = socket) do
|
||||
ammo_types = Ammo.list_ammo_types(current_user)
|
||||
|
||||
columns =
|
||||
[
|
||||
%{label: gettext("Name"), key: :name, type: :name},
|
||||
%{label: gettext("Bullet type"), key: :bullet_type, type: :string},
|
||||
%{label: gettext("Bullet core"), key: :bullet_core, type: :string},
|
||||
%{label: gettext("Cartridge"), key: :cartridge, type: :string},
|
||||
%{label: gettext("Caliber"), key: :caliber, type: :string},
|
||||
%{label: gettext("Case material"), key: :case_material, type: :string},
|
||||
%{label: gettext("Jacket type"), key: :jacket_type, type: :string},
|
||||
%{label: gettext("Muzzle velocity"), key: :muzzle_velocity, type: :string},
|
||||
%{label: gettext("Powder type"), key: :powder_type, type: :string},
|
||||
%{
|
||||
label: gettext("Powder grains per charge"),
|
||||
key: :powder_grains_per_charge,
|
||||
type: :string
|
||||
},
|
||||
%{label: gettext("Grains"), key: :grains, type: :string},
|
||||
%{label: gettext("Pressure"), key: :pressure, type: :string},
|
||||
%{label: gettext("Primer type"), key: :primer_type, type: :string},
|
||||
%{label: gettext("Firing type"), key: :firing_type, type: :string},
|
||||
%{label: gettext("Tracer"), key: :tracer, type: :boolean},
|
||||
%{label: gettext("Incendiary"), key: :incendiary, type: :boolean},
|
||||
%{label: gettext("Blank"), key: :blank, type: :boolean},
|
||||
%{label: gettext("Corrosive"), key: :corrosive, type: :boolean},
|
||||
%{label: gettext("Manufacturer"), key: :manufacturer, type: :string},
|
||||
%{label: gettext("UPC"), key: "upc", type: :string}
|
||||
]
|
||||
|> Enum.filter(fn %{key: key, type: type} ->
|
||||
# remove columns if all values match defaults
|
||||
default_value = if type == :boolean, do: false, else: nil
|
||||
|
||||
ammo_types
|
||||
|> Enum.any?(fn ammo_type ->
|
||||
not (ammo_type |> Map.get(key) == default_value)
|
||||
end)
|
||||
end)
|
||||
|> Kernel.++([
|
||||
%{label: gettext("Rounds"), key: :round_count, type: :round_count}
|
||||
])
|
||||
|> Kernel.++(
|
||||
if show_used do
|
||||
[
|
||||
%{
|
||||
label: gettext("Used rounds"),
|
||||
key: :used_round_count,
|
||||
type: :used_round_count
|
||||
},
|
||||
%{
|
||||
label: gettext("Total ever rounds"),
|
||||
key: :historical_round_count,
|
||||
type: :historical_round_count
|
||||
}
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
||||
)
|
||||
|> Kernel.++([%{label: gettext("Packs"), key: :ammo_count, type: :ammo_count}])
|
||||
|> Kernel.++(
|
||||
if show_used do
|
||||
[
|
||||
%{
|
||||
label: gettext("Used packs"),
|
||||
key: :used_ammo_count,
|
||||
type: :used_ammo_count
|
||||
},
|
||||
%{
|
||||
label: gettext("Total ever packs"),
|
||||
key: :historical_ammo_count,
|
||||
type: :historical_ammo_count
|
||||
}
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
||||
)
|
||||
|> Kernel.++([
|
||||
%{label: gettext("Average CPR"), key: :avg_price_paid, type: :avg_price_paid},
|
||||
%{label: nil, key: "actions", type: :actions, sortable: false}
|
||||
])
|
||||
|
||||
rows =
|
||||
ammo_types
|
||||
|> Enum.map(fn ammo_type -> ammo_type |> get_ammo_type_values(columns, current_user) end)
|
||||
|
||||
socket |> assign(columns: columns, rows: rows)
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
{:noreply,
|
||||
socket |> push_patch(to: Routes.ammo_type_index_path(Endpoint, :search, search_term))}
|
||||
defp get_ammo_type_values(ammo_type, columns, current_user) do
|
||||
columns
|
||||
|> Map.new(fn %{key: key, type: type} ->
|
||||
{key, get_ammo_type_value(type, key, ammo_type, current_user)}
|
||||
end)
|
||||
end
|
||||
|
||||
defp list_ammo_types(%{assigns: %{search: search, current_user: current_user}} = socket) do
|
||||
socket |> assign(ammo_types: Ammo.list_ammo_types(search, current_user))
|
||||
defp get_ammo_type_value(:boolean, key, ammo_type, _current_user),
|
||||
do: ammo_type |> Map.get(key) |> humanize()
|
||||
|
||||
defp get_ammo_type_value(:round_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_round_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:historical_round_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_historical_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:used_round_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_used_count_for_ammo_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:historical_ammo_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_ammo_groups_count_for_type(current_user, true)
|
||||
|
||||
defp get_ammo_type_value(:used_ammo_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_used_ammo_groups_count_for_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:ammo_count, _key, ammo_type, current_user),
|
||||
do: ammo_type |> Ammo.get_ammo_groups_count_for_type(current_user)
|
||||
|
||||
defp get_ammo_type_value(:avg_price_paid, _key, ammo_type, current_user) do
|
||||
case ammo_type |> Ammo.get_average_cost_for_ammo_type!(current_user) do
|
||||
nil -> gettext("No cost information")
|
||||
count -> gettext("$%{amount}", amount: count |> :erlang.float_to_binary(decimals: 2))
|
||||
end
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(:name, _key, ammo_type, _current_user) do
|
||||
assigns = %{ammo_type: ammo_type}
|
||||
|
||||
~H"""
|
||||
<.link
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
|
||||
class="link"
|
||||
data-qa={"view-name-#{@ammo_type.id}"}
|
||||
>
|
||||
<%= @ammo_type.name %>
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(:actions, _key, ammo_type, _current_user) do
|
||||
assigns = %{ammo_type: ammo_type}
|
||||
|
||||
~H"""
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, @ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"view-#{@ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-eye"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :edit, @ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{@ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :clone, @ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"clone-#{@ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-copy"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={@ammo_type.id}
|
||||
data-confirm={
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
|
||||
name: @ammo_type.name
|
||||
)
|
||||
}
|
||||
data-qa={"delete-#{@ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_ammo_type_value(nil, _key, _ammo_type, _current_user), do: nil
|
||||
|
||||
defp get_ammo_type_value(_other, key, ammo_type, _current_user), do: ammo_type |> Map.get(key)
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
<%= gettext("Catalog") %>
|
||||
</h1>
|
||||
|
||||
<%= if @ammo_types |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<%= if @rows |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Ammo types") %>
|
||||
<%= display_emoji("😔") %>
|
||||
@ -17,23 +17,7 @@
|
||||
<%= dgettext("actions", "New Ammo type") %>
|
||||
</.link>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
data-qa="ammo_type_search"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search catalog")
|
||||
) %>
|
||||
</.form>
|
||||
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<.toggle_button action="toggle_show_used" value={@show_used}>
|
||||
<span class="title text-lg text-primary-600">
|
||||
<%= gettext("Show used") %>
|
||||
@ -41,66 +25,13 @@
|
||||
</.toggle_button>
|
||||
</div>
|
||||
|
||||
<%= if @ammo_types |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No Ammo types") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.AmmoTypeTableComponent}
|
||||
id="ammo_types_index_table"
|
||||
action={@live_action}
|
||||
ammo_types={@ammo_types}
|
||||
current_user={@current_user}
|
||||
show_used={@show_used}
|
||||
>
|
||||
<:actions :let={ammo_type}>
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
navigate={Routes.ammo_type_show_path(Endpoint, :show, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"view-#{ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-eye"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :edit, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.ammo_type_index_path(Endpoint, :clone, ammo_type)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"clone-#{ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-copy"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={ammo_type.id}
|
||||
data-confirm={
|
||||
dgettext(
|
||||
"prompts",
|
||||
"Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!",
|
||||
name: ammo_type.name
|
||||
)
|
||||
}
|
||||
data-qa={"delete-#{ammo_type.id}"}
|
||||
>
|
||||
<i class="fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id="ammo_types_index_table"
|
||||
action={@live_action}
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -184,7 +184,7 @@
|
||||
</:container>
|
||||
</.live_component>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center items-stretch">
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} show_container={true} />
|
||||
<% end %>
|
||||
|
@ -6,16 +6,11 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
use CanneryWeb, :live_view
|
||||
import CanneryWeb.Components.ContainerCard
|
||||
alias Cannery.{Containers, Containers.Container, Repo}
|
||||
alias CanneryWeb.{Components.TagCard, Endpoint}
|
||||
alias Ecto.Changeset
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(view_table: true, search: search) |> display_containers()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(view_table: true, search: nil) |> display_containers()}
|
||||
end
|
||||
def mount(_params, _session, socket), do: {:ok, socket |> assign(view_table: false)}
|
||||
|
||||
@impl true
|
||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
||||
@ -26,7 +21,7 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
%{name: container_name} =
|
||||
container =
|
||||
Containers.get_container!(id, current_user)
|
||||
|> Repo.preload([:tags, :ammo_groups])
|
||||
|> Repo.preload([:tags, :ammo_groups], force: true)
|
||||
|
||||
socket
|
||||
|> assign(page_title: gettext("Edit %{name}", name: container_name), container: container)
|
||||
@ -47,18 +42,19 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Containers"),
|
||||
container: nil,
|
||||
search: nil
|
||||
container: nil
|
||||
)
|
||||
|> display_containers()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
defp apply_action(socket, :table, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Containers"),
|
||||
container: nil,
|
||||
search: search
|
||||
view_table: true
|
||||
)
|
||||
|> display_containers()
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit_tags, %{"id" => id}) do
|
||||
@ -108,24 +104,146 @@ defmodule CanneryWeb.ContainerLive.Index do
|
||||
|
||||
@impl true
|
||||
def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do
|
||||
{:noreply, socket |> assign(:view_table, !view_table) |> display_containers()}
|
||||
new_path =
|
||||
if view_table,
|
||||
do: Routes.container_index_path(Endpoint, :index),
|
||||
else: Routes.container_index_path(Endpoint, :table)
|
||||
|
||||
{:noreply, socket |> assign(view_table: !view_table) |> push_patch(to: new_path)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.container_index_path(Endpoint, :index))}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
{:noreply,
|
||||
socket |> push_patch(to: Routes.container_index_path(Endpoint, :search, search_term))}
|
||||
end
|
||||
|
||||
defp display_containers(%{assigns: %{search: search, current_user: current_user}} = socket) do
|
||||
defp display_containers(%{assigns: %{current_user: current_user}} = socket) do
|
||||
containers =
|
||||
Containers.list_containers(search, current_user)
|
||||
|> Repo.preload([:tags, :ammo_groups])
|
||||
Containers.list_containers(current_user) |> Repo.preload([:tags, :ammo_groups], force: true)
|
||||
|
||||
socket |> assign(:containers, containers)
|
||||
columns =
|
||||
[
|
||||
%{label: gettext("Name"), key: :name, type: :string},
|
||||
%{label: gettext("Description"), key: :desc, type: :string},
|
||||
%{label: gettext("Location"), key: :location, type: :string},
|
||||
%{label: gettext("Type"), key: :type, type: :string},
|
||||
%{label: gettext("Packs"), key: :packs, type: :integer},
|
||||
%{label: gettext("Rounds"), key: :rounds, type: :string},
|
||||
%{label: gettext("Tags"), key: :tags, type: :tags},
|
||||
%{label: nil, key: :actions, sortable: false, type: :actions}
|
||||
]
|
||||
|> Enum.filter(fn %{key: key, type: type} ->
|
||||
# remove columns if all values match defaults
|
||||
default_value =
|
||||
case type do
|
||||
:boolean -> false
|
||||
_other_type -> nil
|
||||
end
|
||||
|
||||
containers
|
||||
|> Enum.any?(fn container ->
|
||||
type in [:tags, :actions] or not (container |> Map.get(key) == default_value)
|
||||
end)
|
||||
end)
|
||||
|
||||
rows =
|
||||
containers
|
||||
|> Enum.map(fn container -> container |> get_row_data_for_container(columns) end)
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
containers: containers,
|
||||
columns: columns,
|
||||
rows: rows
|
||||
)
|
||||
end
|
||||
|
||||
@spec get_row_data_for_container(Container.t(), [map()]) :: map()
|
||||
defp get_row_data_for_container(container, columns) do
|
||||
container = container |> Repo.preload([:ammo_groups, :tags])
|
||||
|
||||
columns
|
||||
|> Map.new(fn %{key: key} -> {key, get_value_for_key(key, container)} end)
|
||||
end
|
||||
|
||||
@spec get_value_for_key(atom(), Container.t()) :: any()
|
||||
defp get_value_for_key(:name, %{id: id, name: container_name}) do
|
||||
assigns = %{id: id, container_name: container_name}
|
||||
|
||||
{container_name,
|
||||
~H"""
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<.link navigate={Routes.container_show_path(Endpoint, :show, @id)} class="link">
|
||||
<%= @container_name %>
|
||||
</.link>
|
||||
</div>
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_value_for_key(:packs, container) do
|
||||
container |> Containers.get_container_ammo_group_count!()
|
||||
end
|
||||
|
||||
defp get_value_for_key(:rounds, container) do
|
||||
container |> Containers.get_container_rounds!()
|
||||
end
|
||||
|
||||
defp get_value_for_key(:tags, container) do
|
||||
assigns = %{container: container}
|
||||
|
||||
{container.tags |> Enum.map(fn %{name: name} -> name end),
|
||||
~H"""
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= unless @container.tags |> Enum.empty?() do %>
|
||||
<%= for tag <- @container.tags do %>
|
||||
<TagCard.simple_tag_card tag={tag} />
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="mx-4 my-2">
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit_tags, @container)}
|
||||
class="text-primary-600 link"
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</div>
|
||||
"""}
|
||||
end
|
||||
|
||||
defp get_value_for_key(:actions, container) do
|
||||
assigns = %{container: container}
|
||||
|
||||
~H"""
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit, @container)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{@container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :clone, @container)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"clone-#{@container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-copy"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={@container.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete %{name}?", name: @container.name)
|
||||
}
|
||||
data-qa={"delete-#{@container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
"""
|
||||
end
|
||||
|
||||
defp get_value_for_key(key, container), do: container |> Map.get(key)
|
||||
|
||||
def return_to(true = _view_table), do: Routes.container_index_path(Endpoint, :table)
|
||||
def return_to(false = _view_table), do: Routes.container_index_path(Endpoint, :index)
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
<%= gettext("Containers") %>
|
||||
</h1>
|
||||
|
||||
<%= if @containers |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<%= if @containers |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No containers") %>
|
||||
<%= display_emoji("😔") %>
|
||||
@ -17,23 +17,7 @@
|
||||
<%= dgettext("actions", "New Container") %>
|
||||
</.link>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
data-qa="container_search"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search containers")
|
||||
) %>
|
||||
</.form>
|
||||
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<.toggle_button action="toggle_table" value={@view_table}>
|
||||
<span class="title text-lg text-primary-600">
|
||||
<%= gettext("View as table") %>
|
||||
@ -42,31 +26,28 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= if @containers |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No containers") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-center">
|
||||
<%= if @view_table do %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.ContainerTableComponent}
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id="containers_index_table"
|
||||
action={@live_action}
|
||||
containers={@containers}
|
||||
current_user={@current_user}
|
||||
>
|
||||
<:tag_actions :let={container}>
|
||||
<div class="mx-4 my-2">
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit_tags, container)}
|
||||
class="text-primary-600 link"
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</:tag_actions>
|
||||
<:actions :let={container}>
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
/>
|
||||
<% else %>
|
||||
<%= for container <- @containers do %>
|
||||
<.container_card container={container}>
|
||||
<:tag_actions>
|
||||
<div class="mx-4 my-2">
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit_tags, container)}
|
||||
class="text-primary-600 link"
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</:tag_actions>
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit, container)}
|
||||
class="text-primary-600 link"
|
||||
@ -95,75 +76,28 @@
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% else %>
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
|
||||
<%= for container <- @containers do %>
|
||||
<.container_card container={container}>
|
||||
<:tag_actions>
|
||||
<div class="mx-4 my-2">
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit_tags, container)}
|
||||
class="text-primary-600 link"
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-tags"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</:tag_actions>
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :edit, container)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
patch={Routes.container_index_path(Endpoint, :clone, container)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"clone-#{container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-copy"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={container.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete %{name}?",
|
||||
name: container.name
|
||||
)
|
||||
}
|
||||
data-qa={"delete-#{container.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</.container_card>
|
||||
<% end %>
|
||||
</div>
|
||||
</.container_card>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= if @live_action in [:new, :edit, :clone] do %>
|
||||
<.modal return_to={Routes.container_index_path(Endpoint, :index)}>
|
||||
<.modal return_to={return_to(@view_table)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.ContainerLive.FormComponent}
|
||||
id={@container.id || :new}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
container={@container}
|
||||
return_to={Routes.container_index_path(Endpoint, :index)}
|
||||
return_to={return_to(@view_table)}
|
||||
current_user={@current_user}
|
||||
/>
|
||||
</.modal>
|
||||
<% end %>
|
||||
|
||||
<%= if @live_action == :edit_tags do %>
|
||||
<.modal return_to={Routes.container_index_path(Endpoint, :index)}>
|
||||
<.modal return_to={return_to(@view_table)}>
|
||||
<.live_component
|
||||
module={CanneryWeb.ContainerLive.EditTagsComponent}
|
||||
id={@container.id}
|
||||
|
@ -11,14 +11,18 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket),
|
||||
do: {:ok, socket |> assign(show_used: false, view_table: true)}
|
||||
def mount(_params, _session, %{assigns: %{live_action: live_action}} = socket),
|
||||
do: {:ok, socket |> assign(show_used: false, view_table: live_action == :table)}
|
||||
|
||||
@impl true
|
||||
def handle_params(%{"id" => id}, _session, %{assigns: %{current_user: current_user}} = socket) do
|
||||
def handle_params(
|
||||
%{"id" => id},
|
||||
_session,
|
||||
%{assigns: %{current_user: current_user, live_action: live_action}} = socket
|
||||
) do
|
||||
socket =
|
||||
socket
|
||||
|> assign(view_table: true)
|
||||
|> assign(view_table: live_action == :table)
|
||||
|> render_container(id, current_user)
|
||||
|
||||
{:noreply, socket}
|
||||
@ -90,8 +94,17 @@ defmodule CanneryWeb.ContainerLive.Show do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("toggle_table", _params, %{assigns: %{view_table: view_table}} = socket) do
|
||||
{:noreply, socket |> assign(:view_table, !view_table) |> render_container()}
|
||||
def handle_event(
|
||||
"toggle_table",
|
||||
_params,
|
||||
%{assigns: %{view_table: view_table, container: container}} = socket
|
||||
) do
|
||||
new_path =
|
||||
if view_table,
|
||||
do: Routes.container_show_path(Endpoint, :show, container),
|
||||
else: Routes.container_show_path(Endpoint, :table, container)
|
||||
|
||||
{:noreply, socket |> push_patch(to: new_path)}
|
||||
end
|
||||
|
||||
@spec render_container(Socket.t(), Container.id(), User.t()) :: Socket.t()
|
||||
|
@ -133,7 +133,7 @@
|
||||
</:ammo_type>
|
||||
</.live_component>
|
||||
<% else %>
|
||||
<div class="flex flex-wrap justify-center items-stretch">
|
||||
<div class="flex flex-wrap justify-center items-center">
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group} />
|
||||
<% end %>
|
||||
|
@ -38,7 +38,7 @@ defmodule CanneryWeb.InviteLive.FormComponent do
|
||||
|
||||
changeset =
|
||||
case action do
|
||||
:new -> Invite.create_changeset(user, "example_token", invite_params)
|
||||
:new -> invite |> Invite.create_changeset(user, "example_token", invite_params)
|
||||
:edit -> invite |> Invite.update_changeset(invite_params)
|
||||
end
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
</.link>
|
||||
<% end %>
|
||||
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-center">
|
||||
<%= for invite <- @invites do %>
|
||||
<.invite_card invite={invite}>
|
||||
<:code_actions>
|
||||
@ -91,7 +91,7 @@
|
||||
<%= gettext("Admins") %>
|
||||
</h1>
|
||||
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-center">
|
||||
<%= for admin <- @admins do %>
|
||||
<.user_card user={admin}>
|
||||
<.link
|
||||
@ -121,7 +121,7 @@
|
||||
<%= gettext("Users") %>
|
||||
</h1>
|
||||
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-center">
|
||||
<%= for user <- @users do %>
|
||||
<.user_card user={user}>
|
||||
<.link
|
||||
|
@ -10,13 +10,7 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
alias Phoenix.LiveView.Socket
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(search: search) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(search: nil) |> display_shot_groups()}
|
||||
end
|
||||
def mount(_params, _session, socket), do: {:ok, socket |> display_shot_groups()}
|
||||
|
||||
@impl true
|
||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
||||
@ -29,46 +23,26 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
%{"id" => id}
|
||||
) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Record Shots"),
|
||||
ammo_group: Ammo.get_ammo_group!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Record Shots"))
|
||||
|> assign(:ammo_group, Ammo.get_ammo_group!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit Shot Records"),
|
||||
shot_group: ActivityLog.get_shot_group!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Edit Shot Records"))
|
||||
|> assign(:shot_group, ActivityLog.get_shot_group!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Shot Records"),
|
||||
shot_group: %ShotGroup{}
|
||||
)
|
||||
|> assign(:page_title, gettext("New Shot Records"))
|
||||
|> assign(:shot_group, %ShotGroup{})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Shot Records"),
|
||||
search: nil,
|
||||
shot_group: nil
|
||||
)
|
||||
|> display_shot_groups()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Shot Records"),
|
||||
search: search,
|
||||
shot_group: nil
|
||||
)
|
||||
|> display_shot_groups()
|
||||
|> assign(:page_title, gettext("Shot Records"))
|
||||
|> assign(:shot_group, nil)
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -81,7 +55,6 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event(
|
||||
"toggle_staged",
|
||||
%{"ammo_group_id" => ammo_group_id},
|
||||
@ -96,27 +69,32 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_shot_groups()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.range_index_path(Endpoint, :index))}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.range_index_path(Endpoint, :search, search_term))}
|
||||
end
|
||||
|
||||
@spec display_shot_groups(Socket.t()) :: Socket.t()
|
||||
defp display_shot_groups(%{assigns: %{search: search, current_user: current_user}} = socket) do
|
||||
defp display_shot_groups(%{assigns: %{current_user: current_user}} = socket) do
|
||||
shot_groups =
|
||||
ActivityLog.list_shot_groups(search, current_user)
|
||||
|> Repo.preload(ammo_group: :ammo_type)
|
||||
ActivityLog.list_shot_groups(current_user) |> Repo.preload(ammo_group: :ammo_type)
|
||||
|
||||
ammo_groups = Ammo.list_staged_ammo_groups(current_user)
|
||||
|
||||
columns = [
|
||||
%{label: gettext("Ammo"), key: :name},
|
||||
%{label: gettext("Rounds shot"), key: :count},
|
||||
%{label: gettext("Notes"), key: :notes},
|
||||
%{label: gettext("Date"), key: :date},
|
||||
%{label: nil, key: :actions, sortable: false}
|
||||
]
|
||||
|
||||
rows =
|
||||
shot_groups
|
||||
|> Enum.map(fn shot_group -> shot_group |> get_row_data_for_shot_group(columns) end)
|
||||
|
||||
chart_data = shot_groups |> get_chart_data_for_shot_group()
|
||||
|
||||
socket
|
||||
|> assign(
|
||||
ammo_groups: ammo_groups,
|
||||
columns: columns,
|
||||
rows: rows,
|
||||
chart_data: chart_data,
|
||||
shot_groups: shot_groups
|
||||
)
|
||||
@ -136,6 +114,61 @@ defmodule CanneryWeb.RangeLive.Index do
|
||||
label: gettext("Rounds shot: %{count}", count: sum)
|
||||
}
|
||||
end)
|
||||
|> Enum.sort_by(fn %{date: date} -> date end, Date)
|
||||
|> Enum.sort_by(fn %{date: date} -> date end)
|
||||
end
|
||||
|
||||
@spec get_row_data_for_shot_group(ShotGroup.t(), [map()]) :: map()
|
||||
defp get_row_data_for_shot_group(%{date: date} = shot_group, columns) do
|
||||
shot_group = shot_group |> Repo.preload(ammo_group: :ammo_type)
|
||||
assigns = %{shot_group: shot_group}
|
||||
|
||||
columns
|
||||
|> Map.new(fn %{key: key} ->
|
||||
value =
|
||||
case key do
|
||||
:name ->
|
||||
{shot_group.ammo_group.ammo_type.name,
|
||||
~H"""
|
||||
<.link
|
||||
navigate={Routes.ammo_group_show_path(Endpoint, :show, @shot_group.ammo_group)}
|
||||
class="link"
|
||||
>
|
||||
<%= @shot_group.ammo_group.ammo_type.name %>
|
||||
</.link>
|
||||
"""}
|
||||
|
||||
:date ->
|
||||
date |> display_date()
|
||||
|
||||
:actions ->
|
||||
~H"""
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :edit, @shot_group)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{@shot_group.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={@shot_group.id}
|
||||
data-confirm={dgettext("prompts", "Are you sure you want to delete this shot record?")}
|
||||
data-qa={"delete-#{@shot_group.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</div>
|
||||
"""
|
||||
|
||||
key ->
|
||||
shot_group |> Map.get(key)
|
||||
end
|
||||
|
||||
{key, value}
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
@ -17,35 +17,33 @@
|
||||
<%= dgettext("actions", "Stage ammo") %>
|
||||
</.link>
|
||||
|
||||
<div class="w-full flex flex-row flex-wrap justify-center items-stretch">
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group}>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
phx-click="toggle_staged"
|
||||
phx-value-ammo_group_id={ammo_group.id}
|
||||
data-confirm={"#{dgettext("prompts", "Are you sure you want to unstage this ammo?")}"}
|
||||
>
|
||||
<%= if ammo_group.staged,
|
||||
do: dgettext("actions", "Unstage from range"),
|
||||
else: dgettext("actions", "Stage for range") %>
|
||||
</button>
|
||||
<%= for ammo_group <- @ammo_groups do %>
|
||||
<.ammo_group_card ammo_group={ammo_group}>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
phx-click="toggle_staged"
|
||||
phx-value-ammo_group_id={ammo_group.id}
|
||||
data-confirm={"#{dgettext("prompts", "Are you sure you want to unstage this ammo?")}"}
|
||||
>
|
||||
<%= if ammo_group.staged,
|
||||
do: dgettext("actions", "Unstage from range"),
|
||||
else: dgettext("actions", "Stage for range") %>
|
||||
</button>
|
||||
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :add_shot_group, ammo_group)}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "Record shots") %>
|
||||
</.link>
|
||||
</.ammo_group_card>
|
||||
<% end %>
|
||||
</div>
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :add_shot_group, ammo_group)}
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<%= dgettext("actions", "Record shots") %>
|
||||
</.link>
|
||||
</.ammo_group_card>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<%= if @shot_groups |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<%= if @shot_groups |> Enum.empty?() do %>
|
||||
<h1 class="title text-xl text-primary-600">
|
||||
<%= gettext("No shots recorded") %>
|
||||
<%= display_emoji("😔") %>
|
||||
@ -69,62 +67,14 @@
|
||||
<%= dgettext("errors", "Your browser does not support the canvas element.") %>
|
||||
</canvas>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
data-qa="shot_group_search"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search shot records")
|
||||
) %>
|
||||
</.form>
|
||||
</div>
|
||||
|
||||
<%= if @shot_groups |> Enum.empty?() do %>
|
||||
<h1 class="title text-xl text-primary-600">
|
||||
<%= gettext("No shots recorded") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.ShotGroupTableComponent}
|
||||
id="shot_groups_index_table"
|
||||
shot_groups={@shot_groups}
|
||||
current_user={@current_user}
|
||||
>
|
||||
<:actions :let={shot_group}>
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<.link
|
||||
patch={Routes.range_index_path(Endpoint, :edit, shot_group)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{shot_group.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={shot_group.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete this shot record?")
|
||||
}
|
||||
data-qa={"delete-#{shot_group.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</div>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
<.live_component
|
||||
module={CanneryWeb.Components.TableComponent}
|
||||
id="shot_groups_index_table"
|
||||
columns={@columns}
|
||||
rows={@rows}
|
||||
initial_key={:date}
|
||||
initial_sort_mode={:desc}
|
||||
/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -9,53 +9,27 @@ defmodule CanneryWeb.TagLive.Index do
|
||||
alias CanneryWeb.{Endpoint, ViewHelpers}
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(:search, search) |> display_tags()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(:search, nil) |> display_tags()}
|
||||
end
|
||||
def mount(_params, _session, socket), do: {:ok, socket |> display_tags()}
|
||||
|
||||
@impl true
|
||||
def handle_params(params, _url, %{assigns: %{live_action: live_action}} = socket) do
|
||||
{:noreply, apply_action(socket, live_action, params)}
|
||||
{:noreply, apply_action(socket, live_action, params) |> display_tags}
|
||||
end
|
||||
|
||||
defp apply_action(%{assigns: %{current_user: current_user}} = socket, :edit, %{"id" => id}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Edit Tag"),
|
||||
tag: Tags.get_tag!(id, current_user)
|
||||
)
|
||||
|> assign(:page_title, gettext("Edit Tag"))
|
||||
|> assign(:tag, Tags.get_tag!(id, current_user))
|
||||
end
|
||||
|
||||
defp apply_action(socket, :new, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("New Tag"),
|
||||
tag: %Tag{bg_color: ViewHelpers.random_color(), text_color: "#ffffff"}
|
||||
)
|
||||
|> assign(:page_title, gettext("New Tag"))
|
||||
|> assign(:tag, %Tag{bg_color: ViewHelpers.random_color(), text_color: "#ffffff"})
|
||||
end
|
||||
|
||||
defp apply_action(socket, :index, _params) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Tags"),
|
||||
search: nil,
|
||||
tag: nil
|
||||
)
|
||||
|> display_tags()
|
||||
end
|
||||
|
||||
defp apply_action(socket, :search, %{"search" => search}) do
|
||||
socket
|
||||
|> assign(
|
||||
page_title: gettext("Tags"),
|
||||
search: search,
|
||||
tag: nil
|
||||
)
|
||||
|> display_tags()
|
||||
socket |> assign(:page_title, gettext("Tags")) |> assign(:tag, nil)
|
||||
end
|
||||
|
||||
@impl true
|
||||
@ -65,16 +39,7 @@ defmodule CanneryWeb.TagLive.Index do
|
||||
{:noreply, socket |> put_flash(:info, prompt) |> display_tags()}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_event("search", %{"search" => %{"search_term" => ""}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.tag_index_path(Endpoint, :index))}
|
||||
end
|
||||
|
||||
def handle_event("search", %{"search" => %{"search_term" => search_term}}, socket) do
|
||||
{:noreply, socket |> push_patch(to: Routes.tag_index_path(Endpoint, :search, search_term))}
|
||||
end
|
||||
|
||||
defp display_tags(%{assigns: %{search: search, current_user: current_user}} = socket) do
|
||||
socket |> assign(tags: Tags.list_tags(search, current_user))
|
||||
defp display_tags(%{assigns: %{current_user: current_user}} = socket) do
|
||||
socket |> assign(tags: Tags.list_tags(current_user))
|
||||
end
|
||||
end
|
||||
|
@ -5,7 +5,7 @@
|
||||
<p class="title text-md text-primary-600">
|
||||
<%= gettext("Tags can be added to your containers to help you organize") %>
|
||||
</p>
|
||||
<%= if @tags |> Enum.empty?() and @search |> is_nil() do %>
|
||||
<%= if @tags |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No tags") %>
|
||||
<%= display_emoji("😔") %>
|
||||
@ -19,58 +19,32 @@
|
||||
<%= dgettext("actions", "New Tag") %>
|
||||
</.link>
|
||||
<% end %>
|
||||
<div class="flex flex-row flex-wrap justify-center items-center">
|
||||
<%= for tag <- @tags do %>
|
||||
<.tag_card tag={tag}>
|
||||
<.link
|
||||
patch={Routes.tag_index_path(Endpoint, :edit, tag)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{tag.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<div class="w-full flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 max-w-xl">
|
||||
<.form
|
||||
:let={f}
|
||||
for={:search}
|
||||
phx-change="search"
|
||||
phx-submit="search"
|
||||
class="grow self-stretch flex flex-col items-stretch"
|
||||
data-qa="tag_search"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search tags")
|
||||
) %>
|
||||
</.form>
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={tag.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name)
|
||||
}
|
||||
data-qa={"delete-#{tag.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</.tag_card>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= if @tags |> Enum.empty?() do %>
|
||||
<h2 class="title text-xl text-primary-600">
|
||||
<%= gettext("No tags") %>
|
||||
<%= display_emoji("😔") %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<div class="flex flex-row flex-wrap justify-center items-stretch">
|
||||
<%= for tag <- @tags do %>
|
||||
<.tag_card tag={tag}>
|
||||
<.link
|
||||
patch={Routes.tag_index_path(Endpoint, :edit, tag)}
|
||||
class="text-primary-600 link"
|
||||
data-qa={"edit-#{tag.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
href="#"
|
||||
class="text-primary-600 link"
|
||||
phx-click="delete"
|
||||
phx-value-id={tag.id}
|
||||
data-confirm={
|
||||
dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name)
|
||||
}
|
||||
data-qa={"delete-#{tag.id}"}
|
||||
>
|
||||
<i class="fa-fw fa-lg fas fa-trash"></i>
|
||||
</.link>
|
||||
</.tag_card>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= if @live_action in [:new, :edit] do %>
|
||||
|
@ -64,48 +64,45 @@ defmodule CanneryWeb.Router do
|
||||
|
||||
live "/tags", TagLive.Index, :index
|
||||
live "/tags/new", TagLive.Index, :new
|
||||
live "/tags/edit/:id", TagLive.Index, :edit
|
||||
live "/tags/search/:search", TagLive.Index, :search
|
||||
live "/tags/:id/edit", TagLive.Index, :edit
|
||||
|
||||
live "/catalog", AmmoTypeLive.Index, :index
|
||||
live "/catalog/new", AmmoTypeLive.Index, :new
|
||||
live "/catalog/clone/:id", AmmoTypeLive.Index, :clone
|
||||
live "/catalog/edit/:id", AmmoTypeLive.Index, :edit
|
||||
live "/catalog/search/:search", AmmoTypeLive.Index, :search
|
||||
live "/catalog/:id/clone", AmmoTypeLive.Index, :clone
|
||||
live "/catalog/:id/edit", AmmoTypeLive.Index, :edit
|
||||
|
||||
live "/type/:id", AmmoTypeLive.Show, :show
|
||||
live "/type/:id/edit", AmmoTypeLive.Show, :edit
|
||||
live "/type/:id/table", AmmoTypeLive.Show, :table
|
||||
live "/catalog/:id/show", AmmoTypeLive.Show, :show
|
||||
live "/catalog/:id/show/edit", AmmoTypeLive.Show, :edit
|
||||
live "/catalog/:id/show/table", AmmoTypeLive.Show, :table
|
||||
|
||||
live "/containers", ContainerLive.Index, :index
|
||||
live "/containers/table", ContainerLive.Index, :table
|
||||
live "/containers/new", ContainerLive.Index, :new
|
||||
live "/containers/edit/:id", ContainerLive.Index, :edit
|
||||
live "/containers/clone/:id", ContainerLive.Index, :clone
|
||||
live "/containers/edit_tags/:id", ContainerLive.Index, :edit_tags
|
||||
live "/containers/search/:search", ContainerLive.Index, :search
|
||||
live "/containers/:id/edit", ContainerLive.Index, :edit
|
||||
live "/containers/:id/clone", ContainerLive.Index, :clone
|
||||
live "/containers/:id/edit_tags", ContainerLive.Index, :edit_tags
|
||||
|
||||
live "/container/:id", ContainerLive.Show, :show
|
||||
live "/container/edit/:id", ContainerLive.Show, :edit
|
||||
live "/container/edit_tags/:id", ContainerLive.Show, :edit_tags
|
||||
live "/containers/:id/show", ContainerLive.Show, :show
|
||||
live "/containers/:id/show/table", ContainerLive.Show, :table
|
||||
live "/containers/:id/show/edit", ContainerLive.Show, :edit
|
||||
live "/containers/:id/show/edit_tags", ContainerLive.Show, :edit_tags
|
||||
|
||||
live "/ammo", AmmoGroupLive.Index, :index
|
||||
live "/ammo/new", AmmoGroupLive.Index, :new
|
||||
live "/ammo/edit/:id", AmmoGroupLive.Index, :edit
|
||||
live "/ammo/clone/:id", AmmoGroupLive.Index, :clone
|
||||
live "/ammo/add_shot_group/:id", AmmoGroupLive.Index, :add_shot_group
|
||||
live "/ammo/move/:id", AmmoGroupLive.Index, :move
|
||||
live "/ammo/search/:search", AmmoGroupLive.Index, :search
|
||||
live "/ammo/:id/edit", AmmoGroupLive.Index, :edit
|
||||
live "/ammo/:id/clone", AmmoGroupLive.Index, :clone
|
||||
live "/ammo/:id/add_shot_group", AmmoGroupLive.Index, :add_shot_group
|
||||
live "/ammo/:id/move", AmmoGroupLive.Index, :move
|
||||
|
||||
live "/ammo/show/:id", AmmoGroupLive.Show, :show
|
||||
live "/ammo/show/edit/:id", AmmoGroupLive.Show, :edit
|
||||
live "/ammo/show/add_shot_group/:id", AmmoGroupLive.Show, :add_shot_group
|
||||
live "/ammo/show/move/:id", AmmoGroupLive.Show, :move
|
||||
live "/ammo/show/:id/edit/:shot_group_id", AmmoGroupLive.Show, :edit_shot_group
|
||||
live "/ammo/:id/show", AmmoGroupLive.Show, :show
|
||||
live "/ammo/:id/show/edit", AmmoGroupLive.Show, :edit
|
||||
live "/ammo/:id/show/add_shot_group", AmmoGroupLive.Show, :add_shot_group
|
||||
live "/ammo/:id/show/move", AmmoGroupLive.Show, :move
|
||||
live "/ammo/:id/show/:shot_group_id/edit", AmmoGroupLive.Show, :edit_shot_group
|
||||
|
||||
live "/range", RangeLive.Index, :index
|
||||
live "/range/edit/:id", RangeLive.Index, :edit
|
||||
live "/range/add_shot_group/:id", RangeLive.Index, :add_shot_group
|
||||
live "/range/search/:search", RangeLive.Index, :search
|
||||
live "/range/:id/edit", RangeLive.Index, :edit
|
||||
live "/range/:id/add_shot_group", RangeLive.Index, :add_shot_group
|
||||
end
|
||||
|
||||
scope "/", CanneryWeb do
|
||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Cannery.MixProject do
|
||||
def project do
|
||||
[
|
||||
app: :cannery,
|
||||
version: "0.8.0",
|
||||
version: "0.7.1",
|
||||
elixir: "1.14.1",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
compilers: Mix.compilers(),
|
||||
|
@ -10,8 +10,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -156,9 +156,9 @@ msgstr ""
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
@ -234,13 +234,13 @@ msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
|
@ -23,8 +23,8 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -169,9 +169,9 @@ msgstr "Munition markieren"
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr "Warum nicht einige für den Schießstand auswählen?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr "Schüsse dokumentieren"
|
||||
@ -247,13 +247,13 @@ msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
|
@ -45,11 +45,10 @@ msgstr "Admins"
|
||||
msgid "Admins:"
|
||||
msgstr "Admins:"
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: lib/cannery_web/components/topbar.ex:73
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:56
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo"
|
||||
msgstr "Munition"
|
||||
@ -65,8 +64,8 @@ msgstr "Munitionsarten"
|
||||
msgid "Background color"
|
||||
msgstr "Hintergrundfarbe"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr "Knallpatrone"
|
||||
@ -76,32 +75,32 @@ msgstr "Knallpatrone"
|
||||
msgid "Brass"
|
||||
msgstr "Messing"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr "Projektilkern"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr "Patronenart"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr "Kaliber"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr "Patrone"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr "Gehäusematerial"
|
||||
@ -114,15 +113,15 @@ msgid "Container"
|
||||
msgstr "Behälter"
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:57
|
||||
#: lib/cannery_web/live/container_live/index.ex:49
|
||||
#: lib/cannery_web/live/container_live/index.ex:58
|
||||
#: lib/cannery_web/live/container_live/index.ex:44
|
||||
#: lib/cannery_web/live/container_live/index.ex:53
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Containers"
|
||||
msgstr "Behälter"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr "Korrosiv"
|
||||
@ -139,9 +138,9 @@ msgstr "Anzahl"
|
||||
msgid "Count:"
|
||||
msgstr "Anzahl:"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:24
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:27
|
||||
#: lib/cannery_web/live/container_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr "Beschreibung"
|
||||
@ -157,12 +156,17 @@ msgstr "Beschreibung:"
|
||||
msgid "Easy to Use:"
|
||||
msgstr "Einfache Anwendung:"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Ammo type"
|
||||
msgstr "Munitionstyp bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Invite"
|
||||
msgstr "Einladung bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:28
|
||||
#: lib/cannery_web/live/tag_live/index.ex:21
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Tag"
|
||||
msgstr "Tag bearbeiten"
|
||||
@ -177,14 +181,14 @@ msgstr "Beispiel Munitionstyp Abkürzungen"
|
||||
msgid "FMJ"
|
||||
msgstr "VM"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr "Körner"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:81
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr "Brandmunition"
|
||||
@ -216,9 +220,9 @@ msgstr "Einladungen"
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr "Für 60 Tage eingeloggt bleiben"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:69
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||
#: lib/cannery_web/live/container_live/index.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Location"
|
||||
msgstr "Standort"
|
||||
@ -234,8 +238,8 @@ msgstr "Standort:"
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr "Magazin, Ladestreifen, Munitionskiste usw."
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr "Hersteller"
|
||||
@ -250,24 +254,24 @@ msgstr "Metallene Munitionskiste mit Anime-Girl-Sticker"
|
||||
msgid "My cool ammo can"
|
||||
msgstr "Meine coole Munitionskiste"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:45
|
||||
#: lib/cannery_web/components/container_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/container_live/index.ex:121
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
msgstr "Name"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:36
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Ammo type"
|
||||
msgstr "Neuer Munitionstyp"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:36
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:31
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
msgstr "Neuer Behälter"
|
||||
@ -277,13 +281,12 @@ msgstr "Neuer Behälter"
|
||||
msgid "New Invite"
|
||||
msgstr "Neue Einladung"
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:36
|
||||
#: lib/cannery_web/live/tag_live/index.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Tag"
|
||||
msgstr "Neuer Tag"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo"
|
||||
msgstr "Keine Munition"
|
||||
@ -294,7 +297,6 @@ msgid "No ammo for this type"
|
||||
msgstr "Keine Munition dieser Art"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No containers"
|
||||
msgstr "Kein Behälter"
|
||||
@ -306,17 +308,16 @@ msgstr "Keine Einladung"
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No tags"
|
||||
msgstr "Keine Tags"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:81
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:93
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Notes"
|
||||
msgstr "Bemerkungen"
|
||||
@ -332,8 +333,8 @@ msgstr "Bemerkungen:"
|
||||
msgid "On the bookshelf"
|
||||
msgstr "Auf dem Bücherregal"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr "Druck"
|
||||
@ -349,8 +350,8 @@ msgstr "Kaufpreis"
|
||||
msgid "Price paid:"
|
||||
msgstr "Kaufpreis:"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:78
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr "Zündertyp"
|
||||
@ -393,10 +394,9 @@ msgstr "Stahl"
|
||||
msgid "Stored in"
|
||||
msgstr "Gelagert in"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:52
|
||||
#: lib/cannery_web/components/topbar.ex:49
|
||||
#: lib/cannery_web/live/tag_live/index.ex:44
|
||||
#: lib/cannery_web/live/tag_live/index.ex:54
|
||||
#: lib/cannery_web/live/container_live/index.ex:127
|
||||
#: lib/cannery_web/live/tag_live/index.ex:32
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tags"
|
||||
@ -417,15 +417,15 @@ msgstr "Textfarbe"
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr "Leuchtspur"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:49
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:68
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||
#: lib/cannery_web/live/container_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr "Art"
|
||||
@ -478,9 +478,9 @@ msgid "Range day"
|
||||
msgstr "Range Day"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:45
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:94
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:36
|
||||
#: lib/cannery_web/live/range_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
@ -496,24 +496,23 @@ msgid "No ammo staged"
|
||||
msgstr "Keine Munition selektiert"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:30
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr "Schüsse dokumentieren"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:42
|
||||
#: lib/cannery_web/live/range_live/index.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Shot Records"
|
||||
msgstr "Schießkladde editieren"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:49
|
||||
#: lib/cannery_web/live/range_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
msgstr "Neue Schießkladde"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No shots recorded"
|
||||
msgstr "Keine Schüsse dokumentiert"
|
||||
@ -524,21 +523,20 @@ msgstr "Keine Schüsse dokumentiert"
|
||||
msgid "Rounds left"
|
||||
msgstr "Patronen verbleibend"
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/range_live/index.ex:81
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot"
|
||||
msgstr "Patronen abgefeuert"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:57
|
||||
#: lib/cannery_web/live/range_live/index.ex:67
|
||||
#: lib/cannery_web/live/range_live/index.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot Records"
|
||||
msgstr "Schießkladde"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:117
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Move ammo"
|
||||
msgstr "Munition verschieben"
|
||||
@ -548,18 +546,18 @@ msgstr "Munition verschieben"
|
||||
msgid "No other containers"
|
||||
msgstr "Kein weiterer Behälter"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:55
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot log"
|
||||
msgstr "Schießkladde"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:71
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:78
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:153
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:225
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:180
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:152
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:224
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:179
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
@ -570,32 +568,32 @@ msgstr "$%{amount}"
|
||||
msgid "Bimetal"
|
||||
msgstr "Bimetall"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr "Patronenhülse"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr "Mündungsgeschwindigkeit"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr "Pulverkörner pro Ladung"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:53
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr "Pulverart"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr "UPC"
|
||||
@ -616,18 +614,18 @@ msgstr "Derzeitiges Passwort"
|
||||
msgid "New password"
|
||||
msgstr "Neues Passwort"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
msgstr "Markiert"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage"
|
||||
msgstr "Demarkiert"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr "Patronenhülsenform"
|
||||
@ -642,14 +640,14 @@ msgstr "Neu verbinden..."
|
||||
msgid "Loading..."
|
||||
msgstr "Lädt..."
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:32
|
||||
#: lib/cannery_web/live/container_live/show.ex:113
|
||||
#: lib/cannery_web/live/container_live/index.ex:27
|
||||
#: lib/cannery_web/live/container_live/show.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name}"
|
||||
msgstr "%{name} bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:69
|
||||
#: lib/cannery_web/live/container_live/show.ex:114
|
||||
#: lib/cannery_web/live/container_live/index.ex:65
|
||||
#: lib/cannery_web/live/container_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr "Editiere %{name} Tags"
|
||||
@ -661,8 +659,8 @@ msgstr "Editiere %{name} Tags"
|
||||
msgid "Rounds:"
|
||||
msgstr "Patronen:"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:222
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:179
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:221
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
@ -713,7 +711,7 @@ msgstr "Passwort vergessen?"
|
||||
msgid "Log in"
|
||||
msgstr "Einloggen"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:34
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Register"
|
||||
msgstr "Registrieren"
|
||||
@ -724,7 +722,7 @@ msgid "Reset your password"
|
||||
msgstr "Passwort zurücksetzen"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:33
|
||||
#: lib/cannery_web/live/range_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record Shots"
|
||||
msgstr "Schüsse dokumentieren"
|
||||
@ -734,6 +732,11 @@ msgstr "Schüsse dokumentieren"
|
||||
msgid "Copies"
|
||||
msgstr "Kopien"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo types"
|
||||
msgstr "Munitionsart"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
@ -788,8 +791,6 @@ msgid "View the source code"
|
||||
msgstr "Quellcode ansehen"
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
@ -848,45 +849,45 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
msgstr "Behälter"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:105
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:193
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:192
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{percentage}%"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:136
|
||||
#: lib/cannery_web/live/range_live/index.ex:114
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr "Patronen abgefeuert"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:117
|
||||
#: lib/cannery_web/live/container_live/index.ex:125
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/components/container_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:97
|
||||
#: lib/cannery_web/live/container_live/index.ex:126
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
msgstr "Patronen:"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:158
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:110
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
@ -896,7 +897,7 @@ msgstr ""
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:91
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:108
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr "Summe aller Patronen"
|
||||
@ -906,7 +907,7 @@ msgstr "Summe aller Patronen"
|
||||
msgid "Total ever rounds:"
|
||||
msgstr "Summe abgegebener Schüsse:"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:105
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
@ -916,7 +917,7 @@ msgstr ""
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:103
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
@ -931,7 +932,7 @@ msgstr ""
|
||||
msgid "Used up!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr "Patronen abgefeuert"
|
||||
@ -1031,20 +1032,19 @@ msgstr "Leuchtspur"
|
||||
msgid "UPC:"
|
||||
msgstr "UPC"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:28
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:120
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit %{ammo_type_name}"
|
||||
msgstr "%{name} bearbeiten"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:39
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:231
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:230
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Empty"
|
||||
msgstr ""
|
||||
@ -1094,7 +1094,7 @@ msgstr ""
|
||||
msgid "Last used on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:178
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:177
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Never used"
|
||||
msgstr ""
|
||||
@ -1111,38 +1111,12 @@ msgstr ""
|
||||
msgid "Purchased on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit ammo"
|
||||
msgstr "Munitionstyp bearbeiten"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:46
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "No Ammo types"
|
||||
msgstr "Keine Munitionsarten"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:57
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:36
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search shot records"
|
||||
msgstr ""
|
||||
|
@ -23,18 +23,18 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr "Behälter muss vor dem Löschen leer sein"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr "Konnte %{name} nicht löschen: %{error}"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr "Konnte Behälter nicht finden"
|
||||
@ -83,14 +83,14 @@ msgstr "Oops, etwas ist schiefgegangen. Bitte beachten Sie den Fehler unten."
|
||||
msgid "Reset password link is invalid or it has expired."
|
||||
msgstr "Link zum Passwort zurücksetzen ist ungültig oder abgelaufen."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr "Entschuldigung, aber öffentliche Registrierung ist deaktiviert"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr ""
|
||||
@ -121,17 +121,17 @@ msgstr "Sie sind nicht berechtigt, diese Seite aufzurufen"
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr "Sie sind nicht berechtigt, diese Seite aufzurufen."
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr "hat sich nicht geändert"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr "Passwort stimmt nicht überein"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "is not valid"
|
||||
msgstr "ist nicht gültig"
|
||||
@ -141,7 +141,7 @@ msgstr "ist nicht gültig"
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr "Muss ein @ Zeichen und keine Leerzeichen haben"
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr "Tag nicht gefunden"
|
||||
@ -151,13 +151,13 @@ msgstr "Tag nicht gefunden"
|
||||
msgid "Tag could not be added"
|
||||
msgstr "Tag konnte nicht hinzugefügt werden"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr "Anzahl muss mindestens 1 sein"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr "Anzahl muss weniger als %{count} betragen"
|
||||
@ -187,17 +187,17 @@ msgstr ""
|
||||
"Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War "
|
||||
"%{multiplier}"
|
||||
|
||||
#: lib/cannery/ammo.ex:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
@ -31,11 +31,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr "%{name} erfolgreich erstellt"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} erfolgreich gelöscht"
|
||||
@ -50,8 +50,8 @@ msgstr "%{name} erfolgreich deaktiviert"
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr "%{name} erfolgreich aktiviert"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr "%{name} wurde gelöscht"
|
||||
@ -82,10 +82,10 @@ msgstr ""
|
||||
"Sind Sie sicher, dass sie %{email} löschen möchten? Dies kann nicht "
|
||||
"zurückgenommen werden!"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"
|
||||
@ -95,7 +95,7 @@ msgstr "Sind Sie sicher, dass sie %{name} löschen möchten?"
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr "Sind Sie sicher, dass sie die Einladung für %{name} löschen möchten?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -150,7 +150,7 @@ msgstr "Passwort erfolgreich zurückgesetzt."
|
||||
msgid "Password updated successfully."
|
||||
msgstr "Passwort erfolgreich geändert."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto"
|
||||
@ -188,7 +188,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr "%{name} erfolgreich hinzugefügt"
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr "%{tag_name} wurde von %{container_name} entfernt"
|
||||
@ -203,19 +203,19 @@ msgstr "Füge hinzu..."
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr "Schüsse erfolgreich dokumentiert"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr "Sind sie sicher, dass Sie diese Munition demarkieren möchten?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr "Sind sie sicher, dass sie die Schießkladde löschen möchten?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr "Schießkladde erfolgreich gelöscht"
|
||||
@ -266,13 +266,13 @@ msgstr "Möchten Sie die Sprache wechseln?"
|
||||
msgid "Language updated successfully."
|
||||
msgstr "Spracheinstellung gespeichert."
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr "Munitionsgruppe erfolgreich gelöscht"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr "Munition erfolgreich demarkiert"
|
||||
@ -289,7 +289,7 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] "Munitionsgruppe erfolgreich aktualisiert"
|
||||
msgstr[1] "Munitionsgruppe erfolgreich aktualisiert"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
|
@ -30,11 +30,10 @@ msgstr ""
|
||||
msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: lib/cannery_web/components/topbar.ex:73
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:56
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo"
|
||||
msgstr ""
|
||||
@ -50,8 +49,8 @@ msgstr ""
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
@ -61,32 +60,32 @@ msgstr ""
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -99,15 +98,15 @@ msgid "Container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:57
|
||||
#: lib/cannery_web/live/container_live/index.ex:49
|
||||
#: lib/cannery_web/live/container_live/index.ex:58
|
||||
#: lib/cannery_web/live/container_live/index.ex:44
|
||||
#: lib/cannery_web/live/container_live/index.ex:53
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -124,9 +123,9 @@ msgstr ""
|
||||
msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:24
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:27
|
||||
#: lib/cannery_web/live/container_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -142,12 +141,17 @@ msgstr ""
|
||||
msgid "Easy to Use:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:28
|
||||
#: lib/cannery_web/live/tag_live/index.ex:21
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
@ -162,14 +166,14 @@ msgstr ""
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:81
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -201,9 +205,9 @@ msgstr ""
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:69
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||
#: lib/cannery_web/live/container_live/index.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Location"
|
||||
msgstr ""
|
||||
@ -219,8 +223,8 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -235,24 +239,24 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:45
|
||||
#: lib/cannery_web/components/container_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/container_live/index.ex:121
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:36
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:36
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:31
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
msgstr ""
|
||||
@ -262,13 +266,12 @@ msgstr ""
|
||||
msgid "New Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:36
|
||||
#: lib/cannery_web/live/tag_live/index.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
@ -279,7 +282,6 @@ msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No containers"
|
||||
msgstr ""
|
||||
@ -291,17 +293,16 @@ msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:81
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:93
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
@ -317,8 +318,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -334,8 +335,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:78
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -376,10 +377,9 @@ msgstr ""
|
||||
msgid "Stored in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:52
|
||||
#: lib/cannery_web/components/topbar.ex:49
|
||||
#: lib/cannery_web/live/tag_live/index.ex:44
|
||||
#: lib/cannery_web/live/tag_live/index.ex:54
|
||||
#: lib/cannery_web/live/container_live/index.ex:127
|
||||
#: lib/cannery_web/live/tag_live/index.ex:32
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tags"
|
||||
@ -400,15 +400,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:49
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:68
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||
#: lib/cannery_web/live/container_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -461,9 +461,9 @@ msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:45
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:94
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:36
|
||||
#: lib/cannery_web/live/range_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
@ -479,24 +479,23 @@ msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:30
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:42
|
||||
#: lib/cannery_web/live/range_live/index.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:49
|
||||
#: lib/cannery_web/live/range_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
@ -507,21 +506,20 @@ msgstr ""
|
||||
msgid "Rounds left"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/range_live/index.ex:81
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:57
|
||||
#: lib/cannery_web/live/range_live/index.ex:67
|
||||
#: lib/cannery_web/live/range_live/index.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:117
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Move ammo"
|
||||
msgstr ""
|
||||
@ -531,18 +529,18 @@ msgstr ""
|
||||
msgid "No other containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:55
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot log"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:71
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:78
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:153
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:225
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:180
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:152
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:224
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:179
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
@ -553,32 +551,32 @@ msgstr ""
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:53
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -599,18 +597,18 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -625,14 +623,14 @@ msgstr ""
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:32
|
||||
#: lib/cannery_web/live/container_live/show.ex:113
|
||||
#: lib/cannery_web/live/container_live/index.ex:27
|
||||
#: lib/cannery_web/live/container_live/show.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:69
|
||||
#: lib/cannery_web/live/container_live/show.ex:114
|
||||
#: lib/cannery_web/live/container_live/index.ex:65
|
||||
#: lib/cannery_web/live/container_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
@ -644,8 +642,8 @@ msgstr ""
|
||||
msgid "Rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:222
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:179
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:221
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
@ -696,7 +694,7 @@ msgstr ""
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:34
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
@ -707,7 +705,7 @@ msgid "Reset your password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:33
|
||||
#: lib/cannery_web/live/range_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record Shots"
|
||||
msgstr ""
|
||||
@ -717,6 +715,11 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
@ -771,8 +774,6 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
@ -831,45 +832,45 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:105
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:193
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:192
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{percentage}%"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:136
|
||||
#: lib/cannery_web/live/range_live/index.ex:114
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:117
|
||||
#: lib/cannery_web/live/container_live/index.ex:125
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/components/container_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:97
|
||||
#: lib/cannery_web/live/container_live/index.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:158
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:110
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
@ -879,7 +880,7 @@ msgstr ""
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:91
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:108
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
@ -889,7 +890,7 @@ msgstr ""
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:105
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
@ -899,7 +900,7 @@ msgstr ""
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:103
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
@ -914,7 +915,7 @@ msgstr ""
|
||||
msgid "Used up!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
@ -1014,20 +1015,19 @@ msgstr ""
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:28
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:120
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{ammo_type_name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:39
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:231
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:230
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Empty"
|
||||
msgstr ""
|
||||
@ -1077,7 +1077,7 @@ msgstr ""
|
||||
msgid "Last used on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:178
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:177
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Never used"
|
||||
msgstr ""
|
||||
@ -1094,38 +1094,12 @@ msgstr ""
|
||||
msgid "Purchased on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:57
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:36
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search shot records"
|
||||
msgstr ""
|
||||
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Language: en\n"
|
||||
"Plural-Forms: nplurals=2\n"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -157,9 +157,9 @@ msgstr ""
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
@ -235,13 +235,13 @@ msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
|
@ -31,11 +31,10 @@ msgstr ""
|
||||
msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: lib/cannery_web/components/topbar.ex:73
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:56
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo"
|
||||
msgstr ""
|
||||
@ -51,8 +50,8 @@ msgstr ""
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
@ -62,32 +61,32 @@ msgstr ""
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -100,15 +99,15 @@ msgid "Container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:57
|
||||
#: lib/cannery_web/live/container_live/index.ex:49
|
||||
#: lib/cannery_web/live/container_live/index.ex:58
|
||||
#: lib/cannery_web/live/container_live/index.ex:44
|
||||
#: lib/cannery_web/live/container_live/index.ex:53
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -125,9 +124,9 @@ msgstr ""
|
||||
msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:24
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:27
|
||||
#: lib/cannery_web/live/container_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -143,12 +142,17 @@ msgstr ""
|
||||
msgid "Easy to Use:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:28
|
||||
#: lib/cannery_web/live/tag_live/index.ex:21
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
@ -163,14 +167,14 @@ msgstr ""
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:81
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -202,9 +206,9 @@ msgstr ""
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:69
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||
#: lib/cannery_web/live/container_live/index.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Location"
|
||||
msgstr ""
|
||||
@ -220,8 +224,8 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -236,24 +240,24 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:45
|
||||
#: lib/cannery_web/components/container_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/container_live/index.ex:121
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:36
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:36
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:31
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
msgstr ""
|
||||
@ -263,13 +267,12 @@ msgstr ""
|
||||
msgid "New Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:36
|
||||
#: lib/cannery_web/live/tag_live/index.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
@ -280,7 +283,6 @@ msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No containers"
|
||||
msgstr ""
|
||||
@ -292,17 +294,16 @@ msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:81
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:93
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
@ -318,8 +319,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -335,8 +336,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:78
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -377,10 +378,9 @@ msgstr ""
|
||||
msgid "Stored in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:52
|
||||
#: lib/cannery_web/components/topbar.ex:49
|
||||
#: lib/cannery_web/live/tag_live/index.ex:44
|
||||
#: lib/cannery_web/live/tag_live/index.ex:54
|
||||
#: lib/cannery_web/live/container_live/index.ex:127
|
||||
#: lib/cannery_web/live/tag_live/index.ex:32
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tags"
|
||||
@ -401,15 +401,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:49
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:68
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||
#: lib/cannery_web/live/container_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -462,9 +462,9 @@ msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:45
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:94
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:36
|
||||
#: lib/cannery_web/live/range_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
@ -480,24 +480,23 @@ msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:30
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:42
|
||||
#: lib/cannery_web/live/range_live/index.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:49
|
||||
#: lib/cannery_web/live/range_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
@ -508,21 +507,20 @@ msgstr ""
|
||||
msgid "Rounds left"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/range_live/index.ex:81
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:57
|
||||
#: lib/cannery_web/live/range_live/index.ex:67
|
||||
#: lib/cannery_web/live/range_live/index.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:117
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Move ammo"
|
||||
msgstr ""
|
||||
@ -532,18 +530,18 @@ msgstr ""
|
||||
msgid "No other containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:55
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot log"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:71
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:78
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:153
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:225
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:180
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:152
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:224
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:179
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
@ -554,32 +552,32 @@ msgstr ""
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:53
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -600,18 +598,18 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -626,14 +624,14 @@ msgstr ""
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:32
|
||||
#: lib/cannery_web/live/container_live/show.ex:113
|
||||
#: lib/cannery_web/live/container_live/index.ex:27
|
||||
#: lib/cannery_web/live/container_live/show.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:69
|
||||
#: lib/cannery_web/live/container_live/show.ex:114
|
||||
#: lib/cannery_web/live/container_live/index.ex:65
|
||||
#: lib/cannery_web/live/container_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
@ -645,8 +643,8 @@ msgstr ""
|
||||
msgid "Rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:222
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:179
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:221
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
@ -697,7 +695,7 @@ msgstr ""
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:34
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
@ -708,7 +706,7 @@ msgid "Reset your password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:33
|
||||
#: lib/cannery_web/live/range_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Record Shots"
|
||||
msgstr ""
|
||||
@ -718,6 +716,11 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:40
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
@ -772,8 +775,6 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
@ -832,45 +833,45 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:105
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:193
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:192
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{percentage}%"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:136
|
||||
#: lib/cannery_web/live/range_live/index.ex:114
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:117
|
||||
#: lib/cannery_web/live/container_live/index.ex:125
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/components/container_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:97
|
||||
#: lib/cannery_web/live/container_live/index.ex:126
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:158
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:110
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
@ -880,7 +881,7 @@ msgstr ""
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:91
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:108
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
@ -890,7 +891,7 @@ msgstr ""
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:105
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
@ -900,7 +901,7 @@ msgstr ""
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:103
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
@ -915,7 +916,7 @@ msgstr ""
|
||||
msgid "Used up!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
@ -1015,20 +1016,19 @@ msgstr ""
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:28
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:120
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit %{ammo_type_name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:39
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:231
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:230
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Empty"
|
||||
msgstr ""
|
||||
@ -1078,7 +1078,7 @@ msgstr ""
|
||||
msgid "Last used on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:178
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:177
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Never used"
|
||||
msgstr ""
|
||||
@ -1095,38 +1095,12 @@ msgstr ""
|
||||
msgid "Purchased on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:46
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "No Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:57
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:36
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search shot records"
|
||||
msgstr ""
|
||||
|
@ -10,18 +10,18 @@ msgid ""
|
||||
msgstr ""
|
||||
"Language: en\n"
|
||||
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr ""
|
||||
@ -70,14 +70,14 @@ msgstr ""
|
||||
msgid "Reset password link is invalid or it has expired."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr ""
|
||||
@ -107,18 +107,18 @@ msgstr ""
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr ""
|
||||
|
||||
## From Ecto.Changeset.put_change/3
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "is not valid"
|
||||
msgstr ""
|
||||
@ -128,7 +128,7 @@ msgstr ""
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr ""
|
||||
@ -138,13 +138,13 @@ msgstr ""
|
||||
msgid "Tag could not be added"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr ""
|
||||
@ -170,17 +170,17 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
@ -19,11 +19,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -38,8 +38,8 @@ msgstr ""
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr ""
|
||||
@ -68,10 +68,10 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr ""
|
||||
@ -81,7 +81,7 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -132,7 +132,7 @@ msgstr ""
|
||||
msgid "Password updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
@ -168,7 +168,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr ""
|
||||
@ -183,19 +183,19 @@ msgstr ""
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr ""
|
||||
@ -246,13 +246,13 @@ msgstr ""
|
||||
msgid "Language updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr ""
|
||||
@ -269,7 +269,7 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
|
@ -10,18 +10,18 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr ""
|
||||
@ -70,14 +70,14 @@ msgstr ""
|
||||
msgid "Reset password link is invalid or it has expired."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr ""
|
||||
@ -107,17 +107,17 @@ msgstr ""
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "is not valid"
|
||||
msgstr ""
|
||||
@ -127,7 +127,7 @@ msgstr ""
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr ""
|
||||
@ -137,13 +137,13 @@ msgstr ""
|
||||
msgid "Tag could not be added"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr ""
|
||||
@ -169,17 +169,17 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
@ -3,7 +3,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-05-21 19:45+0000\n"
|
||||
"PO-Revision-Date: 2022-11-30 19:19+0000\n"
|
||||
"PO-Revision-Date: 2022-11-13 21:49+0000\n"
|
||||
"Last-Translator: Brea Foga <breaardiente@gmail.com>\n"
|
||||
"Language-Team: Spanish <https://weblate.bubbletea.dev/projects/cannery/"
|
||||
"actions/es/>\n"
|
||||
@ -23,8 +23,8 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -169,9 +169,9 @@ msgstr "Preparar munición"
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr "¿Por qué no preparar parte para disparar?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr "Tiros récord"
|
||||
@ -244,21 +244,21 @@ msgstr "Mover munición"
|
||||
#: lib/cannery_web/live/invite_live/index.html.heex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Set Unlimited"
|
||||
msgstr "Activar ilimitados"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr "Preparar para el campo de tiro"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr "Desmontar del campo de tiro"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:148
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Export Data as JSON"
|
||||
msgstr "Exportar datos como JSON"
|
||||
msgstr ""
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-05-21 19:44+0000\n"
|
||||
"PO-Revision-Date: 2022-11-30 19:19+0000\n"
|
||||
"Last-Translator: Hannah Winter <konhat@hotmail.es>\n"
|
||||
"PO-Revision-Date: 2022-05-22 22:52+0000\n"
|
||||
"Last-Translator: Ed <ed.ylles1997@gmail.com>\n"
|
||||
"Language-Team: Spanish <https://weblate.bubbletea.dev/projects/cannery/"
|
||||
"emails/es/>\n"
|
||||
"Language: es\n"
|
||||
@ -12,7 +12,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.14.2\n"
|
||||
"X-Generator: Weblate 4.12.2\n"
|
||||
|
||||
## This file is a PO Template file.
|
||||
##
|
||||
@ -41,23 +41,23 @@ msgstr "Hola %{email},"
|
||||
#: lib/cannery_web/templates/email/confirm_email.txt.eex:10
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "If you didn't create an account at %{url}, please ignore this."
|
||||
msgstr "Si no creó un usuario en %{url}, por favor, ignore este mensaje."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/templates/email/reset_password.txt.eex:8
|
||||
#: lib/cannery_web/templates/email/update_email.txt.eex:8
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "If you didn't request this change from %{url}, please ignore this."
|
||||
msgstr "Si no pidió este cambio desde %{url}, por favor, ignore este mensaje."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/email.ex:37
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Reset your %{name} password"
|
||||
msgstr "Reseteé su contraseña en %{name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/email.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Update your %{name} email"
|
||||
msgstr "Actualice su correo en &{url}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/templates/email/confirm_email.html.eex:9
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -95,26 +95,20 @@ msgstr ""
|
||||
#: lib/cannery_web/templates/email/confirm_email.html.eex:22
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "If you didn't create an account at %{name}, please ignore this."
|
||||
msgstr "Si no ha creado una cuenta en %{name}, por favor, ignore este mensaje."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/templates/email/reset_password.html.eex:16
|
||||
#: lib/cannery_web/templates/email/update_email.html.eex:16
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "If you didn't request this change from %{name}, please ignore this."
|
||||
msgstr ""
|
||||
"Si no ha solicitado este cambio desde %{name}, por favor, ignore este "
|
||||
"mensaje."
|
||||
|
||||
#: lib/cannery_web/templates/layout/email.txt.eex:9
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "This email was sent from %{name} at %{url}, the self-hosted firearm tracker website."
|
||||
msgstr ""
|
||||
"Este correo se mandó por %{name} desde %{url}, la página de seguimiento de "
|
||||
"armas autogestionada."
|
||||
|
||||
#: lib/cannery_web/templates/layout/email.html.heex:13
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "This email was sent from %{name}, the self-hosted firearm tracker website."
|
||||
msgstr ""
|
||||
"Este correo se mandó por %{name}, la página de seguimiento de armas "
|
||||
"autogestionada."
|
||||
|
@ -3,7 +3,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-05-21 19:44+0000\n"
|
||||
"PO-Revision-Date: 2022-12-01 19:21+0000\n"
|
||||
"PO-Revision-Date: 2022-11-13 21:49+0000\n"
|
||||
"Last-Translator: Brea Foga <breaardiente@gmail.com>\n"
|
||||
"Language-Team: Spanish <https://weblate.bubbletea.dev/projects/cannery/"
|
||||
"errors/es/>\n"
|
||||
@ -23,18 +23,18 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr "El contenedor debe estar vacío antes de ser borrado"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr "No se pudo eliminar %{name}: %{error}"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr "No se pudo encontrar el contenedor"
|
||||
@ -86,22 +86,22 @@ msgid "Reset password link is invalid or it has expired."
|
||||
msgstr ""
|
||||
"El enlace de reestablecimiento de la contraseña es inválido o ha caducado."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr "Lo sentimos, el registro público no está habilitado"
|
||||
msgstr "Lo sentimos, la inscripción pública está desactivada"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr "Lo sentimos, esta invitación no es válida o ha caducado"
|
||||
msgstr "Lo sentimos, esta invitación no fue encontrada o ha expirado"
|
||||
|
||||
#: lib/cannery_web/controllers/user_settings_controller.ex:99
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unable to delete user"
|
||||
msgstr "No se ha podido eliminar el usuario"
|
||||
msgstr "No se pudo borrar el usuario"
|
||||
|
||||
#: lib/cannery_web/views/error_view.ex:10
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -111,7 +111,7 @@ msgstr "No autorizado"
|
||||
#: lib/cannery_web/controllers/user_confirmation_controller.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "User confirmation link is invalid or it has expired."
|
||||
msgstr "El enlace de confirmación de usuario no es válido o ha caducado."
|
||||
msgstr "El enlace de confirmación es inválido o ha expirado."
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:18
|
||||
#, elixir-autogen, elixir-format
|
||||
@ -123,17 +123,17 @@ msgstr "No está autorizado a ver esta página"
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr "No está autorizado a ver esta página."
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr "no cambió"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr "no coincide con la contraseña"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "is not valid"
|
||||
msgstr "no es válido"
|
||||
@ -143,7 +143,7 @@ msgstr "no es válido"
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr "debe tener el signo @ y no contener espacios"
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr "Etiqueta no encontrada"
|
||||
@ -151,15 +151,15 @@ msgstr "Etiqueta no encontrada"
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag could not be added"
|
||||
msgstr "No se ha podido añadir la etiqueta"
|
||||
msgstr "La etiqueta no pudo ser añadida"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr "El recuento debe dar al menos 1"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr "El recuento debe ser menos de %{count}"
|
||||
@ -178,29 +178,29 @@ msgstr "La etiqueta no pudo ser eliminada"
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.ex:157
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not parse number of copies"
|
||||
msgstr "No se ha podido procesar el número de copias"
|
||||
msgstr "No se pudo analizar el número de copias"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.ex:142
|
||||
#, 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:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr "Multiplicador inválido"
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr "Por favor escoja un tipo de munición y un contenedor"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr "Su navegador no es compatible con el elemento lienzo."
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Please select a valid user and ammo pack"
|
||||
msgstr "Por favor escoja un usuario y tipo de munición valido"
|
||||
msgstr ""
|
||||
|
@ -3,8 +3,8 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-05-21 19:44+0000\n"
|
||||
"PO-Revision-Date: 2022-11-30 19:19+0000\n"
|
||||
"Last-Translator: Brea Foga <breaardiente@gmail.com>\n"
|
||||
"PO-Revision-Date: 2022-06-06 19:05+0000\n"
|
||||
"Last-Translator: Ed <ed.ylles1997@gmail.com>\n"
|
||||
"Language-Team: Spanish <https://weblate.bubbletea.dev/projects/cannery/"
|
||||
"prompts/es/>\n"
|
||||
"Language: es\n"
|
||||
@ -12,7 +12,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.14.2\n"
|
||||
"X-Generator: Weblate 4.12.2\n"
|
||||
|
||||
## This file is a PO Template file.
|
||||
##
|
||||
@ -31,11 +31,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr "%{name} creado exitosamente"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} borrado exitosamente"
|
||||
@ -50,8 +50,8 @@ msgstr "%{name} desactivado exitosamente"
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr "%{name} activado exitosamente"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr "%{name} ha sido borrado"
|
||||
@ -82,10 +82,10 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr "Está seguro que desea eliminar %{email}? Esta acción es permanente!"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr "Está seguro que desea eliminar %{name}?"
|
||||
@ -95,7 +95,7 @@ msgstr "Está seguro que desea eliminar %{name}?"
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr "Está seguro que quiere eliminar la invitación para %{name}?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -150,7 +150,7 @@ msgstr "Contraseña reiniciada exitosamente."
|
||||
msgid "Password updated successfully."
|
||||
msgstr "Contraseña cambiada exitosamente."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr "Por favor chequea el correo para verificar tu cuenta"
|
||||
@ -187,7 +187,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr "%{name} añadido exitosamente"
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr "se ha removido %{tag_name} de %{container_name}"
|
||||
@ -202,96 +202,94 @@ msgstr "Añadiendo..."
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr "Tiros registrados exitosamente"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr "Está seguro que desea desmontar esta munición?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr "¿Está segure que quiere borrar este récord de disparos?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr "Récord de disparos borrado exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/form_component.ex:55
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records updated successfully"
|
||||
msgstr "Récord de disparos actualizado exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_confirmation_controller.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{email} confirmed successfully."
|
||||
msgstr "%{email} confirmado exitosamente."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo moved to %{name} successfully"
|
||||
msgstr "Munición movida a %{name} exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:121
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Copied to clipboard"
|
||||
msgstr "Copiado al portapapeles"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.ex:58
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} removed successfully"
|
||||
msgstr "%{name} eliminado exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:17
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "You'll need to"
|
||||
msgstr "Necesitará hacerlo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Creating..."
|
||||
msgstr "Creando..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/templates/user_settings/edit.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to change your language?"
|
||||
msgstr "¿Está segure de que quiere cambiar el idioma?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_settings_controller.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Language updated successfully."
|
||||
msgstr "Idioma cambiado exitosamente."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr "Munición borrada exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr "Munición descargada exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.ex:118
|
||||
#, elixir-autogen, elixir-format
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo updated successfully"
|
||||
msgstr "Munición actualizada exitosamente"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.ex:178
|
||||
#, elixir-autogen, elixir-format
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo added successfully"
|
||||
msgid_plural "Ammo added successfully"
|
||||
msgstr[0] "Munición añadida exitosamente"
|
||||
msgstr[1] "Municiones añadidas exitosamente"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
msgstr ""
|
||||
"¿Está seguro de que quiere borrar %{name}? ¡Esto también borrará todos los "
|
||||
"tipos de munición %{name}!"
|
||||
|
@ -23,8 +23,8 @@ msgstr ""
|
||||
# # Run "mix gettext.extract" to bring this file up to
|
||||
# # date. Leave "msgstr"s empty as changing them here has no
|
||||
# # effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -169,9 +169,9 @@ msgstr "Munition préparée"
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr "Pourquoi pas en préparer pour tirer ?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr "Enregistrer des tirs"
|
||||
@ -247,13 +247,13 @@ msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
|
@ -45,11 +45,10 @@ msgstr "Administrateur·ices"
|
||||
msgid "Admins:"
|
||||
msgstr "Administrateur·ices :"
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: lib/cannery_web/components/topbar.ex:73
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:56
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo"
|
||||
msgstr "Munition"
|
||||
@ -65,8 +64,8 @@ msgstr "Type de munition"
|
||||
msgid "Background color"
|
||||
msgstr "Couleur de fond"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr "Vide"
|
||||
@ -76,32 +75,32 @@ msgstr "Vide"
|
||||
msgid "Brass"
|
||||
msgstr "Cuivre"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr "Noyau de balle"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr "Type de balle"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr "Calibre"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr "Cartouche"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr "Matériau de la caisse"
|
||||
@ -114,15 +113,15 @@ msgid "Container"
|
||||
msgstr "Conteneur"
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:57
|
||||
#: lib/cannery_web/live/container_live/index.ex:49
|
||||
#: lib/cannery_web/live/container_live/index.ex:58
|
||||
#: lib/cannery_web/live/container_live/index.ex:44
|
||||
#: lib/cannery_web/live/container_live/index.ex:53
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Containers"
|
||||
msgstr "Conteneurs"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr "Corrosive"
|
||||
@ -139,9 +138,9 @@ msgstr "Quantité"
|
||||
msgid "Count:"
|
||||
msgstr "Quantité :"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:24
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:27
|
||||
#: lib/cannery_web/live/container_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
@ -157,12 +156,17 @@ msgstr "Description :"
|
||||
msgid "Easy to Use:"
|
||||
msgstr "Simple à utiliser :"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Ammo type"
|
||||
msgstr "Éditer le type de munition"
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Invite"
|
||||
msgstr "Modifier l’invitation"
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:28
|
||||
#: lib/cannery_web/live/tag_live/index.ex:21
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Tag"
|
||||
msgstr "Modifier le tag"
|
||||
@ -177,14 +181,14 @@ msgstr "Exemple d’abréviations de type de balle"
|
||||
msgid "FMJ"
|
||||
msgstr "FMJ"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr "Graines"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:81
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr "Incendiaire"
|
||||
@ -216,9 +220,9 @@ msgstr "Invitations"
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr "Me garder authentifié durant 60 jours"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:69
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||
#: lib/cannery_web/live/container_live/index.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Location"
|
||||
msgstr "Localisation"
|
||||
@ -234,8 +238,8 @@ msgstr "Localisation :"
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr "Chargeur, lame-chargeur, boite de munition, etc."
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr "Fabricant"
|
||||
@ -250,24 +254,24 @@ msgstr "Boite de munition avec le sticker de fille d’animation"
|
||||
msgid "My cool ammo can"
|
||||
msgstr "Ma superbe boite de munition"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:45
|
||||
#: lib/cannery_web/components/container_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/container_live/index.ex:121
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:36
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Ammo type"
|
||||
msgstr "Nouveau type de munition"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:36
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:31
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
msgstr "Nouveau conteneur"
|
||||
@ -277,13 +281,12 @@ msgstr "Nouveau conteneur"
|
||||
msgid "New Invite"
|
||||
msgstr "Nouvelle invitation"
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:36
|
||||
#: lib/cannery_web/live/tag_live/index.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Tag"
|
||||
msgstr "Nouveau tag"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo"
|
||||
msgstr "Aucune munition"
|
||||
@ -294,7 +297,6 @@ msgid "No ammo for this type"
|
||||
msgstr "Aucune munition pour ce type"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No containers"
|
||||
msgstr "Aucun conteneur"
|
||||
@ -306,17 +308,16 @@ msgstr "Aucune invitation"
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No tags"
|
||||
msgstr "Aucun tag"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:81
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:93
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
@ -332,8 +333,8 @@ msgstr "Notes :"
|
||||
msgid "On the bookshelf"
|
||||
msgstr "Sur l’étagère"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr "Pression"
|
||||
@ -349,8 +350,8 @@ msgstr "Prix payé"
|
||||
msgid "Price paid:"
|
||||
msgstr "Prix payé :"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:78
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr "Type d’amorce"
|
||||
@ -393,10 +394,9 @@ msgstr "Acier"
|
||||
msgid "Stored in"
|
||||
msgstr "Est stocké dans"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:52
|
||||
#: lib/cannery_web/components/topbar.ex:49
|
||||
#: lib/cannery_web/live/tag_live/index.ex:44
|
||||
#: lib/cannery_web/live/tag_live/index.ex:54
|
||||
#: lib/cannery_web/live/container_live/index.ex:127
|
||||
#: lib/cannery_web/live/tag_live/index.ex:32
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tags"
|
||||
@ -419,15 +419,15 @@ msgstr "Couleur du texte"
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr "Le site web de suivi d’arme à feux auto-hébergé"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr "Traceuse"
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:49
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:68
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||
#: lib/cannery_web/live/container_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr "Type"
|
||||
@ -480,9 +480,9 @@ msgid "Range day"
|
||||
msgstr "Journée de stand"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:45
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:94
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:36
|
||||
#: lib/cannery_web/live/range_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Date"
|
||||
msgstr "Date"
|
||||
@ -498,24 +498,23 @@ msgid "No ammo staged"
|
||||
msgstr "Aucune munition sélectionnée"
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:30
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr "Tirs enregistrés"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:42
|
||||
#: lib/cannery_web/live/range_live/index.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Shot Records"
|
||||
msgstr "Modifier les enregistrements de tir"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:49
|
||||
#: lib/cannery_web/live/range_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
msgstr "Nouveaux enregistrements de tir"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No shots recorded"
|
||||
msgstr "Aucun tir enregistré"
|
||||
@ -526,21 +525,20 @@ msgstr "Aucun tir enregistré"
|
||||
msgid "Rounds left"
|
||||
msgstr "Cartouches restantes"
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/range_live/index.ex:81
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot"
|
||||
msgstr "Cartouches tirées"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:57
|
||||
#: lib/cannery_web/live/range_live/index.ex:67
|
||||
#: lib/cannery_web/live/range_live/index.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot Records"
|
||||
msgstr "Enregistrements de tir"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:117
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Move ammo"
|
||||
msgstr "Déplacer munition"
|
||||
@ -550,18 +548,18 @@ msgstr "Déplacer munition"
|
||||
msgid "No other containers"
|
||||
msgstr "Aucun autre conteneur"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:55
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot log"
|
||||
msgstr "Évènements de tir"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:71
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:78
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:153
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:225
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:180
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:152
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:224
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:179
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
@ -572,32 +570,32 @@ msgstr "%{amount} $"
|
||||
msgid "Bimetal"
|
||||
msgstr "Bi-métal"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr "Type de douille"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr "Vélocité du canon"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr "Graines de poudre par charge"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:53
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr "Type de poudre"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr "UPC"
|
||||
@ -618,18 +616,18 @@ msgstr "Mot de passe actuel"
|
||||
msgid "New password"
|
||||
msgstr "Nouveau mot de passe"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
msgstr "Sélectionné"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage"
|
||||
msgstr "Désélectionner"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr "Type d’allumage"
|
||||
@ -644,14 +642,14 @@ msgstr "Reconnexion en cours…"
|
||||
msgid "Loading..."
|
||||
msgstr "Chargement en cours…"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:32
|
||||
#: lib/cannery_web/live/container_live/show.ex:113
|
||||
#: lib/cannery_web/live/container_live/index.ex:27
|
||||
#: lib/cannery_web/live/container_live/show.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name}"
|
||||
msgstr "Éditer %{name}"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:69
|
||||
#: lib/cannery_web/live/container_live/show.ex:114
|
||||
#: lib/cannery_web/live/container_live/index.ex:65
|
||||
#: lib/cannery_web/live/container_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr "Éditer les tags de %{name}"
|
||||
@ -663,8 +661,8 @@ msgstr "Éditer les tags de %{name}"
|
||||
msgid "Rounds:"
|
||||
msgstr "Cartouches :"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:222
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:179
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:221
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
@ -715,7 +713,7 @@ msgstr "Mot de passe oublié ?"
|
||||
msgid "Log in"
|
||||
msgstr "Se connecter"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:34
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Register"
|
||||
msgstr "S’enregistrer"
|
||||
@ -726,7 +724,7 @@ msgid "Reset your password"
|
||||
msgstr "Réinitialiser votre mot de passe"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:33
|
||||
#: lib/cannery_web/live/range_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record Shots"
|
||||
msgstr "Enregistrer des tirs"
|
||||
@ -736,6 +734,11 @@ msgstr "Enregistrer des tirs"
|
||||
msgid "Copies"
|
||||
msgstr "Exemplaires"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo types"
|
||||
msgstr "Types de munition"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
@ -790,8 +793,6 @@ msgid "View the source code"
|
||||
msgstr "Voir le code source"
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
@ -851,45 +852,45 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
msgstr "Conteneur"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:105
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:193
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:192
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{percentage}%"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:136
|
||||
#: lib/cannery_web/live/range_live/index.ex:114
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr "Cartouches tirées"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:117
|
||||
#: lib/cannery_web/live/container_live/index.ex:125
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr "Packages :"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/components/container_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:97
|
||||
#: lib/cannery_web/live/container_live/index.ex:126
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
msgstr "Cartouches :"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:158
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:110
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
@ -899,7 +900,7 @@ msgstr ""
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:91
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:108
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr "Quantité de cartouches"
|
||||
@ -909,7 +910,7 @@ msgstr "Quantité de cartouches"
|
||||
msgid "Total ever rounds:"
|
||||
msgstr "Nombre totale de cartouches tirées :"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:105
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
@ -919,7 +920,7 @@ msgstr ""
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:103
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
@ -934,7 +935,7 @@ msgstr ""
|
||||
msgid "Used up!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr "Cartouches tirées"
|
||||
@ -1034,20 +1035,19 @@ msgstr "Traceuse"
|
||||
msgid "UPC:"
|
||||
msgstr "UPC"
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:28
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:120
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit %{ammo_type_name}"
|
||||
msgstr "Éditer %{name}"
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:39
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:231
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:230
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Empty"
|
||||
msgstr ""
|
||||
@ -1097,7 +1097,7 @@ msgstr ""
|
||||
msgid "Last used on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:178
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:177
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Never used"
|
||||
msgstr ""
|
||||
@ -1114,38 +1114,12 @@ msgstr ""
|
||||
msgid "Purchased on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit ammo"
|
||||
msgstr "Éditer le type de munition"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:46
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "No Ammo types"
|
||||
msgstr "Aucun type de munition"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:57
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:36
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search shot records"
|
||||
msgstr ""
|
||||
|
@ -23,18 +23,18 @@ msgstr ""
|
||||
# # Run "mix gettext.extract" to bring this file up to
|
||||
# # date. Leave "msgstr"s empty as changing them here has no
|
||||
# # effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr "Le conteneur doit être vide pour être supprimé"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr "Impossible de supprimer %{name} : %{error}"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr "Impossible de trouver ce conteneur"
|
||||
@ -85,14 +85,14 @@ msgstr ""
|
||||
msgid "Reset password link is invalid or it has expired."
|
||||
msgstr "Le lien de réinitialisation de mot de passe est invalide ou expiré."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr "Désolé, l’enregistrement public est désactivé"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr "Désolé, cette invitation n’est pas trouvée ou est expirée"
|
||||
@ -122,17 +122,17 @@ msgstr "Vous n’êtes pas autorisé·e à voir cette page"
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr "Vous n’êtes pas autorisé·e à voir cette page."
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr "est inchangé"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr "le mot de passe ne correspond pas"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "is not valid"
|
||||
msgstr "n’est pas valide"
|
||||
@ -142,7 +142,7 @@ msgstr "n’est pas valide"
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr "doit contenir le symbole @ et aucune espace"
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr "Tag pas trouvé"
|
||||
@ -152,13 +152,13 @@ msgstr "Tag pas trouvé"
|
||||
msgid "Tag could not be added"
|
||||
msgstr "Le tag n’a pas pu être ajouté"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr "Le nombre doit être au moins égal à 1"
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr "La quantité doit être inférieur à %{count}"
|
||||
@ -186,17 +186,17 @@ msgstr "Impossible d'analyser le nombre de copies"
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr "Nombre de copies invalide, doit être 1 et %{max}. Été %{multiplier}"
|
||||
|
||||
#: lib/cannery/ammo.ex:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr "Multiplicateur invalide"
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr "Veuillez choisir un type de munitions et un conteneur"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
@ -31,11 +31,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr "%{name} créé· avec succès"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr "%{name} supprimé· avec succès"
|
||||
@ -50,8 +50,8 @@ msgstr "%{name} supprimé·e avec succès"
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr "%{name} activé·e avec succès"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr "%{name} a été supprimé·e"
|
||||
@ -83,10 +83,10 @@ msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
"Êtes-vous certain·e de supprimer %{email} ? Cette action est définitive !"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr "Êtes-vous certain·e de supprimer %{name} ?"
|
||||
@ -96,7 +96,7 @@ msgstr "Êtes-vous certain·e de supprimer %{name} ?"
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr "Êtes-vous certain·e de supprimer l’invitation pour %{name} ?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -151,7 +151,7 @@ msgstr "Mot de passe réinitialiser avec succès."
|
||||
msgid "Password updated successfully."
|
||||
msgstr "Mot de passe mis à jour avec succès."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr "Veuillez vérifier votre mél pour confirmer votre compte"
|
||||
@ -189,7 +189,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr "%{name} a été ajouté avec succès"
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr "%{tag_name} a été retiré de %{container_name}"
|
||||
@ -204,19 +204,19 @@ msgstr "Ajout en cours…"
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr "Tirs enregistré avec succès"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr "Êtes-vous certain·e de vouloir désélectionner cette munition ?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr "Êtes-vous certain·e de vouloir supprimer cet enregistrement de tir ?"
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr "Enregistrements de tir supprimés avec succès"
|
||||
@ -267,13 +267,13 @@ msgstr "Êtes-vous certain·e de vouloir changer votre langue ?"
|
||||
msgid "Language updated successfully."
|
||||
msgstr "Langue mise à jour avec succès."
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr "Groupe de munition supprimé avec succès"
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr "Groupe de munition désélectionner avec succès"
|
||||
@ -290,7 +290,7 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] "Groupe de munition mis à jour avec succès"
|
||||
msgstr[1] "Groupe de munition mis à jour avec succès"
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
|
@ -21,8 +21,8 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:54
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:50
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Add Ammo"
|
||||
@ -167,9 +167,9 @@ msgstr ""
|
||||
msgid "Why not get some ready to shoot?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:100
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:101
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
@ -245,13 +245,13 @@ msgid "Set Unlimited"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:86
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:32
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage for range"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:85
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:31
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:30
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage from range"
|
||||
msgstr ""
|
||||
|
@ -41,11 +41,10 @@ msgstr ""
|
||||
msgid "Admins:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:41
|
||||
#: lib/cannery_web/components/topbar.ex:73
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:70
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:79
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:56
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo"
|
||||
msgstr ""
|
||||
@ -61,8 +60,8 @@ msgstr ""
|
||||
msgid "Background color"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:140
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Blank"
|
||||
msgstr ""
|
||||
@ -72,32 +71,32 @@ msgstr ""
|
||||
msgid "Brass"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:64
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet core"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:63
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Bullet type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:49
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:58
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:66
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Caliber"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:65
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cartridge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Case material"
|
||||
msgstr ""
|
||||
@ -110,15 +109,15 @@ msgid "Container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:57
|
||||
#: lib/cannery_web/live/container_live/index.ex:49
|
||||
#: lib/cannery_web/live/container_live/index.ex:58
|
||||
#: lib/cannery_web/live/container_live/index.ex:44
|
||||
#: lib/cannery_web/live/container_live/index.ex:53
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:66
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:144
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Corrosive"
|
||||
msgstr ""
|
||||
@ -135,9 +134,9 @@ msgstr ""
|
||||
msgid "Count:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:24
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:27
|
||||
#: lib/cannery_web/live/container_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
@ -153,12 +152,17 @@ msgstr ""
|
||||
msgid "Easy to Use:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/invite_live/index.ex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:28
|
||||
#: lib/cannery_web/live/tag_live/index.ex:21
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Tag"
|
||||
msgstr ""
|
||||
@ -173,14 +177,14 @@ msgstr ""
|
||||
msgid "FMJ"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:59
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:103
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Grains"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:64
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:136
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:81
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Incendiary"
|
||||
msgstr ""
|
||||
@ -212,9 +216,9 @@ msgstr ""
|
||||
msgid "Keep me logged in for 60 days"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:48
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:69
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:42
|
||||
#: lib/cannery_web/live/container_live/index.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Location"
|
||||
msgstr ""
|
||||
@ -230,8 +234,8 @@ msgstr ""
|
||||
msgid "Magazine, Clip, Ammo Box, etc"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:67
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:148
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:84
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
@ -246,24 +250,24 @@ msgstr ""
|
||||
msgid "My cool ammo can"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:45
|
||||
#: lib/cannery_web/components/container_table_component.ex:46
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/container_live/index.ex:121
|
||||
#: lib/cannery_web/live/invite_live/form_component.html.heex:20
|
||||
#: lib/cannery_web/live/tag_live/form_component.ex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:36
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:29
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Ammo type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:36
|
||||
#: lib/cannery_web/live/container_live/index.ex:43
|
||||
#: lib/cannery_web/live/container_live/index.ex:31
|
||||
#: lib/cannery_web/live/container_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Container"
|
||||
msgstr ""
|
||||
@ -273,13 +277,12 @@ msgstr ""
|
||||
msgid "New Invite"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.ex:36
|
||||
#: lib/cannery_web/live/tag_live/index.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Tag"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No Ammo"
|
||||
msgstr ""
|
||||
@ -290,7 +293,6 @@ msgid "No ammo for this type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No containers"
|
||||
msgstr ""
|
||||
@ -302,17 +304,16 @@ msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/edit_tags_component.html.heex:31
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:10
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:37
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:81
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:43
|
||||
#: lib/cannery_web/live/ammo_group_live/form_component.html.heex:49
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:93
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:29
|
||||
#: lib/cannery_web/live/range_live/index.ex:82
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
@ -328,8 +329,8 @@ msgstr ""
|
||||
msgid "On the bookshelf"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:60
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:111
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Pressure"
|
||||
msgstr ""
|
||||
@ -345,8 +346,8 @@ msgstr ""
|
||||
msgid "Price paid:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:61
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:118
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:78
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Primer type"
|
||||
msgstr ""
|
||||
@ -387,10 +388,9 @@ msgstr ""
|
||||
msgid "Stored in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:52
|
||||
#: lib/cannery_web/components/topbar.ex:49
|
||||
#: lib/cannery_web/live/tag_live/index.ex:44
|
||||
#: lib/cannery_web/live/tag_live/index.ex:54
|
||||
#: lib/cannery_web/live/container_live/index.ex:127
|
||||
#: lib/cannery_web/live/tag_live/index.ex:32
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tags"
|
||||
@ -411,15 +411,15 @@ msgstr ""
|
||||
msgid "The self-hosted firearm tracker website"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:132
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:80
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tracer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/container_table_component.ex:49
|
||||
#: lib/cannery_web/components/move_ammo_group_component.ex:68
|
||||
#: lib/cannery_web/live/container_live/form_component.html.heex:35
|
||||
#: lib/cannery_web/live/container_live/index.ex:124
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@ -472,9 +472,9 @@ msgid "Range day"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:45
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:44
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:94
|
||||
#: lib/cannery_web/live/range_live/form_component.html.heex:36
|
||||
#: lib/cannery_web/live/range_live/index.ex:83
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
@ -490,24 +490,23 @@ msgid "No ammo staged"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/add_shot_group_component.html.heex:3
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:30
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record shots"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:42
|
||||
#: lib/cannery_web/live/range_live/index.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:32
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:49
|
||||
#: lib/cannery_web/live/range_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:50
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:48
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No shots recorded"
|
||||
msgstr ""
|
||||
@ -518,21 +517,20 @@ msgstr ""
|
||||
msgid "Rounds left"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/shot_group_table_component.ex:42
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:92
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/range_live/index.ex:81
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:62
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Rounds shot"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:57
|
||||
#: lib/cannery_web/live/range_live/index.ex:67
|
||||
#: lib/cannery_web/live/range_live/index.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot Records"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:117
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:32
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Move ammo"
|
||||
msgstr ""
|
||||
@ -542,18 +540,18 @@ msgstr ""
|
||||
msgid "No other containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:55
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:53
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot log"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:71
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:78
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:153
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:225
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:180
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:152
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:224
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:37
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:44
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:179
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:136
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "$%{amount}"
|
||||
@ -564,32 +562,32 @@ msgstr ""
|
||||
msgid "Bimetal"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:72
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Jacket type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:79
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Muzzle velocity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:55
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder grains per charge"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:53
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:89
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:70
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Powder type"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:68
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "UPC"
|
||||
msgstr ""
|
||||
@ -610,18 +608,18 @@ msgstr ""
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Stage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:93
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:72
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Unstage"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/form_component.html.heex:125
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Firing type"
|
||||
msgstr ""
|
||||
@ -636,14 +634,14 @@ msgstr ""
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:32
|
||||
#: lib/cannery_web/live/container_live/show.ex:113
|
||||
#: lib/cannery_web/live/container_live/index.ex:27
|
||||
#: lib/cannery_web/live/container_live/show.ex:126
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:69
|
||||
#: lib/cannery_web/live/container_live/show.ex:114
|
||||
#: lib/cannery_web/live/container_live/index.ex:65
|
||||
#: lib/cannery_web/live/container_live/show.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Edit %{name} tags"
|
||||
msgstr ""
|
||||
@ -655,8 +653,8 @@ msgstr ""
|
||||
msgid "Rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:222
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:179
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:221
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:178
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cost information"
|
||||
@ -707,7 +705,7 @@ msgstr ""
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:34
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:35
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Register"
|
||||
msgstr ""
|
||||
@ -718,7 +716,7 @@ msgid "Reset your password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:41
|
||||
#: lib/cannery_web/live/range_live/index.ex:33
|
||||
#: lib/cannery_web/live/range_live/index.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record Shots"
|
||||
msgstr ""
|
||||
@ -728,6 +726,11 @@ msgstr ""
|
||||
msgid "Copies"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Added on:"
|
||||
@ -782,8 +785,6 @@ msgid "View the source code"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/topbar.ex:65
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:52
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:62
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Catalog"
|
||||
@ -842,45 +843,45 @@ msgstr ""
|
||||
msgid "Container:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:63
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:48
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:152
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:105
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Show used"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:193
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:192
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:19
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{percentage}%"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:136
|
||||
#: lib/cannery_web/live/range_live/index.ex:114
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot: %{count}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:100
|
||||
#: lib/cannery_web/components/container_table_component.ex:50
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:117
|
||||
#: lib/cannery_web/live/container_live/index.ex:125
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Packs"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:80
|
||||
#: lib/cannery_web/components/container_table_component.ex:51
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:97
|
||||
#: lib/cannery_web/live/container_live/index.ex:126
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:158
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:39
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:23
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "View as table"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:110
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:127
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Total ever packs"
|
||||
msgstr ""
|
||||
@ -890,7 +891,7 @@ msgstr ""
|
||||
msgid "Total ever packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:91
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:108
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Total ever rounds"
|
||||
msgstr ""
|
||||
@ -900,7 +901,7 @@ msgstr ""
|
||||
msgid "Total ever rounds:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:105
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:122
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Used packs"
|
||||
msgstr ""
|
||||
@ -910,7 +911,7 @@ msgstr ""
|
||||
msgid "Used packs:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:86
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:103
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Used rounds"
|
||||
msgstr ""
|
||||
@ -925,7 +926,7 @@ msgstr ""
|
||||
msgid "Used up!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:66
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:64
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Rounds shot chart"
|
||||
msgstr ""
|
||||
@ -1025,20 +1026,19 @@ msgstr ""
|
||||
msgid "UPC:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_type_table_component.ex:120
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:137
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:132
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Average CPR"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:28
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:120
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit %{ammo_type_name}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_card.ex:39
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:231
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:230
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Empty"
|
||||
msgstr ""
|
||||
@ -1088,7 +1088,7 @@ msgstr ""
|
||||
msgid "Last used on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:178
|
||||
#: lib/cannery_web/components/ammo_group_table_component.ex:177
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Never used"
|
||||
msgstr ""
|
||||
@ -1105,38 +1105,12 @@ msgstr ""
|
||||
msgid "Purchased on:"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:46
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Edit ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:8
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:46
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "No Ammo types"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search catalog"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:57
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search ammo"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:33
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search containers"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:36
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Search tags"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search shot records"
|
||||
msgstr ""
|
||||
|
@ -24,18 +24,18 @@ msgstr ""
|
||||
## Run "mix gettext.extract" to bring this file up to
|
||||
## date. Leave "msgstr"s empty as changing them here has no
|
||||
## effect: edit them in PO (.po) files instead.
|
||||
#: lib/cannery/containers.ex:179
|
||||
#: lib/cannery/containers.ex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Container must be empty before deleting"
|
||||
msgstr "Caithfidh an coimeádán a bheidh follamh roimh scriosadh"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:92
|
||||
#: lib/cannery_web/live/container_live/show.ex:73
|
||||
#: lib/cannery_web/live/container_live/index.ex:88
|
||||
#: lib/cannery_web/live/container_live/show.ex:77
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not delete %{name}: %{error}"
|
||||
msgstr "Ní feidir %{name} a scriosadh: %{error}"
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:80
|
||||
#: lib/cannery_web/live/container_live/index.ex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Could not find that container"
|
||||
msgstr "Ní feidir an coimeádán sin a fáil"
|
||||
@ -86,14 +86,14 @@ msgstr ""
|
||||
msgid "Reset password link is invalid or it has expired."
|
||||
msgstr "Tá nasc an pasfhocail a athrú neamhbailí nó as dáta."
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:24
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:55
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:25
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:56
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, public registration is disabled"
|
||||
msgstr "Tá brón orainn, tá clarú póiblí bactha"
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:14
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:45
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:15
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Sorry, this invite was not found or expired"
|
||||
msgstr "Tá brón orainn, ní feidir an cuireadh seo a fáil nó tá sé as dáta"
|
||||
@ -123,17 +123,17 @@ msgstr "Níl cead agaibh féachaint ar an leathanach seo"
|
||||
msgid "You are not authorized to view this page."
|
||||
msgstr "Níl cead agaibh féachaint ar an leathanach seo."
|
||||
|
||||
#: lib/cannery/accounts/user.ex:137
|
||||
#: lib/cannery/accounts/user.ex:138
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "did not change"
|
||||
msgstr "Níor athraigh sé"
|
||||
|
||||
#: lib/cannery/accounts/user.ex:158
|
||||
#: lib/cannery/accounts/user.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "does not match password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/accounts/user.ex:195
|
||||
#: lib/cannery/accounts/user.ex:196
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "is not valid"
|
||||
msgstr ""
|
||||
@ -143,7 +143,7 @@ msgstr ""
|
||||
msgid "must have the @ sign and no spaces"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/tags.ex:66
|
||||
#: lib/cannery/tags.ex:40
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Tag not found"
|
||||
msgstr ""
|
||||
@ -153,13 +153,13 @@ msgstr ""
|
||||
msgid "Tag could not be added"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:122
|
||||
#: lib/cannery/activity_log/shot_group.ex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be at least 1"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/activity_log/shot_group.ex:82
|
||||
#: lib/cannery/activity_log/shot_group.ex:118
|
||||
#: lib/cannery/activity_log/shot_group.ex:119
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Count must be less than %{count}"
|
||||
msgstr ""
|
||||
@ -185,17 +185,17 @@ msgstr ""
|
||||
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo.ex:686
|
||||
#: lib/cannery/ammo.ex:609
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Invalid multiplier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery/ammo/ammo_group.ex:97
|
||||
#: lib/cannery/ammo/ammo_group.ex:96
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please select an ammo type and container"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:69
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Your browser does not support the canvas element."
|
||||
msgstr ""
|
||||
|
@ -29,11 +29,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -48,8 +48,8 @@ msgstr ""
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr ""
|
||||
@ -78,10 +78,10 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr ""
|
||||
@ -91,7 +91,7 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -142,7 +142,7 @@ msgstr ""
|
||||
msgid "Password updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
@ -178,7 +178,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr ""
|
||||
@ -193,19 +193,19 @@ msgstr ""
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr ""
|
||||
@ -256,13 +256,13 @@ msgstr ""
|
||||
msgid "Language updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr ""
|
||||
@ -279,7 +279,7 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
|
@ -18,11 +18,11 @@ msgstr ""
|
||||
msgid "%{name} created successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:73
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:47
|
||||
#: lib/cannery_web/live/ammo_type_live/show.ex:55
|
||||
#: lib/cannery_web/live/invite_live/index.ex:53
|
||||
#: lib/cannery_web/live/invite_live/index.ex:133
|
||||
#: lib/cannery_web/live/tag_live/index.ex:64
|
||||
#: lib/cannery_web/live/tag_live/index.ex:38
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} deleted succesfully"
|
||||
msgstr ""
|
||||
@ -37,8 +37,8 @@ msgstr ""
|
||||
msgid "%{name} enabled succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.ex:85
|
||||
#: lib/cannery_web/live/container_live/show.ex:63
|
||||
#: lib/cannery_web/live/container_live/index.ex:81
|
||||
#: lib/cannery_web/live/container_live/show.ex:67
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{name} has been deleted"
|
||||
msgstr ""
|
||||
@ -67,10 +67,10 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete %{email}? This action is permanent!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:92
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:136
|
||||
#: lib/cannery_web/live/container_live/index.ex:236
|
||||
#: lib/cannery_web/live/container_live/index.html.heex:73
|
||||
#: lib/cannery_web/live/container_live/show.html.heex:59
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:64
|
||||
#: lib/cannery_web/live/tag_live/index.html.heex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}?"
|
||||
msgstr ""
|
||||
@ -80,7 +80,7 @@ msgstr ""
|
||||
msgid "Are you sure you want to delete the invite for %{name}?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:152
|
||||
#: lib/cannery_web/live/ammo_group_live/index.html.heex:131
|
||||
#: lib/cannery_web/live/ammo_group_live/show.html.heex:75
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this ammo?"
|
||||
@ -131,7 +131,7 @@ msgstr ""
|
||||
msgid "Password updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:73
|
||||
#: lib/cannery_web/controllers/user_registration_controller.ex:74
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Please check your email to verify your account"
|
||||
msgstr ""
|
||||
@ -167,7 +167,7 @@ msgstr ""
|
||||
msgid "%{name} added successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/container_live/show.ex:39
|
||||
#: lib/cannery_web/live/container_live/show.ex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "%{tag_name} has been removed from %{container_name}"
|
||||
msgstr ""
|
||||
@ -182,19 +182,19 @@ msgstr ""
|
||||
msgid "Shots recorded successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:28
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to unstage this ammo?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:137
|
||||
#: lib/cannery_web/live/range_live/index.html.heex:118
|
||||
#: lib/cannery_web/live/range_live/index.ex:159
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete this shot record?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:83
|
||||
#: lib/cannery_web/live/range_live/index.ex:80
|
||||
#: lib/cannery_web/live/range_live/index.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Shot records deleted succesfully"
|
||||
msgstr ""
|
||||
@ -245,13 +245,13 @@ msgstr ""
|
||||
msgid "Language updated successfully."
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:89
|
||||
#: lib/cannery_web/live/ammo_group_live/index.ex:64
|
||||
#: lib/cannery_web/live/ammo_group_live/show.ex:55
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo deleted succesfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/cannery_web/live/range_live/index.ex:95
|
||||
#: lib/cannery_web/live/range_live/index.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Ammo unstaged succesfully"
|
||||
msgstr ""
|
||||
@ -268,7 +268,7 @@ msgid_plural "Ammo added successfully"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: lib/cannery_web/live/ammo_type_live/index.html.heex:90
|
||||
#: lib/cannery_web/live/ammo_type_live/index.ex:232
|
||||
#: lib/cannery_web/live/ammo_type_live/show.html.heex:28
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete %{name}? This will delete all %{name} type ammo as well!"
|
||||
|
@ -1,119 +0,0 @@
|
||||
defmodule Cannery.Repo.Migrations.AddSearch do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute """
|
||||
CREATE FUNCTION immutable_to_string(integer, text)
|
||||
RETURNS text LANGUAGE sql IMMUTABLE as
|
||||
$$SELECT coalesce(($1)::TEXT, $2)::TEXT$$
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE FUNCTION immutable_to_string(double precision, text)
|
||||
RETURNS text LANGUAGE sql IMMUTABLE as
|
||||
$$SELECT coalesce(($1)::TEXT, $2)::TEXT$$
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE FUNCTION immutable_to_string(date, text)
|
||||
RETURNS text LANGUAGE sql IMMUTABLE as
|
||||
$$SELECT coalesce(($1)::TEXT, $2)::TEXT$$
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE FUNCTION boolean_to_string(boolean, text, text)
|
||||
RETURNS text LANGUAGE sql IMMUTABLE as
|
||||
$$SELECT (CASE $1 WHEN true THEN $2 ELSE $3 END)::TEXT$$
|
||||
"""
|
||||
|
||||
execute """
|
||||
ALTER TABLE ammo_groups
|
||||
ADD COLUMN search tsvector
|
||||
GENERATED ALWAYS AS (
|
||||
setweight(to_tsvector('english', coalesce("notes", '')), 'A') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("price_paid", '')), 'B') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("purchased_on", '')), 'B') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("count", '')), 'C')
|
||||
) STORED
|
||||
"""
|
||||
|
||||
execute("CREATE INDEX ammo_groups_trgm_idx ON ammo_groups USING GIN (search)")
|
||||
|
||||
execute """
|
||||
ALTER TABLE containers
|
||||
ADD COLUMN search tsvector
|
||||
GENERATED ALWAYS AS (
|
||||
setweight(to_tsvector('english', coalesce("name", '')), 'A') ||
|
||||
setweight(to_tsvector('english', coalesce("desc", '')), 'B') ||
|
||||
setweight(to_tsvector('english', coalesce("location", '')), 'B') ||
|
||||
setweight(to_tsvector('english', coalesce("type", '')), 'C')
|
||||
) STORED
|
||||
"""
|
||||
|
||||
execute("CREATE INDEX containers_trgm_idx ON containers USING GIN (search)")
|
||||
|
||||
execute """
|
||||
ALTER TABLE tags
|
||||
ADD COLUMN search tsvector
|
||||
GENERATED ALWAYS AS (
|
||||
setweight(to_tsvector('english', coalesce("name", '')), 'A')
|
||||
) STORED
|
||||
"""
|
||||
|
||||
execute("CREATE INDEX tags_trgm_idx ON tags USING GIN (search)")
|
||||
|
||||
execute """
|
||||
ALTER TABLE ammo_types
|
||||
ADD COLUMN search tsvector
|
||||
GENERATED ALWAYS AS (
|
||||
setweight(to_tsvector('english', coalesce("name", '')), 'A') ||
|
||||
setweight(to_tsvector('english', coalesce("desc", '')), 'B') ||
|
||||
setweight(to_tsvector('english', coalesce("bullet_type", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("bullet_core", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("cartridge", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("caliber", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("case_material", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("jacket_type", '')), 'C') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("muzzle_velocity", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("powder_type", '')), 'C') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("powder_grains_per_charge", '')), 'C') ||
|
||||
setweight(to_tsvector('english', immutable_to_string("grains", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("pressure", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("primer_type", '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("firing_type", '')), 'C') ||
|
||||
setweight(to_tsvector('english', boolean_to_string("tracer", 'tracer', '')), 'C') ||
|
||||
setweight(to_tsvector('english', boolean_to_string("incendiary", 'incendiary', '')), 'C') ||
|
||||
setweight(to_tsvector('english', boolean_to_string("blank", 'blank', '')), 'C') ||
|
||||
setweight(to_tsvector('english', boolean_to_string("corrosive", 'corrosive', '')), 'C') ||
|
||||
setweight(to_tsvector('english', coalesce("manufacturer", '')), 'D') ||
|
||||
setweight(to_tsvector('english', coalesce("upc", '')), 'D')
|
||||
) STORED
|
||||
"""
|
||||
|
||||
execute("CREATE INDEX ammo_types_trgm_idx ON ammo_types USING GIN (search)")
|
||||
|
||||
execute """
|
||||
ALTER TABLE shot_groups
|
||||
ADD COLUMN search tsvector
|
||||
GENERATED ALWAYS AS (
|
||||
setweight(to_tsvector('english', coalesce(notes, '')), 'A') ||
|
||||
setweight(to_tsvector('english', immutable_to_string(count, '')), 'B') ||
|
||||
setweight(to_tsvector('english', immutable_to_string(date, '')), 'C')
|
||||
) STORED
|
||||
"""
|
||||
|
||||
execute("CREATE INDEX shot_groups_trgm_idx ON shot_groups USING GIN (search)")
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:ammo_groups), do: remove(:search)
|
||||
alter table(:containers), do: remove(:search)
|
||||
alter table(:tags), do: remove(:search)
|
||||
alter table(:ammo_types), do: remove(:search)
|
||||
alter table(:shot_groups), do: remove(:search)
|
||||
execute("DROP FUNCTION immutable_to_string(double precision, text)")
|
||||
execute("DROP FUNCTION immutable_to_string(integer, text)")
|
||||
execute("DROP FUNCTION immutable_to_string(date, text)")
|
||||
execute("DROP FUNCTION boolean_to_string(boolean, text, text)")
|
||||
end
|
||||
end
|
@ -104,7 +104,7 @@ defmodule Cannery.AccountsTest do
|
||||
|
||||
describe "change_user_registration/2" do
|
||||
test "returns a changeset" do
|
||||
assert %Changeset{} = changeset = Accounts.change_user_registration()
|
||||
assert %Changeset{} = changeset = Accounts.change_user_registration(%User{})
|
||||
assert changeset.required == [:password, :email]
|
||||
end
|
||||
|
||||
@ -112,7 +112,8 @@ defmodule Cannery.AccountsTest do
|
||||
email = unique_user_email()
|
||||
password = valid_user_password()
|
||||
|
||||
changeset = Accounts.change_user_registration(%{"email" => email, "password" => password})
|
||||
changeset =
|
||||
Accounts.change_user_registration(%User{}, %{"email" => email, "password" => password})
|
||||
|
||||
assert changeset.valid?
|
||||
assert get_change(changeset, :email) == email
|
||||
|
@ -38,56 +38,17 @@ defmodule Cannery.ActivityLogTest do
|
||||
]
|
||||
end
|
||||
|
||||
test "list_shot_groups/1 returns all shot_groups",
|
||||
test "list_shot_groups/0 returns all shot_groups",
|
||||
%{shot_group: shot_group, current_user: current_user} do
|
||||
assert ActivityLog.list_shot_groups(current_user) == [shot_group]
|
||||
end
|
||||
|
||||
test "list_shot_groups/2 returns relevant shot_groups for a user", %{
|
||||
ammo_type: ammo_type,
|
||||
ammo_group: ammo_group,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
shot_group_a = shot_group_fixture(%{"notes" => "amazing"}, current_user, ammo_group)
|
||||
|
||||
{1, [another_ammo_group]} =
|
||||
ammo_group_fixture(%{"notes" => "stupendous"}, ammo_type, container, current_user)
|
||||
|
||||
shot_group_b = shot_group_fixture(current_user, another_ammo_group)
|
||||
|
||||
another_ammo_type = ammo_type_fixture(%{"name" => "fabulous ammo"}, current_user)
|
||||
|
||||
{1, [yet_another_ammo_group]} =
|
||||
ammo_group_fixture(another_ammo_type, container, current_user)
|
||||
|
||||
shot_group_c = shot_group_fixture(current_user, yet_another_ammo_group)
|
||||
|
||||
random_user = user_fixture()
|
||||
random_container = container_fixture(random_user)
|
||||
random_ammo_type = ammo_type_fixture(random_user)
|
||||
|
||||
{1, [random_ammo_group]} =
|
||||
ammo_group_fixture(random_ammo_type, random_container, random_user)
|
||||
|
||||
_shouldnt_return = shot_group_fixture(random_user, random_ammo_group)
|
||||
|
||||
# notes
|
||||
assert ActivityLog.list_shot_groups("amazing", current_user) == [shot_group_a]
|
||||
|
||||
# ammo group attributes
|
||||
assert ActivityLog.list_shot_groups("stupendous", current_user) == [shot_group_b]
|
||||
|
||||
# ammo type attributes
|
||||
assert ActivityLog.list_shot_groups("fabulous", current_user) == [shot_group_c]
|
||||
end
|
||||
|
||||
test "get_shot_group!/2 returns the shot_group with given id",
|
||||
test "get_shot_group!/1 returns the shot_group with given id",
|
||||
%{shot_group: shot_group, current_user: current_user} do
|
||||
assert ActivityLog.get_shot_group!(shot_group.id, current_user) == shot_group
|
||||
end
|
||||
|
||||
test "get_shot_group!/2 does not return a shot_group of another user",
|
||||
test "get_shot_group!/1 does not return a shot_group of another user",
|
||||
%{shot_group: shot_group} do
|
||||
another_user = user_fixture()
|
||||
|
||||
@ -96,7 +57,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
end
|
||||
end
|
||||
|
||||
test "create_shot_group/3 with valid data creates a shot_group",
|
||||
test "create_shot_group/1 with valid data creates a shot_group",
|
||||
%{current_user: current_user, ammo_group: ammo_group} do
|
||||
valid_attrs = %{"count" => 10, "date" => ~D[2022-02-13], "notes" => "some notes"}
|
||||
|
||||
@ -108,7 +69,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
assert shot_group.notes == "some notes"
|
||||
end
|
||||
|
||||
test "create_shot_group/3 removes corresponding count from ammo group",
|
||||
test "create_shot_group/1 removes corresponding count from ammo group",
|
||||
%{
|
||||
current_user: current_user,
|
||||
ammo_group: %{id: ammo_group_id, count: org_count} = ammo_group
|
||||
@ -124,7 +85,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
assert new_count == 10
|
||||
end
|
||||
|
||||
test "create_shot_group/3 does not remove more than ammo group amount",
|
||||
test "create_shot_group/1 does not remove more than ammo group amount",
|
||||
%{current_user: current_user, ammo_group: %{id: ammo_group_id} = ammo_group} do
|
||||
valid_attrs = %{"count" => 20, "date" => ~D[2022-02-13], "notes" => "some notes"}
|
||||
|
||||
@ -139,7 +100,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
ActivityLog.create_shot_group(%{"count" => 1}, current_user, ammo_group)
|
||||
end
|
||||
|
||||
test "create_shot_group/3 with invalid data returns error changeset",
|
||||
test "create_shot_group/1 with invalid data returns error changeset",
|
||||
%{current_user: current_user, ammo_group: ammo_group} do
|
||||
invalid_params = %{"count" => nil, "date" => nil, "notes" => nil}
|
||||
|
||||
@ -147,7 +108,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
ActivityLog.create_shot_group(invalid_params, current_user, ammo_group)
|
||||
end
|
||||
|
||||
test "update_shot_group/3 with valid data updates the shot_group and ammo_group",
|
||||
test "update_shot_group/2 with valid data updates the shot_group and ammo_group",
|
||||
%{
|
||||
shot_group: shot_group,
|
||||
ammo_group: %{id: ammo_group_id},
|
||||
@ -188,7 +149,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
assert ammo_group.count == 0
|
||||
end
|
||||
|
||||
test "update_shot_group/3 with invalid data returns error changeset",
|
||||
test "update_shot_group/2 with invalid data returns error changeset",
|
||||
%{shot_group: shot_group, current_user: current_user} do
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
ActivityLog.update_shot_group(
|
||||
@ -207,7 +168,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
assert shot_group == ActivityLog.get_shot_group!(shot_group.id, current_user)
|
||||
end
|
||||
|
||||
test "delete_shot_group/2 deletes the shot_group and adds value back",
|
||||
test "delete_shot_group/1 deletes the shot_group and adds value back",
|
||||
%{shot_group: shot_group, current_user: current_user, ammo_group: %{id: ammo_group_id}} do
|
||||
assert {:ok, %ShotGroup{}} = ActivityLog.delete_shot_group(shot_group, current_user)
|
||||
|
||||
|
@ -4,7 +4,7 @@ defmodule Cannery.AmmoTest do
|
||||
"""
|
||||
|
||||
use Cannery.DataCase
|
||||
alias Cannery.{Ammo, Ammo.AmmoGroup, Ammo.AmmoType, Containers}
|
||||
alias Cannery.{Ammo, Ammo.AmmoGroup, Ammo.AmmoType}
|
||||
alias Ecto.Changeset
|
||||
|
||||
@moduletag :ammo_test
|
||||
@ -40,55 +40,11 @@ defmodule Cannery.AmmoTest do
|
||||
[ammo_type: ammo_type_fixture(current_user), current_user: current_user]
|
||||
end
|
||||
|
||||
test "list_ammo_types/1 returns all ammo_types",
|
||||
test "list_ammo_types/0 returns all ammo_types",
|
||||
%{ammo_type: ammo_type, current_user: current_user} do
|
||||
assert Ammo.list_ammo_types(current_user) == [ammo_type]
|
||||
end
|
||||
|
||||
test "list_ammo_types/1 returns relevant ammo_types for a user",
|
||||
%{current_user: current_user} do
|
||||
ammo_type_a =
|
||||
%{"name" => "bullets", "desc" => "has some pews in it", "grains" => 5}
|
||||
|> ammo_type_fixture(current_user)
|
||||
|
||||
ammo_type_b =
|
||||
%{"name" => "hollows", "grains" => 3}
|
||||
|> ammo_type_fixture(current_user)
|
||||
|
||||
ammo_type_c =
|
||||
%{
|
||||
"name" => "jackets",
|
||||
"desc" => "brass shell",
|
||||
"tracer" => true
|
||||
}
|
||||
|> ammo_type_fixture(current_user)
|
||||
|
||||
_shouldnt_return =
|
||||
%{
|
||||
"name" => "bullet",
|
||||
"desc" => "pews brass shell"
|
||||
}
|
||||
|> ammo_type_fixture(user_fixture())
|
||||
|
||||
# name
|
||||
assert Ammo.list_ammo_types("bullet", current_user) == [ammo_type_a]
|
||||
assert Ammo.list_ammo_types("bullets", current_user) == [ammo_type_a]
|
||||
assert Ammo.list_ammo_types("hollow", current_user) == [ammo_type_b]
|
||||
assert Ammo.list_ammo_types("jacket", current_user) == [ammo_type_c]
|
||||
|
||||
# desc
|
||||
assert Ammo.list_ammo_types("pew", current_user) == [ammo_type_a]
|
||||
assert Ammo.list_ammo_types("brass", current_user) == [ammo_type_c]
|
||||
assert Ammo.list_ammo_types("shell", current_user) == [ammo_type_c]
|
||||
|
||||
# grains (integer)
|
||||
assert Ammo.list_ammo_types("5", current_user) == [ammo_type_a]
|
||||
assert Ammo.list_ammo_types("3", current_user) == [ammo_type_b]
|
||||
|
||||
# tracer (boolean)
|
||||
assert Ammo.list_ammo_types("tracer", current_user) == [ammo_type_c]
|
||||
end
|
||||
|
||||
test "get_ammo_type!/1 returns the ammo_type with given id",
|
||||
%{ammo_type: ammo_type, current_user: current_user} do
|
||||
assert Ammo.get_ammo_type!(ammo_type.id, current_user) == ammo_type
|
||||
@ -294,13 +250,6 @@ defmodule Cannery.AmmoTest do
|
||||
%{"count" => 50, "price_paid" => 36.1}
|
||||
|> ammo_group_fixture(ammo_type, container, current_user)
|
||||
|
||||
another_user = user_fixture()
|
||||
another_ammo_type = ammo_type_fixture(another_user)
|
||||
another_container = container_fixture(another_user)
|
||||
|
||||
{1, [_shouldnt_show_up]} =
|
||||
ammo_group_fixture(another_ammo_type, another_container, another_user)
|
||||
|
||||
[
|
||||
ammo_type: ammo_type,
|
||||
ammo_group: ammo_group,
|
||||
@ -309,7 +258,7 @@ defmodule Cannery.AmmoTest do
|
||||
]
|
||||
end
|
||||
|
||||
test "list_ammo_groups/3 returns all ammo_groups",
|
||||
test "list_ammo_groups/2 returns all ammo_groups",
|
||||
%{
|
||||
ammo_type: ammo_type,
|
||||
ammo_group: ammo_group,
|
||||
@ -321,65 +270,13 @@ defmodule Cannery.AmmoTest do
|
||||
|
||||
shot_group_fixture(%{"count" => 30}, current_user, another_ammo_group)
|
||||
another_ammo_group = another_ammo_group |> Repo.reload!()
|
||||
assert Ammo.list_ammo_groups(current_user) == [ammo_group] |> Repo.preload(:shot_groups)
|
||||
|
||||
assert Ammo.list_ammo_groups(nil, false, current_user) ==
|
||||
[ammo_group] |> preload_ammo_group()
|
||||
|
||||
assert Ammo.list_ammo_groups(nil, true, current_user)
|
||||
assert Ammo.list_ammo_groups(current_user, true)
|
||||
|> Enum.sort_by(fn %{count: count} -> count end) ==
|
||||
[another_ammo_group, ammo_group] |> preload_ammo_group()
|
||||
[another_ammo_group, ammo_group] |> Repo.preload(:shot_groups)
|
||||
end
|
||||
|
||||
test "list_ammo_groups/3 returns relevant ammo groups when searched",
|
||||
%{
|
||||
ammo_type: ammo_type,
|
||||
ammo_group: ammo_group,
|
||||
container: container,
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [another_ammo_group]} =
|
||||
%{"count" => 49, "notes" => "cool ammo group"}
|
||||
|> ammo_group_fixture(ammo_type, container, current_user)
|
||||
|
||||
another_ammo_type = ammo_type_fixture(%{"name" => "amazing ammo"}, current_user)
|
||||
another_container = container_fixture(%{"name" => "fantastic container"}, current_user)
|
||||
|
||||
tag = tag_fixture(%{"name" => "stupendous tag"}, current_user)
|
||||
Containers.add_tag!(another_container, tag, current_user)
|
||||
|
||||
{1, [amazing_ammo_group]} =
|
||||
ammo_group_fixture(%{"count" => 48}, another_ammo_type, container, current_user)
|
||||
|
||||
{1, [fantastic_ammo_group]} =
|
||||
ammo_group_fixture(%{"count" => 47}, ammo_type, another_container, current_user)
|
||||
|
||||
assert Ammo.list_ammo_groups(nil, false, current_user)
|
||||
|> Enum.sort_by(fn %{count: count} -> count end) ==
|
||||
[fantastic_ammo_group, amazing_ammo_group, another_ammo_group, ammo_group]
|
||||
|> preload_ammo_group()
|
||||
|
||||
# search works for ammo group attributes
|
||||
assert Ammo.list_ammo_groups("cool", true, current_user) ==
|
||||
[another_ammo_group] |> preload_ammo_group()
|
||||
|
||||
# search works for ammo type attributes
|
||||
assert Ammo.list_ammo_groups("amazing", true, current_user) ==
|
||||
[amazing_ammo_group] |> preload_ammo_group()
|
||||
|
||||
# search works for container attributes
|
||||
assert Ammo.list_ammo_groups("fantastic", true, current_user) ==
|
||||
[fantastic_ammo_group] |> preload_ammo_group()
|
||||
|
||||
# search works for container tag attributes
|
||||
assert Ammo.list_ammo_groups("stupendous", true, current_user) ==
|
||||
[fantastic_ammo_group] |> preload_ammo_group()
|
||||
|
||||
assert Ammo.list_ammo_groups("random", true, current_user) == []
|
||||
end
|
||||
|
||||
defp preload_ammo_group(ammo_group),
|
||||
do: ammo_group |> Repo.preload([:ammo_type, :shot_groups, container: :tags])
|
||||
|
||||
test "list_ammo_groups_for_type/2 returns all ammo_groups for a type",
|
||||
%{
|
||||
ammo_type: ammo_type,
|
||||
|
@ -22,12 +22,7 @@ defmodule Cannery.ContainersTest do
|
||||
"name" => "some updated name",
|
||||
"type" => "some updated type"
|
||||
}
|
||||
@invalid_attrs %{
|
||||
"desc" => nil,
|
||||
"location" => nil,
|
||||
"name" => nil,
|
||||
"type" => nil
|
||||
}
|
||||
@invalid_attrs %{"desc" => nil, "location" => nil, "name" => nil, "type" => nil}
|
||||
|
||||
describe "containers" do
|
||||
setup do
|
||||
@ -39,47 +34,9 @@ defmodule Cannery.ContainersTest do
|
||||
test "list_containers/1 returns all containers",
|
||||
%{current_user: current_user, container: container} do
|
||||
assert Containers.list_containers(current_user) ==
|
||||
[container] |> preload_containers()
|
||||
[container |> Repo.preload([:ammo_groups, :tags])]
|
||||
end
|
||||
|
||||
test "list_containers/2 returns relevant containers for a user",
|
||||
%{current_user: current_user} do
|
||||
container_a =
|
||||
container_fixture(%{"name" => "my cool container"}, current_user) |> preload_containers()
|
||||
|
||||
container_b =
|
||||
container_fixture(%{"desc" => "a fascinating description"}, current_user)
|
||||
|> preload_containers()
|
||||
|
||||
container_c = container_fixture(%{"location" => "a secret place"}, current_user)
|
||||
tag = tag_fixture(%{"name" => "stupendous tag"}, current_user)
|
||||
Containers.add_tag!(container_c, tag, current_user)
|
||||
container_c = container_c |> preload_containers()
|
||||
|
||||
container_d = container_fixture(%{"type" => "musty old box"}, current_user)
|
||||
tag = tag_fixture(%{"name" => "amazing tag"}, current_user)
|
||||
Containers.add_tag!(container_d, tag, current_user)
|
||||
container_d = container_d |> preload_containers()
|
||||
|
||||
_shouldnt_return =
|
||||
container_fixture(%{"name" => "another person's container"}, user_fixture())
|
||||
|
||||
# attributes
|
||||
assert Containers.list_containers("cool", current_user) == [container_a]
|
||||
assert Containers.list_containers("fascinating", current_user) == [container_b]
|
||||
assert Containers.list_containers("secret", current_user) == [container_c]
|
||||
assert Containers.list_containers("box", current_user) == [container_d]
|
||||
|
||||
# tags
|
||||
assert Containers.list_containers("stupendous", current_user) == [container_c]
|
||||
assert Containers.list_containers("amazing", current_user) == [container_d]
|
||||
|
||||
assert Containers.list_containers("asajslkdflskdf", current_user) == []
|
||||
end
|
||||
|
||||
defp preload_containers(containers),
|
||||
do: containers |> Repo.preload([:ammo_groups, :tags])
|
||||
|
||||
test "get_container!/1 returns the container with given id",
|
||||
%{current_user: current_user, container: container} do
|
||||
assert Containers.get_container!(container.id, current_user) ==
|
||||
|
@ -31,28 +31,10 @@ defmodule Cannery.TagsTest do
|
||||
[tag: tag_fixture(current_user), current_user: current_user]
|
||||
end
|
||||
|
||||
test "list_tags/1 returns all tags", %{tag: tag, current_user: current_user} do
|
||||
test "list_tags/0 returns all tags", %{tag: tag, current_user: current_user} do
|
||||
assert Tags.list_tags(current_user) == [tag]
|
||||
end
|
||||
|
||||
test "list_tags/2 returns relevant tags for a user", %{current_user: current_user} do
|
||||
tag_a = tag_fixture(%{"name" => "bullets"}, current_user)
|
||||
tag_b = tag_fixture(%{"name" => "hollows"}, current_user)
|
||||
|
||||
_shouldnt_return =
|
||||
%{
|
||||
"name" => "bullet",
|
||||
"desc" => "pews brass shell"
|
||||
}
|
||||
|> tag_fixture(user_fixture())
|
||||
|
||||
# name
|
||||
assert Tags.list_tags("bullet", current_user) == [tag_a]
|
||||
assert Tags.list_tags("bullets", current_user) == [tag_a]
|
||||
assert Tags.list_tags("hollow", current_user) == [tag_b]
|
||||
assert Tags.list_tags("hollows", current_user) == [tag_b]
|
||||
end
|
||||
|
||||
test "get_tag!/1 returns the tag with given id", %{tag: tag, current_user: current_user} do
|
||||
assert Tags.get_tag!(tag.id, current_user) == tag
|
||||
end
|
||||
|
@ -66,37 +66,6 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
||||
assert html =~ ammo_group.ammo_type.name
|
||||
end
|
||||
|
||||
test "can search for ammo_groups", %{conn: conn, ammo_group: ammo_group} do
|
||||
{:ok, index_live, html} = live(conn, Routes.ammo_group_index_path(conn, :index))
|
||||
|
||||
ammo_group = ammo_group |> Repo.preload(:ammo_type)
|
||||
|
||||
assert html =~ ammo_group.ammo_type.name
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"ammo_group_search\"]",
|
||||
search: %{search_term: ammo_group.ammo_type.name}
|
||||
)
|
||||
|> render_change() =~ ammo_group.ammo_type.name
|
||||
|
||||
assert_patch(
|
||||
index_live,
|
||||
Routes.ammo_group_index_path(conn, :search, ammo_group.ammo_type.name)
|
||||
)
|
||||
|
||||
refute index_live
|
||||
|> form("[data-qa=\"ammo_group_search\"]", search: %{search_term: "something_else"})
|
||||
|> render_change() =~ ammo_group.ammo_type.name
|
||||
|
||||
assert_patch(index_live, Routes.ammo_group_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"ammo_group_search\"]", search: %{search_term: ""})
|
||||
|> render_change() =~ ammo_group.ammo_type.name
|
||||
|
||||
assert_patch(index_live, Routes.ammo_group_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves a single new ammo_group", %{conn: conn} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.ammo_group_index_path(conn, :index))
|
||||
|
||||
@ -142,7 +111,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|
||||
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
|
||||
|
||||
assert html =~ dgettext("prompts", "Ammo added successfully")
|
||||
assert Ammo.list_ammo_groups(nil, false, current_user) |> Enum.count() == multiplier + 1
|
||||
assert Ammo.list_ammo_groups(current_user) |> Enum.count() == multiplier + 1
|
||||
end
|
||||
|
||||
test "does not save invalid number of new ammo_groups", %{conn: conn} do
|
||||
|
@ -70,36 +70,10 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
|
||||
test "lists all ammo_types", %{conn: conn, ammo_type: ammo_type} do
|
||||
{:ok, _index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
|
||||
|
||||
assert html =~ gettext("Catalog")
|
||||
assert html =~ gettext("Ammo types")
|
||||
assert html =~ ammo_type.bullet_type
|
||||
end
|
||||
|
||||
test "can search for ammo_type", %{conn: conn, ammo_type: ammo_type} do
|
||||
{:ok, index_live, html} = live(conn, Routes.ammo_type_index_path(conn, :index))
|
||||
|
||||
assert html =~ ammo_type.bullet_type
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"ammo_type_search\"]",
|
||||
search: %{search_term: ammo_type.bullet_type}
|
||||
)
|
||||
|> render_change() =~ ammo_type.bullet_type
|
||||
|
||||
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, ammo_type.bullet_type))
|
||||
|
||||
refute index_live
|
||||
|> form("[data-qa=\"ammo_type_search\"]", search: %{search_term: "something_else"})
|
||||
|> render_change() =~ ammo_type.bullet_type
|
||||
|
||||
assert_patch(index_live, Routes.ammo_type_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"ammo_type_search\"]", search: %{search_term: ""})
|
||||
|> render_change() =~ ammo_type.bullet_type
|
||||
|
||||
assert_patch(index_live, Routes.ammo_type_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves new ammo_type", %{conn: conn, current_user: current_user, ammo_type: ammo_type} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
|
||||
|
||||
@ -128,7 +102,7 @@ defmodule CanneryWeb.AmmoTypeLiveTest do
|
||||
{:ok, index_live, _html} = live(conn, Routes.ammo_type_index_path(conn, :index))
|
||||
|
||||
assert index_live |> element("[data-qa=\"edit-#{ammo_type.id}\"]") |> render_click() =~
|
||||
gettext("Edit %{ammo_type_name}", ammo_type_name: ammo_type.name)
|
||||
gettext("Edit Ammo type")
|
||||
|
||||
assert_patch(index_live, Routes.ammo_type_index_path(conn, :edit, ammo_type))
|
||||
|
||||
|
@ -62,7 +62,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
%{ammo_type: ammo_type, ammo_group: ammo_group, shot_group: shot_group}
|
||||
end
|
||||
|
||||
describe "Index" do
|
||||
describe "Index regular" do
|
||||
setup [:register_and_log_in_user, :create_container]
|
||||
|
||||
test "lists all containers", %{conn: conn, container: container} do
|
||||
@ -72,41 +72,6 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
assert html =~ container.location
|
||||
end
|
||||
|
||||
test "lists all containers in table mode", %{conn: conn, container: container} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
html = index_live |> element("[data-qa=\"toggle_table\"]") |> render_click()
|
||||
|
||||
assert html =~ gettext("Containers")
|
||||
assert html =~ container.location
|
||||
end
|
||||
|
||||
test "can search for containers", %{conn: conn, container: container} do
|
||||
{:ok, index_live, html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
assert html =~ container.location
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"container_search\"]",
|
||||
search: %{search_term: container.location}
|
||||
)
|
||||
|> render_change() =~ container.location
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :search, container.location))
|
||||
|
||||
refute index_live
|
||||
|> form("[data-qa=\"container_search\"]", search: %{search_term: "something_else"})
|
||||
|> render_change() =~ container.location
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"container_search\"]", search: %{search_term: ""})
|
||||
|> render_change() =~ container.location
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves new container", %{conn: conn, container: container} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
@ -221,6 +186,130 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
end
|
||||
end
|
||||
|
||||
describe "Index table" do
|
||||
setup [:register_and_log_in_user, :create_container]
|
||||
|
||||
test "lists all containers", %{conn: conn, container: container} do
|
||||
{:ok, _index_live, html} = live(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
assert html =~ gettext("Containers")
|
||||
assert html =~ container.location
|
||||
end
|
||||
|
||||
test "saves new container", %{conn: conn, container: container} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
assert index_live |> element("a", dgettext("actions", "New Container")) |> render_click() =~
|
||||
gettext("New Container")
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :new))
|
||||
|
||||
# assert index_live
|
||||
# |> form("#container-form", container: @invalid_attrs)
|
||||
# |> render_change() =~ dgettext("errors", "can't be blank")
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#container-form", container: @create_attrs)
|
||||
|> render_submit()
|
||||
|> follow_redirect(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
assert html =~ dgettext("prompts", "%{name} created successfully", name: container.name)
|
||||
assert html =~ "some location"
|
||||
end
|
||||
|
||||
test "updates container in listing", %{
|
||||
conn: conn,
|
||||
current_user: current_user,
|
||||
container: container
|
||||
} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
assert index_live |> element("[data-qa=\"edit-#{container.id}\"]") |> render_click() =~
|
||||
gettext("Edit %{name}", name: container.name)
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :edit, container))
|
||||
|
||||
# assert index_live
|
||||
# |> form("#container-form", container: @invalid_attrs)
|
||||
# |> render_change() =~ dgettext("errors", "can't be blank")
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#container-form", container: @update_attrs)
|
||||
|> render_submit()
|
||||
|> follow_redirect(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
container = container.id |> Containers.get_container!(current_user)
|
||||
assert html =~ dgettext("prompts", "%{name} updated successfully", name: container.name)
|
||||
assert html =~ "some updated location"
|
||||
end
|
||||
|
||||
test "clones container in listing", %{
|
||||
conn: conn,
|
||||
current_user: current_user,
|
||||
container: container
|
||||
} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
html = index_live |> element("[data-qa=\"clone-#{container.id}\"]") |> render_click()
|
||||
assert html =~ gettext("New Container")
|
||||
assert html =~ "some location"
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :clone, container))
|
||||
|
||||
# assert index_live
|
||||
# |> form("#container-form", container: @invalid_attrs)
|
||||
# |> render_change() =~ dgettext("errors", "can't be blank")
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#container-form", container: @create_attrs)
|
||||
|> render_submit()
|
||||
|> follow_redirect(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
container = container.id |> Containers.get_container!(current_user)
|
||||
assert html =~ dgettext("prompts", "%{name} created successfully", name: container.name)
|
||||
assert html =~ "some location"
|
||||
end
|
||||
|
||||
test "clones container in listing with updates", %{
|
||||
conn: conn,
|
||||
current_user: current_user,
|
||||
container: container
|
||||
} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
assert index_live |> element("[data-qa=\"clone-#{container.id}\"]") |> render_click() =~
|
||||
gettext("New Container")
|
||||
|
||||
assert_patch(index_live, Routes.container_index_path(conn, :clone, container))
|
||||
|
||||
# assert index_live
|
||||
# |> form("#container-form", container: @invalid_attrs)
|
||||
# |> render_change() =~ dgettext("errors", "can't be blank")
|
||||
|
||||
{:ok, _view, html} =
|
||||
index_live
|
||||
|> form("#container-form",
|
||||
container: Map.merge(@create_attrs, %{location: "some updated location"})
|
||||
)
|
||||
|> render_submit()
|
||||
|> follow_redirect(conn, Routes.container_index_path(conn, :index))
|
||||
|
||||
container = container.id |> Containers.get_container!(current_user)
|
||||
assert html =~ dgettext("prompts", "%{name} created successfully", name: container.name)
|
||||
assert html =~ "some updated location"
|
||||
end
|
||||
|
||||
test "deletes container in listing", %{conn: conn, container: container} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.container_index_path(conn, :table))
|
||||
|
||||
assert index_live |> element("[data-qa=\"delete-#{container.id}\"]") |> render_click()
|
||||
refute has_element?(index_live, "#container-#{container.id}")
|
||||
end
|
||||
end
|
||||
|
||||
describe "Show" do
|
||||
setup [:register_and_log_in_user, :create_container]
|
||||
|
||||
@ -278,6 +367,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
html = show_live |> element("[data-qa=\"toggle_table\"]") |> render_click()
|
||||
assert_patch(show_live, Routes.container_show_path(conn, :table, container))
|
||||
|
||||
assert html =~ ammo_type_name
|
||||
assert html =~ "some ammo group"
|
||||
@ -306,6 +396,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|
||||
{:ok, show_live, _html} = live(conn, Routes.container_show_path(conn, :show, container))
|
||||
|
||||
html = show_live |> element("[data-qa=\"toggle_table\"]") |> render_click()
|
||||
assert_patch(show_live, Routes.container_show_path(conn, :table, container))
|
||||
|
||||
assert html =~ dgettext("actions", "Show used")
|
||||
refute html =~ "some ammo group"
|
||||
|
@ -37,32 +37,6 @@ defmodule CanneryWeb.RangeLiveTest do
|
||||
assert html =~ shot_group.notes
|
||||
end
|
||||
|
||||
test "can search for shot_group", %{conn: conn, shot_group: shot_group} do
|
||||
{:ok, index_live, html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
assert html =~ shot_group.notes
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"shot_group_search\"]",
|
||||
search: %{search_term: shot_group.notes}
|
||||
)
|
||||
|> render_change() =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :search, shot_group.notes))
|
||||
|
||||
refute index_live
|
||||
|> form("[data-qa=\"shot_group_search\"]", search: %{search_term: "something_else"})
|
||||
|> render_change() =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"shot_group_search\"]", search: %{search_term: ""})
|
||||
|> render_change() =~ shot_group.notes
|
||||
|
||||
assert_patch(index_live, Routes.range_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves new shot_group", %{conn: conn, ammo_group: ammo_group} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.range_index_path(conn, :index))
|
||||
|
||||
|
@ -41,32 +41,6 @@ defmodule CanneryWeb.TagLiveTest do
|
||||
assert html =~ tag.bg_color
|
||||
end
|
||||
|
||||
test "can search for tag", %{conn: conn, tag: tag} do
|
||||
{:ok, index_live, html} = live(conn, Routes.tag_index_path(conn, :index))
|
||||
|
||||
assert html =~ tag.name
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"tag_search\"]",
|
||||
search: %{search_term: tag.name}
|
||||
)
|
||||
|> render_change() =~ tag.name
|
||||
|
||||
assert_patch(index_live, Routes.tag_index_path(conn, :search, tag.name))
|
||||
|
||||
refute index_live
|
||||
|> form("[data-qa=\"tag_search\"]", search: %{search_term: "something_else"})
|
||||
|> render_change() =~ tag.name
|
||||
|
||||
assert_patch(index_live, Routes.tag_index_path(conn, :search, "something_else"))
|
||||
|
||||
assert index_live
|
||||
|> form("[data-qa=\"tag_search\"]", search: %{search_term: ""})
|
||||
|> render_change() =~ tag.name
|
||||
|
||||
assert_patch(index_live, Routes.tag_index_path(conn, :index))
|
||||
end
|
||||
|
||||
test "saves new tag", %{conn: conn} do
|
||||
{:ok, index_live, _html} = live(conn, Routes.tag_index_path(conn, :index))
|
||||
|
||||
|
@ -13,7 +13,6 @@ defmodule Cannery.Fixtures do
|
||||
Containers,
|
||||
Containers.Container,
|
||||
Email,
|
||||
Repo,
|
||||
Tags,
|
||||
Tags.Tag
|
||||
}
|
||||
@ -39,12 +38,11 @@ defmodule Cannery.Fixtures do
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
"email" => unique_user_email(),
|
||||
"password" => valid_user_password()
|
||||
"password" => valid_user_password(),
|
||||
"role" => "admin"
|
||||
})
|
||||
|> Accounts.register_user()
|
||||
|> unwrap_ok_tuple()
|
||||
|> User.role_changeset("admin")
|
||||
|> Repo.update!()
|
||||
end
|
||||
|
||||
def extract_user_token(fun) do
|
||||
|
Loading…
Reference in New Issue
Block a user