From 534ecb132c48845c45ef10728a562f6c17ca4469 Mon Sep 17 00:00:00 2001 From: AI&I Date: Mon, 17 Apr 2023 04:37:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/zh-CN.json | 6 ++++++ pages/account/onboarding.vue | 4 ++-- pages/account/signup.vue | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lang/zh-CN.json b/lang/zh-CN.json index 6af380a..64edb1b 100644 --- a/lang/zh-CN.json +++ b/lang/zh-CN.json @@ -18,6 +18,12 @@ "Please enter your password":"请输入你的密码", "Password must be at least 8 characters":"密码至少八个字符", "Please confirm your password":"请输入确认密码", + "Something went wrong. Please try again.":"网络错误请稍后重试", + "This password is too common.":"密码过于简单", + "This password is entirely numeric.":"密码不能全是数字", + "Your registration is successful":"恭喜你,注册成功!", + "You can now":"现在你可以", + "to your account.":"你的账号了。", "welcomeTo": "欢迎来到", "language": "语言", "setApiKey": "设置API密钥", diff --git a/pages/account/onboarding.vue b/pages/account/onboarding.vue index d7accfc..b886d6e 100644 --- a/pages/account/onboarding.vue +++ b/pages/account/onboarding.vue @@ -47,9 +47,9 @@ onNuxtReady(() => { >
-

Your registration is successful

+

{{$('Your registration is successful')}}

- You can now login to your account. + {{$('You can now')}} {{$('signIn')}} {{$t('to your account.')}}

diff --git a/pages/account/signup.vue b/pages/account/signup.vue index 71277a8..4c531a7 100644 --- a/pages/account/signup.vue +++ b/pages/account/signup.vue @@ -64,15 +64,15 @@ const submit = async () => { if (error.value.status === 400) { for (const key in formData.value) { if (error.value.data[key]) { - fieldErrors.value[key] = error.value.data[key][0] + fieldErrors.value[key] = $i18n.t(error.value.data[key][0]) } } if (error.value.data.non_field_errors) { - errorMsg.value = error.value.data.non_field_errors[0] + errorMsg.value = $i18n.t(error.value.data.non_field_errors[0]) } } else { if (error.value.data.detail) { - errorMsg.value = error.value.data.detail + errorMsg.value = $i18n.t(error.value.data.detail) } else { errorMsg.value = 'Something went wrong. Please try again.' }