diff --git a/assets/css/core_components.css b/assets/css/core_components.css index 71d7707..7776721 100644 --- a/assets/css/core_components.css +++ b/assets/css/core_components.css @@ -128,7 +128,6 @@ .simple-form { margin-top: 2rem; - background-color: #ffffff; } .simple-form-action { @@ -148,7 +147,6 @@ font-size: 0.875rem; font-weight: 600; line-height: 1.5rem; - color: #ffffff; } .input { diff --git a/lib/comfycamp_web/live/user_confirmation_instructions_live.ex b/lib/comfycamp_web/live/user_confirmation_instructions_live.ex index f2a04c4..c0ed539 100644 --- a/lib/comfycamp_web/live/user_confirmation_instructions_live.ex +++ b/lib/comfycamp_web/live/user_confirmation_instructions_live.ex @@ -7,22 +7,22 @@ defmodule ComfycampWeb.UserConfirmationInstructionsLive do ~H"""
<.header class="text-center"> - No confirmation instructions received? - <:subtitle>We'll send a new confirmation link to your inbox + Не получили инструкцию для подтверждения? + <:subtitle>Мы отправим новую ссылку на вашу почту. <.simple_form for={@form} id="resend_confirmation_form" phx-submit="send_instructions"> <.input field={@form[:email]} type="email" placeholder="Email" required /> <:actions> - <.button phx-disable-with="Sending..." class="w-full"> - Resend confirmation instructions + <.button phx-disable-with="Отправляю..." class="w-full"> + Отправить инструкции повторно

- <.link href={~p"/users/register"}>Register - | <.link href={~p"/users/log_in"}>Log in + <.link href={~p"/users/register"}>Зарегистрироваться + | <.link href={~p"/users/log_in"}>Войти

""" diff --git a/lib/comfycamp_web/live/user_confirmation_live.ex b/lib/comfycamp_web/live/user_confirmation_live.ex index ef4fe69..aca0114 100644 --- a/lib/comfycamp_web/live/user_confirmation_live.ex +++ b/lib/comfycamp_web/live/user_confirmation_live.ex @@ -6,18 +6,18 @@ defmodule ComfycampWeb.UserConfirmationLive do def render(%{live_action: :edit} = assigns) do ~H"""
- <.header class="text-center">Confirm Account + <.header class="text-center">Подтвердить аккаунт <.simple_form for={@form} id="confirmation_form" phx-submit="confirm_account"> <:actions> - <.button phx-disable-with="Confirming..." class="w-full">Confirm my account + <.button phx-disable-with="Confirming..." class="w-full">Подтвердить мой аккаунт

- <.link href={~p"/users/register"}>Register - | <.link href={~p"/users/log_in"}>Log in + <.link href={~p"/users/register"}>Зарегистрироваться + | <.link href={~p"/users/log_in"}>Войти

""" diff --git a/lib/comfycamp_web/live/user_forgot_password_live.ex b/lib/comfycamp_web/live/user_forgot_password_live.ex index c98e287..e95ca4c 100644 --- a/lib/comfycamp_web/live/user_forgot_password_live.ex +++ b/lib/comfycamp_web/live/user_forgot_password_live.ex @@ -7,21 +7,21 @@ defmodule ComfycampWeb.UserForgotPasswordLive do ~H"""
<.header class="text-center"> - Forgot your password? - <:subtitle>We'll send a password reset link to your inbox + Забыли пароль? + <:subtitle>Мы отправим ссылку для сброса пароля. <.simple_form for={@form} id="reset_password_form" phx-submit="send_email"> <.input field={@form[:email]} type="email" placeholder="Email" required /> <:actions> - <.button phx-disable-with="Sending..." class="w-full"> - Send password reset instructions + <.button phx-disable-with="Отправляю..." class="w-full"> + Отправить инструкции

- <.link href={~p"/users/register"}>Register - | <.link href={~p"/users/log_in"}>Log in + <.link href={~p"/users/register"}>Зарегистрироваться + | <.link href={~p"/users/log_in"}>Войти

""" diff --git a/lib/comfycamp_web/live/user_login_live.ex b/lib/comfycamp_web/live/user_login_live.ex index 6f8d8e8..a792755 100644 --- a/lib/comfycamp_web/live/user_login_live.ex +++ b/lib/comfycamp_web/live/user_login_live.ex @@ -5,29 +5,29 @@ defmodule ComfycampWeb.UserLoginLive do ~H"""
<.header class="text-center"> - Log in to account + Войти в аккаунт <:subtitle> - Don't have an account? + Нет аккаунта? <.link navigate={~p"/users/register"} class="font-semibold text-brand hover:underline"> - Sign up + Создайте - for an account now. + новый. <.simple_form for={@form} id="login_form" action={~p"/users/log_in"} phx-update="ignore"> <.input field={@form[:email]} type="email" label="Email" required /> - <.input field={@form[:password]} type="password" label="Password" required /> + <.input field={@form[:password]} type="password" label="Пароль" required /> <:actions> - <.input field={@form[:remember_me]} type="checkbox" label="Keep me logged in" /> + <.input field={@form[:remember_me]} type="checkbox" label="Запомнить" /> <.link href={~p"/users/reset_password"} class="text-sm font-semibold"> - Forgot your password? + Забыли пароль? <:actions> - <.button phx-disable-with="Logging in..." class="w-full"> - Log in + <.button phx-disable-with="Вхожу..." class="w-full"> + Войти diff --git a/lib/comfycamp_web/live/user_registration_live.ex b/lib/comfycamp_web/live/user_registration_live.ex index 62c3186..a92a7cc 100644 --- a/lib/comfycamp_web/live/user_registration_live.ex +++ b/lib/comfycamp_web/live/user_registration_live.ex @@ -6,15 +6,15 @@ defmodule ComfycampWeb.UserRegistrationLive do def render(assigns) do ~H""" -
+
<.header class="text-center"> - Register for an account + Создайте аккаунт <:subtitle> - Already registered? + Уже зарегистрированы? <.link navigate={~p"/users/log_in"} class="font-semibold text-brand hover:underline"> - Log in + Войти - to your account now. + в аккаунт. @@ -28,14 +28,16 @@ defmodule ComfycampWeb.UserRegistrationLive do method="post" > <.error :if={@check_errors}> - Oops, something went wrong! Please check the errors below. + Что-то пошло не так. Проверьте ошибки ниже. <.input field={@form[:email]} type="email" label="Email" required /> - <.input field={@form[:password]} type="password" label="Password" required /> + <.input field={@form[:password]} type="password" label="Пароль" required /> <:actions> - <.button phx-disable-with="Creating account..." class="w-full">Create an account + <.button phx-disable-with="Создаю аккаунт..." class="w-full"> + Создать аккаунт +
diff --git a/lib/comfycamp_web/live/user_reset_password_live.ex b/lib/comfycamp_web/live/user_reset_password_live.ex index fcabc22..e714034 100644 --- a/lib/comfycamp_web/live/user_reset_password_live.ex +++ b/lib/comfycamp_web/live/user_reset_password_live.ex @@ -6,7 +6,7 @@ defmodule ComfycampWeb.UserResetPasswordLive do def render(assigns) do ~H"""
- <.header class="text-center">Reset Password + <.header class="text-center">Сброс пароля <.simple_form for={@form} @@ -15,24 +15,24 @@ defmodule ComfycampWeb.UserResetPasswordLive do phx-change="validate" > <.error :if={@form.errors != []}> - Oops, something went wrong! Please check the errors below. + Упс, что-то пошло не так. Проверьте ошибки ниже. - <.input field={@form[:password]} type="password" label="New password" required /> + <.input field={@form[:password]} type="password" label="Новый пароль" required /> <.input field={@form[:password_confirmation]} type="password" - label="Confirm new password" + label="Подтвердите новый пароль" required /> <:actions> - <.button phx-disable-with="Resetting..." class="w-full">Reset Password + <.button phx-disable-with="Сбрасываю..." class="w-full">Сбросить пароль

- <.link href={~p"/users/register"}>Register - | <.link href={~p"/users/log_in"}>Log in + <.link href={~p"/users/register"}>Зарегистрироваться + | <.link href={~p"/users/log_in"}>Войти

""" diff --git a/lib/comfycamp_web/live/user_settings_live.ex b/lib/comfycamp_web/live/user_settings_live.ex index b2007dd..c4223cd 100644 --- a/lib/comfycamp_web/live/user_settings_live.ex +++ b/lib/comfycamp_web/live/user_settings_live.ex @@ -6,8 +6,8 @@ defmodule ComfycampWeb.UserSettingsLive do def render(assigns) do ~H""" <.header class="text-center"> - Account Settings - <:subtitle>Manage your account email address and password settings + Настройки аккаунта + <:subtitle>Настройки email адреса и пароля
@@ -24,12 +24,12 @@ defmodule ComfycampWeb.UserSettingsLive do name="current_password" id="current_password_for_email" type="password" - label="Current password" + label="Текущий пароль" value={@email_form_current_password} required /> <:actions> - <.button phx-disable-with="Changing...">Change Email + <.button phx-disable-with="Изменяю...">Изменить email
@@ -49,23 +49,28 @@ defmodule ComfycampWeb.UserSettingsLive do id="hidden_user_email" value={@current_email} /> - <.input field={@password_form[:password]} type="password" label="New password" required /> + <.input + field={@password_form[:password]} + type="password" + label="Новый пароль" + required + /> <.input field={@password_form[:password_confirmation]} type="password" - label="Confirm new password" + label="Подтвердите новый пароль" /> <.input field={@password_form[:current_password]} name="current_password" type="password" - label="Current password" + label="Текущий пароль" id="current_password_for_password" value={@current_password} required /> <:actions> - <.button phx-disable-with="Changing...">Change Password + <.button phx-disable-with="Изменяю...">Изменить пароль
diff --git a/test/comfycamp_web/live/user_confirmation_instructions_live_test.exs b/test/comfycamp_web/live/user_confirmation_instructions_live_test.exs index 37eda06..efb3930 100644 --- a/test/comfycamp_web/live/user_confirmation_instructions_live_test.exs +++ b/test/comfycamp_web/live/user_confirmation_instructions_live_test.exs @@ -14,7 +14,7 @@ defmodule ComfycampWeb.UserConfirmationInstructionsLiveTest do describe "Resend confirmation" do test "renders the resend confirmation page", %{conn: conn} do {:ok, _lv, html} = live(conn, ~p"/users/confirm") - assert html =~ "Resend confirmation instructions" + assert html =~ "Отправить инструкции повторно" end test "sends a new confirmation token", %{conn: conn, user: user} do diff --git a/test/comfycamp_web/live/user_confirmation_live_test.exs b/test/comfycamp_web/live/user_confirmation_live_test.exs index e8f22c2..454bbb0 100644 --- a/test/comfycamp_web/live/user_confirmation_live_test.exs +++ b/test/comfycamp_web/live/user_confirmation_live_test.exs @@ -14,7 +14,7 @@ defmodule ComfycampWeb.UserConfirmationLiveTest do describe "Confirm user" do test "renders confirmation page", %{conn: conn} do {:ok, _lv, html} = live(conn, ~p"/users/confirm/some-token") - assert html =~ "Confirm Account" + assert html =~ "Подтвердить аккаунт" end test "confirms the given token once", %{conn: conn, user: user} do diff --git a/test/comfycamp_web/live/user_forgot_password_live_test.exs b/test/comfycamp_web/live/user_forgot_password_live_test.exs index 0ce0428..073e632 100644 --- a/test/comfycamp_web/live/user_forgot_password_live_test.exs +++ b/test/comfycamp_web/live/user_forgot_password_live_test.exs @@ -11,9 +11,9 @@ defmodule ComfycampWeb.UserForgotPasswordLiveTest do test "renders email page", %{conn: conn} do {:ok, lv, html} = live(conn, ~p"/users/reset_password") - assert html =~ "Forgot your password?" - assert has_element?(lv, ~s|a[href="#{~p"/users/register"}"]|, "Register") - assert has_element?(lv, ~s|a[href="#{~p"/users/log_in"}"]|, "Log in") + assert html =~ "Забыли пароль?" + assert has_element?(lv, ~s|a[href="#{~p"/users/register"}"]|, "Зарегистрироваться") + assert has_element?(lv, ~s|a[href="#{~p"/users/log_in"}"]|, "Войти") end test "redirects if already logged in", %{conn: conn} do diff --git a/test/comfycamp_web/live/user_login_live_test.exs b/test/comfycamp_web/live/user_login_live_test.exs index aed5fe8..b02891c 100644 --- a/test/comfycamp_web/live/user_login_live_test.exs +++ b/test/comfycamp_web/live/user_login_live_test.exs @@ -10,7 +10,7 @@ defmodule ComfycampWeb.UserLoginLiveTest do assert html =~ "Войти" assert html =~ "Зарегистрироваться" - assert html =~ "Forgot your password?" + assert html =~ "Забыли пароль?" end test "redirects if already logged in", %{conn: conn} do @@ -63,11 +63,11 @@ defmodule ComfycampWeb.UserLoginLiveTest do {:ok, _login_live, login_html} = lv - |> element(~s|main a:fl-contains("Sign up")|) + |> element(~s|main a:fl-contains("Создайте")|) |> render_click() |> follow_redirect(conn, ~p"/users/register") - assert login_html =~ "Register" + assert login_html =~ "Зарегистрироваться" end test "redirects to forgot password page when the Forgot Password button is clicked", %{ @@ -77,11 +77,11 @@ defmodule ComfycampWeb.UserLoginLiveTest do {:ok, conn} = lv - |> element(~s|main a:fl-contains("Forgot your password?")|) + |> element(~s|main a:fl-contains("Забыли пароль?")|) |> render_click() |> follow_redirect(conn, ~p"/users/reset_password") - assert conn.resp_body =~ "Forgot your password?" + assert conn.resp_body =~ "Забыли пароль?" end end end diff --git a/test/comfycamp_web/live/user_registration_live_test.exs b/test/comfycamp_web/live/user_registration_live_test.exs index c14298e..2e24ffa 100644 --- a/test/comfycamp_web/live/user_registration_live_test.exs +++ b/test/comfycamp_web/live/user_registration_live_test.exs @@ -8,8 +8,8 @@ defmodule ComfycampWeb.UserRegistrationLiveTest do test "renders registration page", %{conn: conn} do {:ok, _lv, html} = live(conn, ~p"/users/register") - assert html =~ "Register" - assert html =~ "Log in" + assert html =~ "Зарегистрироваться" + assert html =~ "Войти" end test "redirects if already logged in", %{conn: conn} do @@ -30,7 +30,7 @@ defmodule ComfycampWeb.UserRegistrationLiveTest do |> element("#registration_form") |> render_change(user: %{"email" => "with spaces", "password" => "too short"}) - assert result =~ "Register" + assert result =~ "Зарегистрироваться" assert result =~ "must have the @ sign and no spaces" assert result =~ "should be at least 12 character" end @@ -76,11 +76,11 @@ defmodule ComfycampWeb.UserRegistrationLiveTest do {:ok, _login_live, login_html} = lv - |> element(~s|main a:fl-contains("Log in")|) + |> element(~s|main a:fl-contains("Войти")|) |> render_click() |> follow_redirect(conn, ~p"/users/log_in") - assert login_html =~ "Log in" + assert login_html =~ "Войти" end end end diff --git a/test/comfycamp_web/live/user_reset_password_live_test.exs b/test/comfycamp_web/live/user_reset_password_live_test.exs index 216756e..8da56cb 100644 --- a/test/comfycamp_web/live/user_reset_password_live_test.exs +++ b/test/comfycamp_web/live/user_reset_password_live_test.exs @@ -21,7 +21,7 @@ defmodule ComfycampWeb.UserResetPasswordLiveTest do test "renders reset password with valid token", %{conn: conn, token: token} do {:ok, _lv, html} = live(conn, ~p"/users/reset_password/#{token}") - assert html =~ "Reset Password" + assert html =~ "Сбросить пароль" end test "does not render reset password with invalid token", %{conn: conn} do @@ -81,7 +81,7 @@ defmodule ComfycampWeb.UserResetPasswordLiveTest do ) |> render_submit() - assert result =~ "Reset Password" + assert result =~ "Сбросить пароль" assert result =~ "should be at least 12 character(s)" assert result =~ "does not match password" end @@ -93,11 +93,11 @@ defmodule ComfycampWeb.UserResetPasswordLiveTest do {:ok, conn} = lv - |> element(~s|main a:fl-contains("Log in")|) + |> element(~s|main a:fl-contains("Войти")|) |> render_click() |> follow_redirect(conn, ~p"/users/log_in") - assert conn.resp_body =~ "Log in" + assert conn.resp_body =~ "Войти" end test "redirects to registration page when the Register button is clicked", %{ @@ -108,11 +108,11 @@ defmodule ComfycampWeb.UserResetPasswordLiveTest do {:ok, conn} = lv - |> element(~s|main a:fl-contains("Register")|) + |> element(~s|main a:fl-contains("Зарегистрироваться")|) |> render_click() |> follow_redirect(conn, ~p"/users/register") - assert conn.resp_body =~ "Register" + assert conn.resp_body =~ "Зарегистрироваться" end end end diff --git a/test/comfycamp_web/live/user_settings_live_test.exs b/test/comfycamp_web/live/user_settings_live_test.exs index 4beeffe..c249ac1 100644 --- a/test/comfycamp_web/live/user_settings_live_test.exs +++ b/test/comfycamp_web/live/user_settings_live_test.exs @@ -12,8 +12,8 @@ defmodule ComfycampWeb.UserSettingsLiveTest do |> log_in_user(user_fixture()) |> live(~p"/users/settings") - assert html =~ "Change Email" - assert html =~ "Change Password" + assert html =~ "Изменить email" + assert html =~ "Изменить пароль" end test "redirects if user is not logged in", %{conn: conn} do @@ -61,7 +61,7 @@ defmodule ComfycampWeb.UserSettingsLiveTest do "user" => %{"email" => "with spaces"} }) - assert result =~ "Change Email" + assert result =~ "Изменить email" assert result =~ "must have the @ sign and no spaces" end @@ -76,7 +76,7 @@ defmodule ComfycampWeb.UserSettingsLiveTest do }) |> render_submit() - assert result =~ "Change Email" + assert result =~ "Изменить email" assert result =~ "did not change" assert result =~ "is not valid" end @@ -132,7 +132,7 @@ defmodule ComfycampWeb.UserSettingsLiveTest do } }) - assert result =~ "Change Password" + assert result =~ "Изменить пароль" assert result =~ "should be at least 12 character(s)" assert result =~ "does not match password" end @@ -151,7 +151,7 @@ defmodule ComfycampWeb.UserSettingsLiveTest do }) |> render_submit() - assert result =~ "Change Password" + assert result =~ "Изменить пароль" assert result =~ "should be at least 12 character(s)" assert result =~ "does not match password" assert result =~ "is not valid"