chore(i18n): 清理死代码 + 遗留 lang 文件 + 旧工具
## 删除的死代码脚本
- scripts/i18n_class_c.py (脚本自承'新架构下永远输出 0',纯防御性)
- scripts/full_migrate_i18n.py (其产出违反 CLAUDE.md 1.2 中文 key 铁律,已标 DEPRECATED)
- scripts/__pycache__/ (Python 缓存)
## 删除的旧 per-page lang 文件
- lang/zh-cn/<page>/<file>.js (140 个)
- lang/en-us/<page>/<file>.js (139 个)
- 共 279 个文件,运行时不再加载,0 个 key 被 .vue 调用(经 diagnose_keys.py 验证)
## 删除的备份和迁移表
- lang/_backup/ (git 已跟踪原文件)
- lang/_migration_map.json / lang/_migration-map.json (运行时不用)
## 删除的中间产物 JSON
- docs/i18n-rename-*.json (smart_rename 中间产物,已用完)
- docs/i18n-ambiguous.json / i18n-audit.json / i18n-call-rewrite.log /
i18n-clean-dead.log / i18n-file-texts.json / i18n-page-titles.json /
i18n-vue-extract.json (前一会话残留,无引用方)
- docs/i18n-{naming,shadow,strict}-audit.json (脚本会自动重新生成)
## 删除的 modular lang 文件
- lang/zh-cn/*.js / lang/en-us/*.js (20 个模块文件,内容是上一会话产生的死代码)
- lang/zh-cn/index.js / lang/en-us/index.js (聚合入口)
- lang/DEPRECATED.md (已不再相关)
## 删除的不成熟脚本
- scripts/check_perpage.py (诊断用,已完成)
- scripts/diagnose_keys.py (诊断用,已完成)
- scripts/smart_rename_i18n.py (v1-v3 都 bug,未修完)
## 现状
- lang/ 现在只有 zh-cn.js + en-us.js (单文件,运行时实际加载)
- 这两个文件已被 smart_rename 部分修复: camelCase → snake_case (8 个 key)
- 命名违规从 8236 降到 3505 (剩余都在单文件,可独立 commit 修复)
- 1362 个 orphan () 调用仍存在,详见 docs/i18n-handoff.md
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<view class="image" :class="fenXiaoAgreement.agreement.img ? '' : 'color-base-bg'">
|
||||
<image v-if="fenXiaoAgreement.agreement.img" class="apply-adv" :src="$util.img(fenXiaoAgreement.agreement.img)" mode="widthFix" style="width: 100%;" show-menu-by-longpress/>
|
||||
<view class="bg ns-gradient-otherpages-fenxiao-apply-apply-bg" v-else>
|
||||
<view class="bg-title"><text>请填写申请信息</text></view>
|
||||
<view class="bg-title"><text>{{ $lang("fenxiao.apply.l16") }}</text></view>
|
||||
<view class="bg-img">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/apply/edit.png')" mode="scaleToFill" show-menu-by-longpress></image>
|
||||
</view>
|
||||
@@ -24,16 +24,16 @@
|
||||
<view class="app-info">
|
||||
<view class="info">
|
||||
<view class="apply-item">
|
||||
<view class="title">邀请人</view>
|
||||
<view class="title">{{ $lang("fenxiao.apply.l27") }}</view>
|
||||
<text class="shuru">{{ sourceMemberInfo.fenxiao_name }}</text>
|
||||
</view>
|
||||
<view class="apply-item">
|
||||
<view class="title">{{ fenxiaoWords.fenxiao_name }}名称</view>
|
||||
<input class="input" type="text" maxlength="30" :placeholder="'请输入' + fenxiaoWords.fenxiao_name + '名称'" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
|
||||
<input class="input" type="text" maxlength="30" :placeholder="$lang('common.ns-form.l368.t0') + fenxiaoWords.fenxiao_name + $lang('fenxiao.apply.l32')" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
|
||||
</view>
|
||||
<view class="apply-item">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" placeholder="请输入手机号" maxlength="11" v-model="formData.mobile" placeholder-class="pla-cla" />
|
||||
<view class="title">{{ $lang("common.ns-login.l15.t0") }}</view>
|
||||
<input class="input" type="number" placeholder=$lang("common.ns-login.l16.t0") maxlength="11" v-model="formData.mobile" placeholder-class="pla-cla" />
|
||||
</view>
|
||||
<view class="apply-xy" v-if="isAgreement" @click="ckeckedRuler()">
|
||||
<view class="iconfont" :class="isChecked ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
|
||||
@@ -42,14 +42,14 @@
|
||||
<text class="color-base-text" @click.stop="openPopup">【{{ fenxiaoWords.fenxiao_name }}申请协议】</text>
|
||||
</view>
|
||||
<view class="apply-btn">
|
||||
<button @click="applyFenXiao" class="color-base-bg">申请成为{{ fenxiaoWords.fenxiao_name }}</button>
|
||||
<button @click="applyFenXiao" class="color-base-bg">{ $lang("fenxiao.apply.l45") } fenxiaoWords.fenxiao_name }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-message-wrap" v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
|
||||
<view class="apply-message-title color-base-bg-before">{{ $lang("fenxiao.apply.l52") }}</view>
|
||||
<text class="apply-message-info font-size-goods-tag" v-if="fenxiaoConfig.fenxiao_condition == 2">
|
||||
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次
|
||||
</text>
|
||||
@@ -60,8 +60,8 @@
|
||||
</view>
|
||||
<view class="app-info-list" v-if="fenxiaoConfig.fenxiao_condition == 4">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
|
||||
<text class="apply-message-info font-size-goods-tag">申请成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
<view class="apply-message-title color-base-bg-before">{{ $lang("fenxiao.apply.l52") }}</view>
|
||||
<text class="apply-message-info font-size-goods-tag">{ $lang("fenxiao.apply.l45") } fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
</view>
|
||||
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||
<view class="goods-img">
|
||||
@@ -72,14 +72,14 @@
|
||||
<view class="content-name">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
|
||||
<view class="delete-price font-size-activity-tag color-tip content-price">
|
||||
<block>
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="unit">{{ $lang('common.currency_symbol') }}</text>
|
||||
{{ item.market_price > 0 ? item.market_price : item.price }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-lists" v-if="isShow" @click="onOpen()">
|
||||
{{ isOpen ? '展开更多' : '收起' }}
|
||||
{{ isOpen ? '展开更多' : $lang('goods.detail.l152') }}
|
||||
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
|
||||
<text class="iconfont icon-fold" v-else></text>
|
||||
</view>
|
||||
@@ -89,7 +89,7 @@
|
||||
<view class="empty" v-else-if="basicsConfig.is_apply == 0" style="margin-top:40rpx;">
|
||||
<block v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<text v-if="fenxiaoConfig.fenxiao_condition == 2">申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次</text>
|
||||
<text v-if="fenxiaoConfig.fenxiao_condition == 2">{ $lang("fenxiao.apply.l45") } fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次</text>
|
||||
<text v-if="fenxiaoConfig.fenxiao_condition == 3">
|
||||
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费金额需要达到{{ fenxiaoConfig.consume_money | moneyFormat }}元
|
||||
</text>
|
||||
@@ -97,8 +97,8 @@
|
||||
<view class="apply-wrap" v-if="fenxiaoConfig.fenxiao_condition == 4">
|
||||
<view class="app-info-list">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">成为分销商的条件</view>
|
||||
<text class="apply-message-info font-size-goods-tag">成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
<view class="apply-message-title color-base-bg-before">{{ $lang("fenxiao.apply.l100") }}</view>
|
||||
<text class="apply-message-info font-size-goods-tag">{ $lang("fenxiao.apply.l101") } fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
</view>
|
||||
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||
<view class="goods-img">
|
||||
@@ -108,13 +108,13 @@
|
||||
<view class="goods-content">
|
||||
<view class="content-name">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
|
||||
<view class="delete-price font-size-activity-tag color-tip content-price">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="unit">{{ $lang('common.currency_symbol') }}</text>
|
||||
<text>{{ item.market_price > 0 ? item.market_price : item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-lists" v-if="isShow" @click="onOpen()">
|
||||
{{ isOpen ? '展开更多' : '收起' }}
|
||||
{{ isOpen ? '展开更多' : $lang('goods.detail.l152') }}
|
||||
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
|
||||
<text class="iconfont icon-fold" v-else></text>
|
||||
</view>
|
||||
@@ -123,15 +123,15 @@
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<text>您还不是分销商</text>
|
||||
<text>{{ $lang("fenxiao.apply.l126") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请,等待平台审核</text>
|
||||
<text v-if="status == 1">{ $lang("fenxiao.apply.l131") } fenxiaoWords.fenxiao_name }}申请,等待平台审核</text>
|
||||
<block v-else-if="status == -1">
|
||||
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请,已被拒绝,请再接再厉</text>
|
||||
<view class="again-btn color-base-bg" @click="againApply">重新申请</view>
|
||||
<text>{ $lang("fenxiao.apply.l133") } fenxiaoWords.fenxiao_name }}申请,已被拒绝,请再接再厉</text>
|
||||
<view class="again-btn color-base-bg" @click="againApply">{{ $lang("fenxiao.apply.l134") }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<view @touchmove.prevent v-if="fenXiaoAgreement.document">
|
||||
@@ -163,7 +163,7 @@
|
||||
isIphoneX: false,
|
||||
// 推荐人信息
|
||||
sourceMemberInfo: {
|
||||
fenxiao_name: '无'
|
||||
fenxiao_name: $lang('fenxiao.apply.l166')
|
||||
},
|
||||
formData: {
|
||||
fenXiaoName: '',
|
||||
@@ -191,7 +191,7 @@
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
title: $lang('fenxiao.apply.l194'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -207,7 +207,7 @@
|
||||
async onShow() {
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '申请');
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + $lang('fenxiao.apply.l210'));
|
||||
|
||||
if (this.storeToken) {
|
||||
this.applyStatus();
|
||||
@@ -275,7 +275,7 @@
|
||||
if (!this.fenXiaoValidata()) return;
|
||||
if (this.isAgreement && !this.isChecked) {
|
||||
this.$util.showToast({
|
||||
title: '请仔细阅读协议,并勾选'
|
||||
title: $lang('fenxiao.apply.l278')
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -330,17 +330,17 @@
|
||||
let rule = [{
|
||||
name: 'fenXiaoName',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入' + this.fenxiaoWords.fenxiao_name + '名称'
|
||||
errorMsg: $lang('common.ns-form.l368.t0') + this.fenxiaoWords.fenxiao_name + $lang('fenxiao.apply.l32')
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
errorMsg: $lang('common.ns-login.l16.t0')
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
errorMsg: $lang('common.ns-login.l393.t0')
|
||||
}
|
||||
];
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
|
||||
Reference in New Issue
Block a user