refactor(i18n): 扁平化所有国际化语言文件的翻译结构
移除多层嵌套的翻译对象,将所有翻译项直接挂载到顶层lang对象上,统一代码结构
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
export const lang = {
|
||||
pay: {
|
||||
cashier: {
|
||||
title: 'Cashier',
|
||||
// Pay button
|
||||
confirmPay: 'Confirm Payment',
|
||||
// Empty states
|
||||
noPayMethodConfigured: 'No payment method configured!',
|
||||
orderAlreadyPaid: 'This order has been paid',
|
||||
noPayInfo: 'Payment information not found',
|
||||
// Payment methods
|
||||
alipay: 'Alipay',
|
||||
wechatpay: 'WeChat Pay',
|
||||
// Messages
|
||||
pleaseSelectPayMethod: 'Please select a payment method!',
|
||||
paying: 'Processing payment...',
|
||||
paymentCancelled: 'Payment cancelled',
|
||||
paymentFailed: 'Payment failed, reason: {reason}',
|
||||
}
|
||||
}
|
||||
title: 'Cashier',
|
||||
// Pay button
|
||||
confirmPay: 'Confirm Payment',
|
||||
// Empty states
|
||||
noPayMethodConfigured: 'No payment method configured!',
|
||||
orderAlreadyPaid: 'This order has been paid',
|
||||
noPayInfo: 'Payment information not found',
|
||||
// Payment methods
|
||||
alipay: 'Alipay',
|
||||
wechatpay: 'WeChat Pay',
|
||||
// Messages
|
||||
pleaseSelectPayMethod: 'Please select a payment method!',
|
||||
paying: 'Processing payment...',
|
||||
paymentCancelled: 'Payment cancelled',
|
||||
paymentFailed: 'Payment failed, reason: {reason}',
|
||||
};
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
export const lang = {
|
||||
pay: {
|
||||
result: {
|
||||
//title is the page title
|
||||
title: 'Payment Result',
|
||||
paymentSuccess: 'Payment Successful',
|
||||
paymentFail: 'Payment Failed',
|
||||
goHome: 'Back to Home',
|
||||
memberCenter: 'Member Center',
|
||||
payMoney: 'Payment Amount',
|
||||
unit: 'Yuan',
|
||||
// consumption rewards
|
||||
congratulations: 'Congratulations, you have received',
|
||||
points: 'Points',
|
||||
growthValue: 'Growth Value',
|
||||
couponsCount: '{count} Coupons',
|
||||
// action buttons
|
||||
rechargeRecords: 'Recharge Records',
|
||||
memberCard: 'Member Card',
|
||||
viewOrder: 'View Order',
|
||||
// toast messages
|
||||
noPayInfo: 'Payment information not found!',
|
||||
}
|
||||
}
|
||||
//title is the page title
|
||||
title: 'Payment Result',
|
||||
paymentSuccess: 'Payment Successful',
|
||||
paymentFail: 'Payment Failed',
|
||||
goHome: 'Back to Home',
|
||||
memberCenter: 'Member Center',
|
||||
payMoney: 'Payment Amount',
|
||||
unit: 'Yuan',
|
||||
// consumption rewards
|
||||
congratulations: 'Congratulations, you have received',
|
||||
points: 'Points',
|
||||
growthValue: 'Growth Value',
|
||||
couponsCount: '{count} Coupons',
|
||||
// action buttons
|
||||
rechargeRecords: 'Recharge Records',
|
||||
memberCard: 'Member Card',
|
||||
viewOrder: 'View Order',
|
||||
// toast messages
|
||||
noPayInfo: 'Payment information not found!',
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
export const lang = {
|
||||
title: 'WeChat Pay',
|
||||
openInBrowserTip: 'Tap the top-right menu and open in browser',
|
||||
pay: {
|
||||
wxPay: {
|
||||
title: 'WeChat Pay',
|
||||
openInBrowserTip: 'Tap the top-right menu and open in browser'
|
||||
}
|
||||
}
|
||||
openInBrowserTip: 'Tap the top-right menu and open in browser'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user