gettext page_live

This commit is contained in:
shibao 2022-02-25 21:58:07 -05:00 committed by oliviasculley
parent e35bdf101b
commit e16fbba810
7 changed files with 455 additions and 6 deletions

View File

@ -7,7 +7,12 @@ defmodule LokalWeb.PageLive do
@impl true
def mount(_params, session, socket) do
{:ok, socket |> assign_defaults(session) |> assign(query: "", results: %{})}
socket =
socket
|> assign_defaults(session)
|> assign(page_title: gettext("Home"), query: "", results: %{})
{:ok, socket}
end
@impl true

View File

@ -1,9 +1,9 @@
<div class="flex flex-col justify-center items-center text-center space-y-4">
<h1 class="title text-primary-500 text-2xl">
Welcome to Lokal
<%= gettext("Welcome to Lokal") %>
</h1>
<p class="title text-primary-500 text-lg">
Shop from your community
<%= gettext("Shop from your community") %>
</p>
</div>

74
priv/gettext/actions.pot Normal file
View File

@ -0,0 +1,74 @@
## This file is a PO Template file.
##
## "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.
msgid ""
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:16
#: lib/lokal_web/templates/user_settings/edit.html.heex:45
msgid "Change email"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:60
#: lib/lokal_web/templates/user_settings/edit.html.heex:101
msgid "Change password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:108
msgid "Delete User"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_registration/new.html.heex:43
#: lib/lokal_web/templates/user_reset_password/new.html.heex:3
#: lib/lokal_web/templates/user_session/new.html.heex:45
msgid "Forgot your password?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:95
#: 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_session/new.html.heex:3
#: lib/lokal_web/templates/user_session/new.html.heex:33
msgid "Log in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:88
#: lib/lokal_web/templates/user_confirmation/new.html.heex:25
#: 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
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
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
msgid "Reset password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_reset_password/new.html.heex:16
msgid "Send instructions to reset password"
msgstr ""

103
priv/gettext/default.pot Normal file
View File

@ -0,0 +1,103 @@
## This file is a PO Template file.
##
## "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.
msgid ""
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:80
msgid "Confirm new password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_confirmation_controller.ex:8
msgid "Confirm your account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:33
#: lib/lokal_web/templates/user_settings/edit.html.heex:89
msgid "Current password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_reset_password_controller.ex:9
msgid "Forgot your password?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/invite_card.ex:27
msgid "Invite Disabled"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:58
msgid "Invites"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_session/new.html.heex:28
msgid "Keep me logged in for 60 days"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/live.html.heex:37
msgid "Loading..."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_session_controller.ex:8
msgid "Log in"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:73
msgid "New password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/layout/live.html.heex:50
msgid "Reconnecting..."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_registration_controller.ex:35
msgid "Register"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_reset_password_controller.ex:36
msgid "Reset your password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:10
#: lib/lokal_web/templates/user_settings/edit.html.heex:3
msgid "Settings"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.html.leex:7
msgid "Shop from your community"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/invite_card.ex:22
msgid "Uses Left:"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.html.leex:3
msgid "Welcome to Lokal"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/live/page_live.ex:13
msgid "Home"
msgstr ""

96
priv/gettext/emails.pot Normal file
View File

@ -0,0 +1,96 @@
## This file is a PO Template file.
##
## "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.
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.txt.eex:2
#: lib/lokal_web/templates/email/reset_password.html.eex: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.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
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:17
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.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.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.txt.eex:4
msgid "You can reset your password by visiting the URL below:"
msgstr ""

View File

@ -7,7 +7,6 @@
## 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 ""
@ -93,3 +92,104 @@ msgstr ""
msgid "must be equal to %{number}"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:67
msgid "Email change link is invalid or it has expired."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/error/error.html.heex:8
msgid "Error"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/error/error.html.heex:29
msgid "Go back home"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/views/error_view.ex:11
msgid "Internal Server Error"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_session_controller.ex:17
msgid "Invalid email or password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/views/error_view.ex:9
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_settings/edit.html.heex:22
#: lib/lokal_web/templates/user_settings/edit.html.heex:66
msgid "Oops, something went wrong! Please check the errors below."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_reset_password_controller.ex:63
msgid "Reset password link is invalid or it has expired."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_registration_controller.ex:25
#: lib/lokal_web/controllers/user_registration_controller.ex:56
msgid "Sorry, public registration is disabled"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_registration_controller.ex:15
#: lib/lokal_web/controllers/user_registration_controller.ex:46
msgid "Sorry, this invite was not found or expired"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:82
msgid "Unable to delete user"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/views/error_view.ex:10
msgid "Unauthorized"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_confirmation_controller.ex:54
msgid "User confirmation link is invalid or it has expired."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_auth.ex:177
msgid "You are not authorized to view this page."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_auth.ex:39
#: lib/lokal_web/controllers/user_auth.ex:161
msgid "You must confirm your account and log in to access this page."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/user.ex:128
msgid "did not change"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/user.ex:149
msgid "does not match password"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/user.ex:186
msgid "is not valid"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal/accounts/user.ex:82
msgid "must have the @ sign and no spaces"
msgstr ""

71
priv/gettext/prompts.pot Normal file
View File

@ -0,0 +1,71 @@
## This file is a PO Template file.
##
## "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.
msgid ""
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_confirmation_controller.ex:38
msgid "%{email} confirmed successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:28
msgid "A link to confirm your email change has been sent to the new address."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/templates/user_settings/edit.html.heex:112
msgid "Are you sure you want to delete your account?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/components/topbar.ex:73
msgid "Are you sure you want to log out?"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:60
msgid "Email changed successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_confirmation_controller.ex:23
msgid "If your email is in our system and it has not been confirmed yet, you will receive an email with instructions shortly."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_reset_password_controller.ex:24
msgid "If your email is in our system, you will receive instructions to reset your password shortly."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_session_controller.ex:23
msgid "Logged out successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_reset_password_controller.ex:46
msgid "Password reset successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:47
msgid "Password updated successfully."
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_registration_controller.ex:74
msgid "Please check your email to verify your account"
msgstr ""
#, elixir-autogen, elixir-format
#: lib/lokal_web/controllers/user_settings_controller.ex:78
msgid "Your account has been deleted"
msgstr ""