diff --git a/lib/cannery/accounts.ex b/lib/cannery/accounts.ex index e89426b4..29bf4973 100644 --- a/lib/cannery/accounts.ex +++ b/lib/cannery/accounts.ex @@ -63,6 +63,19 @@ defmodule Cannery.Accounts do @spec get_user!(User.t()) :: User.t() def get_user!(id), do: Repo.get!(User, id) + @doc """ + Returns all users grouped by role. + + ## Examples + + iex> list_users_by_role(%User{id: 123, role: :admin}) + [admin: [%User{}], user: [%User{}, %User{}]] + + """ + @spec list_all_users_by_role(User.t()) :: %{String.t() => [User.t()]} + def list_all_users_by_role(%User{role: :admin}) do + Repo.all(User) |> Enum.group_by(fn user -> user.role end) + end @doc """ Returns all users for a certain role. diff --git a/lib/cannery_web/components/invite_card.ex b/lib/cannery_web/components/invite_card.ex new file mode 100644 index 00000000..7e28976d --- /dev/null +++ b/lib/cannery_web/components/invite_card.ex @@ -0,0 +1,39 @@ +defmodule CanneryWeb.Components.InviteCard do + @moduledoc """ + Display card for an invite + """ + + use CanneryWeb, :component + alias CanneryWeb.Endpoint + + def invite_card(assigns) do + ~H""" +
+

+ <%= @invite.name %> +

+ + <%= if @invite.disabled_at |> is_nil() do %> +

+ <%= gettext("Uses Left:") %> + <%= @invite.uses_left || "Unlimited" %> +

+ <% else %> +

+ <%= gettext("Invite Disabled") %> +

+ <% end %> + + <%= Routes.user_registration_url(Endpoint, :new, invite: @invite.token) %> + + + <%= if @inner_block do %> +
+ <%= render_slot(@inner_block) %> +
+ <% end %> +
+ """ + end +end diff --git a/lib/cannery_web/components/user_card.ex b/lib/cannery_web/components/user_card.ex new file mode 100644 index 00000000..7d9d886e --- /dev/null +++ b/lib/cannery_web/components/user_card.ex @@ -0,0 +1,35 @@ +defmodule CanneryWeb.Components.UserCard do + @moduledoc """ + Display card for a user + """ + + use CanneryWeb, :component + + def user_card(assigns) do + ~H""" +
+

+ <%= @user.email %> +

+ +

+ <%= if @user.confirmed_at |> is_nil() do %> + Email unconfirmed + <% else %> + User was confirmed at <%= @user.confirmed_at |> display_datetime() %> + <% end %> +

+ + <%= if @inner_block do %> +
+ <%= render_slot(@inner_block) %> +
+ <% end %> +
+ """ + end +end diff --git a/lib/cannery_web/controllers/user_registration_controller.ex b/lib/cannery_web/controllers/user_registration_controller.ex index 65f87ea9..58fdc74c 100644 --- a/lib/cannery_web/controllers/user_registration_controller.ex +++ b/lib/cannery_web/controllers/user_registration_controller.ex @@ -3,7 +3,7 @@ defmodule CanneryWeb.UserRegistrationController do import CanneryWeb.Gettext alias Cannery.{Accounts, Invites} alias Cannery.Accounts.User - alias CanneryWeb.{HomeLive, UserAuth} + alias CanneryWeb.{Endpoint, HomeLive} def new(conn, %{"invite" => invite_token}) do invite = Invites.get_invite_by_token(invite_token) @@ -13,7 +13,7 @@ defmodule CanneryWeb.UserRegistrationController do else conn |> put_flash(:error, dgettext("errors", "Sorry, this invite was not found or expired")) - |> redirect(to: Routes.live_path(CanneryWeb.Endpoint, HomeLive)) + |> redirect(to: Routes.live_path(Endpoint, HomeLive)) end end @@ -23,7 +23,7 @@ defmodule CanneryWeb.UserRegistrationController do else conn |> put_flash(:error, dgettext("errors", "Sorry, public registration is disabled")) - |> redirect(to: Routes.live_path(CanneryWeb.Endpoint, HomeLive)) + |> redirect(to: Routes.live_path(Endpoint, HomeLive)) end end @@ -41,7 +41,7 @@ defmodule CanneryWeb.UserRegistrationController do else conn |> put_flash(:error, dgettext("errors", "Sorry, this invite was not found or expired")) - |> redirect(to: Routes.live_path(CanneryWeb.Endpoint, HomeLive)) + |> redirect(to: Routes.live_path(Endpoint, HomeLive)) end end @@ -51,7 +51,7 @@ defmodule CanneryWeb.UserRegistrationController do else conn |> put_flash(:error, dgettext("errors", "Sorry, public registration is disabled")) - |> redirect(to: Routes.live_path(CanneryWeb.Endpoint, HomeLive)) + |> redirect(to: Routes.live_path(Endpoint, HomeLive)) end end @@ -68,8 +68,8 @@ defmodule CanneryWeb.UserRegistrationController do ) conn - |> put_flash(:info, dgettext("prompts", "User created successfully.")) - |> UserAuth.log_in_user(user) + |> put_flash(:info, dgettext("prompts", "Please check your email to verify your account")) + |> redirect(to: Routes.user_session_path(Endpoint, :new)) {:error, %Ecto.Changeset{} = changeset} -> render(conn, "new.html", changeset: changeset, invite: invite) diff --git a/lib/cannery_web/live/invite_live/index.ex b/lib/cannery_web/live/invite_live/index.ex index c1b8f11d..067c3476 100644 --- a/lib/cannery_web/live/invite_live/index.ex +++ b/lib/cannery_web/live/invite_live/index.ex @@ -4,9 +4,8 @@ defmodule CanneryWeb.InviteLive.Index do """ use CanneryWeb, :live_view - - alias Cannery.Invites - alias Cannery.Invites.Invite + import CanneryWeb.Components.{InviteCard, UserCard} + alias Cannery.{Accounts, Invites, Invites.Invite} alias CanneryWeb.{Endpoint, HomeLive} @impl true @@ -44,7 +43,11 @@ defmodule CanneryWeb.InviteLive.Index do end @impl true - def handle_event("delete", %{"id" => id}, %{assigns: %{current_user: current_user}} = socket) do + def handle_event( + "delete_invite", + %{"id" => id}, + %{assigns: %{current_user: current_user}} = socket + ) do %{name: invite_name} = id |> Invites.get_invite!(current_user) |> Invites.delete_invite!(current_user) @@ -106,7 +109,30 @@ defmodule CanneryWeb.InviteLive.Index do {:noreply, socket} end + @impl true + def handle_event( + "delete_user", + %{"id" => id}, + %{assigns: %{current_user: current_user}} = socket + ) do + %{email: user_email} = Accounts.get_user!(id) |> Accounts.delete_user!(current_user) + + prompt = dgettext("prompts", "%{name} deleted succesfully", name: user_email) + + {:noreply, socket |> put_flash(:info, prompt) |> display_invites()} + end + defp display_invites(%{assigns: %{current_user: current_user}} = socket) do - socket |> assign(:invites, Invites.list_invites(current_user)) + invites = Invites.list_invites(current_user) + + all_users = Accounts.list_all_users_by_role(current_user) + + admins = + all_users + |> Map.get(:admin, []) + |> Enum.reject(fn %{id: user_id} -> user_id == current_user.id end) + + users = all_users |> Map.get(:user, []) + socket |> assign(invites: invites, admins: admins, users: users) end end diff --git a/lib/cannery_web/live/invite_live/index.html.heex b/lib/cannery_web/live/invite_live/index.html.heex new file mode 100644 index 00000000..fe977403 --- /dev/null +++ b/lib/cannery_web/live/invite_live/index.html.heex @@ -0,0 +1,136 @@ +
+

+ <%= gettext("Listing Invites") %> +

+ + <%= if @invites |> Enum.empty?() do %> +

+ <%= gettext("No invites") %> 😔 +

+ + <%= live_patch(dgettext("actions", "Invite someone new!"), + to: Routes.invite_index_path(@socket, :new), + class: "btn btn-primary" + ) %> + <% else %> + <%= live_patch(dgettext("actions", "Create Invite"), + to: Routes.invite_index_path(@socket, :new), + class: "btn btn-primary" + ) %> + <% end %> + +
+ <%= for invite <- @invites do %> + <.invite_card invite={invite}> + <%= live_patch to: Routes.invite_index_path(Endpoint, :edit, invite), + class: "text-primary-500 link" do %> + + <% end %> + + <%= link to: "#", + class: "text-primary-500 link", + phx_click: "delete_invite", + phx_value_id: invite.id, + data: [ + confirm: + dgettext("prompts", "Are you sure you want to delete the invite for %{name}?", + name: invite.name + ) + ] do %> + + <% end %> + + <%= if invite.disabled_at |> is_nil() do %> + + <%= gettext("Disable") %> + + <% else %> + + <%= gettext("Enable") %> + + <% end %> + + <%= if invite.disabled_at |> is_nil() and not (invite.uses_left |> is_nil()) do %> + + <%= gettext("Set Unlimited") %> + + <% end %> + + <% end %> +
+ + <%= unless @admins |> Enum.empty?() do %> +
+ +
+

+ <%= gettext("Admins") %> +

+ + <%= for admin <- @admins do %> + <.user_card user={admin}> + <%= link to: "#", + class: "text-primary-500 link", + phx_click: "delete_user", + phx_value_id: admin.id, + data: [ + confirm: + dgettext( + "prompts", + "Are you sure you want to delete %{email}? This action is permanent!", + email: admin.email + ) + ] do %> + + <% end %> + + <% end %> +
+ <% end %> + + <%= unless @users |> Enum.empty?() do %> +
+ +
+

+ <%= gettext("Users") %> +

+ + <%= for user <- @users do %> + <.user_card user={user}> + <%= link to: "#", + class: "text-primary-500 link", + phx_click: "delete_user", + phx_value_id: user.id, + data: [ + confirm: + dgettext( + "prompts", + "Are you sure you want to delete %{email}? This action is permanent!", + email: user.email + ) + ] do %> + + <% end %> + + <% end %> +
+ <% end %> +
+ +<%= if @live_action in [:new, :edit] do %> + <%= live_modal(CanneryWeb.InviteLive.FormComponent, + id: @invite.id || :new, + title: @page_title, + action: @live_action, + invite: @invite, + return_to: Routes.invite_index_path(@socket, :index), + current_user: @current_user + ) %> +<% end %> diff --git a/lib/cannery_web/live/invite_live/index.html.leex b/lib/cannery_web/live/invite_live/index.html.leex deleted file mode 100644 index 863121ef..00000000 --- a/lib/cannery_web/live/invite_live/index.html.leex +++ /dev/null @@ -1,90 +0,0 @@ -
-

- <%= gettext("Listing Invites") %> -

- - <%= if @invites |> Enum.empty?() do %> -

- <%= gettext("No invites") %> 😔 -

- - <%= live_patch dgettext("actions", "Invite someone new!"), - to: Routes.invite_index_path(@socket, :new), - class: "btn btn-primary" %> - <% else %> - <%= live_patch dgettext("actions", "Create Invite"), - to: Routes.invite_index_path(@socket, :new), - class: "btn btn-primary" %> - <% end %> - -
- <%= for invite <- @invites do %> -
-

- <%= invite.name %> -

- - <%= if invite.disabled_at |> is_nil() do %> -

- <%= gettext("Uses Left:") %> - <%= invite.uses_left || "Unlimited" %> -

- <% else %> -

- <%= gettext("Invite Disabled") %> -

- <% end %> - - - <%= Routes.user_registration_url(@socket, :new, invite: invite.token) %> - - -
- <%= live_patch to: Routes.invite_index_path(@socket, :edit, invite), - class: "text-primary-500 link" do %> - - <% end %> - - <%= link to: "#", - class: "text-primary-500 link", - phx_click: "delete", - phx_value_id: invite.id, - data: [confirm: dgettext("prompts", "Are you sure you want to delete the invite for %{name}?", name: invite.name)] do %> - - <% end %> - - <%= if invite.disabled_at |> is_nil() do %> - - <%= gettext("Disable") %> - - <% else %> - - <%= gettext("Enable") %> - - <% end %> - - <%= if invite.disabled_at |> is_nil() and not(invite.uses_left |> is_nil()) do %> - - <%= gettext("Set Unlimited") %> - - <% end %> -
-
- <% end %> -
-
- -<%= if @live_action in [:new, :edit] do %> - <%= live_modal CanneryWeb.InviteLive.FormComponent, - id: @invite.id || :new, - title: @page_title, - action: @live_action, - invite: @invite, - return_to: Routes.invite_index_path(@socket, :index), - current_user: @current_user %> -<% end %> diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot index 53740352..0283e4d5 100644 --- a/priv/gettext/actions.pot +++ b/priv/gettext/actions.pot @@ -11,27 +11,23 @@ msgid "" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:96 -#: lib/cannery_web/templates/layout/topbar.html.heex:36 -#: lib/cannery_web/templates/user_confirmation/new.html.heex:26 -#: lib/cannery_web/templates/user_registration/new.html.heex:39 -#: lib/cannery_web/templates/user_reset_password/edit.html.heex:41 -#: lib/cannery_web/templates/user_reset_password/new.html.heex:27 -#: lib/cannery_web/templates/user_session/new.html.heex:3 -#: lib/cannery_web/templates/user_session/new.html.heex:35 -msgid "Log in" +#: lib/cannery_web/live/ammo_group_live/index.ex:28 +msgid "Add Ammo" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:89 -#: lib/cannery_web/templates/layout/topbar.html.heex:28 -#: lib/cannery_web/templates/user_confirmation/new.html.heex:21 -#: lib/cannery_web/templates/user_registration/new.html.heex:3 -#: lib/cannery_web/templates/user_registration/new.html.heex:34 -#: lib/cannery_web/templates/user_reset_password/edit.html.heex:36 -#: lib/cannery_web/templates/user_reset_password/new.html.heex:22 -#: lib/cannery_web/templates/user_session/new.html.heex:41 -msgid "Register" +#: lib/cannery_web/live/ammo_group_live/index.html.heex:11 +msgid "Add your first box!" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/container_live/index.html.heex:11 +msgid "Add your first container!" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.html.heex:11 +msgid "Add your first type!" msgstr "" #, elixir-format, ex-autogen @@ -46,6 +42,11 @@ msgstr "" msgid "Change password" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:16 +msgid "Create Invite" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/templates/user_settings/edit.html.heex:100 msgid "Delete User" @@ -58,6 +59,60 @@ msgstr "" msgid "Forgot your password?" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:11 +msgid "Invite someone new!" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:96 +#: lib/cannery_web/templates/layout/topbar.html.heex:36 +#: lib/cannery_web/templates/user_confirmation/new.html.heex:26 +#: lib/cannery_web/templates/user_registration/new.html.heex:39 +#: lib/cannery_web/templates/user_reset_password/edit.html.heex:41 +#: lib/cannery_web/templates/user_reset_password/new.html.heex:27 +#: lib/cannery_web/templates/user_session/new.html.heex:3 +#: lib/cannery_web/templates/user_session/new.html.heex:35 +msgid "Log in" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.html.heex:13 +msgid "Make your first tag!" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.html.heex:16 +msgid "New Ammo group" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.html.heex:16 +msgid "New Ammo type" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/container_live/index.html.heex:16 +msgid "New Container" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.html.heex:18 +msgid "New Tag" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:89 +#: lib/cannery_web/templates/layout/topbar.html.heex:28 +#: lib/cannery_web/templates/user_confirmation/new.html.heex:21 +#: lib/cannery_web/templates/user_registration/new.html.heex:3 +#: lib/cannery_web/templates/user_registration/new.html.heex:34 +#: lib/cannery_web/templates/user_reset_password/edit.html.heex:36 +#: lib/cannery_web/templates/user_reset_password/new.html.heex:22 +#: lib/cannery_web/templates/user_session/new.html.heex:41 +msgid "Register" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/templates/user_confirmation/new.html.heex:3 #: lib/cannery_web/templates/user_confirmation/new.html.heex:15 @@ -70,26 +125,6 @@ msgstr "" msgid "Reset password" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/templates/user_reset_password/new.html.heex:16 -msgid "Send instructions to reset password" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.ex:28 -msgid "Add Ammo" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.html.heex:11 -msgid "Add your first box!" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.html.heex:16 -msgid "New Ammo group" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_group_live/form_component.ex:102 #: lib/cannery_web/live/ammo_type_live/form_component.ex:161 @@ -99,47 +134,12 @@ msgstr "" msgid "Save" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/user_reset_password/new.html.heex:16 +msgid "Send instructions to reset password" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_group_live/index.html.heex:56 msgid "View" msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.html.heex:11 -msgid "Add your first type!" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.html.heex:16 -msgid "New Ammo type" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.html.heex:11 -msgid "Add your first container!" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.html.heex:16 -msgid "New Container" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:15 -msgid "Create Invite" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:11 -msgid "Invite someone new!" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.html.heex:18 -msgid "New Tag" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.html.heex:13 -msgid "Make your first tag!" -msgstr "" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 065bb90d..ab8916ba 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -21,33 +21,8 @@ msgid "Access from any internet-capable device" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:85 -msgid "Instance Information" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:116 -msgid "Invite Only" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:115 -msgid "Public Signups" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:39 -msgid "Welcome to %{name}" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:67 -msgid "Your data stays with you, period" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:43 -msgid "The self-hosted firearm tracker website" +#: lib/cannery_web/live/invite_live/index.html.heex:73 +msgid "Admins" msgstr "" #, elixir-format, ex-autogen @@ -55,133 +30,11 @@ msgstr "" msgid "Admins:" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:52 -msgid "Easy to Use:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:63 -msgid "Secure:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:73 -msgid "Simple:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:66 -msgid "Self-host your own instance, or use an instance from someone you trust." -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/components/topbar.ex:47 msgid "Ammo" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:41 -msgid "Containers" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:60 -msgid "Invites" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:53 -msgid "Manage" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/topbar.ex:35 -msgid "Tags" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/templates/user_session/new.html.heex:29 -msgid "Keep me logged in for 60 days" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/templates/user_settings/edit.html.heex:3 -msgid "Settings" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/form_component.ex:75 -#: lib/cannery_web/live/ammo_group_live/index.html.heex:26 -msgid "Count" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/ammo_group_card.ex:28 -#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 -msgid "Count:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.ex:22 -#: lib/cannery_web/live/ammo_group_live/show.ex:40 -msgid "Edit Ammo group" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.html.heex:3 -msgid "Listing Ammo" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.ex:33 -msgid "Listing Ammo groups" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.html.heex:8 -msgid "No Ammo" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/form_component.ex:89 -#: lib/cannery_web/live/ammo_group_live/index.html.heex:32 -msgid "Notes" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/ammo_group_card.ex:34 -#: lib/cannery_web/live/ammo_group_live/show.html.heex:14 -msgid "Notes:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/form_component.ex:82 -#: lib/cannery_web/live/ammo_group_live/index.html.heex:29 -msgid "Price paid" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/ammo_group_card.ex:41 -#: lib/cannery_web/live/ammo_group_live/show.html.heex:21 -msgid "Price paid:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/show.ex:39 -msgid "Show Ammo group" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/show.html.heex:45 -msgid "Stored in" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/show.html.heex:50 -msgid "This ammo group is not in a container" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_group_live/form_component.ex:69 msgid "Ammo type" @@ -192,6 +45,11 @@ msgstr "" msgid "Average Price paid" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/form_component.ex:54 +msgid "Background color" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/form_component.ex:145 #: lib/cannery_web/live/ammo_type_live/index.html.heex:38 @@ -243,24 +101,84 @@ msgstr "" msgid "Container" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:41 +msgid "Containers" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/form_component.ex:149 #: lib/cannery_web/live/ammo_type_live/index.html.heex:39 msgid "Corrosive" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/form_component.ex:75 +#: lib/cannery_web/live/ammo_group_live/index.html.heex:26 +msgid "Count" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/ammo_group_card.ex:28 +#: lib/cannery_web/live/ammo_group_live/show.html.heex:8 +msgid "Count:" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/form_component.ex:63 #: lib/cannery_web/live/container_live/form_component.ex:67 msgid "Description" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/components/container_card.ex:26 +#: lib/cannery_web/live/container_live/show.html.heex:8 +msgid "Description:" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:45 +msgid "Disable" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:52 +msgid "Easy to Use:" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.ex:22 +#: lib/cannery_web/live/ammo_group_live/show.ex:40 +msgid "Edit Ammo group" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/index.ex:23 #: lib/cannery_web/live/ammo_type_live/show.ex:46 msgid "Edit Ammo type" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/container_live/index.ex:23 +#: lib/cannery_web/live/container_live/show.ex:67 +msgid "Edit Container" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:34 +msgid "Edit Invite" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.ex:23 +msgid "Edit Tag" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:49 +msgid "Enable" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/form_component.ex:74 msgid "Example bullet type abbreviations" @@ -284,110 +202,69 @@ msgstr "" msgid "Incendiary" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:85 +msgid "Instance Information" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/invite_card.ex:24 +msgid "Invite Disabled" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:116 +msgid "Invite Only" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:60 +msgid "Invites" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/user_session/new.html.heex:29 +msgid "Keep me logged in for 60 days" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.html.heex:3 +msgid "Listing Ammo" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/index.html.heex:3 msgid "Listing Ammo Types" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.ex:33 +msgid "Listing Ammo groups" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/ammo_type_live/index.ex:34 msgid "Listing Ammo types" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:153 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:40 -msgid "Manufacturer" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:59 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:26 -#: lib/cannery_web/live/container_live/form_component.ex:60 -#: lib/cannery_web/live/invite_live/form_component.ex:55 -#: lib/cannery_web/live/tag_live/form_component.ex:50 -msgid "Name" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.ex:29 -msgid "New Ammo type" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 -msgid "No Ammo Types" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/show.html.heex:99 -msgid "No ammo for this type" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:119 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:33 -#: lib/cannery_web/live/ammo_type_live/show.html.heex:42 -msgid "Pressure" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:126 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:34 -#: lib/cannery_web/live/ammo_type_live/show.html.heex:43 -msgid "Primer type" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:133 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:35 -msgid "Rimfire" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:157 -msgid "SKU" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/show.ex:45 -msgid "Show Ammo type" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.html.heex:41 -msgid "Sku" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:86 -msgid "Steel" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:137 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:36 -msgid "Tracer" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/components/container_card.ex:26 -#: lib/cannery_web/live/container_live/show.html.heex:8 -msgid "Description:" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.ex:23 -#: lib/cannery_web/live/container_live/show.ex:67 -msgid "Edit Container" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/index.ex:32 #: lib/cannery_web/live/container_live/index.html.heex:3 msgid "Listing Containers" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:42 +#: lib/cannery_web/live/invite_live/index.html.heex:3 +msgid "Listing Invites" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.ex:34 +#: lib/cannery_web/live/tag_live/index.html.heex:3 +msgid "Listing Tags" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/form_component.ex:82 msgid "Location" @@ -404,6 +281,17 @@ msgstr "" msgid "Magazine, Clip, Ammo Box, etc" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:53 +msgid "Manage" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:153 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:40 +msgid "Manufacturer" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/form_component.ex:71 msgid "Metal ammo can with the anime girl sticker" @@ -414,11 +302,50 @@ msgstr "" msgid "My cool ammo can" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:59 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:26 +#: lib/cannery_web/live/container_live/form_component.ex:60 +#: lib/cannery_web/live/invite_live/form_component.ex:55 +#: lib/cannery_web/live/tag_live/form_component.ex:50 +msgid "Name" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.ex:29 +msgid "New Ammo type" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/index.ex:28 msgid "New Container" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:38 +msgid "New Invite" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.ex:29 +msgid "New Tag" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.html.heex:8 +msgid "No Ammo" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.html.heex:8 +msgid "No Ammo Types" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/show.html.heex:99 +msgid "No ammo for this type" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/show.html.heex:46 msgid "No ammo groups in this container" @@ -429,16 +356,161 @@ msgstr "" msgid "No containers" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:8 +msgid "No invites" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.html.heex:10 +msgid "No tags" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/form_component.ex:89 +#: lib/cannery_web/live/ammo_group_live/index.html.heex:32 +msgid "Notes" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/ammo_group_card.ex:34 +#: lib/cannery_web/live/ammo_group_live/show.html.heex:14 +msgid "Notes:" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/form_component.ex:86 msgid "On the bookshelf" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:119 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:33 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:42 +msgid "Pressure" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/form_component.ex:82 +#: lib/cannery_web/live/ammo_group_live/index.html.heex:29 +msgid "Price paid" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/ammo_group_card.ex:41 +#: lib/cannery_web/live/ammo_group_live/show.html.heex:21 +msgid "Price paid:" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:126 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:34 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:43 +msgid "Primer type" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:115 +msgid "Public Signups" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:133 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:35 +msgid "Rimfire" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:157 +msgid "SKU" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:63 +msgid "Secure:" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:66 +msgid "Self-host your own instance, or use an instance from someone you trust." +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:61 +msgid "Set Unlimited" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/user_settings/edit.html.heex:3 +msgid "Settings" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/show.ex:39 +msgid "Show Ammo group" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/show.ex:45 +msgid "Show Ammo type" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/show.ex:66 msgid "Show Container" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:73 +msgid "Simple:" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.html.heex:41 +msgid "Sku" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:86 +msgid "Steel" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/show.html.heex:45 +msgid "Stored in" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/components/topbar.ex:35 +msgid "Tags" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/index.html.heex:6 +msgid "Tags can be added to your containers to help you organize" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/tag_live/form_component.ex:60 +msgid "Text color" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:43 +msgid "The self-hosted firearm tracker website" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/show.html.heex:50 +msgid "This ammo group is not in a container" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:137 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:36 +msgid "Tracer" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/live/container_live/form_component.ex:75 msgid "Type" @@ -451,84 +523,12 @@ msgid "Type:" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/form_component.ex:54 -msgid "Background color" +#: lib/cannery_web/live/invite_live/index.html.heex:102 +msgid "Users" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:60 -msgid "Disable" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:35 -msgid "Edit Invite" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.ex:23 -msgid "Edit Tag" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:65 -msgid "Enable" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:35 -msgid "Invite Disabled" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:43 -#: lib/cannery_web/live/invite_live/index.html.leex:3 -msgid "Listing Invites" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.ex:34 -#: lib/cannery_web/live/tag_live/index.html.heex:3 -msgid "Listing Tags" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:39 -msgid "New Invite" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.ex:29 -msgid "New Tag" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:8 -msgid "No invites" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.html.heex:10 -msgid "No tags" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:73 -msgid "Set Unlimited" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/index.html.heex:6 -msgid "Tags can be added to your containers to help you organize" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/tag_live/form_component.ex:60 -msgid "Text color" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:30 +#: lib/cannery_web/components/invite_card.ex:19 msgid "Uses Left:" msgstr "" @@ -536,3 +536,13 @@ msgstr "" #: lib/cannery_web/live/invite_live/form_component.ex:59 msgid "Uses left" msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:39 +msgid "Welcome to %{name}" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/home_live.ex:67 +msgid "Your data stays with you, period" +msgstr "" diff --git a/priv/gettext/emails.pot b/priv/gettext/emails.pot index 57abdba7..e064507c 100644 --- a/priv/gettext/emails.pot +++ b/priv/gettext/emails.pot @@ -10,31 +10,11 @@ msgid "" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/templates/layout/email.html.heex:13 -msgid "This email was sent from %{name}" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/templates/layout/email.txt.eex:10 -msgid "This email was sent from %{name} at %{url}" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery/accounts/email.ex:30 msgid "Confirm your %{name} account" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery/accounts/email.ex:37 -msgid "Reset your %{name} password" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery/accounts/email.ex:44 -msgid "Update your %{name} email" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/templates/email/confirm_email.html.eex:2 #: lib/cannery_web/templates/email/confirm_email.txt.eex:2 @@ -59,6 +39,26 @@ msgstr "" msgid "If you didn't request this change from %{url}, please ignore this." msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery/accounts/email.ex:37 +msgid "Reset your %{name} password" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/layout/email.html.heex:13 +msgid "This email was sent from %{name}" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/layout/email.txt.eex:10 +msgid "This email was sent from %{name} at %{url}" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery/accounts/email.ex:44 +msgid "Update your %{name} email" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/templates/email/confirm_email.html.eex:4 msgid "Welcome to %{name}!" diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot index a7bae92d..37bba7b2 100644 --- a/priv/gettext/errors.pot +++ b/priv/gettext/errors.pot @@ -1,116 +1,34 @@ -## This is a PO Template file. +## This file is a PO Template file. ## -## `msgid`s here are often extracted from source code. +## "msgid"s here are often extracted from source code. ## Add new translations manually only if they're dynamic ## translations that can't be statically extracted. ## -## 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. -## From Ecto.Changeset.cast/4 -msgid "can't be blank" -msgstr "" - -## From Ecto.Changeset.unique_constraint/3 -msgid "has already been taken" -msgstr "" - -## From Ecto.Changeset.put_change/3 -msgid "is invalid" -msgstr "" - -## From Ecto.Changeset.validate_acceptance/3 -msgid "must be accepted" -msgstr "" - -## From Ecto.Changeset.validate_format/3 -msgid "has invalid format" -msgstr "" - -## From Ecto.Changeset.validate_subset/3 -msgid "has an invalid entry" -msgstr "" - -## From Ecto.Changeset.validate_exclusion/3 -msgid "is reserved" -msgstr "" - -## From Ecto.Changeset.validate_confirmation/3 -msgid "does not match confirmation" -msgstr "" - -## From Ecto.Changeset.no_assoc_constraint/3 -msgid "is still associated with this entry" -msgstr "" - -msgid "are still associated with this entry" -msgstr "" - -## From Ecto.Changeset.validate_length/3 -msgid "should be %{count} character(s)" -msgid_plural "should be %{count} character(s)" -msgstr[0] "" -msgstr[1] "" - -msgid "should have %{count} item(s)" -msgid_plural "should have %{count} item(s)" -msgstr[0] "" -msgstr[1] "" - -msgid "should be at least %{count} character(s)" -msgid_plural "should be at least %{count} character(s)" -msgstr[0] "" -msgstr[1] "" - -msgid "should have at least %{count} item(s)" -msgid_plural "should have at least %{count} item(s)" -msgstr[0] "" -msgstr[1] "" - -msgid "should be at most %{count} character(s)" -msgid_plural "should be at most %{count} character(s)" -msgstr[0] "" -msgstr[1] "" - -msgid "should have at most %{count} item(s)" -msgid_plural "should have at most %{count} item(s)" -msgstr[0] "" -msgstr[1] "" - -## From Ecto.Changeset.validate_number/3 -msgid "must be less than %{number}" -msgstr "" - -msgid "must be greater than %{number}" -msgstr "" - -msgid "must be less than or equal to %{number}" -msgstr "" - -msgid "must be greater than or equal to %{number}" -msgstr "" - -msgid "must be equal to %{number}" +## 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. +msgid "" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery/accounts/user.ex:128 -msgid "did not change" +#: lib/cannery/containers.ex:105 +msgid "Container must be empty before deleting" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery/accounts/user.ex:149 -msgid "does not match password" +#: lib/cannery_web/live/container_live/index.ex:54 +#: lib/cannery_web/live/container_live/show.ex:52 +msgid "Could not delete %{name}: %{error}" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery/accounts/user.ex:186 -msgid "is not valid" +#: lib/cannery_web/live/container_live/index.ex:42 +msgid "Could not find that container" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery/accounts/user.ex:82 -msgid "must have the @ sign and no spaces" +#: lib/cannery_web/controllers/user_settings_controller.ex:67 +msgid "Email change link is invalid or it has expired." msgstr "" #, elixir-format, ex-autogen @@ -118,32 +36,14 @@ msgstr "" msgid "Error" msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/views/error_view.ex:11 -msgid "Internal Server Error" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/views/error_view.ex:9 -msgid "Not found" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/views/error_view.ex:10 -msgid "Unauthorized" -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/templates/error/error.html.heex:28 msgid "Go back home" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/templates/user_registration/new.html.heex:13 -#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 -#: lib/cannery_web/templates/user_settings/edit.html.heex:17 -#: lib/cannery_web/templates/user_settings/edit.html.heex:58 -msgid "Oops, something went wrong! Please check the errors below." +#: lib/cannery_web/views/error_view.ex:11 +msgid "Internal Server Error" msgstr "" #, elixir-format, ex-autogen @@ -152,8 +52,16 @@ msgid "Invalid email or password" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/controllers/user_settings_controller.ex:67 -msgid "Email change link is invalid or it has expired." +#: lib/cannery_web/views/error_view.ex:9 +msgid "Not found" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/user_registration/new.html.heex:13 +#: lib/cannery_web/templates/user_reset_password/edit.html.heex:13 +#: lib/cannery_web/templates/user_settings/edit.html.heex:17 +#: lib/cannery_web/templates/user_settings/edit.html.heex:58 +msgid "Oops, something went wrong! Please check the errors below." msgstr "" #, elixir-format, ex-autogen @@ -178,11 +86,21 @@ msgstr "" msgid "Unable to delete user" msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/views/error_view.ex:10 +msgid "Unauthorized" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/controllers/user_confirmation_controller.ex:53 msgid "User confirmation link is invalid or it has expired." msgstr "" +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:19 +msgid "You are not authorized to view this page" +msgstr "" + #, elixir-format, ex-autogen #: lib/cannery_web/controllers/user_auth.ex:160 msgid "You are not authorized to view this page." @@ -194,22 +112,21 @@ msgid "You must log in to access this page." msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.ex:42 -msgid "Could not find that container" +#: lib/cannery/accounts/user.ex:128 +msgid "did not change" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery/containers.ex:105 -msgid "Container must be empty before deleting" +#: lib/cannery/accounts/user.ex:149 +msgid "does not match password" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.ex:54 -#: lib/cannery_web/live/container_live/show.ex:52 -msgid "Could not delete %{name}: %{error}" +#: lib/cannery/accounts/user.ex:186 +msgid "is not valid" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:20 -msgid "You are not authorized to view this page" +#: lib/cannery/accounts/user.ex:82 +msgid "must have the @ sign and no spaces" msgstr "" diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index 8349a334..ace431f1 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -11,8 +11,101 @@ msgid "" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/home_live.ex:94 -msgid "Register to setup %{name}" +#: lib/cannery_web/live/ammo_type_live/form_component.ex:193 +#: lib/cannery_web/live/container_live/form_component.ex:126 +#: lib/cannery_web/live/invite_live/form_component.ex:98 +#: lib/cannery_web/live/tag_live/form_component.ex:101 +msgid "%{name} created successfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/index.ex:41 +#: lib/cannery_web/live/ammo_type_live/show.ex:39 +#: lib/cannery_web/live/invite_live/index.ex:54 +#: lib/cannery_web/live/invite_live/index.ex:120 +#: lib/cannery_web/live/tag_live/index.ex:41 +msgid "%{name} deleted succesfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:102 +msgid "%{name} disabled succesfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:84 +msgid "%{name} enabled succesfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/container_live/index.ex:47 +#: lib/cannery_web/live/container_live/show.ex:42 +msgid "%{name} has been deleted" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.ex:68 +msgid "%{name} updated succesfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/form_component.ex:179 +#: lib/cannery_web/live/container_live/form_component.ex:108 +#: lib/cannery_web/live/invite_live/form_component.ex:80 +#: lib/cannery_web/live/tag_live/form_component.ex:83 +msgid "%{name} updated successfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/controllers/user_settings_controller.ex:28 +msgid "A link to confirm your email change has been sent to the new address." +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/form_component.ex:151 +msgid "Ammo group created successfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.ex:40 +#: lib/cannery_web/live/ammo_group_live/show.ex:33 +msgid "Ammo group deleted succesfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/form_component.ex:133 +msgid "Ammo group updated successfully" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:84 +#: lib/cannery_web/live/invite_live/index.html.heex:113 +msgid "Are you sure you want to delete %{email}? This action is permanent!" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_type_live/show.html.heex:26 +#: lib/cannery_web/live/container_live/index.html.heex:36 +#: lib/cannery_web/live/container_live/show.html.heex:36 +#: lib/cannery_web/live/tag_live/index.html.heex:36 +msgid "Are you sure you want to delete %{name}?" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/invite_live/index.html.heex:36 +msgid "Are you sure you want to delete the invite for %{name}?" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/live/ammo_group_live/index.html.heex:69 +#: lib/cannery_web/live/ammo_group_live/show.html.heex:35 +#: lib/cannery_web/live/ammo_type_live/index.html.heex:104 +msgid "Are you sure you want to delete this ammo?" +msgstr "" + +#, elixir-format, ex-autogen +#: lib/cannery_web/templates/user_settings/edit.html.heex:104 +msgid "Are you sure you want to delete your account?" msgstr "" #, elixir-format, ex-autogen @@ -22,13 +115,8 @@ msgid "Are you sure you want to log out?" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/templates/user_settings/edit.html.heex:104 -msgid "Are you sure you want to delete your account?" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/controllers/user_settings_controller.ex:28 -msgid "A link to confirm your email change has been sent to the new address." +#: lib/cannery_web/live/invite_live/index.html.heex:59 +msgid "Are you sure you want to make %{name} unlimited?" msgstr "" #, elixir-format, ex-autogen @@ -61,36 +149,14 @@ msgstr "" msgid "Password updated successfully." msgstr "" -#, elixir-format, ex-autogen -#: lib/cannery_web/controllers/user_confirmation_controller.ex:37 -msgid "User confirmed successfully." -msgstr "" - #, elixir-format, ex-autogen #: lib/cannery_web/controllers/user_registration_controller.ex:71 -msgid "User created successfully." +msgid "Please check your email to verify your account" msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/controllers/user_settings_controller.ex:78 -msgid "Your account has been deleted" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/form_component.ex:151 -msgid "Ammo group created successfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/form_component.ex:133 -msgid "Ammo group updated successfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.html.heex:69 -#: lib/cannery_web/live/ammo_group_live/show.html.heex:35 -#: lib/cannery_web/live/ammo_type_live/index.html.heex:104 -msgid "Are you sure you want to delete this ammo?" +#: lib/cannery_web/live/home_live.ex:94 +msgid "Register to setup %{name}" msgstr "" #, elixir-format, ex-autogen @@ -103,65 +169,11 @@ msgid "Saving..." msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/show.html.heex:26 -#: lib/cannery_web/live/container_live/index.html.heex:36 -#: lib/cannery_web/live/container_live/show.html.heex:36 -#: lib/cannery_web/live/tag_live/index.html.heex:36 -msgid "Are you sure you want to delete %{name}?" +#: lib/cannery_web/controllers/user_confirmation_controller.ex:37 +msgid "User confirmed successfully." msgstr "" #, elixir-format, ex-autogen -#: lib/cannery_web/live/container_live/index.ex:47 -#: lib/cannery_web/live/container_live/show.ex:42 -msgid "%{name} has been deleted" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.html.leex:53 -msgid "Are you sure you want to delete the invite for %{name}?" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:193 -#: lib/cannery_web/live/container_live/form_component.ex:126 -#: lib/cannery_web/live/invite_live/form_component.ex:98 -#: lib/cannery_web/live/tag_live/form_component.ex:101 -msgid "%{name} created successfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/index.ex:41 -#: lib/cannery_web/live/ammo_type_live/show.ex:39 -#: lib/cannery_web/live/invite_live/index.ex:51 -#: lib/cannery_web/live/tag_live/index.ex:41 -msgid "%{name} deleted succesfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_type_live/form_component.ex:179 -#: lib/cannery_web/live/container_live/form_component.ex:108 -#: lib/cannery_web/live/invite_live/form_component.ex:80 -#: lib/cannery_web/live/tag_live/form_component.ex:83 -msgid "%{name} updated successfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/ammo_group_live/index.ex:40 -#: lib/cannery_web/live/ammo_group_live/show.ex:33 -msgid "Ammo group deleted succesfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:99 -msgid "%{name} disabled succesfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:81 -msgid "%{name} enabled succesfully" -msgstr "" - -#, elixir-format, ex-autogen -#: lib/cannery_web/live/invite_live/index.ex:65 -msgid "%{name} updated succesfully" +#: lib/cannery_web/controllers/user_settings_controller.ex:78 +msgid "Your account has been deleted" msgstr ""