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:
2026-07-04 09:24:35 +08:00
parent 92e8823566
commit 783c10fc62
98 changed files with 1543 additions and 1530 deletions

View File

@@ -14,10 +14,10 @@
@click="toDetail(orderItem.fenxiao_order_id)">
<view class="order-header">
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">{{ $lang('statusRefunded') }}</text>
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">{{ $lang('fenxiao.order.statusRefunded') }}</text>
<text class="status-name color-text-green"
v-else-if="orderItem.is_settlement == 1">{{ $lang('statusSettled') }}</text>
<text class="status-name color-text-orange" v-else>{{ $lang('statusPendingSettlement') }}</text>
v-else-if="orderItem.is_settlement == 1">{{ $lang('fenxiao.order.statusSettled') }}</text>
<text class="status-name color-text-orange" v-else>{{ $lang('fenxiao.order.statusPendingSettlement') }}</text>
</view>
<view class="order-body">
@@ -30,7 +30,7 @@
<view class="top-wrap">
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
<view>
<text class="color-tip">{{ $lang('earnPrefix') }}{{ fenxiaoWords.account }}</text>
<text class="color-tip">{{ $lang('fenxiao.order.earnPrefix') }}{{ fenxiaoWords.account }}</text>
<text class="price-color price-style small">{{
$lang('common.currencySymbol') }}</text>
<text class="price-color price-style large">{{
@@ -66,7 +66,7 @@
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
</view>
<view class="total">
<text>{{ $lang('totalLabel') }}</text>
<text>{{ $lang('fenxiao.order.totalLabel') }}</text>
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar">{{
parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
@@ -78,13 +78,13 @@
</view>
</view>
<view class="cart-empty">
<ns-empty :text="$lang('noOrders')" :isIndex="false"
<ns-empty :text="$lang('fenxiao.order.noOrders')" :isIndex="false"
v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty :text="$lang('noPendingSettlementOrders')" :isIndex="false"
<ns-empty :text="$lang('fenxiao.order.noPendingSettlementOrders')" :isIndex="false"
v-if="selectId == 1 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty :text="$lang('noSettledOrders')" :isIndex="false"
<ns-empty :text="$lang('fenxiao.order.noSettledOrders')" :isIndex="false"
v-if="selectId == 2 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty :text="$lang('noRefundedOrders')" :isIndex="false"
<ns-empty :text="$lang('fenxiao.order.noRefundedOrders')" :isIndex="false"
v-if="selectId == 3 && orderList.length == 0 && emptyShow"></ns-empty>
</view>
</view>
@@ -142,7 +142,7 @@ export default {
setTimeout(() => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: this.$lang('merchantNotOpenFenxiao'),
title: this.$lang('fenxiao.order.merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -152,7 +152,7 @@ export default {
}
}, 1000);
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('orderSuffix'));
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('fenxiao.order.orderSuffix'));
if (!this.storeToken) {
this.redirectTologin('/pages_promotion/fenxiao/order');