feat: 新增多语言国际化页面配置,修复部分页面硬编码文案

1. 新增了zh-cn和en-us两套语言下的大量页面国际化配置文件,覆盖商品、订单、会员、营销活动等多个业务模块
2. 修复了分销页面、VR页面、支付页面、商品不存在页面的硬编码提示文案,替换为国际化调用
3. 删除了原有的i18n检查脚本文件
This commit is contained in:
2026-06-25 11:00:50 +08:00
parent 5f41febd70
commit 8e218bb663
509 changed files with 49155 additions and 55313 deletions

View File

@@ -53,54 +53,54 @@ export default {
begin_time:'',//团购开始时间
end_time:''//团购结束时间
},
groundingArray: [$lang('merch.public.edit.l56'), $lang('merch.public.edit.l56')],
groundingArray: ['下架', '上架'],
pickuptypeArray: [$lang('merch.public.edit.l58'), $lang('merch.public.edit.l58'), $lang('merch.public.edit.l58')],//, $lang('merch.public.edit.l58')
pickuptypeArray: ['当日达', '次日达', '隔日达'],//, '自定义'
currCategory: 0, // 当前所设置的商品分类
virtualDeliverArray: [{
name: $lang('merch.public.edit.l63'),
name: '自动发货',
value: 'auto_deliver',
},
{
name: $lang('merch.public.edit.l67'),
name: '手动发货',
value: 'artificial_deliver',
},
{
name: $lang('merch.public.edit.l71'),
name: '到店核销',
value: 'verify',
}
],
virtualDeliverValue: {
'auto_deliver': $lang('merch.public.edit.l63'),
'artificial_deliver': $lang('merch.public.edit.l67'),
'verify': $lang('merch.public.edit.l71')
'auto_deliver': '自动发货',
'artificial_deliver': '手动发货',
'verify': '到店核销'
},
virtualReceiveArray: [{
name: $lang('merch.public.edit.l81'),
name: '自动收货',
value: 'auto_receive',
},
{
name: $lang('merch.public.edit.l85'),
name: '买家确认收货',
value: 'artificial_receive',
},
],
virtualReceiveValue: {
'auto_receive': $lang('merch.public.edit.l81'),
'artificial_receive': $lang('merch.public.edit.l85'),
'auto_receive': '自动收货',
'artificial_receive': '买家确认收货',
},
validityTypeArray: [$lang('goods.detail.l133'), $lang('merch.public.edit.l93'), $lang('merch.public.edit.l93')],
validityTypeArray: ['永久', '购买后几日有效', '指定过期日期'],
virtualIndate: 0,
minDate: '',
carmiLength: $lang('merch.public.edit.l96'),
carmiLength: '添加卡密',
limitLength: [ //限购
{
name: $lang('merch.public.edit.l99'),
name: '单次限购',
value: '1'
},
{
name: $lang('merch.public.edit.l103'),
name: '长期限购',
value: '2'
}
],
@@ -123,14 +123,14 @@ export default {
if (this.goodsData.id) {
this.isAWait = true;
uni.setNavigationBarTitle({
title: $lang('merch.public.edit.l126')
title: '编辑商品'
});
await this.editGetGoodsInfo();
} else {
this.isAWait = false;
uni.setNavigationBarTitle({
title: $lang('merch.public.edit.l133')
title: '添加商品'
});
}
@@ -167,7 +167,7 @@ export default {
if(res.result.detail){
this.goodsData = res.result.detail
this.$util.showToast({
title: $lang('merch.public.edit.l170'),
title: '商品不存在',
});
setTimeout(() => {
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
@@ -265,7 +265,7 @@ export default {
this.$forceUpdate();
} else {
this.$util.showToast({
title: $lang('merch.public.edit.l170'),
title: '商品不存在',
});
setTimeout(() => {
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
@@ -493,7 +493,7 @@ export default {
addShopCategory() {
if (this.shopCategoryNumber == 10) {
this.$util.showToast({
title: $lang('merch.public.edit.l496')
title: '商品可以属于多个分类,最多10个'
});
return;
}
@@ -530,7 +530,7 @@ export default {
this.goodsData.carmichael = uni.getStorageSync('editGoodsCarmichael') ? JSON.parse(uni.getStorageSync('editGoodsCarmichael')) : [];
if (this.goodsData.carmichael.length > 0) {
this.carmiLength = $lang('merch.public.edit.l533') + this.goodsData.carmichael.length + '】'
this.carmiLength = '添加卡密【' + this.goodsData.carmichael.length + '】'
}
}
@@ -568,21 +568,21 @@ export default {
if (this.goodsData.goodsname.length == 0) {
this.$util.showToast({
title: $lang('common.ns-navbar.l31.t0')
title: '请输入商品名称'
});
return false;
}
if (this.goodsData.subtitle.length > 100) {
this.$util.showToast({
title: $lang('merch.public.edit.l578')
title: '商品简介不能超过100个字符'
});
return false;
}
if (this.goodsData.goods_image.length == 0) {
this.$util.showToast({
title: $lang('merch.public.edit.l585')
title: '请上传商品图片'
});
return false;
}
@@ -632,20 +632,20 @@ export default {
if (this.goodsData.price == 0) {
this.$util.showToast({
title: $lang('merch.public.edit.l635')
title: '请输入销售价'
});
return false;
}
if (isNaN(this.goodsData.price) || !this.$util.data().regExp.digit.test(this.goodsData.price)) {
this.$util.showToast({
title: $lang('merch.public.edit.l641')
title: '[销售价]格式输入错误'
});
return false;
}
if (this.goodsData.productprice.length > 0 && (isNaN(this.goodsData.productprice) || !this.$util.data().regExp.digit.test(this.goodsData.productprice))) {
this.$util.showToast({
title: $lang('merch.public.edit.l648')
title: '[原价价]格式输入错误'
});
return false;
}
@@ -655,26 +655,26 @@ export default {
// 总库存
if (this.goodsData.total == 0) {
this.$util.showToast({
title: $lang('merch.public.edit.l658')
title: '请输入库存'
});
return false;
}
if (isNaN(this.goodsData.total) || !this.$util.data().regExp.number.test(this.goodsData.total)) {
this.$util.showToast({
title: $lang('merch.public.edit.l665')
title: '[库存]格式输入错误'
});
return false;
}
if (isNaN(this.goodsData.goods_start_count) || !this.$util.data().regExp.number.test(this.goodsData.goods_start_count)) {
this.$util.showToast({
title: $lang('merch.public.edit.l671')
title: '[起售]格式输入错误'
});
return false;
}
if (this.goodsData.goods_start_count < 0) {
this.$util.showToast({
title: $lang('merch.public.edit.l677')
title: '起售数量不能小于0'
});
return false;
}
@@ -905,7 +905,7 @@ export default {
getGoodsForm() {
getOrderFormList().then(res=>{
if (res.data) {
let goodsForm = [$lang('merch.public.edit.l908')];
let goodsForm = ['请选择商品表单'];
res.data.forEach((item, index) => {
goodsForm.push(item.form_name);
if (this.goodsData.form_id && this.goodsData.form_id == item.id) this.goodsData.goods_form_index = index + 1;
@@ -926,7 +926,7 @@ export default {
getSupplyList() {
getSupplyList().then(res=>{
if (res.data) {
let supplyForm = [$lang('merch.public.edit.l929')];
let supplyForm = ['请选择供应商'];
res.data.forEach((item, index) => {
supplyForm.push(item.title);
if (this.goodsData.supplier_id && this.goodsData.supplier_id == item.supplier_id) this.goodsData.supply_index = index + 1;

View File

@@ -39,7 +39,7 @@ export default {
fontWeight: false,
padding: 0,
cartEvent: "detail",
text: $lang("common.ns-goods-recommend.l20.t0"),
text: "购买",
textColor: "#FFFFFF",
theme: "default",
aroundRadius: 25,
@@ -76,8 +76,8 @@ export default {
this.getMerch()
}else{
uni.showModal({
title:$lang('common.wxwork-contact.l202.t0'),
content:$lang('merch.public.js.list.l80'),
title:'提示',
content:'商家不存在',
showCancel:false,
success(e){
uni.navigateBack({})
@@ -120,7 +120,7 @@ export default {
* 转发分享
*/
onShareAppMessage(res) {
var title = $lang('goods.public.js.list.l126') + this.count + $lang('goods.public.js.list.l126') + this.keyword + this.category_title + this.coupon_name + $lang('goods.public.js.list.l126');
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var path = route.path;
return {
@@ -134,7 +134,7 @@ export default {
},
// 分享到微信朋友圈
onShareTimeline() {
var title = $lang('goods.public.js.list.l126') + this.count + $lang('goods.public.js.list.l126') + this.keyword + this.category_title + this.coupon_name + $lang('goods.public.js.list.l126');
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var query = route.query;
return {
@@ -144,18 +144,18 @@ export default {
};
},
methods: {
getMerch(){
this.$api.sendRequest({
url: '/merch/api/merch/merchinfo',
data: {
merch_id: this.merch_id
},
success: res => {
if (res.code >= 0 && res.data) {
this.merch = res.data;
}
}
});
getMerch(){
this.$api.sendRequest({
url: '/merch/api/merch/merchinfo',
data: {
merch_id: this.merch_id
},
success: res => {
if (res.code >= 0 && res.data) {
this.merch = res.data;
}
}
});
},
/**
* 获取优惠券数据
@@ -336,26 +336,26 @@ export default {
// }
if (!Number(this.maxPrice) && this.maxPrice) {
this.$util.showToast({
title: $lang('goods.public.js.list.l365')
title: '请输入最高价'
});
return;
}
if (Number(this.minPrice) < 0 || Number(this.maxPrice) < 0) {
this.$util.showToast({
title: $lang('goods.public.js.list.l371')
title: '筛选价格不能小于0'
});
return;
}
if (this.minPrice != '' && Number(this.minPrice) > Number(this.maxPrice) && this.maxPrice) {
this.$util.showToast({
title: $lang('goods.public.js.list.l378')
title: '最低价不能大于最高价'
});
return;
}
if (this.maxPrice != '' && Number(this.maxPrice) < Number(this.minPrice)) {
this.$util.showToast({
title: $lang('goods.public.js.list.l384')
title: '最高价不能小于最低价'
});
return;
}