refactor(i18n): 扁平化多语言文件结构,移除嵌套的components对象
统一调整所有组件级多语言配置,将原有的components.[componentName]嵌套结构改为直接顶层键值对,简化语言包的调用层级
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
export const lang = {
|
||||
// chat-message component
|
||||
components: {
|
||||
chatMessage: {
|
||||
// Customer service offline hint
|
||||
customerOffline: 'Customer service is offline',
|
||||
// Customer service online hint
|
||||
customerOnline: 'Customer service is online',
|
||||
},
|
||||
},
|
||||
// Customer service offline hint
|
||||
customerOffline: 'Customer service is offline',
|
||||
// Customer service online hint
|
||||
customerOnline: 'Customer service is online',
|
||||
}
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
export const lang = {
|
||||
// mescroll pull-down refresh / pull-up load component
|
||||
components: {
|
||||
mescroll: {
|
||||
// pull-down refresh text
|
||||
down: {
|
||||
textInOffset: 'Pull to refresh',
|
||||
textOutOffset: 'Release to update',
|
||||
textLoading: 'Loading ...',
|
||||
},
|
||||
// pull-up load text
|
||||
up: {
|
||||
textLoading: 'Loading ...',
|
||||
textNoMore: '-- END --',
|
||||
},
|
||||
// empty layout tip
|
||||
empty: {
|
||||
tip: '~ No data ~',
|
||||
},
|
||||
down: {
|
||||
textInOffset: 'Pull to refresh',
|
||||
textOutOffset: 'Release to update',
|
||||
textLoading: 'Loading ...',
|
||||
},
|
||||
// pull-up load text
|
||||
up: {
|
||||
textLoading: 'Loading ...',
|
||||
textNoMore: '-- END --',
|
||||
},
|
||||
// empty layout tip
|
||||
empty: {
|
||||
tip: '~ No data ~',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
export const lang = {
|
||||
// ns-chat-goods chat goods component
|
||||
components: {
|
||||
chatGoods: {
|
||||
// Sent status
|
||||
sent: 'Sent',
|
||||
// Send button
|
||||
send: 'Send',
|
||||
},
|
||||
},
|
||||
// Sent status
|
||||
sent: 'Sent',
|
||||
// Send button
|
||||
send: 'Send',
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
export const lang = {
|
||||
// ns-chat-receiveGoods chat received goods component
|
||||
components: {
|
||||
chatReceiveGoods: {
|
||||
// Stock prefix
|
||||
stockPrefix: 'Stock:',
|
||||
// Sales prefix
|
||||
salesPrefix: 'Sales:',
|
||||
// View goods button
|
||||
viewGoods: 'View Product',
|
||||
},
|
||||
},
|
||||
// Stock prefix
|
||||
stockPrefix: 'Stock:',
|
||||
// Sales prefix
|
||||
salesPrefix: 'Sales:',
|
||||
// View goods button
|
||||
viewGoods: 'View Product',
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
export const lang = {
|
||||
// ns-goods-sku product SKU component
|
||||
components: {
|
||||
nsGoodsSku: {
|
||||
// Point suffix: {point} is the points amount placeholder
|
||||
pointSuffix: '{point} points',
|
||||
},
|
||||
},
|
||||
// Point suffix: {point} is the points amount placeholder
|
||||
pointSuffix: '{point} points',
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
export const lang = {
|
||||
// ns-video-player-popup video popup component
|
||||
components: {
|
||||
videoPlayerPopup: {
|
||||
// Video URL does not exist hint
|
||||
videoUrlNotExist: 'Video URL does not exist',
|
||||
},
|
||||
},
|
||||
// Video URL does not exist hint
|
||||
videoUrlNotExist: 'Video URL does not exist',
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
export const lang = {
|
||||
// ns-chat-order order message component
|
||||
components: {
|
||||
nsChatOrder: {
|
||||
// order status label: {status} is the order status value placeholder
|
||||
orderStatus: 'Order Status: {status}',
|
||||
// delivery method label: {method} is the delivery method value placeholder
|
||||
deliveryMethod: 'Delivery Method: {method}',
|
||||
// send button
|
||||
send: 'Send',
|
||||
// sent button (disabled state)
|
||||
sent: 'Sent',
|
||||
},
|
||||
},
|
||||
// order status label: {status} is the order status value placeholder
|
||||
orderStatus: 'Order Status: {status}',
|
||||
// delivery method label: {method} is the delivery method value placeholder
|
||||
deliveryMethod: 'Delivery Method: {method}',
|
||||
// send button
|
||||
send: 'Send',
|
||||
// sent button (disabled state)
|
||||
sent: 'Sent',
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
export const lang = {
|
||||
// ns-contact customer service component
|
||||
components: {
|
||||
nsContact: {
|
||||
// popup title
|
||||
contactService: 'Contact Customer Service',
|
||||
// customer service phone tip: {phone} is the phone number placeholder
|
||||
callServiceTip: 'Please contact customer service at {phone}',
|
||||
// no customer service message
|
||||
noServiceOffline: 'Sorry, no customer service available, please contact offline',
|
||||
},
|
||||
},
|
||||
// popup title
|
||||
contactService: 'Contact Customer Service',
|
||||
// customer service phone tip: {phone} is the phone number placeholder
|
||||
callServiceTip: 'Please contact customer service at {phone}',
|
||||
// no customer service message
|
||||
noServiceOffline: 'Sorry, no customer service available, please contact offline',
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
export const lang = {
|
||||
// pick-regions region picker component
|
||||
components: {
|
||||
pickRegions: {
|
||||
// Cancel button
|
||||
cancel: 'Cancel',
|
||||
// Confirm button
|
||||
confirm: 'Done',
|
||||
},
|
||||
},
|
||||
// Cancel button
|
||||
cancel: 'Cancel',
|
||||
// Confirm button
|
||||
confirm: 'Done',
|
||||
}
|
||||
|
||||
@@ -1,33 +1,29 @@
|
||||
export const lang = {
|
||||
// ===== yuyue-date component =====
|
||||
components: {
|
||||
yuyueDate: {
|
||||
// Appointed date button
|
||||
appointedDate: 'Appointed Date',
|
||||
// Appointed date button
|
||||
appointedDate: 'Appointed Date',
|
||||
|
||||
// Time status text
|
||||
fullyBooked: 'Fully Booked',
|
||||
available: 'Available',
|
||||
// Time status text
|
||||
fullyBooked: 'Fully Booked',
|
||||
available: 'Available',
|
||||
|
||||
// Selection status
|
||||
noSelection: 'No Selection',
|
||||
// Selection status
|
||||
noSelection: 'No Selection',
|
||||
|
||||
// Toast message
|
||||
weekdayCannotBook: '{weekday} cannot be booked',
|
||||
// Toast message
|
||||
weekdayCannotBook: '{weekday} cannot be booked',
|
||||
|
||||
// Near-day labels
|
||||
today: 'Today',
|
||||
tomorrow: 'Tomorrow',
|
||||
dayAfterTomorrow: 'Day After Tomorrow',
|
||||
// Near-day labels
|
||||
today: 'Today',
|
||||
tomorrow: 'Tomorrow',
|
||||
dayAfterTomorrow: 'Day After Tomorrow',
|
||||
|
||||
// Week day names (index 0-6 = Sunday through Saturday, matching Date.getDay())
|
||||
weekSunday: 'Sun',
|
||||
weekMonday: 'Mon',
|
||||
weekTuesday: 'Tue',
|
||||
weekWednesday: 'Wed',
|
||||
weekThursday: 'Thu',
|
||||
weekFriday: 'Fri',
|
||||
weekSaturday: 'Sat',
|
||||
}
|
||||
}
|
||||
// Week day names (index 0-6 = Sunday through Saturday, matching Date.getDay())
|
||||
weekSunday: 'Sun',
|
||||
weekMonday: 'Mon',
|
||||
weekTuesday: 'Tue',
|
||||
weekWednesday: 'Wed',
|
||||
weekThursday: 'Thu',
|
||||
weekFriday: 'Fri',
|
||||
weekSaturday: 'Sat',
|
||||
}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
export const lang = {
|
||||
// chat-message 组件
|
||||
components: {
|
||||
chatMessage: {
|
||||
// 客服不在线提示
|
||||
customerOffline: '客服不在线',
|
||||
// 客服在线提示
|
||||
customerOnline: '客服在线',
|
||||
},
|
||||
},
|
||||
// 客服不在线提示
|
||||
customerOffline: '客服不在线',
|
||||
// 客服在线提示
|
||||
customerOnline: '客服在线',
|
||||
}
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
export const lang = {
|
||||
// mescroll 下拉刷新/上拉加载组件
|
||||
components: {
|
||||
mescroll: {
|
||||
// 下拉刷新提示文本
|
||||
down: {
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '加载中 ...',
|
||||
},
|
||||
// 上拉加载提示文本
|
||||
up: {
|
||||
textLoading: '加载中 ...',
|
||||
textNoMore: '-- END --',
|
||||
},
|
||||
// 空布局提示
|
||||
empty: {
|
||||
tip: '~ 暂无相关数据 ~',
|
||||
},
|
||||
},
|
||||
// 下拉刷新提示文本
|
||||
down: {
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '加载中 ...',
|
||||
},
|
||||
// 上拉加载提示文本
|
||||
up: {
|
||||
textLoading: '加载中 ...',
|
||||
textNoMore: '-- END --',
|
||||
},
|
||||
// 空布局提示
|
||||
empty: {
|
||||
tip: '~ 暂无相关数据 ~',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
export const lang = {
|
||||
// ns-chat-goods 聊天商品组件
|
||||
components: {
|
||||
chatGoods: {
|
||||
// 已发送状态
|
||||
sent: '已发送',
|
||||
// 发送按钮
|
||||
send: '发送',
|
||||
},
|
||||
},
|
||||
// 已发送状态
|
||||
sent: '已发送',
|
||||
// 发送按钮
|
||||
send: '发送',
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
export const lang = {
|
||||
// ns-chat-receiveGoods 聊天收到商品组件
|
||||
components: {
|
||||
chatReceiveGoods: {
|
||||
// 库存前缀
|
||||
stockPrefix: '库存:',
|
||||
// 销量前缀
|
||||
salesPrefix: '销量:',
|
||||
// 查看商品按钮
|
||||
viewGoods: '查看商品',
|
||||
},
|
||||
},
|
||||
// 库存前缀
|
||||
stockPrefix: '库存:',
|
||||
// 销量前缀
|
||||
salesPrefix: '销量:',
|
||||
// 查看商品按钮
|
||||
viewGoods: '查看商品',
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
export const lang = {
|
||||
// ns-goods-sku 商品 SKU 组件
|
||||
components: {
|
||||
nsGoodsSku: {
|
||||
// 积分后缀: {point} 为积分数量占位符
|
||||
pointSuffix: '{point}积分',
|
||||
},
|
||||
},
|
||||
// 积分后缀: {point} 为积分数量占位符
|
||||
pointSuffix: '{point}积分',
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
export const lang = {
|
||||
// ns-video-player-popup 视频弹窗组件
|
||||
components: {
|
||||
videoPlayerPopup: {
|
||||
// 视频地址不存在提示
|
||||
videoUrlNotExist: '视频地址不存在',
|
||||
},
|
||||
},
|
||||
// 视频地址不存在提示
|
||||
videoUrlNotExist: '视频地址不存在',
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
export const lang = {
|
||||
// ns-chat-order 订单消息组件
|
||||
components: {
|
||||
nsChatOrder: {
|
||||
// 订单状态标签: {status} 为订单状态值占位符
|
||||
orderStatus: '订单状态:{status}',
|
||||
// 配送方式标签: {method} 为配送方式值占位符
|
||||
deliveryMethod: '配送方式:{method}',
|
||||
// 发送按钮
|
||||
send: '发送',
|
||||
// 已发送按钮(禁用状态)
|
||||
sent: '已发送',
|
||||
},
|
||||
},
|
||||
// 订单状态标签: {status} 为订单状态值占位符
|
||||
orderStatus: '订单状态:{status}',
|
||||
// 配送方式标签: {method} 为配送方式值占位符
|
||||
deliveryMethod: '配送方式:{method}',
|
||||
// 发送按钮
|
||||
send: '发送',
|
||||
// 已发送按钮(禁用状态)
|
||||
sent: '已发送',
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
export const lang = {
|
||||
// ns-contact 客服组件
|
||||
components: {
|
||||
nsContact: {
|
||||
// 弹窗标题
|
||||
contactService: '联系客服',
|
||||
// 客服电话提示: {phone} 为电话号码占位符
|
||||
callServiceTip: '请联系客服,客服电话是 {phone}',
|
||||
// 无客服提示
|
||||
noServiceOffline: '抱歉,商家暂无客服,请线下联系',
|
||||
},
|
||||
},
|
||||
// 弹窗标题
|
||||
contactService: '联系客服',
|
||||
// 客服电话提示: {phone} 为电话号码占位符
|
||||
callServiceTip: '请联系客服,客服电话是 {phone}',
|
||||
// 无客服提示
|
||||
noServiceOffline: '抱歉,商家暂无客服,请线下联系',
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
export const lang = {
|
||||
// pick-regions 地区选择组件
|
||||
components: {
|
||||
pickRegions: {
|
||||
// 取消按钮
|
||||
cancel: '取消',
|
||||
// 完成按钮
|
||||
confirm: '完成',
|
||||
},
|
||||
},
|
||||
// 取消按钮
|
||||
cancel: '取消',
|
||||
// 完成按钮
|
||||
confirm: '完成',
|
||||
}
|
||||
|
||||
@@ -1,33 +1,29 @@
|
||||
export const lang = {
|
||||
// ===== yuyue-date 组件 =====
|
||||
components: {
|
||||
yuyueDate: {
|
||||
// 指定日期按钮
|
||||
appointedDate: '指定日期',
|
||||
// 指定日期按钮
|
||||
appointedDate: '指定日期',
|
||||
|
||||
// 时间状态文本
|
||||
fullyBooked: '已约满',
|
||||
available: '可预约',
|
||||
// 时间状态文本
|
||||
fullyBooked: '已约满',
|
||||
available: '可预约',
|
||||
|
||||
// 选中状态
|
||||
noSelection: '暂无选择',
|
||||
// 选中状态
|
||||
noSelection: '暂无选择',
|
||||
|
||||
// Toast 提示
|
||||
weekdayCannotBook: '{weekday}不可以预约',
|
||||
// Toast 提示
|
||||
weekdayCannotBook: '{weekday}不可以预约',
|
||||
|
||||
// 近三天日期标签
|
||||
today: '今天',
|
||||
tomorrow: '明天',
|
||||
dayAfterTomorrow: '后天',
|
||||
// 近三天日期标签
|
||||
today: '今天',
|
||||
tomorrow: '明天',
|
||||
dayAfterTomorrow: '后天',
|
||||
|
||||
// 星期完整名称(索引 0-6 对应周日到周六,与 Date.getDay() 返回值一致)
|
||||
weekSunday: '周日',
|
||||
weekMonday: '周一',
|
||||
weekTuesday: '周二',
|
||||
weekWednesday: '周三',
|
||||
weekThursday: '周四',
|
||||
weekFriday: '周五',
|
||||
weekSaturday: '周六',
|
||||
}
|
||||
}
|
||||
// 星期完整名称(索引 0-6 对应周日到周六,与 Date.getDay() 返回值一致)
|
||||
weekSunday: '周日',
|
||||
weekMonday: '周一',
|
||||
weekTuesday: '周二',
|
||||
weekWednesday: '周三',
|
||||
weekThursday: '周四',
|
||||
weekFriday: '周五',
|
||||
weekSaturday: '周六',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user