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.' }