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: '展开',
// 点击收起(展开弹窗底部收起按钮)
clickToCollapse: '点击收起',
// 滚动到底部提示
reachedBottom: '已经到底了~',
// 暂无分类(空状态提示)
noCategory: '暂时没有分类哦!',
// 商品单位:件
pieceUnit: '件',
},
},
// 展开全部分类(横向滚动右侧展开按钮)
expand: '展开',
// 点击收起(展开弹窗底部收起按钮)
clickToCollapse: '点击收起',
// 滚动到底部提示
reachedBottom: '已经到底了~',
// 暂无分类(空状态提示)
noCategory: '暂时没有分类哦!',
// 商品单位:件
pieceUnit: '件',
}

View File

@@ -1,14 +1,10 @@
export const lang = {
'components-diy': {
diyIndexPage: {
// 首页(默认分类名称)
home: '首页',
// 销量文案:已售X件
soldCount: '已售{count}{unit}',
// 销量单位:件
soldUnit: '件',
// 分类下无商品的空状态提示
noGoodsInCategory: '该分类下暂无商品',
},
},
// 首页(默认分类名称)
home: '首页',
// 销量文案:已售X件
soldCount: '已售{count}{unit}',
// 销量单位:件
soldUnit: '件',
// 分类下无商品的空状态提示
noGoodsInCategory: '该分类下暂无商品',
}

View File

@@ -1,14 +1,10 @@
export const lang = {
'components-diy': {
diyStore: {
// 切换门店(按钮文案)
switchStore: '切换门店',
// 定位中(加载状态提示)
locating: '定位中',
// 获取位置中(地址加载状态提示)
gettingLocation: '获取位置中',
// 搜索框占位符
searchPlaceholder: '搜索',
},
},
// 切换门店(按钮文案)
switchStore: '切换门店',
// 定位中(加载状态提示)
locating: '定位中',
// 获取位置中(地址加载状态提示)
gettingLocation: '获取位置中',
// 搜索框占位符
searchPlaceholder: '搜索',
};