refactor: 统一项目内国际化key的命名空间格式
本次提交对全项目的国际化调用进行了规范化重构:
1. 为中文/英文语言包新增了avatar和gender的别名映射,兼容旧有headImg/sex写法
2. 修正了lang.js中的注释路径错误
3. 将所有页面和组件内的$lang调用从短路径改为带业务模块前缀的完整命名空间路径,例如将$lang('title')改为$lang('article.list.title')
4. 优化了i18n-lazy.js的注释说明,补充了正确的key命名格式示例
5. 统一了分销、订单、会员等模块的国际化key层级,确保所有语言调用路径一致
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="search-wrap uni-flex uni-row">
|
||||
<view class="flex-item input-wrap">
|
||||
<input class="uni-input" maxlength="50" :placeholder="$lang('searchPlaceholder')" v-model="keyword" @confirm="search"
|
||||
<input class="uni-input" maxlength="50" :placeholder="$lang('files.list.searchPlaceholder')" v-model="keyword" @confirm="search"
|
||||
@input="__set_model($event, 'keyword')" />
|
||||
<text class="iconfont icon-sousuo3" @tap="search"></text>
|
||||
</view>
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="info-wrap">
|
||||
<view class="title">{{ item.$orig.files_title }}</view>
|
||||
<view class="read-wrap">
|
||||
<text>{{ $lang('viewPdf') }}</text>
|
||||
<text>{{ $lang('files.list.viewPdf') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,7 +29,7 @@
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="empty-wrap">
|
||||
<ns-empty :text="$lang('emptyText')" :isIndex="false"></ns-empty>
|
||||
<ns-empty :text="$lang('files.list.emptyText')" :isIndex="false"></ns-empty>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
},
|
||||
toDetail(item) {
|
||||
uni.showLoading({
|
||||
title: this.$lang('loading')
|
||||
title: this.$lang('files.list.loading')
|
||||
})
|
||||
try {
|
||||
uni.downloadFile({
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
complete: res => {
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({
|
||||
title: this.$lang('fileNotExist'),
|
||||
title: this.$lang('files.list.fileNotExist'),
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user