refactor: restructure waitlist form localization messages
- Updated English and Chinese localization files to nest waitlist form messages under a `form` object for better organization. - Adjusted `WaitlistFormCard` component to utilize the new message structure, enhancing clarity and maintainability of the code.
This commit is contained in:
parent
0ae10c6c42
commit
635346bff6
@ -76,14 +76,16 @@
|
||||
"title": "Waitlist",
|
||||
"description": "Join our waitlist for latest news and updates",
|
||||
"subtitle": "Join our waitlist for latest news and updates",
|
||||
"formTitle": "Join Our Waitlist",
|
||||
"formDescription": "We will send you only one email every week, and no spam",
|
||||
"email": "Email",
|
||||
"emailValidation": "Please enter a valid email address",
|
||||
"subscribe": "Subscribe",
|
||||
"subscribing": "Subscribing...",
|
||||
"success": "Subscribed successfully",
|
||||
"fail": "Failed to subscribe"
|
||||
"form": {
|
||||
"title": "Join Our Waitlist",
|
||||
"description": "We will send you only one email every week, and no spam",
|
||||
"email": "Email",
|
||||
"subscribe": "Subscribe",
|
||||
"subscribing": "Subscribing...",
|
||||
"success": "Subscribed successfully",
|
||||
"fail": "Failed to subscribe",
|
||||
"emailValidation": "Please enter a valid email address"
|
||||
}
|
||||
},
|
||||
"AuthPage": {
|
||||
"login": {
|
||||
|
@ -70,14 +70,16 @@
|
||||
"title": "邮件列表",
|
||||
"description": "加入我们的邮件列表,获取最新消息和更新",
|
||||
"subtitle": "加入我们的邮件列表,获取最新消息和更新",
|
||||
"formTitle": "加入我们的邮件列表",
|
||||
"formDescription": "我们每周只发送一封邮件,并且不会发送垃圾邮件",
|
||||
"email": "邮箱",
|
||||
"emailValidation": "请输入有效的邮箱地址",
|
||||
"subscribe": "订阅",
|
||||
"subscribing": "订阅中...",
|
||||
"success": "订阅成功",
|
||||
"fail": "订阅失败"
|
||||
"form": {
|
||||
"title": "加入我们的邮件列表",
|
||||
"description": "我们每周只发送一封邮件,并且不会发送垃圾邮件",
|
||||
"email": "邮箱",
|
||||
"subscribe": "订阅",
|
||||
"subscribing": "订阅中...",
|
||||
"success": "订阅成功",
|
||||
"fail": "订阅失败",
|
||||
"emailValidation": "请输入有效的邮箱地址"
|
||||
}
|
||||
},
|
||||
"AuthPage": {
|
||||
"login": {
|
||||
|
@ -32,7 +32,7 @@ import { z } from 'zod';
|
||||
* This is a client component that handles the waitlist form submission
|
||||
*/
|
||||
export function WaitlistFormCard() {
|
||||
const t = useTranslations('WaitlistPage');
|
||||
const t = useTranslations('WaitlistPage.form');
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const [error, setError] = useState<string | undefined>('');
|
||||
|
||||
@ -81,10 +81,10 @@ export function WaitlistFormCard() {
|
||||
<Card className="mx-auto max-w-lg overflow-hidden">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-lg font-bold">
|
||||
{t('formTitle')}
|
||||
{t('title')}
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
{t('formDescription')}
|
||||
{t('description')}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<Form {...form}>
|
||||
|
Loading…
Reference in New Issue
Block a user