refactor(i18n): 扁平化多语言文件结构,移除嵌套的components对象

统一调整所有组件级多语言配置,将原有的components.[componentName]嵌套结构改为直接顶层键值对,简化语言包的调用层级
This commit is contained in:
2026-06-30 16:53:53 +08:00
parent eef59211d3
commit 4adaa945a1
20 changed files with 141 additions and 223 deletions

View File

@@ -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',
}

View File

@@ -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 ~',
},
},
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}