refactor: 优化多语言结构并新增远端语言包加载能力

1. 扁平化多语言文件层级,移除嵌套的命名空间
2. 更新组件内多语言调用路径,适配新的语言包结构
3. 重构HTTP请求错误处理逻辑
4. 新增remote-only模式的远端语言包加载器
5. 新增多语言数据源remote-only配置项
This commit is contained in:
2026-06-30 10:03:25 +08:00
parent 32db276e68
commit e6d47a3d78
13 changed files with 477 additions and 117 deletions

View File

@@ -1,16 +1,12 @@
export const lang = {
'components-diy': {
diyCategory: {
// Expand all categories (button on the right of horizontal scroll)
expand: 'Expand',
// Click to collapse (button at the bottom of expanded popup)
clickToCollapse: 'Click to collapse',
// Scroll to bottom tip
reachedBottom: 'Reached the bottom~',
// No categories (empty state tip)
noCategory: 'No categories yet!',
// Product unit: piece
pieceUnit: 'pc(s)',
},
},
// Expand all categories (button on the right of horizontal scroll)
expand: 'Expand',
// Click to collapse (button at the bottom of expanded popup)
clickToCollapse: 'Click to collapse',
// Scroll to bottom tip
reachedBottom: 'Reached the bottom~',
// No categories (empty state tip)
noCategory: 'No categories yet!',
// Product unit: piece
pieceUnit: 'pc(s)',
}

View File

@@ -1,14 +1,10 @@
export const lang = {
'components-diy': {
diyIndexPage: {
// Home (default category name)
home: 'Home',
// Sales text: Sold X units
soldCount: 'Sold {count}{unit}',
// Sales unit: piece
soldUnit: 'pcs',
// Empty state prompt when no goods in category
noGoodsInCategory: 'No goods in this category',
},
},
// Home (default category name)
home: 'Home',
// Sales text: Sold X units
soldCount: 'Sold {count}{unit}',
// Sales unit: piece
soldUnit: 'pcs',
// Empty state prompt when no goods in category
noGoodsInCategory: 'No goods in this category',
}

View File

@@ -1,14 +1,10 @@
export const lang = {
'components-diy': {
diyStore: {
// Switch store button text
switchStore: 'Switch Store',
// Locating status text
locating: 'Locating',
// Getting location status text for address
gettingLocation: 'Getting location',
// Search input placeholder
searchPlaceholder: 'Search',
},
},
// Switch store button text
switchStore: 'Switch Store',
// Locating status text
locating: 'Locating',
// Getting location status text for address
gettingLocation: 'Getting location',
// Search input placeholder
searchPlaceholder: 'Search',
};