Compare commits

..

5 Commits

Author SHA1 Message Date
41bcc2f456 add logo 😄
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-04 20:19:03 -04:00
947659b207 fix ammo_group changesets 2022-07-04 20:06:41 -04:00
9ebca20dc6 add error case for create_changeset 2022-07-04 20:06:31 -04:00
3cbd62e84c fix shotgroup changesets 2022-07-01 21:39:08 -04:00
67010640f0 remove unchangeable requirements 2022-07-01 19:53:44 -04:00
39 changed files with 604 additions and 339 deletions

View File

@ -1,6 +1,7 @@
# Cannery
![screenshot](https://gitea.bubbletea.dev/shibao/cannery/raw/branch/stable/home.png)
![logo](https://gitea.bubbletea.dev/shibao/cannery/raw/branch/stable/assets/static/images/cannery.png)
![old screenshot](https://gitea.bubbletea.dev/shibao/cannery/raw/branch/stable/home.png)
The self-hosted firearm tracker website.

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 516 KiB

View File

@ -4,8 +4,7 @@ defmodule Cannery.ActivityLog do
"""
import Ecto.Query, warn: false
import CanneryWeb.Gettext
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo, Ammo.AmmoGroup, Repo}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo.AmmoGroup, Repo}
alias Ecto.{Changeset, Multi}
@doc """
@ -60,25 +59,24 @@ defmodule Cannery.ActivityLog do
"""
@spec create_shot_group(attrs :: map(), User.t(), AmmoGroup.t()) ::
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t()) | nil}
def create_shot_group(
attrs,
%User{id: user_id},
%AmmoGroup{id: ammo_group_id, count: ammo_group_count, user_id: user_id} = ammo_group
) do
attrs = attrs |> Map.merge(%{"user_id" => user_id, "ammo_group_id" => ammo_group_id})
changeset = %ShotGroup{} |> ShotGroup.create_changeset(attrs)
shot_group_count = changeset |> Changeset.get_field(:count)
if shot_group_count > ammo_group_count do
error = dgettext("errors", "Count must be less than %{count}", count: ammo_group_count)
changeset = changeset |> Changeset.add_error(:count, error)
{:error, changeset}
else
def create_shot_group(attrs, user, ammo_group) do
Multi.new()
|> Multi.insert(:create_shot_group, changeset)
|> Multi.insert(
:create_shot_group,
%ShotGroup{} |> ShotGroup.create_changeset(user, ammo_group, attrs)
)
|> Multi.run(
:ammo_group,
fn repo, %{create_shot_group: %{ammo_group_id: ammo_group_id, user_id: user_id}} ->
{:ok,
repo.one(from ag in AmmoGroup, where: ag.id == ^ammo_group_id and ag.user_id == ^user_id)}
end
)
|> Multi.update(
:update_ammo_group,
fn %{create_shot_group: %{count: shot_group_count}, ammo_group: %{count: ammo_group_count}} ->
ammo_group |> AmmoGroup.range_changeset(%{"count" => ammo_group_count - shot_group_count})
end
)
|> Repo.transaction()
|> case do
@ -87,7 +85,6 @@ defmodule Cannery.ActivityLog do
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
end
@doc """
Updates a shot_group.
@ -104,35 +101,32 @@ defmodule Cannery.ActivityLog do
@spec update_shot_group(ShotGroup.t(), attrs :: map(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t()) | nil}
def update_shot_group(
%ShotGroup{count: count, user_id: user_id, ammo_group_id: ammo_group_id} = shot_group,
%ShotGroup{count: count, user_id: user_id} = shot_group,
attrs,
%User{id: user_id} = user
) do
%{count: ammo_group_count, user_id: ^user_id} =
ammo_group = ammo_group_id |> Ammo.get_ammo_group!(user)
changeset = shot_group |> ShotGroup.update_changeset(attrs)
new_shot_group_count = changeset |> Changeset.get_field(:count)
shot_diff_to_add = new_shot_group_count - count
cond do
shot_diff_to_add > ammo_group_count ->
error = dgettext("errors", "Count must be less than %{count}", count: ammo_group_count)
changeset = changeset |> Changeset.add_error(:count, error)
{:error, changeset}
new_shot_group_count <= 0 ->
error = dgettext("errors", "Count must be at least 1")
changeset = changeset |> Changeset.add_error(:count, error)
{:error, changeset}
true ->
Multi.new()
|> Multi.update(:update_shot_group, changeset)
|> Multi.update(
:update_shot_group,
shot_group |> ShotGroup.update_changeset(user, attrs)
)
|> Multi.run(
:ammo_group,
fn repo, %{update_shot_group: %{ammo_group_id: ammo_group_id, user_id: user_id}} ->
{:ok,
repo.one(from ag in AmmoGroup, where: ag.id == ^ammo_group_id and ag.user_id == ^user_id)}
end
)
|> Multi.update(
:update_ammo_group,
ammo_group
|> AmmoGroup.range_changeset(%{"count" => ammo_group_count - shot_diff_to_add})
fn %{
update_shot_group: %{count: new_count},
ammo_group: %{count: ammo_group_count} = ammo_group
} ->
shot_diff_to_add = new_count - count
new_ammo_group_count = ammo_group_count - shot_diff_to_add
ammo_group |> AmmoGroup.range_changeset(%{"count" => new_ammo_group_count})
end
)
|> Repo.transaction()
|> case do
@ -141,7 +135,6 @@ defmodule Cannery.ActivityLog do
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
end
@doc """
Deletes a shot_group.
@ -158,18 +151,27 @@ defmodule Cannery.ActivityLog do
@spec delete_shot_group(ShotGroup.t(), User.t()) ::
{:ok, ShotGroup.t()} | {:error, Changeset.t(ShotGroup.t())}
def delete_shot_group(
%ShotGroup{count: count, user_id: user_id, ammo_group_id: ammo_group_id} = shot_group,
%User{id: user_id} = user
%ShotGroup{user_id: user_id} = shot_group,
%User{id: user_id}
) do
%{count: ammo_group_count, user_id: ^user_id} =
ammo_group = ammo_group_id |> Ammo.get_ammo_group!(user)
Multi.new()
|> Multi.delete(:delete_shot_group, shot_group)
|> Multi.run(
:ammo_group,
fn repo, %{delete_shot_group: %{ammo_group_id: ammo_group_id, user_id: user_id}} ->
{:ok,
repo.one(from ag in AmmoGroup, where: ag.id == ^ammo_group_id and ag.user_id == ^user_id)}
end
)
|> Multi.update(
:update_ammo_group,
ammo_group
|> AmmoGroup.range_changeset(%{"count" => ammo_group_count + count})
fn %{
delete_shot_group: %{count: count},
ammo_group: %{count: ammo_group_count} = ammo_group
} ->
new_ammo_group_count = ammo_group_count + count
ammo_group |> AmmoGroup.range_changeset(%{"count" => new_ammo_group_count})
end
)
|> Repo.transaction()
|> case do
@ -178,21 +180,4 @@ defmodule Cannery.ActivityLog do
{:error, _other_transaction, _value, _changes_so_far} -> {:error, nil}
end
end
@doc """
Returns an `%Ecto.Changeset{}` for tracking shot_group changes.
## Examples
iex> change_shot_group(shot_group)
%Ecto.Changeset{data: %ShotGroup{}}
"""
@spec change_shot_group(ShotGroup.t() | ShotGroup.new_shot_group()) ::
Changeset.t(ShotGroup.t() | ShotGroup.new_shot_group())
@spec change_shot_group(ShotGroup.t() | ShotGroup.new_shot_group(), attrs :: map()) ::
Changeset.t(ShotGroup.t() | ShotGroup.new_shot_group())
def change_shot_group(%ShotGroup{} = shot_group, attrs \\ %{}) do
shot_group |> ShotGroup.update_changeset(attrs)
end
end

View File

@ -4,8 +4,9 @@ defmodule Cannery.ActivityLog.ShotGroup do
"""
use Ecto.Schema
import CanneryWeb.Gettext
import Ecto.Changeset
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo.AmmoGroup}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Ammo.AmmoGroup, Repo}
alias Ecto.{Changeset, UUID}
@primary_key {:id, :binary_id, autogenerate: true}
@ -37,21 +38,84 @@ defmodule Cannery.ActivityLog.ShotGroup do
@type id :: UUID.t()
@doc false
@spec create_changeset(new_shot_group(), attrs :: map()) :: Changeset.t(new_shot_group())
def create_changeset(shot_group, attrs) do
@spec create_changeset(
new_shot_group(),
User.t() | any(),
AmmoGroup.t() | any(),
attrs :: map()
) ::
Changeset.t(new_shot_group())
def create_changeset(
shot_group,
%User{id: user_id},
%AmmoGroup{id: ammo_group_id, user_id: user_id} = ammo_group,
attrs
)
when not (user_id |> is_nil()) and not (ammo_group_id |> is_nil()) do
shot_group
|> cast(attrs, [:count, :notes, :date, :ammo_group_id, :user_id])
|> change(user_id: user_id)
|> change(ammo_group_id: ammo_group_id)
|> cast(attrs, [:count, :notes, :date])
|> validate_number(:count, greater_than: 0)
|> validate_create_shot_group_count(ammo_group)
|> validate_required([:count, :ammo_group_id, :user_id])
end
def create_changeset(shot_group, _invalid_user, _invalid_ammo_group, attrs) do
shot_group
|> cast(attrs, [:count, :notes, :date])
|> validate_number(:count, greater_than: 0)
|> validate_required([:count, :ammo_group_id, :user_id])
|> add_error(:invalid, dgettext("errors", "Please select a valid user and ammo group"))
end
defp validate_create_shot_group_count(changeset, %AmmoGroup{count: ammo_group_count}) do
if changeset |> Changeset.get_field(:count) > ammo_group_count do
error = dgettext("errors", "Count must be less than %{count}", count: ammo_group_count)
changeset |> Changeset.add_error(:count, error)
else
changeset
end
end
@doc false
@spec update_changeset(t() | new_shot_group(), attrs :: map()) ::
@spec update_changeset(t() | new_shot_group(), User.t(), attrs :: map()) ::
Changeset.t(t() | new_shot_group())
def update_changeset(shot_group, attrs) do
def update_changeset(
%ShotGroup{user_id: user_id} = shot_group,
%User{id: user_id} = user,
attrs
)
when not (user_id |> is_nil()) do
shot_group
|> cast(attrs, [:count, :notes, :date])
|> validate_number(:count, greater_than: 0)
|> validate_required([:count])
|> validate_update_shot_group_count(shot_group, user)
end
defp validate_update_shot_group_count(
changeset,
%ShotGroup{count: count} = shot_group,
%User{id: user_id}
)
when not (user_id |> is_nil()) do
%{ammo_group: %AmmoGroup{count: ammo_group_count, user_id: ^user_id}} =
shot_group |> Repo.preload(:ammo_group)
new_shot_group_count = changeset |> Changeset.get_field(:count)
shot_diff_to_add = new_shot_group_count - count
cond do
shot_diff_to_add > ammo_group_count ->
error = dgettext("errors", "Count must be less than %{count}", count: ammo_group_count)
changeset |> Changeset.add_error(:count, error)
new_shot_group_count <= 0 ->
changeset |> Changeset.add_error(:count, dgettext("errors", "Count must be at least 1"))
true ->
changeset
end
end
end

View File

@ -3,6 +3,7 @@ defmodule Cannery.Ammo do
The Ammo context.
"""
import CanneryWeb.Gettext
import Ecto.Query, warn: false
alias Cannery.{Accounts.User, Containers, Repo}
alias Cannery.ActivityLog.ShotGroup
@ -350,18 +351,21 @@ defmodule Cannery.Ammo do
def create_ammo_groups(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
multiplier,
%User{id: user_id} = user
%User{} = user
)
when multiplier >= 1 and multiplier <= @ammo_group_create_limit do
# validate ammo type and container ids belong to user
_valid_ammo_type = get_ammo_type!(ammo_type_id, user)
_valid_container = Containers.get_container!(container_id, user)
when multiplier >= 1 and multiplier <= @ammo_group_create_limit and
not (ammo_type_id |> is_nil()) and not (container_id |> is_nil()) do
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
changesets =
Enum.map(1..multiplier, fn _count ->
%AmmoGroup{} |> AmmoGroup.create_changeset(attrs |> Map.put("user_id", user_id))
%AmmoGroup{}
|> AmmoGroup.create_changeset(
get_ammo_type!(ammo_type_id, user),
Containers.get_container!(container_id, user),
user,
attrs
)
end)
if changesets |> Enum.all?(fn %{valid?: valid} -> valid end) do
@ -386,8 +390,27 @@ defmodule Cannery.Ammo do
end
end
def create_ammo_groups(invalid_attrs, _multiplier, _user) do
{:error, %AmmoGroup{} |> AmmoGroup.create_changeset(invalid_attrs)}
def create_ammo_groups(
%{"ammo_type_id" => ammo_type_id, "container_id" => container_id} = attrs,
_multiplier,
user
)
when not (ammo_type_id |> is_nil()) and not (container_id |> is_nil()) do
changeset =
%AmmoGroup{}
|> AmmoGroup.create_changeset(
get_ammo_type!(ammo_type_id, user),
Containers.get_container!(container_id, user),
user,
attrs
)
|> Changeset.add_error(:multiplier, dgettext("errors", "Invalid multiplier"))
{:error, changeset}
end
def create_ammo_groups(invalid_attrs, _multiplier, user) do
{:error, %AmmoGroup{} |> AmmoGroup.create_changeset(nil, nil, user, invalid_attrs)}
end
@doc """
@ -436,18 +459,4 @@ defmodule Cannery.Ammo do
@spec delete_ammo_group!(AmmoGroup.t(), User.t()) :: AmmoGroup.t()
def delete_ammo_group!(%AmmoGroup{user_id: user_id} = ammo_group, %User{id: user_id}),
do: ammo_group |> Repo.delete!()
@doc """
Returns an `%Changeset{}` for tracking ammo_group changes.
## Examples
iex> change_ammo_group(ammo_group)
%Changeset{data: %AmmoGroup{}}
"""
@spec change_ammo_group(AmmoGroup.t()) :: Changeset.t(AmmoGroup.t())
@spec change_ammo_group(AmmoGroup.t(), attrs :: map()) :: Changeset.t(AmmoGroup.t())
def change_ammo_group(%AmmoGroup{} = ammo_group, attrs \\ %{}),
do: AmmoGroup.update_changeset(ammo_group, attrs)
end

View File

@ -7,6 +7,7 @@ defmodule Cannery.Ammo.AmmoGroup do
"""
use Ecto.Schema
import CanneryWeb.Gettext
import Ecto.Changeset
alias Cannery.Ammo.{AmmoGroup, AmmoType}
alias Cannery.{Accounts.User, ActivityLog.ShotGroup, Containers.Container}
@ -48,22 +49,49 @@ defmodule Cannery.Ammo.AmmoGroup do
@type id :: UUID.t()
@doc false
@spec create_changeset(new_ammo_group(), attrs :: map()) :: Changeset.t(new_ammo_group())
def create_changeset(ammo_group, attrs) do
@spec create_changeset(
new_ammo_group(),
AmmoType.t() | nil,
Container.t() | nil,
User.t(),
attrs :: map()
) :: Changeset.t(new_ammo_group())
def create_changeset(
ammo_group,
%AmmoType{id: ammo_type_id},
%Container{id: container_id, user_id: user_id},
%User{id: user_id},
attrs
)
when not (ammo_type_id |> is_nil()) and not (container_id |> is_nil()) and
not (user_id |> is_nil()) do
ammo_group
|> cast(attrs, [:count, :price_paid, :notes, :staged, :ammo_type_id, :container_id, :user_id])
|> change(ammo_type_id: ammo_type_id)
|> change(user_id: user_id)
|> change(container_id: container_id)
|> cast(attrs, [:count, :price_paid, :notes, :staged])
|> validate_number(:count, greater_than: 0)
|> validate_required([:count, :staged, :ammo_type_id, :container_id, :user_id])
end
@doc """
Invalid changeset, used to prompt user to select ammo type and container
"""
def create_changeset(ammo_group, _invalid_ammo_type, _invalid_container, _invalid_user, attrs) do
ammo_group
|> cast(attrs, [:ammo_type_id, :container_id])
|> validate_required([:ammo_type_id, :container_id])
|> add_error(:invalid, dgettext("errors", "Please select an ammo type and container"))
end
@doc false
@spec update_changeset(t() | new_ammo_group(), attrs :: map()) ::
Changeset.t(t() | new_ammo_group())
def update_changeset(ammo_group, attrs) do
ammo_group
|> cast(attrs, [:count, :price_paid, :notes, :staged, :ammo_type_id, :container_id])
|> cast(attrs, [:count, :price_paid, :notes, :staged])
|> validate_number(:count, greater_than_or_equal_to: 0)
|> validate_required([:count, :staged, :ammo_type_id, :container_id, :user_id])
|> validate_required([:count, :staged])
end
@doc """
@ -75,6 +103,6 @@ defmodule Cannery.Ammo.AmmoGroup do
def range_changeset(ammo_group, attrs) do
ammo_group
|> cast(attrs, [:count, :staged])
|> validate_required([:count, :staged, :ammo_type_id, :container_id, :user_id])
|> validate_required([:count, :staged])
end
end

View File

@ -118,6 +118,6 @@ defmodule Cannery.Ammo.AmmoType do
def update_changeset(ammo_type, attrs) do
ammo_type
|> cast(attrs, changeset_fields())
|> validate_required([:name, :user_id])
|> validate_required(:name)
end
end

View File

@ -55,6 +55,6 @@ defmodule Cannery.Containers.Container do
def update_changeset(container, attrs) do
container
|> cast(attrs, [:name, :desc, :type, :location])
|> validate_required([:name, :type, :user_id])
|> validate_required([:name, :type])
end
end

View File

@ -51,7 +51,7 @@ defmodule Cannery.Invites.Invite do
def update_changeset(invite, attrs) do
invite
|> cast(attrs, [:name, :uses_left, :disabled_at])
|> validate_required([:name, :token, :user_id])
|> validate_required([:name])
|> validate_number(:uses_left, greater_than_or_equal_to: 0)
end
end

View File

@ -47,6 +47,6 @@ defmodule Cannery.Tags.Tag do
def update_changeset(tag, attrs) do
tag
|> cast(attrs, [:name, :bg_color, :text_color])
|> validate_required([:name, :bg_color, :text_color, :user_id])
|> validate_required([:name, :bg_color, :text_color])
end
end

View File

@ -16,9 +16,10 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
},
Socket.t()
) :: {:ok, Socket.t()}
def update(%{ammo_group: _ammo_group, current_user: _current_user} = assigns, socket) do
def update(%{ammo_group: ammo_group, current_user: current_user} = assigns, socket) do
changeset =
%ShotGroup{date: NaiveDateTime.utc_now(), count: 1} |> ActivityLog.change_shot_group()
%ShotGroup{date: NaiveDateTime.utc_now(), count: 1}
|> ShotGroup.create_changeset(current_user, ammo_group, %{})
{:ok, socket |> assign(assigns) |> assign(:changeset, changeset)}
end
@ -27,21 +28,13 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
def handle_event(
"validate",
%{"shot_group" => shot_group_params},
%{
assigns: %{
ammo_group: %AmmoGroup{id: ammo_group_id} = ammo_group,
current_user: %User{id: user_id}
}
} = socket
%{assigns: %{ammo_group: ammo_group, current_user: current_user}} = socket
) do
shot_group_params =
shot_group_params
|> process_params(ammo_group)
|> Map.merge(%{"ammo_group_id" => ammo_group_id, "user_id" => user_id})
params = shot_group_params |> process_params(ammo_group)
changeset =
%ShotGroup{}
|> ActivityLog.change_shot_group(shot_group_params)
|> ShotGroup.create_changeset(current_user, ammo_group, params)
|> Map.put(:action, :validate)
{:noreply, socket |> assign(:changeset, changeset)}
@ -51,17 +44,12 @@ defmodule CanneryWeb.Components.AddShotGroupComponent do
"save",
%{"shot_group" => shot_group_params},
%{
assigns: %{
ammo_group: %{id: ammo_group_id} = ammo_group,
current_user: %{id: user_id} = current_user,
return_to: return_to
}
assigns: %{ammo_group: ammo_group, current_user: current_user, return_to: return_to}
} = socket
) do
socket =
shot_group_params
|> process_params(ammo_group)
|> Map.merge(%{"ammo_group_id" => ammo_group_id, "user_id" => user_id})
|> ActivityLog.create_shot_group(current_user, ammo_group)
|> case do
{:ok, _shot_group} ->

View File

@ -22,7 +22,7 @@ defmodule CanneryWeb.Components.MoveAmmoGroupComponent do
assigns,
socket
) do
changeset = Ammo.change_ammo_group(ammo_group)
changeset = ammo_group |> AmmoGroup.update_changeset(%{})
containers =
Containers.list_containers(current_user)

View File

@ -16,10 +16,16 @@ defmodule CanneryWeb.Components.Topbar do
<nav role="navigation" class="mb-8 px-8 py-4 w-full bg-primary-400">
<div class="flex flex-col sm:flex-row justify-between items-center">
<div class="mb-4 sm:mb-0 sm:mr-8 flex flex-row justify-start items-center space-x-2">
<%= live_redirect("Cannery",
to: Routes.live_path(Endpoint, HomeLive),
class: "mx-2 my-1 leading-5 text-xl text-white hover:underline"
) %>
<%= live_redirect to: Routes.live_path(Endpoint, HomeLive),
class: "inline mx-2 my-1 leading-5 text-xl text-white"
do %>
<img
src={Routes.static_path(Endpoint, "/images/cannery.svg")}
alt={gettext("Cannery logo")}
class="inline-block h-8 mx-1"
/>
<h1 class="inline hover:underline">Cannery</h1>
<% end %>
<%= if @title_content do %>
<span class="mx-2 my-1">

View File

@ -25,7 +25,7 @@ defmodule CanneryWeb.AmmoGroupLive.FormComponent do
socket =
socket
|> assign(:ammo_group_create_limit, @ammo_group_create_limit)
|> assign(:changeset, Ammo.change_ammo_group(ammo_group))
|> assign(:changeset, ammo_group |> AmmoGroup.update_changeset(%{}))
|> assign(:ammo_types, Ammo.list_ammo_types(current_user))
|> assign_new(:containers, fn -> Containers.list_containers(current_user) end)
@ -36,7 +36,7 @@ defmodule CanneryWeb.AmmoGroupLive.FormComponent do
def handle_event(
"validate",
%{"ammo_group" => ammo_group_params},
%{assigns: %{action: action, ammo_group: ammo_group}} = socket
%{assigns: %{action: action, ammo_group: ammo_group, current_user: user}} = socket
) do
changeset_action =
case action do
@ -44,7 +44,24 @@ defmodule CanneryWeb.AmmoGroupLive.FormComponent do
:edit -> :update
end
changeset = ammo_group |> Ammo.change_ammo_group(ammo_group_params)
changeset =
case action do
:new ->
ammo_type =
if ammo_group_params |> Map.has_key?("ammo_type_id"),
do: ammo_group_params |> Map.get("ammo_type_id") |> Ammo.get_ammo_type!(user),
else: nil
container =
if ammo_group_params |> Map.has_key?("container_id"),
do: ammo_group_params |> Map.get("container_id") |> Containers.get_container!(user),
else: nil
ammo_group |> AmmoGroup.create_changeset(ammo_type, container, user, ammo_group_params)
:edit ->
ammo_group |> AmmoGroup.update_changeset(ammo_group_params)
end
changeset =
case changeset |> Changeset.apply_action(changeset_action) do

View File

@ -5,6 +5,7 @@ defmodule CanneryWeb.HomeLive do
use CanneryWeb, :live_view
alias Cannery.Accounts
alias CanneryWeb.Endpoint
@impl true
def mount(_params, _session, socket) do
@ -36,6 +37,13 @@ defmodule CanneryWeb.HomeLive do
def render(assigns) do
~H"""
<div class="mx-auto px-8 sm:px-16 flex flex-col justify-center items-center text-center space-y-4 max-w-3xl">
<img
src={Routes.static_path(Endpoint, "/images/cannery.svg")}
alt={gettext("Cannery logo")}
class="inline-block w-32 hover:-mt-2 hover:mb-2 transition-all duration-500 ease-in-out"
title={gettext("isn't he cute >:3")}
/>
<h1 class="title text-primary-600 text-2xl">
<%= gettext("Welcome to %{name}", name: "Cannery") %>
</h1>

View File

@ -1,6 +1,6 @@
defmodule CanneryWeb.RangeLive.FormComponent do
@moduledoc """
Livecomponent that can update or create a ShotGroup
Livecomponent that can update a ShotGroup
"""
use CanneryWeb, :live_component
@ -24,7 +24,7 @@ defmodule CanneryWeb.RangeLive.FormComponent do
} = assigns,
socket
) do
changeset = shot_group |> ActivityLog.change_shot_group()
changeset = shot_group |> ShotGroup.update_changeset(current_user, %{})
ammo_group = Ammo.get_ammo_group!(ammo_group_id, current_user)
{:ok, socket |> assign(assigns) |> assign(ammo_group: ammo_group, changeset: changeset)}
end
@ -33,11 +33,11 @@ defmodule CanneryWeb.RangeLive.FormComponent do
def handle_event(
"validate",
%{"shot_group" => shot_group_params},
%{assigns: %{shot_group: shot_group}} = socket
%{assigns: %{current_user: current_user, shot_group: shot_group}} = socket
) do
changeset =
shot_group
|> ActivityLog.change_shot_group(shot_group_params)
|> ShotGroup.update_changeset(current_user, shot_group_params)
|> Map.put(:action, :validate)
{:noreply, assign(socket, :changeset, changeset)}

View File

@ -66,7 +66,7 @@ msgid "Invite someone new!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/components/topbar.ex:112
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:48
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
@ -97,7 +97,7 @@ msgid "New Tag"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/components/topbar.ex:105
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:42

View File

@ -79,7 +79,7 @@ msgid "Invite someone new!"
msgstr "Laden Sie jemanden ein!"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/components/topbar.ex:112
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:48
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
@ -110,7 +110,7 @@ msgid "New Tag"
msgstr "Neuer Tag"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/components/topbar.ex:105
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:42

View File

@ -24,14 +24,14 @@ msgstr ""
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:56
#: lib/cannery_web/live/home_live.ex:64
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr ""
"Mit %{name} können Sie ihren Munitionsbestand vor und nach dem Schießen "
"leicht im Auge behalten"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:78
#: lib/cannery_web/live/home_live.ex:86
msgid "Access from any internet-capable device"
msgstr "Zugriff von jedem Internet-fähigen Gerät"
@ -41,12 +41,12 @@ msgid "Admins"
msgstr "Admins"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:92
#: lib/cannery_web/live/home_live.ex:100
msgid "Admins:"
msgstr "Admins:"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.ex:80
msgid "Ammo"
@ -124,7 +124,7 @@ msgid "Container"
msgstr "Behälter"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/live/container_live/index.ex:36
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
@ -167,7 +167,7 @@ msgid "Disable"
msgstr "Deaktivieren"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:53
#: lib/cannery_web/live/home_live.ex:61
msgid "Easy to Use:"
msgstr "Einfache Anwendung:"
@ -222,7 +222,7 @@ msgid "Incendiary"
msgstr "Brandmunition"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:87
#: lib/cannery_web/live/home_live.ex:95
msgid "Instance Information"
msgstr "Instanzinformationen"
@ -232,12 +232,12 @@ msgid "Invite Disabled"
msgstr "Einladung deaktiviert"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118
#: lib/cannery_web/live/home_live.ex:126
msgid "Invite Only"
msgstr "Nur mit Einladung"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:69
#: lib/cannery_web/components/topbar.ex:75
#: lib/cannery_web/live/invite_live/index.ex:41
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
@ -388,17 +388,17 @@ msgid "Primer type"
msgstr "Zündertyp"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:117
#: lib/cannery_web/live/home_live.ex:125
msgid "Public Signups"
msgstr "Öffentliche Registrierung"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:65
#: lib/cannery_web/live/home_live.ex:73
msgid "Secure:"
msgstr "Sicher:"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:68
#: lib/cannery_web/live/home_live.ex:76
msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
"Hosten Sie Ihre eigene Instanz oder verwenden Sie eine Instanz, der Sie "
@ -421,7 +421,7 @@ msgid "Show Ammo type"
msgstr "Zeige Munitionsarten"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:75
#: lib/cannery_web/live/home_live.ex:83
msgid "Simple:"
msgstr "Einfach:"
@ -436,7 +436,7 @@ msgid "Stored in"
msgstr "Gelagert in"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:38
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/live/tag_live/index.ex:32
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
@ -453,7 +453,7 @@ msgid "Text color"
msgstr "Textfarbe"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
#: lib/cannery_web/live/home_live.ex:52
msgid "The self-hosted firearm tracker website"
msgstr "Die selbst-gehostete Website zur Verwaltung von Schusswaffen"
@ -492,12 +492,12 @@ msgid "Uses left"
msgstr "Verbleibende Nutzung"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:40
#: lib/cannery_web/live/home_live.ex:48
msgid "Welcome to %{name}"
msgstr "Willkommen %{name}"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69
#: lib/cannery_web/live/home_live.ex:77
msgid "Your data stays with you, period"
msgstr "Ihre Daten bleiben bei Ihnen, Punkt"
@ -507,7 +507,7 @@ msgid "No tags for this container"
msgstr "Keine Tags für diesen Behälter"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/components/topbar.ex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr "Schießplatz"
@ -863,27 +863,27 @@ msgid "Language"
msgstr "Sprache"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:139
#: lib/cannery_web/live/home_live.ex:147
msgid "Get involved!"
msgstr "Mach mit!"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:156
#: lib/cannery_web/live/home_live.ex:164
msgid "Help translate"
msgstr "Hilf beim Übersetzen"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:165
#: lib/cannery_web/live/home_live.ex:173
msgid "Report bugs or request features"
msgstr "Sende Bugs oder Erweiterungsvorschläge"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:147
#: lib/cannery_web/live/home_live.ex:155
msgid "View the source code"
msgstr "Quellcode ansehen"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
msgid "Catalog"
msgstr ""
@ -918,3 +918,14 @@ msgstr "Diese Munitionsgruppe ist nicht in einem Behälter"
#: lib/cannery_web/live/container_live/show.html.heex:27
msgid "Packs:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:24
#: lib/cannery_web/live/home_live.ex:42
msgid "Cannery logo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
msgid "isn't he cute >:3"
msgstr ""

View File

@ -152,13 +152,13 @@ msgid "Tag could not be added"
msgstr "Tag konnte nicht hinzugefügt werden"
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:125
#: lib/cannery/activity_log/shot_group.ex:115
msgid "Count must be at least 1"
msgstr "Anzahl muss mindestens 1 sein"
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:73
#: lib/cannery/activity_log.ex:120
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_group.ex:111
msgid "Count must be less than %{count}"
msgstr "Anzahl muss weniger als %{count} betragen"
@ -176,13 +176,28 @@ msgid "Tag could not be removed"
msgstr "Tag konnte nicht gelöscht werden"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:126
#: lib/cannery_web/live/ammo_group_live/form_component.ex:143
msgid "Could not parse number of copies"
msgstr "Konnte die Anzahl der Kopien nicht verstehen"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:111
#: lib/cannery_web/live/ammo_group_live/form_component.ex:128
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
"Ungültige Nummer an Kopien. Muss zwischen 1 and %{max} liegen. War "
"%{multiplier}"
#, elixir-autogen, elixir-format
#: lib/cannery/ammo.ex:407
msgid "Invalid multiplier"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo/ammo_group.ex:84
msgid "Please select an ammo type and container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log/shot_group.ex:69
msgid "Please select a valid user and ammo group"
msgstr ""

View File

@ -113,7 +113,7 @@ msgid "Are you sure you want to delete your account?"
msgstr "Sind Sie sicher, dass sie Ihren Account löschen möchten?"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:84
#: lib/cannery_web/components/topbar.ex:90
msgid "Are you sure you want to log out?"
msgstr "Wirklich ausloggen?"
@ -162,7 +162,7 @@ msgid "Please check your email to verify your account"
msgstr "Bitte überprüfen Sie ihre Mailbox und bestätigen Sie das Nutzerkonto"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:96
#: lib/cannery_web/live/home_live.ex:104
msgid "Register to setup %{name}"
msgstr "Registrieren Sie sich, um %{name} zu bearbeiten"
@ -205,7 +205,7 @@ msgid "Adding..."
msgstr "Füge hinzu..."
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.ex:68
#: lib/cannery_web/components/add_shot_group_component.ex:56
msgid "Shots recorded successfully"
msgstr "Schüsse erfolgreich dokumentiert"
@ -283,12 +283,12 @@ msgid "Ammo unstaged succesfully"
msgstr "Munition erfolgreich demarkiert"
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:88
#: lib/cannery_web/live/ammo_group_live/form_component.ex:105
msgid "Ammo updated successfully"
msgstr "Munitionsgruppe erfolgreich aktualisiert"
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:147
#: lib/cannery_web/live/ammo_group_live/form_component.ex:164
msgid "Ammo added successfully"
msgid_plural "Ammo added successfully"
msgstr[0] "Munitionsgruppe erfolgreich aktualisiert"

View File

@ -11,12 +11,12 @@ msgid ""
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:56
#: lib/cannery_web/live/home_live.ex:64
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:78
#: lib/cannery_web/live/home_live.ex:86
msgid "Access from any internet-capable device"
msgstr ""
@ -26,12 +26,12 @@ msgid "Admins"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:92
#: lib/cannery_web/live/home_live.ex:100
msgid "Admins:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.ex:80
msgid "Ammo"
@ -109,7 +109,7 @@ msgid "Container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/live/container_live/index.ex:36
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
@ -152,7 +152,7 @@ msgid "Disable"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:53
#: lib/cannery_web/live/home_live.ex:61
msgid "Easy to Use:"
msgstr ""
@ -207,7 +207,7 @@ msgid "Incendiary"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:87
#: lib/cannery_web/live/home_live.ex:95
msgid "Instance Information"
msgstr ""
@ -217,12 +217,12 @@ msgid "Invite Disabled"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118
#: lib/cannery_web/live/home_live.ex:126
msgid "Invite Only"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:69
#: lib/cannery_web/components/topbar.ex:75
#: lib/cannery_web/live/invite_live/index.ex:41
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
@ -373,17 +373,17 @@ msgid "Primer type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:117
#: lib/cannery_web/live/home_live.ex:125
msgid "Public Signups"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:65
#: lib/cannery_web/live/home_live.ex:73
msgid "Secure:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:68
#: lib/cannery_web/live/home_live.ex:76
msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
@ -404,7 +404,7 @@ msgid "Show Ammo type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:75
#: lib/cannery_web/live/home_live.ex:83
msgid "Simple:"
msgstr ""
@ -419,7 +419,7 @@ msgid "Stored in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:38
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/live/tag_live/index.ex:32
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
@ -436,7 +436,7 @@ msgid "Text color"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
#: lib/cannery_web/live/home_live.ex:52
msgid "The self-hosted firearm tracker website"
msgstr ""
@ -475,12 +475,12 @@ msgid "Uses left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:40
#: lib/cannery_web/live/home_live.ex:48
msgid "Welcome to %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69
#: lib/cannery_web/live/home_live.ex:77
msgid "Your data stays with you, period"
msgstr ""
@ -490,7 +490,7 @@ msgid "No tags for this container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/components/topbar.ex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr ""
@ -846,27 +846,27 @@ msgid "Language"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:139
#: lib/cannery_web/live/home_live.ex:147
msgid "Get involved!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:156
#: lib/cannery_web/live/home_live.ex:164
msgid "Help translate"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:165
#: lib/cannery_web/live/home_live.ex:173
msgid "Report bugs or request features"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:147
#: lib/cannery_web/live/home_live.ex:155
msgid "View the source code"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
msgid "Catalog"
msgstr ""
@ -901,3 +901,14 @@ msgstr ""
#: lib/cannery_web/live/container_live/show.html.heex:27
msgid "Packs:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:24
#: lib/cannery_web/live/home_live.ex:42
msgid "Cannery logo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
msgid "isn't he cute >:3"
msgstr ""

View File

@ -67,7 +67,7 @@ msgid "Invite someone new!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/components/topbar.ex:112
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:48
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
@ -98,7 +98,7 @@ msgid "New Tag"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/components/topbar.ex:105
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:42

View File

@ -12,12 +12,12 @@ msgstr ""
"Plural-Forms: nplurals=2\n"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:56
#: lib/cannery_web/live/home_live.ex:64
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:78
#: lib/cannery_web/live/home_live.ex:86
msgid "Access from any internet-capable device"
msgstr ""
@ -27,12 +27,12 @@ msgid "Admins"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:92
#: lib/cannery_web/live/home_live.ex:100
msgid "Admins:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.ex:80
msgid "Ammo"
@ -110,7 +110,7 @@ msgid "Container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/live/container_live/index.ex:36
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
@ -153,7 +153,7 @@ msgid "Disable"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:53
#: lib/cannery_web/live/home_live.ex:61
msgid "Easy to Use:"
msgstr ""
@ -208,7 +208,7 @@ msgid "Incendiary"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:87
#: lib/cannery_web/live/home_live.ex:95
msgid "Instance Information"
msgstr ""
@ -218,12 +218,12 @@ msgid "Invite Disabled"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118
#: lib/cannery_web/live/home_live.ex:126
msgid "Invite Only"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:69
#: lib/cannery_web/components/topbar.ex:75
#: lib/cannery_web/live/invite_live/index.ex:41
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
@ -374,17 +374,17 @@ msgid "Primer type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:117
#: lib/cannery_web/live/home_live.ex:125
msgid "Public Signups"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:65
#: lib/cannery_web/live/home_live.ex:73
msgid "Secure:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:68
#: lib/cannery_web/live/home_live.ex:76
msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
@ -405,7 +405,7 @@ msgid "Show Ammo type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:75
#: lib/cannery_web/live/home_live.ex:83
msgid "Simple:"
msgstr ""
@ -420,7 +420,7 @@ msgid "Stored in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:38
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/live/tag_live/index.ex:32
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
@ -437,7 +437,7 @@ msgid "Text color"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
#: lib/cannery_web/live/home_live.ex:52
msgid "The self-hosted firearm tracker website"
msgstr ""
@ -476,12 +476,12 @@ msgid "Uses left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:40
#: lib/cannery_web/live/home_live.ex:48
msgid "Welcome to %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69
#: lib/cannery_web/live/home_live.ex:77
msgid "Your data stays with you, period"
msgstr ""
@ -491,7 +491,7 @@ msgid "No tags for this container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/components/topbar.ex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr ""
@ -847,27 +847,27 @@ msgid "Language"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:139
#: lib/cannery_web/live/home_live.ex:147
msgid "Get involved!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:156
#: lib/cannery_web/live/home_live.ex:164
msgid "Help translate"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:165
#: lib/cannery_web/live/home_live.ex:173
msgid "Report bugs or request features"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:147
#: lib/cannery_web/live/home_live.ex:155
msgid "View the source code"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
msgid "Catalog"
msgstr ""
@ -902,3 +902,14 @@ msgstr ""
#: lib/cannery_web/live/container_live/show.html.heex:27
msgid "Packs:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:24
#: lib/cannery_web/live/home_live.ex:42
msgid "Cannery logo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
msgid "isn't he cute >:3"
msgstr ""

View File

@ -139,13 +139,13 @@ msgid "Tag could not be added"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:125
#: lib/cannery/activity_log/shot_group.ex:115
msgid "Count must be at least 1"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:73
#: lib/cannery/activity_log.ex:120
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_group.ex:111
msgid "Count must be less than %{count}"
msgstr ""
@ -161,11 +161,26 @@ msgid "Tag could not be removed"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:126
#: lib/cannery_web/live/ammo_group_live/form_component.ex:143
msgid "Could not parse number of copies"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:111
#: lib/cannery_web/live/ammo_group_live/form_component.ex:128
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo.ex:407
msgid "Invalid multiplier"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo/ammo_group.ex:84
msgid "Please select an ammo type and container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log/shot_group.ex:69
msgid "Please select a valid user and ammo group"
msgstr ""

View File

@ -99,7 +99,7 @@ msgid "Are you sure you want to delete your account?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:84
#: lib/cannery_web/components/topbar.ex:90
msgid "Are you sure you want to log out?"
msgstr ""
@ -144,7 +144,7 @@ msgid "Please check your email to verify your account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:96
#: lib/cannery_web/live/home_live.ex:104
msgid "Register to setup %{name}"
msgstr ""
@ -185,7 +185,7 @@ msgid "Adding..."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.ex:68
#: lib/cannery_web/components/add_shot_group_component.ex:56
msgid "Shots recorded successfully"
msgstr ""
@ -263,12 +263,12 @@ msgid "Ammo unstaged succesfully"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:88
#: lib/cannery_web/live/ammo_group_live/form_component.ex:105
msgid "Ammo updated successfully"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:147
#: lib/cannery_web/live/ammo_group_live/form_component.ex:164
msgid "Ammo added successfully"
msgid_plural "Ammo added successfully"
msgstr[0] ""

View File

@ -138,13 +138,13 @@ msgid "Tag could not be added"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:125
#: lib/cannery/activity_log/shot_group.ex:115
msgid "Count must be at least 1"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:73
#: lib/cannery/activity_log.ex:120
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_group.ex:111
msgid "Count must be less than %{count}"
msgstr ""
@ -160,11 +160,26 @@ msgid "Tag could not be removed"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:126
#: lib/cannery_web/live/ammo_group_live/form_component.ex:143
msgid "Could not parse number of copies"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:111
#: lib/cannery_web/live/ammo_group_live/form_component.ex:128
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo.ex:407
msgid "Invalid multiplier"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo/ammo_group.ex:84
msgid "Please select an ammo type and container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log/shot_group.ex:69
msgid "Please select a valid user and ammo group"
msgstr ""

View File

@ -77,7 +77,7 @@ msgid "Invite someone new!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/components/topbar.ex:112
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:48
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
@ -108,7 +108,7 @@ msgid "New Tag"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/components/topbar.ex:105
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:42

View File

@ -22,12 +22,12 @@ msgstr ""
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:56
#: lib/cannery_web/live/home_live.ex:64
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:78
#: lib/cannery_web/live/home_live.ex:86
msgid "Access from any internet-capable device"
msgstr ""
@ -37,12 +37,12 @@ msgid "Admins"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:92
#: lib/cannery_web/live/home_live.ex:100
msgid "Admins:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.ex:80
msgid "Ammo"
@ -120,7 +120,7 @@ msgid "Container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/live/container_live/index.ex:36
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
@ -163,7 +163,7 @@ msgid "Disable"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:53
#: lib/cannery_web/live/home_live.ex:61
msgid "Easy to Use:"
msgstr ""
@ -218,7 +218,7 @@ msgid "Incendiary"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:87
#: lib/cannery_web/live/home_live.ex:95
msgid "Instance Information"
msgstr ""
@ -228,12 +228,12 @@ msgid "Invite Disabled"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118
#: lib/cannery_web/live/home_live.ex:126
msgid "Invite Only"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:69
#: lib/cannery_web/components/topbar.ex:75
#: lib/cannery_web/live/invite_live/index.ex:41
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
@ -384,17 +384,17 @@ msgid "Primer type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:117
#: lib/cannery_web/live/home_live.ex:125
msgid "Public Signups"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:65
#: lib/cannery_web/live/home_live.ex:73
msgid "Secure:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:68
#: lib/cannery_web/live/home_live.ex:76
msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
@ -415,7 +415,7 @@ msgid "Show Ammo type"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:75
#: lib/cannery_web/live/home_live.ex:83
msgid "Simple:"
msgstr ""
@ -430,7 +430,7 @@ msgid "Stored in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:38
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/live/tag_live/index.ex:32
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
@ -447,7 +447,7 @@ msgid "Text color"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
#: lib/cannery_web/live/home_live.ex:52
msgid "The self-hosted firearm tracker website"
msgstr ""
@ -486,12 +486,12 @@ msgid "Uses left"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:40
#: lib/cannery_web/live/home_live.ex:48
msgid "Welcome to %{name}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69
#: lib/cannery_web/live/home_live.ex:77
msgid "Your data stays with you, period"
msgstr ""
@ -501,7 +501,7 @@ msgid "No tags for this container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/components/topbar.ex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr ""
@ -857,27 +857,27 @@ msgid "Language"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:139
#: lib/cannery_web/live/home_live.ex:147
msgid "Get involved!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:156
#: lib/cannery_web/live/home_live.ex:164
msgid "Help translate"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:165
#: lib/cannery_web/live/home_live.ex:173
msgid "Report bugs or request features"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:147
#: lib/cannery_web/live/home_live.ex:155
msgid "View the source code"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
msgid "Catalog"
msgstr ""
@ -912,3 +912,14 @@ msgstr ""
#: lib/cannery_web/live/container_live/show.html.heex:27
msgid "Packs:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:24
#: lib/cannery_web/live/home_live.ex:42
msgid "Cannery logo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
msgid "isn't he cute >:3"
msgstr ""

View File

@ -149,13 +149,13 @@ msgid "Tag could not be added"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:125
#: lib/cannery/activity_log/shot_group.ex:115
msgid "Count must be at least 1"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:73
#: lib/cannery/activity_log.ex:120
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_group.ex:111
msgid "Count must be less than %{count}"
msgstr ""
@ -171,11 +171,26 @@ msgid "Tag could not be removed"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:126
#: lib/cannery_web/live/ammo_group_live/form_component.ex:143
msgid "Could not parse number of copies"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:111
#: lib/cannery_web/live/ammo_group_live/form_component.ex:128
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo.ex:407
msgid "Invalid multiplier"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo/ammo_group.ex:84
msgid "Please select an ammo type and container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log/shot_group.ex:69
msgid "Please select a valid user and ammo group"
msgstr ""

View File

@ -109,7 +109,7 @@ msgid "Are you sure you want to delete your account?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:84
#: lib/cannery_web/components/topbar.ex:90
msgid "Are you sure you want to log out?"
msgstr ""
@ -154,7 +154,7 @@ msgid "Please check your email to verify your account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:96
#: lib/cannery_web/live/home_live.ex:104
msgid "Register to setup %{name}"
msgstr ""
@ -195,7 +195,7 @@ msgid "Adding..."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.ex:68
#: lib/cannery_web/components/add_shot_group_component.ex:56
msgid "Shots recorded successfully"
msgstr ""
@ -273,12 +273,12 @@ msgid "Ammo unstaged succesfully"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:88
#: lib/cannery_web/live/ammo_group_live/form_component.ex:105
msgid "Ammo updated successfully"
msgstr ""
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:147
#: lib/cannery_web/live/ammo_group_live/form_component.ex:164
msgid "Ammo added successfully"
msgid_plural "Ammo added successfully"
msgstr[0] ""

View File

@ -79,7 +79,7 @@ msgid "Invite someone new!"
msgstr "Invitez une nouvelle personne!"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:106
#: lib/cannery_web/components/topbar.ex:112
#: lib/cannery_web/templates/user_confirmation/new.html.heex:30
#: lib/cannery_web/templates/user_registration/new.html.heex:48
#: lib/cannery_web/templates/user_reset_password/edit.html.heex:48
@ -110,7 +110,7 @@ msgid "New Tag"
msgstr "Nouveau tag"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:99
#: lib/cannery_web/components/topbar.ex:105
#: lib/cannery_web/templates/user_confirmation/new.html.heex:25
#: lib/cannery_web/templates/user_registration/new.html.heex:3
#: lib/cannery_web/templates/user_registration/new.html.heex:42

View File

@ -24,14 +24,14 @@ msgstr ""
## date. Leave "msgstr"s empty as changing them here has no
## effect: edit them in PO (.po) files instead.
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:56
#: lib/cannery_web/live/home_live.ex:64
msgid "%{name} lets you easily keep an eye on your ammo levels before and after range day"
msgstr ""
"%{name} vous permet de facilement garder un œil sur votre niveau de munition "
"avant et après une journée de stand"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:78
#: lib/cannery_web/live/home_live.ex:86
msgid "Access from any internet-capable device"
msgstr "Accédez depuis nimporte quel appareil connecté à internet"
@ -41,12 +41,12 @@ msgid "Admins"
msgstr "Administrateur·ices"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:92
#: lib/cannery_web/live/home_live.ex:100
msgid "Admins:"
msgstr "Administrateur·ices:"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/live/ammo_group_live/index.html.heex:3
#: lib/cannery_web/live/range_live/index.ex:80
msgid "Ammo"
@ -124,7 +124,7 @@ msgid "Container"
msgstr "Conteneur"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/live/container_live/index.ex:36
#: lib/cannery_web/live/container_live/index.html.heex:3
msgid "Containers"
@ -167,7 +167,7 @@ msgid "Disable"
msgstr "Désactiver"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:53
#: lib/cannery_web/live/home_live.ex:61
msgid "Easy to Use:"
msgstr "Simple à utiliser:"
@ -222,7 +222,7 @@ msgid "Incendiary"
msgstr "Incendiaire"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:87
#: lib/cannery_web/live/home_live.ex:95
msgid "Instance Information"
msgstr "Information de linstance"
@ -232,12 +232,12 @@ msgid "Invite Disabled"
msgstr "Invitation désactivée"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:118
#: lib/cannery_web/live/home_live.ex:126
msgid "Invite Only"
msgstr "Uniquement sur invitation"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:69
#: lib/cannery_web/components/topbar.ex:75
#: lib/cannery_web/live/invite_live/index.ex:41
#: lib/cannery_web/live/invite_live/index.html.heex:3
msgid "Invites"
@ -388,17 +388,17 @@ msgid "Primer type"
msgstr "Type damorce"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:117
#: lib/cannery_web/live/home_live.ex:125
msgid "Public Signups"
msgstr "Enregistrements publics"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:65
#: lib/cannery_web/live/home_live.ex:73
msgid "Secure:"
msgstr "Sécurisé:"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:68
#: lib/cannery_web/live/home_live.ex:76
msgid "Self-host your own instance, or use an instance from someone you trust."
msgstr ""
"Auto-hébergez votre propre instance ou utilisez celle dune personne à "
@ -421,7 +421,7 @@ msgid "Show Ammo type"
msgstr "Montrer le type de munition"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:75
#: lib/cannery_web/live/home_live.ex:83
msgid "Simple:"
msgstr "Simple:"
@ -436,7 +436,7 @@ msgid "Stored in"
msgstr "Est stocké dans"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:38
#: lib/cannery_web/components/topbar.ex:44
#: lib/cannery_web/live/tag_live/index.ex:32
#: lib/cannery_web/live/tag_live/index.html.heex:3
msgid "Tags"
@ -455,7 +455,7 @@ msgid "Text color"
msgstr "Couleur du texte"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
#: lib/cannery_web/live/home_live.ex:52
msgid "The self-hosted firearm tracker website"
msgstr "Le site web de suivi darme à feux auto-hébergé"
@ -494,12 +494,12 @@ msgid "Uses left"
msgstr "Utilisations restantes"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:40
#: lib/cannery_web/live/home_live.ex:48
msgid "Welcome to %{name}"
msgstr "Bienvenue à %{name}"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:69
#: lib/cannery_web/live/home_live.ex:77
msgid "Your data stays with you, period"
msgstr "Vos données restent avec vous, point final"
@ -509,7 +509,7 @@ msgid "No tags for this container"
msgstr "Aucun tag pour ce conteneur"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:62
#: lib/cannery_web/components/topbar.ex:68
#: lib/cannery_web/live/ammo_group_live/index.ex:84
msgid "Range"
msgstr "Portée"
@ -865,27 +865,27 @@ msgid "Language"
msgstr "Langue"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:139
#: lib/cannery_web/live/home_live.ex:147
msgid "Get involved!"
msgstr "Impliquez-vous!"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:156
#: lib/cannery_web/live/home_live.ex:164
msgid "Help translate"
msgstr "Aider à la traduction"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:165
#: lib/cannery_web/live/home_live.ex:173
msgid "Report bugs or request features"
msgstr "Remonter des bugs ou une demande de fonctionnalité"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:147
#: lib/cannery_web/live/home_live.ex:155
msgid "View the source code"
msgstr "Voir le code source"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:50
#: lib/cannery_web/components/topbar.ex:56
#: lib/cannery_web/live/ammo_type_live/index.html.heex:3
msgid "Catalog"
msgstr ""
@ -920,3 +920,14 @@ msgstr "Ce groupe de munition nest pas dans un conteneur"
#: lib/cannery_web/live/container_live/show.html.heex:27
msgid "Packs:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:24
#: lib/cannery_web/live/home_live.ex:42
msgid "Cannery logo"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:44
msgid "isn't he cute >:3"
msgstr ""

View File

@ -153,13 +153,13 @@ msgid "Tag could not be added"
msgstr "Le tag na pas pu être ajouté"
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:125
#: lib/cannery/activity_log/shot_group.ex:115
msgid "Count must be at least 1"
msgstr "Le nombre doit être au moins égal à 1"
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log.ex:73
#: lib/cannery/activity_log.ex:120
#: lib/cannery/activity_log/shot_group.ex:74
#: lib/cannery/activity_log/shot_group.ex:111
msgid "Count must be less than %{count}"
msgstr "La quantité doit être inférieur à %{count}"
@ -177,11 +177,26 @@ msgid "Tag could not be removed"
msgstr "Le tag na pas pu être retiré"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:126
#: lib/cannery_web/live/ammo_group_live/form_component.ex:143
msgid "Could not parse number of copies"
msgstr "Impossible d'analyser le nombre de copies"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:111
#: lib/cannery_web/live/ammo_group_live/form_component.ex:128
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}"
#, elixir-autogen, elixir-format
#: lib/cannery/ammo.ex:407
msgid "Invalid multiplier"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/ammo/ammo_group.ex:84
msgid "Please select an ammo type and container"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery/activity_log/shot_group.ex:69
msgid "Please select a valid user and ammo group"
msgstr ""

View File

@ -114,7 +114,7 @@ msgid "Are you sure you want to delete your account?"
msgstr "Êtes-vous certain·e de supprimer votre compte?"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:84
#: lib/cannery_web/components/topbar.ex:90
msgid "Are you sure you want to log out?"
msgstr "Êtes-vous certain·e de vouloir vous déconnecter?"
@ -163,7 +163,7 @@ msgid "Please check your email to verify your account"
msgstr "Veuillez vérifier votre mél pour confirmer votre compte"
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:96
#: lib/cannery_web/live/home_live.ex:104
msgid "Register to setup %{name}"
msgstr "Senregistrer pour mettre en place %{name}"
@ -206,7 +206,7 @@ msgid "Adding..."
msgstr "Ajout en cours…"
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.ex:68
#: lib/cannery_web/components/add_shot_group_component.ex:56
msgid "Shots recorded successfully"
msgstr "Tirs enregistré avec succès"
@ -284,12 +284,12 @@ msgid "Ammo unstaged succesfully"
msgstr "Groupe de munition désélectionner avec succès"
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:88
#: lib/cannery_web/live/ammo_group_live/form_component.ex:105
msgid "Ammo updated successfully"
msgstr "Groupe de munition mis à jour avec succès"
#, elixir-autogen, elixir-format, fuzzy
#: lib/cannery_web/live/ammo_group_live/form_component.ex:147
#: lib/cannery_web/live/ammo_group_live/form_component.ex:164
msgid "Ammo added successfully"
msgid_plural "Ammo added successfully"
msgstr[0] "Groupe de munition mis à jour avec succès"

View File

@ -98,7 +98,7 @@ msgid "Are you sure you want to delete your account?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/topbar.ex:84
#: lib/cannery_web/components/topbar.ex:90
msgid "Are you sure you want to log out?"
msgstr ""
@ -143,7 +143,7 @@ msgid "Please check your email to verify your account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/home_live.ex:96
#: lib/cannery_web/live/home_live.ex:104
msgid "Register to setup %{name}"
msgstr ""
@ -184,7 +184,7 @@ msgid "Adding..."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/components/add_shot_group_component.ex:68
#: lib/cannery_web/components/add_shot_group_component.ex:56
msgid "Shots recorded successfully"
msgstr ""
@ -262,12 +262,12 @@ msgid "Ammo unstaged succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:88
#: lib/cannery_web/live/ammo_group_live/form_component.ex:105
msgid "Ammo updated successfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:147
#: lib/cannery_web/live/ammo_group_live/form_component.ex:164
msgid "Ammo added successfully"
msgid_plural "Ammo added successfully"
msgstr[0] ""

View File

@ -178,10 +178,5 @@ defmodule Cannery.ActivityLogTest do
ActivityLog.get_shot_group!(shot_group.id, current_user)
end
end
test "change_shot_group/1 returns a shot_group changeset",
%{shot_group: shot_group} do
assert %Ecto.Changeset{} = ActivityLog.change_shot_group(shot_group)
end
end
end

View File

@ -180,9 +180,5 @@ defmodule Cannery.AmmoTest do
Ammo.get_ammo_group!(ammo_group.id, current_user)
end
end
test "change_ammo_group/1 returns a ammo_group changeset", %{ammo_group: ammo_group} do
assert %Changeset{} = Ammo.change_ammo_group(ammo_group)
end
end
end