From cd0b9d3b718969873bf9bddbb830e2e8b4bf98a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 29 May 2025 10:56:27 +0300 Subject: [PATCH] Login Translate --- .../Seeds/SeederData.json | 186 ++++++++++++++++++ ui/dev-dist/sw.js | 2 +- ui/src/views/auth/ExtendLogin.tsx | 20 +- ui/src/views/auth/ForgotPassword.tsx | 16 +- ui/src/views/auth/Login.tsx | 26 +-- ui/src/views/auth/Register.tsx | 40 ++-- ui/src/views/auth/ResetPassword.tsx | 24 +-- ui/src/views/auth/SendConfirmationCode.tsx | 16 +- ui/src/views/auth/VerifyConfirmationCode.tsx | 4 +- 9 files changed, 266 insertions(+), 68 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 07e1abf6..f87f9fc9 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -1416,6 +1416,66 @@ "en": "Enable self registration Description", "tr": "Kendi kendine kaydı etkinleştir Açıklaması" }, + { + "resourceName": "Platform", + "key": "Abp.Account.WelcomeBack", + "en": "Welcome back!", + "tr": "Tekrar hoşgeldiniz!" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.WelcomeBack.Message", + "en": "Please enter your credentials to sign in!", + "tr": "Giriş yapmak için lütfen kimlik bilgilerinizi girin!" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.SignUp", + "en": "Sign up", + "tr": "Yeni Üye" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.SignUp.Message", + "en": "Don't have an account yet?", + "tr": "Henüz bir hesabınız yok mu?" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.EmailAddress", + "en": "Email Address", + "tr": "Email Adresi" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Password", + "en": "Password", + "tr": "Parola" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ConfirmPassword", + "en": "Confirm Password", + "tr": "Şifreyi Onayla" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.2FACode", + "en": "2FA Code", + "tr": "İki Faktör" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.RememberMe", + "en": "Remember Me", + "tr": "Beni Hatırla" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ForgotPassword", + "en": "Forgot password?", + "tr": "Şifremi Unuttum?" + }, { "resourceName": "Platform", "key": "Abp.Account.TwoFactor", @@ -1494,6 +1554,132 @@ "en": "Private Key Description", "tr": "Özel Anahtarı Açıklaması" }, + { + "resourceName": "Platform", + "key": "Abp.Account.ExtendLogin.Title", + "en": "Extension request received", + "tr": "Uzatma talebi alındı" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ExtendLogin.Description", + "en": "If your account is opened after your request is reviewed, you will also be sent an e-mail.", + "tr": "Talebiniz incelendikten sonra hesabınız açılırsa size ayrıca mail gönderilecektir." + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Backto", + "en": "Back to ", + "tr": "Geri dön " + }, + { + "resourceName": "Platform", + "key": "Abp.Account.SignIn", + "en": "Sign in", + "tr": "Oturum Aç" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Register", + "en": "New register", + "tr": "Yeni Üyelik" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ExtendLogin", + "en": "Extend My Login", + "tr": "Oturumu Uzat" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ForgotPassword.Checkyouremail", + "en": "Check your email", + "tr": "E-postanızı kontrol edin" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ForgotPassword.Checkyouremail.Message", + "en": "We have sent a password recovery instruction to your email", + "tr": "E-postanıza bir şifre kurtarma talimatı gönderdik" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ForgotPassword.Message", + "en": "Please enter your email address to receive a verification code", + "tr": "Doğrulama kodunu almak için lütfen e-posta adresinizi girin" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ResetPassword.ResetDone", + "en": "Reset Done", + "tr": "Sıfırlama tamamlandı" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ResetPassword.ResetDone.Message", + "en": "Your password has been successfully reset", + "tr": "Şifreniz başarıyla sıfırlandı" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ResetPassword.SetNewPassword", + "en": "Set new password", + "tr": "Yeni şifre belirle" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ResetPassword.SetNewPassword.Message", + "en": "Your new password must different to previous password", + "tr": "Yeni şifreniz önceki şifrenizden farklı olmalıdır" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.ResetPassword.Continue", + "en": "Continue", + "tr": "Devam" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.SendConfirmationCode", + "en": "Confirm Email", + "tr": "E-posta Onayla" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.SendConfirmationCode.Message", + "en": "Please enter your email to receive new confirmation code", + "tr": "Yeni onay kodunu almak için lütfen e-postanızı girin" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.VerifyConfirmationCode", + "en": "Request New Confirmation Code", + "tr": "Yeni Onay Kodu İsteyin" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Register.Title", + "en": "Sign Up", + "tr": "Üye Ol" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Register.Message", + "en": "And let's get started with your free trial", + "tr": "Ve ücretsiz denemenize başlayalım" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Register.AlreadyHaveAnAccount", + "en": "Already have an account? ", + "tr": "Zaten bir hesabınız var mı?" + }, + { + "resourceName": "Platform", + "key": "Abp.Account.Register.ResultMessage", + "en": "Success. Please confirm your account by clicking the link.", + "tr": "Başarılı. Lütfen bağlantıya tıklayarak hesabınızı onaylayın." + }, { "resourceName": "Platform", "key": "Abp.Identity", diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index 7d82eae4..8a12b39a 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.8b8tnlffsvo" + "revision": "0.952ffulqdco" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/ui/src/views/auth/ExtendLogin.tsx b/ui/src/views/auth/ExtendLogin.tsx index dfe5fd5f..7f354202 100644 --- a/ui/src/views/auth/ExtendLogin.tsx +++ b/ui/src/views/auth/ExtendLogin.tsx @@ -7,6 +7,7 @@ import Input from '@/components/ui/Input' import { ROUTES_ENUM } from '@/constants/route.constant' import { sendExtendLoginRequest } from '@/proxy/account/account.service' import { store } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' import useTimeOutMessage from '@/utils/hooks/useTimeOutMessage' import { Field, Form, Formik } from 'formik' import { useState } from 'react' @@ -18,7 +19,7 @@ type ExtendLoginFormSchema = { } const validationSchema = Yup.object().shape({ - email: Yup.string().required('Please enter your email'), + email: Yup.string().required(), captchaResponse: Yup.string().required(), }) @@ -30,6 +31,7 @@ const ExtendLogin = () => { const [emailSent, setEmailSent] = useState(false) const [message, setMessage] = useTimeOutMessage(10000) + const { translate } = useLocalization() const onSendMail = async ( values: ExtendLoginFormSchema, @@ -51,17 +53,17 @@ const ExtendLogin = () => { return emailSent ? ( <> -
Talebiniz incelendikten sonra hesabınız açılırsa size ayrıca mail gönderilecektir.
+{ translate('::Abp.Account.ExtendLogin.Description')}
We have sent a password recovery instruction to your email
+{translate('::Abp.Account.ForgotPassword.Checkyouremail.Message')}
> ) : ( <> -Please enter your email address to receive a verification code
+{ translate('::Abp.Account.ForgotPassword.Message')}
> )}Please enter your credentials to sign in!
+{translate('::Abp.Account.WelcomeBack.Message')}
And lets get started with your free trial
+{translate('::Abp.Account.Register.Message')}
Your password has been successfully reset
+{translate('::Abp.Account.ResetPassword.ResetDone.Message')}
> ) : ( <> -Your new password must different to previos password
+{translate('::Abp.Account.ResetPassword.SetNewPassword.Message')}
> )}Please enter your email to receive new confirmation code
+{translate('::Abp.Account.SendConfirmationCode.Message')}