From d50e3781dbb9a8cd0525c056f1132ac3b5c67e8f Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Tue, 5 May 2026 09:59:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E9=A1=B5i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en.ts | 91 +++++++ src/lang/zh-cn.ts | 91 +++++++ .../components/EmailVerificationDialog.vue | 18 +- src/views/setting/index.vue | 233 ++++++++++++------ 4 files changed, 353 insertions(+), 80 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index 925d091..5abba6d 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -40,4 +40,95 @@ export default { sendCodeError: 'Send code error', retrievePassword: 'Retrieve password' }, + Settings: { + title: 'Settings', + slogan: 'Manage your account settings and preferences', + profile: { + title: 'Profile', + description: 'Update your display name, avatar, social links and account security.', + firstName: 'FIRST NAME', + lastName: 'LAST NAME', + firstNamePlaceholder: 'First Name', + lastNamePlaceholder: 'Last Name', + username: 'USERNAME', + usernamePlaceholder: 'Username', + usernameTip: 'Your public username on Stylish Parade.', + role: 'ROLE', + roleTip: 'Select up to 2 labels that suit you.', + socialLinks: 'SOCIAL LINKS', + linkNumber: 'Link {index}' + }, + security: { + title: 'Security', + description: 'Manage your login email and password.', + email: 'EMAIL', + newEmail: 'NEW EMAIL ADDRESS', + newEmailPlaceholder: 'Enter new email', + verify: 'Verify', + verified: 'Verified', + verifiedTip: 'Your new email has been verified and is ready to save.', + password: 'PASSWORD', + newPassword: 'NEW PASSWORD', + newPasswordPlaceholder: 'Enter new password', + passwordTip: 'You must satisfy ALL password conditions to register.', + currentPassword: 'CURRENT PASSWORD', + currentPasswordPlaceholder: 'Confirm with your password' + }, + region: { + title: 'Language & Region', + description: 'Set your preferred language, region and currency display.', + displayLanguage: 'DISPLAY LANGUAGE', + selectLanguage: 'Select language', + region: 'REGION', + selectRegion: 'Select region' + }, + buttons: { + cancel: 'CANCEL', + discard: 'DISCARD', + edit: 'EDIT', + saveChange: 'SAVE CHANGE', + saving: 'SAVING...' + }, + dialog: { + title: 'Check your new email', + subtitle: 'Enter the 6-digit code sent to', + submit: 'Submit', + resendCode: 'Resend Code', + resendCodeIn: 'Resend Code in {time}' + }, + messages: { + enterNewEmailFirst: 'Please enter your new email address first', + invalidEmail: 'Please enter a valid email address', + sameEmail: 'Please enter a different email address', + alreadyVerified: 'This email has already been verified', + verificationCodeSent: 'Verification code sent', + enterVerificationCode: 'Please enter the 6-digit verification code', + verificationCompleted: 'Email verification completed', + verifyEmailBeforeSave: 'Please verify your new email before saving', + settingsUpdated: 'Settings updated' + }, + roles: { + fashionEnthusiast: 'Fashion Enthusiast', + contentCreator: 'Content Creator', + student: 'Student', + retailBuyer: 'Retail / Buyer', + fashionDesigner: 'Fashion Designer', + brandBusiness: 'Brand / Business', + prCommunications: 'PR & Communications', + stylist: 'Stylist', + graphicDesigner: 'Graphic Designer', + artist3d: '3D Artist', + other: 'Other' + }, + languages: { + english: 'English', + chinese: 'Chinese', + }, + regions: { + hongKongSar: 'Hong Kong SAR', + mainlandChina: 'Mainland China', + singapore: 'Singapore', + unitedKingdom: 'United Kingdom' + } + } } diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index 4e078c4..7c4b8c6 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -41,4 +41,95 @@ export default { sendCodeError: '发送验证码失败', retrievePassword: '找回密码' }, + Settings: { + title: '设置', + slogan: '管理你的账户设置和偏好', + profile: { + title: '个人资料', + description: '更新你的显示名称、头像、社交链接和账户安全信息。', + firstName: '名字', + lastName: '姓氏', + firstNamePlaceholder: '请输入名字', + lastNamePlaceholder: '请输入姓氏', + username: '用户名', + usernamePlaceholder: '请输入用户名', + usernameTip: '这是你在 Stylish Parade 上公开显示的用户名。', + role: '身份标签', + roleTip: '最多选择 2 个符合你的标签。', + socialLinks: '社交链接', + linkNumber: '链接 {index}' + }, + security: { + title: '安全', + description: '管理你的登录邮箱和密码。', + email: '邮箱', + newEmail: '新邮箱地址', + newEmailPlaceholder: '请输入新邮箱', + verify: '验证', + verified: '已验证', + verifiedTip: '你的新邮箱已验证成功,可以保存。', + password: '密码', + newPassword: '新密码', + newPasswordPlaceholder: '请输入新密码', + passwordTip: '你必须满足所有密码条件才能注册。', + currentPassword: '当前密码', + currentPasswordPlaceholder: '请输入当前密码确认' + }, + region: { + title: '语言与地区', + description: '设置你偏好的语言、地区和货币显示方式。', + displayLanguage: '显示语言', + selectLanguage: '请选择语言', + region: '地区', + selectRegion: '请选择地区' + }, + buttons: { + cancel: '取消', + discard: '放弃', + edit: '编辑', + saveChange: '保存更改', + saving: '保存中...' + }, + dialog: { + title: '检查你的新邮箱', + subtitle: '请输入发送到以下邮箱的 6 位验证码', + submit: '提交', + resendCode: '重新发送验证码', + resendCodeIn: '{time} 后可重新发送验证码' + }, + messages: { + enterNewEmailFirst: '请先输入新的邮箱地址', + invalidEmail: '请输入有效的邮箱地址', + sameEmail: '请输入不同的邮箱地址', + alreadyVerified: '该邮箱已完成验证', + verificationCodeSent: '验证码已发送', + enterVerificationCode: '请输入 6 位验证码', + verificationCompleted: '邮箱验证完成', + verifyEmailBeforeSave: '请先完成新邮箱验证再保存', + settingsUpdated: '设置已更新' + }, + roles: { + fashionEnthusiast: '时尚爱好者', + contentCreator: '内容创作者', + student: '学生', + retailBuyer: '零售 / 买手', + fashionDesigner: '服装设计师', + brandBusiness: '品牌 / 商业', + prCommunications: '公关与传播', + stylist: '造型师', + graphicDesigner: '平面设计师', + artist3d: '3D 艺术家', + other: '其他' + }, + languages: { + english: '英文', + chinese: '中文', + }, + regions: { + hongKongSar: '中国香港特别行政区', + mainlandChina: '中国大陆', + singapore: '新加坡', + unitedKingdom: '英国' + } + } } diff --git a/src/views/setting/components/EmailVerificationDialog.vue b/src/views/setting/components/EmailVerificationDialog.vue index 69fb78b..454086e 100644 --- a/src/views/setting/components/EmailVerificationDialog.vue +++ b/src/views/setting/components/EmailVerificationDialog.vue @@ -5,8 +5,8 @@ -
Check your new email
-
Enter the 6-digit code sent to
+
{{ t('Settings.dialog.title') }}
+
{{ t('Settings.dialog.subtitle') }}
- Submit + {{ t('Settings.dialog.submit') }} +