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:
@@ -41,9 +41,9 @@
|
||||
<!-- 切换视频、图片 -->
|
||||
<view class="media-mode" v-if="goodsSkuDetail.video_url != ''">
|
||||
<text :class="{ 'color-base-bg': switchMedia == 'video' }" @click="switchMedia = 'video'">{{
|
||||
$lang('video') }}</text>
|
||||
$lang('goods.detail.video') }}</text>
|
||||
<text :class="{ 'color-base-bg': switchMedia == 'img' }"
|
||||
@click="(switchMedia = 'img'), videoContext.pause()">{{ $lang('image') }}</text>
|
||||
@click="(switchMedia = 'img'), videoContext.pause()">{{ $lang('goods.detail.image') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<view class="box">
|
||||
<block v-for="(item, index) in deliveryType" :key="index">
|
||||
<text
|
||||
v-if="goodsSkuDetail.support_trade_type.indexOf(index) != -1">{{ $lang('express') }}</text>
|
||||
v-if="goodsSkuDetail.support_trade_type.indexOf(index) != -1">{{ $lang('goods.detail.express') }}</text>
|
||||
<!-- {{ item.name }} -->
|
||||
</block>
|
||||
</view>
|
||||
@@ -199,7 +199,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box">
|
||||
<button type="primary" @click="closeMerchantsServicePopup()">{{ $lang('confirm') }}</button>
|
||||
<button type="primary" @click="closeMerchantsServicePopup()">{{ $lang('goods.detail.confirm') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -363,11 +363,11 @@
|
||||
<view class="detail-tab">
|
||||
<view v-if="goodsSkuDetail.pdf_url" class="tab-item"
|
||||
:class="{ active: detailTab === 'pdf' }" @click="switchDetailTab('pdf')">
|
||||
<text class="tab-label">{{ $lang('document') }}</text>
|
||||
<text class="tab-label">{{ $lang('goods.detail.document') }}</text>
|
||||
</view>
|
||||
<view v-if="hasHtmlTab" class="tab-item"
|
||||
:class="{ active: detailTab === 'html' }" @click="switchDetailTab('html')">
|
||||
<text class="tab-label">{{ $lang('details') }}</text>
|
||||
<text class="tab-label">{{ $lang('goods.detail.details') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-content active">
|
||||
|
||||
Reference in New Issue
Block a user