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:
@@ -11,22 +11,22 @@
|
||||
</swiper>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="tips">{{ $lang('longPressTip') }}</view>
|
||||
<view class="tips">{{ $lang('fenxiao.promote_code.longPressTip') }}</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP -->
|
||||
<view class="btn color-base-bg color-base-border" @click="save">{{ $lang('savePoster') }}</view>
|
||||
<view class="btn color-base-bg color-base-border" @click="save">{{ $lang('fenxiao.promote_code.savePoster') }}</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<uni-popup ref="popupDialog" :custom="true" :mask-click="false">
|
||||
<view class="dialog-popup">
|
||||
<view class="title">{{ $lang('dialogTitle') }}</view>
|
||||
<view class="message">{{ $lang('authDeniedMessage') }}</view>
|
||||
<view class="title">{{ $lang('fenxiao.promote_code.dialogTitle') }}</view>
|
||||
<view class="message">{{ $lang('fenxiao.promote_code.authDeniedMessage') }}</view>
|
||||
<view class="action-wrap">
|
||||
<view @click="closeDialog">{{ $lang('cancel') }}</view>
|
||||
<view @click="closeDialog">{{ $lang('fenxiao.promote_code.cancel') }}</view>
|
||||
<view>
|
||||
<button type="default" open-type="openSetting" @opensetting="closeDialog"
|
||||
hover-class="none">{{ $lang('authorizeNow') }}</button>
|
||||
hover-class="none">{{ $lang('fenxiao.promote_code.authorizeNow') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('saveSuccess')
|
||||
title: this.$lang('fenxiao.promote_code.saveSuccess')
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
@@ -104,20 +104,20 @@ export default {
|
||||
this.$refs.popupDialog.open();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('saveFail')
|
||||
title: this.$lang('fenxiao.promote_code.saveFail')
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('downloadFail')
|
||||
title: this.$lang('fenxiao.promote_code.downloadFail')
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('downloadFail')
|
||||
title: this.$lang('fenxiao.promote_code.downloadFail')
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
});
|
||||
} catch {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('posterGenerateFail')
|
||||
title: this.$lang('fenxiao.promote_code.posterGenerateFail')
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
title: this.$lang('fenxiao.promote_code.merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user