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:
@@ -10,16 +10,16 @@
|
||||
<image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')"
|
||||
mode="aspectFill"></image>
|
||||
<view class="content">
|
||||
{{ $lang('totalEarnings') }}
|
||||
{{ $lang('fenxiao.promote.totalEarnings') }}
|
||||
<text class="money-text">{{ detailData.total_commission }}</text>
|
||||
{{ $lang('currencyUnit') }}
|
||||
{{ $lang('fenxiao.promote.currencyUnit') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="earnings-body">
|
||||
<view class="earnings-tab">
|
||||
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">{{ $lang('invitedFriends') }}</text>
|
||||
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">{{ $lang('orderedFriends') }}</text>
|
||||
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">{{ $lang('fenxiao.promote.invitedFriends') }}</text>
|
||||
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">{{ $lang('fenxiao.promote.orderedFriends') }}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()">
|
||||
<view class="earnings-list" v-if="promote.list.length">
|
||||
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="earnings-empty" v-else>{{ $lang('noInvitedFriends') }}</view>
|
||||
<view class="earnings-empty" v-else>{{ $lang('fenxiao.promote.noInvitedFriends') }}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -41,9 +41,9 @@
|
||||
mode="aspectFit" show-menu-by-longpress></image>
|
||||
<view class="content" v-if="promoteContent.content"><rich-text
|
||||
:nodes="promoteContent.content"></rich-text></view>
|
||||
<view class="rules-empty" v-else>{{ $lang('noActivityRules') }}</view>
|
||||
<view class="rules-empty" v-else>{{ $lang('fenxiao.promote.noActivityRules') }}</view>
|
||||
</view>
|
||||
<view class="active-btn"><button type="primary" @click="toPoster()">{{ $lang('inviteFriends') }}</button></view>
|
||||
<view class="active-btn"><button type="primary" @click="toPoster()">{{ $lang('fenxiao.promote.inviteFriends') }}</button></view>
|
||||
<ns-copyright></ns-copyright>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
title: this.$lang('fenxiao.promote.merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user