Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
59879b7f
Commit
59879b7f
authored
Mar 04, 2026
by
shaw
Browse files
fix(i18n): replace hardcoded English strings in EmailVerifyView with i18n calls
parent
27abae21
Changes
3
Show whitespace changes
Inline
Side-by-side
frontend/src/i18n/locales/en.ts
View file @
59879b7f
...
...
@@ -329,6 +329,16 @@ export default {
sendingCode
:
'
Sending...
'
,
clickToResend
:
'
Click to resend code
'
,
resendCode
:
'
Resend verification code
'
,
sendCodeDesc
:
"
We'll send a verification code to
"
,
codeSentSuccess
:
'
Verification code sent! Please check your inbox.
'
,
verifying
:
'
Verifying...
'
,
verifyAndCreate
:
'
Verify & Create Account
'
,
resendCountdown
:
'
Resend code in {countdown}s
'
,
backToRegistration
:
'
Back to registration
'
,
sendCodeFailed
:
'
Failed to send verification code. Please try again.
'
,
verifyFailed
:
'
Verification failed. Please try again.
'
,
codeRequired
:
'
Verification code is required
'
,
invalidCode
:
'
Please enter a valid 6-digit code
'
,
promoCodeLabel
:
'
Promo Code
'
,
promoCodePlaceholder
:
'
Enter promo code (optional)
'
,
promoCodeValid
:
'
Valid! You will receive ${amount} bonus balance
'
,
...
...
frontend/src/i18n/locales/zh.ts
View file @
59879b7f
...
...
@@ -328,6 +328,16 @@ export default {
sendingCode
:
'
发送中...
'
,
clickToResend
:
'
点击重新发送验证码
'
,
resendCode
:
'
重新发送验证码
'
,
sendCodeDesc
:
'
我们将发送验证码到
'
,
codeSentSuccess
:
'
验证码已发送!请查收您的邮箱。
'
,
verifying
:
'
验证中...
'
,
verifyAndCreate
:
'
验证并创建账户
'
,
resendCountdown
:
'
{countdown}秒后可重新发送
'
,
backToRegistration
:
'
返回注册
'
,
sendCodeFailed
:
'
发送验证码失败,请重试。
'
,
verifyFailed
:
'
验证失败,请重试。
'
,
codeRequired
:
'
请输入验证码
'
,
invalidCode
:
'
请输入有效的6位验证码
'
,
promoCodeLabel
:
'
优惠码
'
,
promoCodePlaceholder
:
'
输入优惠码(可选)
'
,
promoCodeValid
:
'
有效!注册后将获得 ${amount} 赠送余额
'
,
...
...
frontend/src/views/auth/EmailVerifyView.vue
View file @
59879b7f
...
...
@@ -7,7 +7,7 @@
{{
t
(
'
auth.verifyYourEmail
'
)
}}
</h2>
<p
class=
"mt-2 text-sm text-gray-500 dark:text-dark-400"
>
We'll send a verification code to
{{
t
(
'
auth.sendCodeDesc
'
)
}}
<span
class=
"font-medium text-gray-700 dark:text-gray-300"
>
{{
email
}}
</span>
</p>
</div>
...
...
@@ -64,7 +64,7 @@
<Icon
name=
"checkCircle"
size=
"md"
class=
"text-green-500"
/>
</div>
<p
class=
"text-sm text-green-700 dark:text-green-400"
>
Verification
code
s
ent
! Please check your inbox.
{{
t
(
'
auth.
code
S
ent
Success
'
)
}}
</p>
</div>
</div>
...
...
@@ -123,7 +123,7 @@
></path>
</svg>
<Icon
v-else
name=
"checkCircle"
size=
"md"
class=
"mr-2"
/>
{{
isLoading
?
'
Verifying...
'
:
'
V
erify
&
Create
Account
'
}}
{{
isLoading
?
t
(
'
auth.verifying
'
)
:
t
(
'
auth.v
erify
And
Create
'
)
}}
</button>
<!-- Resend Code -->
...
...
@@ -134,7 +134,7 @@
disabled
class=
"cursor-not-allowed text-sm text-gray-400 dark:text-dark-500"
>
Resend code in
{
{
countdown
}}
s
{{
t
(
'
auth.resendCountdown
'
,
{
countdown
}
)
}
}
<
/button
>
<
button
v
-
else
...
...
@@ -162,7 +162,7 @@
class
=
"
flex items-center gap-2 text-gray-500 transition-colors hover:text-gray-700 dark:text-dark-400 dark:hover:text-gray-300
"
>
<
Icon
name
=
"
arrowLeft
"
size
=
"
sm
"
/>
Back to r
egistration
{{
t
(
'
auth.backToR
egistration
'
)
}}
<
/button
>
<
/template
>
<
/AuthLayout
>
...
...
@@ -300,12 +300,12 @@ function onTurnstileVerify(token: string): void {
function
onTurnstileExpire
():
void
{
resendTurnstileToken
.
value
=
''
errors
.
value
.
turnstile
=
'
Verification expired, please try again
'
errors
.
value
.
turnstile
=
t
(
'
auth.turnstileExpired
'
)
}
function
onTurnstileError
():
void
{
resendTurnstileToken
.
value
=
''
errors
.
value
.
turnstile
=
'
Verification failed, please try again
'
errors
.
value
.
turnstile
=
t
(
'
auth.turnstileFailed
'
)
}
// ==================== Send Code ====================
...
...
@@ -336,7 +336,7 @@ async function sendCode(): Promise<void> {
resendTurnstileToken
.
value
=
''
}
catch
(
error
:
unknown
)
{
errorMessage
.
value
=
buildAuthErrorMessage
(
error
,
{
fallback
:
'
Failed to send verification code. Please try again.
'
fallback
:
t
(
'
auth.sendCodeFailed
'
)
}
)
appStore
.
showError
(
errorMessage
.
value
)
...
...
@@ -356,7 +356,7 @@ async function handleResendCode(): Promise<void> {
// If turnstile is enabled but no token yet, wait
if
(
turnstileEnabled
.
value
&&
!
resendTurnstileToken
.
value
)
{
errors
.
value
.
turnstile
=
'
Please
complete
the v
erification
'
errors
.
value
.
turnstile
=
t
(
'
auth.
complete
V
erification
'
)
return
}
...
...
@@ -367,12 +367,12 @@ function validateForm(): boolean {
errors
.
value
.
code
=
''
if
(
!
verifyCode
.
value
.
trim
())
{
errors
.
value
.
code
=
'
Verification code is r
equired
'
errors
.
value
.
code
=
t
(
'
auth.codeR
equired
'
)
return
false
}
if
(
!
/^
\d
{6
}
$/
.
test
(
verifyCode
.
value
.
trim
()))
{
errors
.
value
.
code
=
'
Please enter a valid 6-digit c
ode
'
errors
.
value
.
code
=
t
(
'
auth.invalidC
ode
'
)
return
false
}
...
...
@@ -409,13 +409,13 @@ async function handleVerify(): Promise<void> {
sessionStorage
.
removeItem
(
'
register_data
'
)
// Show success toast
appStore
.
showSuccess
(
'
A
ccount
c
reated
s
uccess
fully! Welcome to
'
+
siteName
.
value
+
'
.
'
)
appStore
.
showSuccess
(
t
(
'
auth.a
ccount
C
reated
S
uccess
'
,
{
siteName
:
siteName
.
value
}
)
)
// Redirect to dashboard
await
router
.
push
(
'
/dashboard
'
)
}
catch
(
error
:
unknown
)
{
errorMessage
.
value
=
buildAuthErrorMessage
(
error
,
{
fallback
:
'
Verification failed. Please try again.
'
fallback
:
t
(
'
auth.verifyFailed
'
)
}
)
appStore
.
showError
(
errorMessage
.
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment