feat: add and optimize multilingual text resources

- add new language packs for multiple pages and components including category, cart, order, member center, distribution, etc.
- add Chinese and English translations for new features and UI text
- fix navigation service error message to use multilingual text
- update component templates to use dynamic language translation instead of hardcoded text
- adjust code indentation and formatting for consistency
This commit is contained in:
2026-06-26 13:49:26 +08:00
parent 66a579d48c
commit f7fb9f34f9
116 changed files with 1640 additions and 525 deletions

View File

@@ -0,0 +1,15 @@
export const lang = {
// ===== img-cropping 图片裁剪组件 =====
imgCropping: {
// 按钮文案
cancel: '取消',
upload: '上传',
// 加载提示
loading: '加载中...',
// 错误提示
cropBoxSizeNotSet: '裁剪框的宽或高没有设置',
pleaseSelectValidImage: '请选择正确图片',
}
}

View File

@@ -18,6 +18,9 @@ export const lang = {
friday: '周五',
saturday: '周六',
// 日期格式模板(月日,命名参数:{month} 月份、{date} 日期)
monthDayFormat: '{month}月{date}日',
// 立即配送前后缀(用于拼接时间范围,如"立即配送(09:00-10:00)")
immediateDeliveryPrefix: '立即配送(',
immediateDeliverySuffix: ')',

View File

@@ -0,0 +1,15 @@
export const lang = {
// ns-chat-order 订单消息组件
components: {
nsChatOrder: {
// 订单状态标签: {status} 为订单状态值占位符
orderStatus: '订单状态:{status}',
// 配送方式标签: {method} 为配送方式值占位符
deliveryMethod: '配送方式:{method}',
// 发送按钮
send: '发送',
// 已发送按钮(禁用状态)
sent: '已发送',
},
},
}

View File

@@ -0,0 +1,13 @@
export const lang = {
// ns-contact 客服组件
components: {
nsContact: {
// 弹窗标题
contactService: '联系客服',
// 客服电话提示: {phone} 为电话号码占位符
callServiceTip: '请联系客服,客服电话是 {phone}',
// 无客服提示
noServiceOffline: '抱歉,商家暂无客服,请线下联系',
},
},
}

View File

@@ -1,17 +1,33 @@
export const lang = {
// ===== yuyue-date 组件 =====
'yuyueDate': {
// 指定日期按钮
appointedDate: '指定日期',
components: {
yuyueDate: {
// 指定日期按钮
appointedDate: '指定日期',
// 时间状态文本
fullyBooked: '已约满',
available: '可预约',
// 时间状态文本
fullyBooked: '已约满',
available: '可预约',
// 选中状态
noSelection: '暂无选择',
// 选中状态
noSelection: '暂无选择',
// Toast 提示
weekdayCannotBook: '{weekday}不可以预约',
// Toast 提示
weekdayCannotBook: '{weekday}不可以预约',
// 近三天日期标签
today: '今天',
tomorrow: '明天',
dayAfterTomorrow: '后天',
// 星期完整名称(索引 0-6 对应周日到周六,与 Date.getDay() 返回值一致)
weekSunday: '周日',
weekMonday: '周一',
weekTuesday: '周二',
weekWednesday: '周三',
weekThursday: '周四',
weekFriday: '周五',
weekSaturday: '周六',
}
}
}