rename page path to home path

This commit is contained in:
shibao 2022-05-05 21:47:22 -04:00 committed by oliviasculley
parent 38a581b639
commit 10877bb754
39 changed files with 238 additions and 234 deletions

View File

@ -27,21 +27,21 @@ defmodule Lokal.Email do
@spec generate_email(key :: String.t(), User.t(), attrs :: map()) :: t()
def generate_email("welcome", user, %{"url" => url}) do
user
|> base_email(dgettext("emails", "Confirm your %{name} account", name: "Lokal"))
|> base_email(dgettext("emails", "Confirm your Lokal account"))
|> render_body("confirm_email.html", %{user: user, url: url})
|> text_body(EmailView.render("confirm_email.txt", %{user: user, url: url}))
end
def generate_email("reset_password", user, %{"url" => url}) do
user
|> base_email(dgettext("emails", "Reset your %{name} password", name: "Lokal"))
|> base_email(dgettext("emails", "Reset your Lokal password"))
|> render_body("reset_password.html", %{user: user, url: url})
|> text_body(EmailView.render("reset_password.txt", %{user: user, url: url}))
end
def generate_email("update_email", user, %{"url" => url}) do
user
|> base_email(dgettext("emails", "Update your %{name} email", name: "Lokal"))
|> base_email(dgettext("emails", "Update your Lokal email"))
|> render_body("update_email.html", %{user: user, url: url})
|> text_body(EmailView.render("update_email.txt", %{user: user, url: url}))
end

View File

@ -6,7 +6,7 @@ defmodule LokalWeb.Components.Topbar do
use LokalWeb, :component
alias Lokal.Accounts
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
def topbar(assigns) do
assigns =
@ -17,7 +17,7 @@ defmodule LokalWeb.Components.Topbar do
<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("Lokal",
to: Routes.live_path(Endpoint, PageLive),
to: Routes.live_path(Endpoint, HomeLive),
class: "mx-2 my-1 leading-5 text-xl text-white hover:underline"
) %>

View File

@ -1,4 +1,8 @@
defmodule LokalWeb.PageController do
defmodule LokalWeb.HomeController do
@moduledoc """
Controller for home page
"""
use LokalWeb, :controller
def index(conn, _params) do

View File

@ -7,7 +7,7 @@ defmodule LokalWeb.UserAuth do
import Phoenix.Controller
import LokalWeb.Gettext
alias Lokal.{Accounts, Accounts.User}
alias LokalWeb.PageLive
alias LokalWeb.HomeLive
alias LokalWeb.Router.Helpers, as: Routes
# Make the remember me cookie valid for 60 days.
@ -176,7 +176,7 @@ defmodule LokalWeb.UserAuth do
conn
|> put_flash(:error, dgettext("errors", "You are not authorized to view this page."))
|> maybe_store_return_to()
|> redirect(to: Routes.live_path(conn, PageLive))
|> redirect(to: Routes.live_path(conn, HomeLive))
|> halt()
end
end

View File

@ -3,7 +3,7 @@ defmodule LokalWeb.UserRegistrationController do
import LokalWeb.Gettext
alias Lokal.{Accounts, Invites}
alias Lokal.Accounts.User
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
def new(conn, %{"invite" => invite_token}) do
invite = Invites.get_invite_by_token(invite_token)
@ -13,7 +13,7 @@ defmodule LokalWeb.UserRegistrationController do
else
conn
|> put_flash(:error, dgettext("errors", "Sorry, this invite was not found or expired"))
|> redirect(to: Routes.live_path(Endpoint, PageLive))
|> redirect(to: Routes.live_path(Endpoint, HomeLive))
end
end
@ -23,7 +23,7 @@ defmodule LokalWeb.UserRegistrationController do
else
conn
|> put_flash(:error, dgettext("errors", "Sorry, public registration is disabled"))
|> redirect(to: Routes.live_path(Endpoint, PageLive))
|> redirect(to: Routes.live_path(Endpoint, HomeLive))
end
end
@ -44,7 +44,7 @@ defmodule LokalWeb.UserRegistrationController do
else
conn
|> put_flash(:error, dgettext("errors", "Sorry, this invite was not found or expired"))
|> redirect(to: Routes.live_path(Endpoint, PageLive))
|> redirect(to: Routes.live_path(Endpoint, HomeLive))
end
end
@ -54,7 +54,7 @@ defmodule LokalWeb.UserRegistrationController do
else
conn
|> put_flash(:error, dgettext("errors", "Sorry, public registration is disabled"))
|> redirect(to: Routes.live_path(Endpoint, PageLive))
|> redirect(to: Routes.live_path(Endpoint, HomeLive))
end
end

View File

@ -2,7 +2,7 @@ defmodule LokalWeb.UserSettingsController do
use LokalWeb, :controller
import LokalWeb.Gettext
alias Lokal.Accounts
alias LokalWeb.{PageLive, UserAuth}
alias LokalWeb.{HomeLive, UserAuth}
plug :assign_email_and_password_changesets
@ -93,7 +93,7 @@ defmodule LokalWeb.UserSettingsController do
conn
|> put_flash(:error, dgettext("prompts", "Your account has been deleted"))
|> redirect(to: Routes.live_path(conn, PageLive))
|> redirect(to: Routes.live_path(conn, HomeLive))
else
conn
|> put_flash(:error, dgettext("errors", "Unable to delete user"))

View File

@ -1,4 +1,4 @@
defmodule LokalWeb.PageLive do
defmodule LokalWeb.HomeLive do
@moduledoc """
Liveview for the main home page
"""

View File

@ -38,7 +38,9 @@ defmodule LokalWeb.InviteLive.FormComponent do
socket =
case invite |> Invites.update_invite(invite_params, current_user) do
{:ok, %{name: invite_name}} ->
prompt = dgettext("prompts", "%{name} updated successfully", name: invite_name)
prompt =
dgettext("prompts", "%{invite_name} updated successfully", invite_name: invite_name)
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
{:error, %Changeset{} = changeset} ->
@ -56,7 +58,9 @@ defmodule LokalWeb.InviteLive.FormComponent do
socket =
case current_user |> Invites.create_invite(invite_params) do
{:ok, %{name: invite_name}} ->
prompt = dgettext("prompts", "%{name} created successfully", name: invite_name)
prompt =
dgettext("prompts", "%{invite_name} created successfully", invite_name: invite_name)
socket |> put_flash(:info, prompt) |> push_redirect(to: return_to)
{:error, %Changeset{} = changeset} ->

View File

@ -6,7 +6,7 @@ defmodule LokalWeb.InviteLive.Index do
use LokalWeb, :live_view
import LokalWeb.Components.{InviteCard, UserCard}
alias Lokal.{Accounts, Invites, Invites.Invite}
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
alias Phoenix.LiveView.JS
@impl true
@ -16,7 +16,7 @@ defmodule LokalWeb.InviteLive.Index do
socket |> display_invites()
else
prompt = dgettext("errors", "You are not authorized to view this page")
return_to = Routes.live_path(Endpoint, PageLive)
return_to = Routes.live_path(Endpoint, HomeLive)
socket |> put_flash(:error, prompt) |> push_redirect(to: return_to)
end
@ -50,7 +50,7 @@ defmodule LokalWeb.InviteLive.Index do
%{name: invite_name} =
id |> Invites.get_invite!(current_user) |> Invites.delete_invite!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: invite_name)
prompt = dgettext("prompts", "%{invite_name} deleted succesfully", invite_name: invite_name)
{:noreply, socket |> put_flash(:info, prompt) |> display_invites()}
end
@ -64,7 +64,9 @@ defmodule LokalWeb.InviteLive.Index do
|> Invites.update_invite(%{"uses_left" => nil}, current_user)
|> case do
{:ok, %{name: invite_name}} ->
prompt = dgettext("prompts", "%{name} updated succesfully", name: invite_name)
prompt =
dgettext("prompts", "%{invite_name} updated succesfully", invite_name: invite_name)
socket |> put_flash(:info, prompt) |> display_invites()
{:error, changeset} ->
@ -84,7 +86,9 @@ defmodule LokalWeb.InviteLive.Index do
|> Invites.update_invite(%{"uses_left" => nil, "disabled_at" => nil}, current_user)
|> case do
{:ok, %{name: invite_name}} ->
prompt = dgettext("prompts", "%{name} enabled succesfully", name: invite_name)
prompt =
dgettext("prompts", "%{invite_name} enabled succesfully", invite_name: invite_name)
socket |> put_flash(:info, prompt) |> display_invites()
{:error, changeset} ->
@ -106,7 +110,9 @@ defmodule LokalWeb.InviteLive.Index do
|> Invites.update_invite(%{"uses_left" => 0, "disabled_at" => now}, current_user)
|> case do
{:ok, %{name: invite_name}} ->
prompt = dgettext("prompts", "%{name} disabled succesfully", name: invite_name)
prompt =
dgettext("prompts", "%{invite_name} disabled succesfully", invite_name: invite_name)
socket |> put_flash(:info, prompt) |> display_invites()
{:error, changeset} ->
@ -130,7 +136,7 @@ defmodule LokalWeb.InviteLive.Index do
) do
%{email: user_email} = Accounts.get_user!(id) |> Accounts.delete_user!(current_user)
prompt = dgettext("prompts", "%{name} deleted succesfully", name: user_email)
prompt = dgettext("prompts", "%{user_email} deleted succesfully", user_email: user_email)
{:noreply, socket |> put_flash(:info, prompt) |> display_invites()}
end

View File

@ -45,8 +45,8 @@
phx_value_id: invite.id,
data: [
confirm:
dgettext("prompts", "Are you sure you want to delete the invite for %{name}?",
name: invite.name
dgettext("prompts", "Are you sure you want to delete the invite for %{invite_name}?",
invite_name: invite.name
),
qa: "delete-#{invite.id}"
] do %>
@ -70,8 +70,8 @@
phx-click="set_unlimited"
phx-value-id={invite.id}
data-confirm={
dgettext("prompts", "Are you sure you want to make %{name} unlimited?",
name: invite.name
dgettext("prompts", "Are you sure you want to make %{invite_name} unlimited?",
invite_name: invite.name
)
}
>

View File

@ -35,7 +35,7 @@ defmodule LokalWeb.Router do
scope "/", LokalWeb do
pipe_through :browser
live "/", PageLive
live "/", HomeLive
end
## Authentication routes

View File

@ -3,23 +3,21 @@
<%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<br />
<span style="margin-bottom: 1em; font-size: 1.25em;">
<%= dgettext("emails", "Welcome to %{name}!", name: "Lokal") %>
<%= dgettext("emails", "Welcome to Lokal") %>
</span>
<br/>
<br />
<%= dgettext("emails", "You can confirm your account by visiting the URL below:") %>
<br/>
<br />
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
<a style="margin: 1em; color: rgb(31, 31, 31);" href={@url}><%= @url %></a>
<br/>
<br />
<%= dgettext("emails",
"If you didn't create an account at %{name}, please ignore this.",
name: "Lokal") %>
<%= dgettext("emails", "If you didn't create an account at Lokal, please ignore this.") %>
</div>

View File

@ -1,7 +1,7 @@
<%= dgettext("emails", "Hi %{email},", email: @user.email) %>
<%= dgettext("emails", "Welcome to %{name}%!", name: "Lokal") %>
<%= dgettext("emails", "Welcome to Lokal") %>
<%= dgettext("emails", "You can confirm your account by visiting the URL below:") %>
@ -9,4 +9,4 @@
<%= dgettext("emails",
"If you didn't create an account at %{url}, please ignore this.",
url: Routes.live_url(Endpoint, PageLive)) %>
url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -3,17 +3,15 @@
<%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<br />
<%= dgettext("emails", "You can reset your password by visiting the URL below:") %>
<br/>
<br />
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
<a style="margin: 1em; color: rgb(31, 31, 31);" href={@url}><%= @url %></a>
<br/>
<br />
<%= dgettext("emails",
"If you didn't request this change from %{name}, please ignore this.",
name: "Lokal") %>
<%= dgettext("emails", "If you didn't request this change from Lokal, please ignore this.") %>
</div>

View File

@ -7,4 +7,4 @@
<%= dgettext("emails",
"If you didn't request this change from %{url}, please ignore this.",
url: Routes.live_url(Endpoint, PageLive)) %>
url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -3,17 +3,18 @@
<%= dgettext("emails", "Hi %{email},", email: @user.email) %>
</span>
<br/>
<br />
<%= dgettext("emails", "You can change your email by visiting the URL below:") %>
<br/>
<br />
<a style="margin: 1em; color: rgb(31, 31, 31);" href="<%= @url %>"><%= @url %></a>
<a style="margin: 1em; color: rgb(31, 31, 31);" href={@url}><%= @url %></a>
<br/>
<br />
<%= dgettext("emails",
"If you didn't request this change from %{name}, please ignore this.",
name: "Lokal") %>
<%= dgettext(
"emails",
"If you didn't request this change from Lokal, please ignore this."
) %>
</div>

View File

@ -7,4 +7,4 @@
<%= dgettext("emails",
"If you didn't request this change from %{url}, please ignore this.",
url: Routes.live_url(Endpoint, PageLive)) %>
url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -24,7 +24,7 @@
<hr class="w-full hr" />
<a href={Routes.live_path(Endpoint, PageLive)} class="link title text-primary-600 text-lg">
<a href={Routes.live_path(Endpoint, HomeLive)} class="link title text-primary-600 text-lg">
<%= dgettext("errors", "Go back home") %>
</a>
</div>

View File

@ -9,11 +9,10 @@
<hr style="margin: 2em auto; border-width: 1px; border-color: rgb(212, 212, 216); width: 100%; max-width: 42rem;" />
<a style="color: rgb(31, 31, 31);" href={Routes.live_url(Endpoint, PageLive)}>
<a style="color: rgb(31, 31, 31);" href={Routes.live_url(Endpoint, HomeLive)}>
<%= dgettext(
"emails",
"This email was sent from %{name}, the self-hosted firearm tracker website.",
name: "Lokal"
"This email was sent from Lokal, the self-hosted firearm tracker website."
) %>
</a>
</body>

View File

@ -7,6 +7,5 @@
=====================
<%= dgettext("emails",
"This email was sent from %{name} at %{url}, the self-hosted firearm tracker website.",
name: "Lokal",
url: Routes.live_url(Endpoint, PageLive)) %>
"This email was sent from Lokal at %{url}, the self-hosted firearm tracker website.",
url: Routes.live_url(Endpoint, HomeLive)) %>

View File

@ -3,20 +3,19 @@
<%= dgettext("actions", "Resend confirmation instructions") %>
</h1>
<%= form_for :user,
Routes.user_confirmation_path(@conn, :create),
[
class:
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
],
fn f -> %>
<.form
let={f}
for={:user}
action={Routes.user_confirmation_path(@conn, :create)}
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<%= label(f, :email, class: "title text-lg text-primary-600") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<%= submit(dgettext("actions", "Resend confirmation instructions"),
class: "mx-auto btn btn-primary col-span-3"
) %>
<% end %>
</.form>
<hr class="hr" />

View File

@ -3,13 +3,12 @@
<%= dgettext("actions", "Register") %>
</h1>
<%= form_for @changeset,
Routes.user_registration_path(@conn, :create),
[
class:
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
],
fn f -> %>
<.form
let={f}
for={@changeset}
action={Routes.user_registration_path(@conn, :create)}
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="alert alert-danger col-span-3">
<p>
@ -40,7 +39,7 @@
<%= error_tag(f, :locale) %>
<%= submit(dgettext("actions", "Register"), class: "mx-auto btn btn-primary col-span-3") %>
<% end %>
</.form>
<hr class="hr" />

View File

@ -3,13 +3,12 @@
<%= dgettext("actions", "Reset password") %>
</h1>
<%= form_for @changeset,
Routes.user_reset_password_path(@conn, :update, @token),
[
class:
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
],
fn f -> %>
<.form
let={f}
for={@changeset}
action={Routes.user_reset_password_path(@conn, :update, @token)}
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<%= if @changeset.action && not @changeset.valid? do %>
<div class="alert alert-danger col-span-3">
<p>
@ -34,7 +33,7 @@
<%= submit(dgettext("actions", "Reset password"),
class: "mx-auto btn btn-primary col-span-3"
) %>
<% end %>
</.form>
<hr class="hr" />

View File

@ -3,20 +3,19 @@
<%= dgettext("actions", "Forgot your password?") %>
</h1>
<%= form_for :user,
Routes.user_reset_password_path(@conn, :create),
[
class:
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
],
fn f -> %>
<.form
let={f}
for={:user}
action={Routes.user_reset_password_path(@conn, :create)}
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<%= label(f, :email, class: "title text-lg text-primary-600") %>
<%= email_input(f, :email, required: true, class: "input input-primary col-span-2") %>
<%= submit(dgettext("actions", "Send instructions to reset password"),
class: "mx-auto btn btn-primary col-span-3"
) %>
<% end %>
</.form>
<hr class="hr" />

View File

@ -3,14 +3,13 @@
<%= dgettext("actions", "Log in") %>
</h1>
<%= form_for @conn,
Routes.user_session_path(@conn, :create),
[
as: :user,
class:
"flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
],
fn f -> %>
<.form
let={f}
for={@conn}
action={Routes.user_session_path(@conn, :create)}
as="user"
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<%= if @error_message do %>
<div class="alert alert-danger col-span-3">
<p>
@ -31,7 +30,7 @@
<%= checkbox(f, :remember_me, class: "checkbox col-span-2") %>
<%= submit(dgettext("actions", "Log in"), class: "mx-auto btn btn-primary col-span-3") %>
<% end %>
</.form>
<hr class="hr" />

View File

@ -2,7 +2,7 @@ defmodule LokalWeb.EmailView do
@moduledoc """
A view for email-related helper functions
"""
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
use LokalWeb, :view
end

View File

@ -1,7 +1,7 @@
defmodule LokalWeb.ErrorView do
use LokalWeb, :view
import LokalWeb.Components.Topbar
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
def template_not_found(error_path, _assigns) do
error_string =

View File

@ -1,7 +1,7 @@
defmodule LokalWeb.LayoutView do
use LokalWeb, :view
import LokalWeb.Components.Topbar
alias LokalWeb.{Endpoint, PageLive}
alias LokalWeb.{Endpoint, HomeLive}
# Phoenix LiveDashboard is available only in development by default,
# so we instruct Elixir to not warn if the dashboard route is missing.

View File

@ -28,48 +28,48 @@ msgid "Delete User"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_registration/new.html.heex:43
#: lib/lokal_web/templates/user_registration/new.html.heex:42
#: lib/lokal_web/templates/user_reset_password/new.html.heex:3
#: lib/lokal_web/templates/user_session/new.html.heex:45
#: lib/lokal_web/templates/user_session/new.html.heex:44
msgid "Forgot your password?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:93
#: lib/lokal_web/templates/user_confirmation/new.html.heex:30
#: lib/lokal_web/templates/user_registration/new.html.heex:39
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:48
#: lib/lokal_web/templates/user_reset_password/new.html.heex:30
#: lib/lokal_web/templates/user_confirmation/new.html.heex:29
#: lib/lokal_web/templates/user_registration/new.html.heex:38
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:47
#: lib/lokal_web/templates/user_reset_password/new.html.heex:29
#: lib/lokal_web/templates/user_session/new.html.heex:3
#: lib/lokal_web/templates/user_session/new.html.heex:33
#: lib/lokal_web/templates/user_session/new.html.heex:32
msgid "Log in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:86
#: lib/lokal_web/templates/user_confirmation/new.html.heex:25
#: lib/lokal_web/templates/user_confirmation/new.html.heex:24
#: lib/lokal_web/templates/user_registration/new.html.heex:3
#: lib/lokal_web/templates/user_registration/new.html.heex:33
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:43
#: lib/lokal_web/templates/user_reset_password/new.html.heex:25
#: lib/lokal_web/templates/user_session/new.html.heex:40
#: lib/lokal_web/templates/user_registration/new.html.heex:32
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:42
#: lib/lokal_web/templates/user_reset_password/new.html.heex:24
#: lib/lokal_web/templates/user_session/new.html.heex:39
msgid "Register"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_confirmation/new.html.heex:3
#: lib/lokal_web/templates/user_confirmation/new.html.heex:16
#: lib/lokal_web/templates/user_confirmation/new.html.heex:15
msgid "Resend confirmation instructions"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:3
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:34
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:33
msgid "Reset password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_reset_password/new.html.heex:16
#: lib/lokal_web/templates/user_reset_password/new.html.heex:15
msgid "Send instructions to reset password"
msgstr ""

View File

@ -44,7 +44,7 @@ msgid "Invites"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_session/new.html.heex:28
#: lib/lokal_web/templates/user_session/new.html.heex:27
msgid "Keep me logged in for 60 days"
msgstr ""
@ -85,7 +85,7 @@ msgid "Settings"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.html.leex:7
#: lib/lokal_web/live/home_live.html.heex:7
msgid "Shop from your community"
msgstr ""
@ -95,12 +95,12 @@ msgid "Uses Left:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.html.leex:3
#: lib/lokal_web/live/home_live.html.heex:3
msgid "Welcome to Lokal"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.ex:13
#: lib/lokal_web/live/home_live.ex:13
msgid "Home"
msgstr ""
@ -158,3 +158,8 @@ msgstr ""
#: lib/lokal_web/templates/user_settings/edit.html.heex:126
msgid "English"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/user_card.ex:30
msgid "User registered on"
msgstr ""

View File

@ -11,36 +11,20 @@ msgid ""
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:30
msgid "Confirm your %{name} account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.eex:3
#: lib/lokal_web/templates/email/confirm_email.html.heex:3
#: lib/lokal_web/templates/email/confirm_email.txt.eex:2
#: lib/lokal_web/templates/email/reset_password.html.eex:3
#: lib/lokal_web/templates/email/reset_password.html.heex:3
#: lib/lokal_web/templates/email/reset_password.txt.eex:2
#: lib/lokal_web/templates/email/update_email.html.eex:3
#: lib/lokal_web/templates/email/update_email.html.heex:3
#: lib/lokal_web/templates/email/update_email.txt.eex:2
msgid "Hi %{email},"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.eex:22
msgid "If you didn't create an account at %{name}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.txt.eex:10
msgid "If you didn't create an account at %{url}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/reset_password.html.eex:16
#: lib/lokal_web/templates/email/update_email.html.eex:16
msgid "If you didn't request this change from %{name}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/reset_password.txt.eex:8
#: lib/lokal_web/templates/email/update_email.txt.eex:8
@ -48,49 +32,61 @@ msgid "If you didn't request this change from %{url}, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:37
msgid "Reset your %{name} password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/email.txt.eex:9
msgid "This email was sent from %{name} at %{url}, the self-hosted firearm tracker website."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/email.html.heex:13
msgid "This email was sent from %{name}, the self-hosted firearm tracker website."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:44
msgid "Update your %{name} email"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.eex:9
msgid "Welcome to %{name}!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.txt.eex:4
msgid "Welcome to %{name}%!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/update_email.html.eex:8
#: lib/lokal_web/templates/email/update_email.html.heex:8
#: lib/lokal_web/templates/email/update_email.txt.eex:4
msgid "You can change your email by visiting the URL below:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.eex:14
#: lib/lokal_web/templates/email/confirm_email.html.heex:14
#: lib/lokal_web/templates/email/confirm_email.txt.eex:6
msgid "You can confirm your account by visiting the URL below:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/reset_password.html.eex:8
#: lib/lokal_web/templates/email/reset_password.html.heex:8
#: lib/lokal_web/templates/email/reset_password.txt.eex:4
msgid "You can reset your password by visiting the URL below:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:30
msgid "Confirm your Lokal account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.heex:22
msgid "If you didn't create an account at Lokal, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/reset_password.html.heex:16
#: lib/lokal_web/templates/email/update_email.html.heex:16
msgid "If you didn't request this change from Lokal, please ignore this."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:37
msgid "Reset your Lokal password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/email.txt.eex:9
msgid "This email was sent from Lokal at %{url}, the self-hosted firearm tracker website."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/email.html.heex:13
msgid "This email was sent from Lokal, the self-hosted firearm tracker website."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/email.ex:44
msgid "Update your Lokal email"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/email/confirm_email.html.heex:9
#: lib/lokal_web/templates/email/confirm_email.txt.eex:4
msgid "Welcome to Lokal"
msgstr ""

View File

@ -124,8 +124,8 @@ msgid "Not found"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_registration/new.html.heex:16
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:16
#: lib/lokal_web/templates/user_registration/new.html.heex:15
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:15
#: lib/lokal_web/templates/user_settings/edit.html.heex:21
#: lib/lokal_web/templates/user_settings/edit.html.heex:64
#: lib/lokal_web/templates/user_settings/edit.html.heex:119

View File

@ -70,37 +70,6 @@ msgstr ""
msgid "Your account has been deleted"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/form_component.ex:59
msgid "%{name} created successfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:55
#: lib/lokal_web/live/invite_live/index.ex:135
msgid "%{name} deleted succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:111
msgid "%{name} disabled succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:89
msgid "%{name} enabled succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:69
msgid "%{name} updated succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/form_component.ex:41
msgid "%{name} updated successfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.html.heex:101
#: lib/lokal_web/live/invite_live/index.html.heex:130
@ -108,17 +77,7 @@ msgid "Are you sure you want to delete %{email}? This action is permanent!"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.html.heex:48
msgid "Are you sure you want to delete the invite for %{name}?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.html.heex:73
msgid "Are you sure you want to make %{name} unlimited?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:123
#: lib/lokal_web/live/invite_live/index.ex:129
msgid "Copied to clipboard"
msgstr ""
@ -136,3 +95,48 @@ msgstr ""
#: lib/lokal_web/controllers/user_settings_controller.ex:65
msgid "Language updated successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/form_component.ex:62
msgid "%{invite_name} created successfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:55
msgid "%{invite_name} deleted succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:116
msgid "%{invite_name} disabled succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:92
msgid "%{invite_name} enabled succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:70
msgid "%{invite_name} updated succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/form_component.ex:42
msgid "%{invite_name} updated successfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.ex:141
msgid "%{user_email} deleted succesfully"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.html.heex:48
msgid "Are you sure you want to delete the invite for %{invite_name}?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/invite_live/index.html.heex:73
msgid "Are you sure you want to make %{invite_name} unlimited?"
msgstr ""

View File

@ -1,8 +0,0 @@
defmodule LokalWeb.PageControllerTest do
use LokalWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, "/")
assert html_response(conn, 200) =~ "Welcome to Lokal"
end
end

View File

@ -46,7 +46,8 @@ defmodule LokalWeb.InviteLiveTest do
|> render_submit()
|> follow_redirect(conn, Routes.invite_index_path(conn, :index))
assert html =~ dgettext("prompts", "%{name} created successfully", name: "some name")
assert html =~
dgettext("prompts", "%{invite_name} created successfully", invite_name: "some name")
assert html =~ "some name"
end
@ -70,7 +71,9 @@ defmodule LokalWeb.InviteLiveTest do
|> follow_redirect(conn, Routes.invite_index_path(conn, :index))
assert html =~
dgettext("prompts", "%{name} updated successfully", name: "some updated name")
dgettext("prompts", "%{invite_name} updated successfully",
invite_name: "some updated name"
)
assert html =~ "some updated name"
end

View File

@ -1,4 +1,4 @@
defmodule LokalWeb.PageLiveTest do
defmodule LokalWeb.HomeLiveTest do
use LokalWeb.ConnCase
import Phoenix.LiveViewTest