diff --git a/apps/user/app/(main)/(content)/register/page.tsx b/apps/user/app/(main)/(content)/register/page.tsx
index 29d4b87..5d9d79c 100644
--- a/apps/user/app/(main)/(content)/register/page.tsx
+++ b/apps/user/app/(main)/(content)/register/page.tsx
@@ -3,7 +3,7 @@ import EmailAuthForm2 from '@/app/auth/email2/auth-form';
export default function RegisterPage() {
return (
-
+
);
diff --git a/apps/user/app/auth/email2/register-form.tsx b/apps/user/app/auth/email2/register-form.tsx
index 80d8b01..3b2dffa 100644
--- a/apps/user/app/auth/email2/register-form.tsx
+++ b/apps/user/app/auth/email2/register-form.tsx
@@ -14,7 +14,6 @@ import {
import { Input } from '@workspace/airo-ui/components/input';
import { Icon } from '@workspace/airo-ui/custom-components/icon';
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
-import { useTranslations } from 'next-intl';
import { useRouter } from 'next/navigation';
import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import { useForm } from 'react-hook-form';
@@ -35,7 +34,6 @@ export default function RegisterForm({
setInitialValues: Dispatch
>;
onSwitchForm: Dispatch>;
}) {
- const t = useTranslations('auth.register');
const { common } = useGlobalStore();
const { verify, auth, invite } = common;
const router = useRouter();
@@ -53,12 +51,9 @@ export default function RegisterForm({
const formSchema = z
.object({
- email: z
- .string()
- .email(t('email'))
- .refine(handleCheckUser, {
- message: t('whitelist'),
- }),
+ email: z.string().email('请输入有效的电子邮件地址。').refine(handleCheckUser, {
+ message: '电子邮件域名不在允许的白名单中。',
+ }),
password: z.string().min(1, '请输入密码'), // 必填提示
repeat_password: z.string().min(1, '请重复输入密码'), // 必填
code: auth.email.enable_verify
@@ -74,7 +69,7 @@ export default function RegisterForm({
if (password !== repeat_password) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
- message: t('passwordMismatch'),
+ message: '两次密码输入不一致',
path: ['repeat_password'],
});
}
@@ -109,7 +104,7 @@ export default function RegisterForm({
线路优化
{auth.register.stop_register ? (
- {t('message')}
+ 尊敬的用户,您好
) : (
- {t('existingAccount')}
+ 已有账户?
@@ -251,7 +246,7 @@ export default function RegisterForm({
className='h-auto min-w-[157px] py-2 text-lg font-medium'
>
{loading && }
- {t('title')}
+ 注册