feat: 新增多语言文案与组件国际化适配
本次提交完成了大量多语言相关的新增与优化工作: 1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案 2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包 3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案 4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持 5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
26
lang/zh-cn/components/ns-form.js
Normal file
26
lang/zh-cn/components/ns-form.js
Normal file
@@ -0,0 +1,26 @@
|
||||
export const lang = {
|
||||
// ===== ns-form 组件 =====
|
||||
'nsForm': {
|
||||
// 选择器占位文本
|
||||
selectPlaceholder: '请选择',
|
||||
selectProvinceCity: '请选择省市',
|
||||
selectProvinceCityDistrict: '请选择省市区/县',
|
||||
|
||||
// 验证提示 - 必填
|
||||
pleaseInput: '请输入{title}',
|
||||
pleaseSelect: '请选择{title}',
|
||||
pleaseSelectAtLeastOne: '请至少选择一个{title}',
|
||||
pleaseUploadAtLeastOne: '请至少上传一张{title}',
|
||||
|
||||
// 验证提示 - 格式校验
|
||||
idCardInvalid: '身份证输入不合法',
|
||||
mobileInvalid: '手机号输入不合法',
|
||||
|
||||
// 验证提示 - 范围校验
|
||||
endDateBeforeStartDate: '结束日期不能小于开始日期',
|
||||
endTimeBeforeStartTime: '结束时间必须大于开始时间',
|
||||
|
||||
// 图片上传
|
||||
maxUploadImages: '最多上传{max}张图片',
|
||||
}
|
||||
}
|
||||
31
lang/zh-cn/components/ns-payment.js
Normal file
31
lang/zh-cn/components/ns-payment.js
Normal file
@@ -0,0 +1,31 @@
|
||||
export const lang = {
|
||||
// ===== ns-payment 组件 =====
|
||||
'nsPayment': {
|
||||
// 弹窗标题
|
||||
paymentMethod: '支付方式',
|
||||
|
||||
// 支付金额
|
||||
payAmount: '支付金额{amount}元',
|
||||
|
||||
// 余额抵扣
|
||||
balanceDeduction: '余额抵扣',
|
||||
availableBalance: '可用¥{amount}',
|
||||
|
||||
// 空状态
|
||||
noPaymentMethod: '平台尚未配置支付方式!',
|
||||
|
||||
// 按钮
|
||||
confirmPay: '确认支付',
|
||||
|
||||
// 支付方式名称
|
||||
alipay: '支付宝支付',
|
||||
wechatpay: '微信支付',
|
||||
|
||||
// 提示文案
|
||||
pleaseSelectPaymentMethod: '请选择支付方式!',
|
||||
paying: '支付中...',
|
||||
payInfoNotFound: '未获取到支付信息!',
|
||||
paymentCancelled: '您已取消支付',
|
||||
paymentFailed: '支付失败,失败原因: {reason}',
|
||||
}
|
||||
}
|
||||
25
lang/zh-cn/components/ns-select-time.js
Normal file
25
lang/zh-cn/components/ns-select-time.js
Normal file
@@ -0,0 +1,25 @@
|
||||
export const lang = {
|
||||
// ===== ns-select-time 组件 =====
|
||||
'nsSelectTime': {
|
||||
// 弹窗标题
|
||||
selectDeliveryTime: '选择送达时间',
|
||||
selectPickupTime: '选择自提时间',
|
||||
|
||||
// 日期标签
|
||||
today: '今天',
|
||||
tomorrow: '明天',
|
||||
|
||||
// 星期名称(按周日到周六顺序,索引 0-6 对应 getDay() 返回值)
|
||||
sunday: '周日',
|
||||
monday: '周一',
|
||||
tuesday: '周二',
|
||||
wednesday: '周三',
|
||||
thursday: '周四',
|
||||
friday: '周五',
|
||||
saturday: '周六',
|
||||
|
||||
// 立即配送前后缀(用于拼接时间范围,如"立即配送(09:00-10:00)")
|
||||
immediateDeliveryPrefix: '立即配送(',
|
||||
immediateDeliverySuffix: ')',
|
||||
}
|
||||
}
|
||||
31
lang/zh-cn/components/payment.js
Normal file
31
lang/zh-cn/components/payment.js
Normal file
@@ -0,0 +1,31 @@
|
||||
export const lang = {
|
||||
// ===== payment 组件 =====
|
||||
payment: {
|
||||
// 弹窗标题
|
||||
title: '支付方式',
|
||||
|
||||
// 支付金额
|
||||
payAmount: '支付金额{money}元',
|
||||
|
||||
// 余额支付
|
||||
balancePay: '余额支付',
|
||||
availableBalance: '可用{symbol}{balance}',
|
||||
|
||||
// 空状态
|
||||
noPaymentMethod: '平台尚未配置支付方式!',
|
||||
|
||||
// 按钮
|
||||
confirmPay: '确认支付',
|
||||
|
||||
// 支付方式名称
|
||||
alipay: '支付宝支付',
|
||||
wechatpay: '微信支付',
|
||||
|
||||
// 提示文案
|
||||
pleaseSelectPayMethod: '请选择支付方式!',
|
||||
paying: '支付中...',
|
||||
payInfoNotFound: '未获取到支付信息!',
|
||||
payCancelled: '您已取消支付',
|
||||
payFailed: '支付失败,失败原因: {reason}',
|
||||
}
|
||||
}
|
||||
27
lang/zh-cn/components/privacy-popup.js
Normal file
27
lang/zh-cn/components/privacy-popup.js
Normal file
@@ -0,0 +1,27 @@
|
||||
export const lang = {
|
||||
// ===== privacy-popup 组件 =====
|
||||
privacyPopup: {
|
||||
// 弹窗标题
|
||||
title: '用户隐私保护提示',
|
||||
|
||||
// 描述文本
|
||||
descPrefix: '感谢您使用{appName},在使用前您应当阅读并同意',
|
||||
descSuffix: ',当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{appName}相关功能。',
|
||||
|
||||
// 按钮文字
|
||||
disagreeBtn: '不同意',
|
||||
agreeBtn: '同意并继续',
|
||||
|
||||
// 默认值 - 小程序端
|
||||
defaultContractNameMp: '用户隐私保护指引',
|
||||
defaultAppNameMp: '本小程序',
|
||||
|
||||
// 默认值 - H5/Web 端
|
||||
defaultAppNameH5: '本应用',
|
||||
defaultContractNameH5: '《隐私条款》',
|
||||
defaultServiceNameH5: '《用户服务协议》',
|
||||
|
||||
// 提示文案
|
||||
disagreeTip: '未同意隐私协议,无法使用相关功能',
|
||||
}
|
||||
}
|
||||
32
lang/zh-cn/components/register-reward.js
Normal file
32
lang/zh-cn/components/register-reward.js
Normal file
@@ -0,0 +1,32 @@
|
||||
export const lang = {
|
||||
// ===== register-reward 组件 =====
|
||||
registerReward: {
|
||||
// 积分奖励
|
||||
pointReward: '积分奖励',
|
||||
points: '积分',
|
||||
pointDesc: '用于下单时抵现或兑换商品等',
|
||||
|
||||
// 成长值
|
||||
growthValue: '成长值',
|
||||
growthDesc: '用于提升会员等级',
|
||||
|
||||
// 红包奖励
|
||||
balanceReward: '红包奖励',
|
||||
yuan: '元',
|
||||
balanceDesc: '不可提现下单时可用',
|
||||
|
||||
// 优惠券奖励
|
||||
couponReward: '优惠券奖励',
|
||||
|
||||
// 优惠券描述 - 有门槛
|
||||
couponMinSpendDiscount: '满{atLeast}打{discount}折',
|
||||
couponMinSpendReduce: '满{atLeast}减{money}',
|
||||
|
||||
// 优惠券描述 - 无门槛
|
||||
couponNoThresholdDiscount: '无门槛,打{discount}折',
|
||||
couponNoThresholdReduce: '无门槛,减{money}',
|
||||
|
||||
// 操作按钮
|
||||
viewNow: '立即查看',
|
||||
}
|
||||
}
|
||||
21
lang/zh-cn/components/wxwork-contact.js
Normal file
21
lang/zh-cn/components/wxwork-contact.js
Normal file
@@ -0,0 +1,21 @@
|
||||
export const lang = {
|
||||
// ===== wxwork-contact 组件 =====
|
||||
wxworkContact: {
|
||||
// 按钮默认文字
|
||||
defaultBtnText: '添加企业微信客服',
|
||||
|
||||
// 确认弹窗
|
||||
popupTitle: '添加企业微信客服',
|
||||
popupContent: '点击确定后将跳转至企业微信,添加专业客服为您服务',
|
||||
cancelBtn: '取消',
|
||||
confirmBtn: '确定',
|
||||
|
||||
// 提示相关
|
||||
tipTitle: '提示',
|
||||
jumpSuccess: '跳转成功',
|
||||
jumpFailed: '跳转失败,请检查企业微信配置',
|
||||
notConfigured: '未配置企业微信客服信息',
|
||||
sdkNotInitialized: '企业微信SDK未初始化',
|
||||
openProfileFailed: '打开用户资料失败',
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user