diff --git a/.env b/.env index 1d44286e25..74a2f7fca4 100644 --- a/.env +++ b/.env @@ -18,9 +18,9 @@ STACK_NAME=full-stack-fastapi-project # Backend BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com" -SECRET_KEY=changethis +SECRET_KEY=123 FIRST_SUPERUSER=admin@example.com -FIRST_SUPERUSER_PASSWORD=changethis +FIRST_SUPERUSER_PASSWORD=123 # Emails SMTP_HOST= diff --git a/frontend/src/routes/_layout/index.tsx b/frontend/src/routes/_layout/index.tsx index 80cc934083..e95a7805a7 100644 --- a/frontend/src/routes/_layout/index.tsx +++ b/frontend/src/routes/_layout/index.tsx @@ -15,9 +15,9 @@ function Dashboard() { - Hi, {currentUser?.full_name || currentUser?.email} 👋🏼 + Привет, {currentUser?.full_name || currentUser?.email} 👋🏼 - Welcome back, nice to see you again! + Добро пожаловать обратно, приятно видеть вас снова! diff --git a/frontend/src/routes/signup.tsx b/frontend/src/routes/signup.tsx index 80396c5078..0f6d25ab40 100644 --- a/frontend/src/routes/signup.tsx +++ b/frontend/src/routes/signup.tsx @@ -147,12 +147,12 @@ function SignUp() { )} Already have an account?{" "} - Log In + Вход diff --git a/frontend/src/utils.ts b/frontend/src/utils.ts index 99f906303c..e3c3cccd00 100644 --- a/frontend/src/utils.ts +++ b/frontend/src/utils.ts @@ -2,24 +2,24 @@ import type { ApiError } from "./client" export const emailPattern = { value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i, - message: "Invalid email address", + message: "Неверный email address", } export const namePattern = { value: /^[A-Za-z\s\u00C0-\u017F]{1,30}$/, - message: "Invalid name", + message: "Неверное имя", } export const passwordRules = (isRequired = true) => { const rules: any = { minLength: { value: 8, - message: "Password must be at least 8 characters", + message: "Пароль должен содердать 8 символов", }, } if (isRequired) { - rules.required = "Password is required" + rules.required = "Требуется ввести пароль" } return rules @@ -32,12 +32,12 @@ export const confirmPasswordRules = ( const rules: any = { validate: (value: string) => { const password = getValues().password || getValues().new_password - return value === password ? true : "The passwords do not match" + return value === password ? true : "Пароли не совпадают" }, } if (isRequired) { - rules.required = "Password confirmation is required" + rules.required = "Требуется подтверждение пароля" } return rules @@ -45,9 +45,9 @@ export const confirmPasswordRules = ( export const handleError = (err: ApiError, showToast: any) => { const errDetail = (err.body as any)?.detail - let errorMessage = errDetail || "Something went wrong." + let errorMessage = errDetail || "Что-то пошло не так." if (Array.isArray(errDetail) && errDetail.length > 0) { errorMessage = errDetail[0].msg } - showToast("Error", errorMessage, "error") + showToast("Error", errorMessage, "ошибка") }