feat: 新增多语言文案、优化导航及工具函数,修复部分业务逻辑

1. 新增多语言资源文件,覆盖文章、预约日期、会员信息、优惠券、表单、购物车、积分商城、分销、AI聊天等多个模块
2. 优化底部导航组件,使用多语言配置替代硬编码文案
3. 重构工具函数,新增从后端数据提取多语言文案的工具方法
4. 修复邀请好友页面的保存提示文案,替换为多语言版本
5. 修复商品SKU组件的提示文案,使用多语言配置
6. 重构AI聊天页面的帮助文档和回复模板,使用多语言配置
7. 优化空状态组件,支持多语言默认文案
8. 修复跳转逻辑,补全参数传递
9. 新增本地开发环境配置
This commit is contained in:
2026-06-25 18:15:31 +08:00
parent ca4e7fd170
commit 2d8846c64c
82 changed files with 3497 additions and 1062 deletions

View File

@@ -0,0 +1,51 @@
export const lang = {
// ===== ns-login component =====
'ns-login': {
// H5 bind mobile popup
bindMobileTitle: 'Mobile number not bound yet',
bindMobileTip: 'Please bind your mobile number to receive order updates',
mobileLabel: 'Mobile',
mobilePlaceholder: 'Enter mobile number',
captchaLabel: 'Captcha',
captchaPlaceholder: 'Enter captcha',
dynacodeLabel: 'Code',
dynacodePlaceholder: 'Enter code',
save: 'Save',
// Mini Program login popup
welcomeTitle: 'Welcome to {siteName}',
loginWithMobile: 'Login with mobile, ',
registerLogin: 'Register & login, ',
getServicesTip: 'to access orders, after-sales and more.',
agree: 'I agree',
privacyPolicy: '《Privacy Policy》',
userServiceAgreement: '《User Service Agreement》',
agreeAndAuthorizeMobile: 'Agree & Authorize Mobile',
authorizeMobile: 'Authorize Mobile',
notNow: 'Not Now',
// Nickname & Avatar
avatarLabel: 'Avatar',
nicknameLabel: 'Nickname',
nicknamePlaceholder: 'Enter nickname',
getMobile: 'Get Mobile Number',
// Dynacode
getDynacode: 'Get Code',
resendAfter: 'Resend in {seconds}s',
// Toast messages
pleaseConfirmAgreement: 'Please confirm the agreement',
uploadFailed: 'Upload failed',
pleaseEnterMobile: 'Please enter mobile number',
pleaseEnterCorrectMobile: 'Please enter correct mobile number',
pleaseEnterCaptcha: 'Please enter captcha',
pleaseEnterDynacode: 'Please enter dynamic code',
requestFail: 'request:fail',
loggingIn: 'Logging in',
loginFailed: 'Login failed',
pleaseAuthorizeMobile: 'Please authorize your mobile number',
pleaseEnterNickname: 'Please enter nickname',
avatarPullFailed: 'Avatar pull failed',
}
}

View File

@@ -0,0 +1,33 @@
export const lang = {
// ===== ns-newform component =====
'ns-newform': {
// Input placeholder defaults
inputPlaceholder: 'Please enter',
selectPlaceholder: 'Please select',
datePlaceholder: 'Please select date',
timePlaceholder: 'Please select time',
startDate: 'Start date',
endDate: 'End date',
startTime: 'Start time',
endTime: 'End time',
selectProvinceCity: 'Please select province and city',
selectProvinceCityDistrict: 'Please select province, city and district',
// Validation - required
pleaseInput: 'Please enter {title}',
pleaseSelect: 'Please select {title}',
pleaseSelectAtLeastOne: 'Please select at least one {title}',
pleaseUploadAtLeastOne: 'Please upload at least one {title}',
// Validation - format
idCardInvalid: 'Invalid ID card number',
mobileInvalid: 'Invalid mobile number',
// Validation - range
endDateBeforeStartDate: 'End date cannot be earlier than start date',
endTimeBeforeStartTime: 'End time must be later than start time',
// Image upload
maxUploadImages: 'Upload up to {max} images',
}
}

View File

@@ -0,0 +1,17 @@
export const lang = {
// ===== yuyue-date component =====
'yuyueDate': {
// Appointed date button
appointedDate: 'Appointed Date',
// Time status text
fullyBooked: 'Fully Booked',
available: 'Available',
// Selection status
noSelection: 'No Selection',
// Toast message
weekdayCannotBook: '{weekday} cannot be booked',
}
}