i18n: replace hardcoded strings with language translations
批量将项目中多处硬编码的文本替换为多语言翻译条目,统一项目文案管理,提升多语言适配效率,包括导航提示、操作反馈、空状态提示、表单占位符等各类文本内容。
This commit is contained in:
@@ -300,8 +300,8 @@
|
||||
<view class="order-cell order-invoice-cell" v-if="goodsData.invoice.invoice_status == 1">
|
||||
<text class="tit">发票</text>
|
||||
<view class="box text-overflow" @click="openPopup('invoicePopup')">
|
||||
<text v-if="orderCreateData.is_invoice == 1">{{ orderCreateData.invoice_type == 1 ? '纸质' : '电子' }}发票({{ orderCreateData.invoice_content }})</text>
|
||||
<text v-else>无需发票</text>
|
||||
<text v-if="orderCreateData.is_invoice == 1">{{ orderCreateData.invoice_type == 1 ? $lang('payment.paperInvoice') : $lang('payment.eInvoice') }}发票({{ orderCreateData.invoice_content }})</text>
|
||||
<text v-else>{{ $lang('payment.noInvoice') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
|
||||
@@ -131,32 +131,32 @@ export default {
|
||||
charge_rule_arr.push({
|
||||
'key': key,
|
||||
'value': charge_rule[key],
|
||||
'title': '周卡',
|
||||
unit: '周'
|
||||
'title': this.$lang('payment.weekCard'),
|
||||
unit: this.$lang('payment.week')
|
||||
});
|
||||
break;
|
||||
case 'month':
|
||||
charge_rule_arr.push({
|
||||
'key': key,
|
||||
'value': charge_rule[key],
|
||||
'title': '月卡',
|
||||
unit: '月'
|
||||
'title': this.$lang('payment.monthCard'),
|
||||
unit: this.$lang('payment.month')
|
||||
});
|
||||
break;
|
||||
case 'quarter':
|
||||
charge_rule_arr.push({
|
||||
'key': key,
|
||||
'value': charge_rule[key],
|
||||
'title': '季卡',
|
||||
unit: '季'
|
||||
'title': this.$lang('payment.quarterCard'),
|
||||
unit: this.$lang('payment.quarter')
|
||||
});
|
||||
break;
|
||||
case 'year':
|
||||
charge_rule_arr.push({
|
||||
'key': key,
|
||||
'value': charge_rule[key],
|
||||
'title': '年卡',
|
||||
unit: '年'
|
||||
'title': this.$lang('payment.yearCard'),
|
||||
unit: this.$lang('payment.year')
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -484,20 +484,20 @@ export default {
|
||||
if (this.paymentData.is_virtual == 1) {
|
||||
if (!this.orderCreateData.member_address.mobile) {
|
||||
this.$util.showToast({
|
||||
title: '请输入预留手机'
|
||||
title: this.$lang('payment.inputMobile')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
|
||||
this.$util.showToast({
|
||||
title: '请输入正确的手机号'
|
||||
title: this.$lang('payment.inputCorrectMobile')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!this.orderCreateData.delivery || !this.orderCreateData.delivery.delivery_type) {
|
||||
this.$util.showToast({
|
||||
title: '商家未设置配送方式'
|
||||
title: this.$lang('payment.noDeliveryMethod')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -506,7 +506,7 @@ export default {
|
||||
(this.orderCreateData.delivery.delivery_type == 'local' && !this.localMemberAddress)
|
||||
) {
|
||||
this.$util.showToast({
|
||||
title: '请先选择您的收货地址'
|
||||
title: this.$lang('payment.selectAddressFirst')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -514,25 +514,25 @@ export default {
|
||||
if (this.orderCreateData.delivery.delivery_type == 'store') {
|
||||
if (!this.orderCreateData.delivery.store_id) {
|
||||
this.$util.showToast({
|
||||
title: '没有可提货的门店,请选择其他配送方式'
|
||||
title: this.$lang('payment.noPickupStore')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.orderCreateData.member_address.mobile) {
|
||||
this.$util.showToast({
|
||||
title: '请输入预留手机'
|
||||
title: this.$lang('payment.inputMobile')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
|
||||
this.$util.showToast({
|
||||
title: '请输入正确的手机号'
|
||||
title: this.$lang('payment.inputCorrectMobile')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.deliveryTime) {
|
||||
this.$util.showToast({
|
||||
title: '请选择提货时间'
|
||||
title: this.$lang('payment.selectPickupTime')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -541,13 +541,13 @@ export default {
|
||||
if (this.orderCreateData.delivery.delivery_type == 'local') {
|
||||
if (!this.orderCreateData.delivery.store_id) {
|
||||
this.$util.showToast({
|
||||
title: '没有可配送的门店,请选择其他配送方式'
|
||||
title: this.$lang('payment.noDeliveryStore')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.calculateGoodsData.config.local.is_use && this.calculateGoodsData.delivery.local.info.time_is_open == 1 && !this.deliveryTime) {
|
||||
this.$util.showToast({
|
||||
title: '请选择送达时间'
|
||||
title: this.$lang('payment.selectDeliveryTime')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -837,25 +837,25 @@ export default {
|
||||
invoiceVerify() {
|
||||
if (!this.orderCreateData.invoice_title) {
|
||||
this.$util.showToast({
|
||||
title: '请填写发票抬头'
|
||||
title: this.$lang('payment.inputInvoiceTitle')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!this.orderCreateData.taxpayer_number && this.orderCreateData.invoice_title_type == 2) {
|
||||
this.$util.showToast({
|
||||
title: '请填写纳税人识别号'
|
||||
title: this.$lang('payment.inputTaxpayerNumber')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.orderCreateData.invoice_type == 1 && !this.orderCreateData.invoice_full_address && this.paymentData.is_virtual == 1) {
|
||||
this.$util.showToast({
|
||||
title: '请填写发票邮寄地址'
|
||||
title: this.$lang('payment.inputInvoiceAddress')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.orderCreateData.invoice_type == 2 && !this.orderCreateData.invoice_email) {
|
||||
this.$util.showToast({
|
||||
title: '请填写邮箱'
|
||||
title: this.$lang('payment.inputEmail')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -863,14 +863,14 @@ export default {
|
||||
var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
|
||||
if (!reg.test(this.orderCreateData.invoice_email)) {
|
||||
this.$util.showToast({
|
||||
title: '请填写正确的邮箱'
|
||||
title: this.$lang('payment.inputCorrectEmail')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!this.orderCreateData.invoice_content) {
|
||||
this.$util.showToast({
|
||||
title: '请选择发票内容'
|
||||
title: this.$lang('payment.selectInvoiceContent')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ export default {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到订单信息!'
|
||||
title: this.$lang('order.noOrderInfo')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
:src="$util.img('public/uniapp/order/order-icon-close.png')" />
|
||||
<view class="status-name">
|
||||
<view class="status-name">
|
||||
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' :
|
||||
orderData.order_status == -1 ? '已关闭' : '' }}
|
||||
{{ orderData.order_status == 0 ? $lang('order.waitPay') : orderData.order_status == 1 ? $lang('order.completed') :
|
||||
orderData.order_status == -1 ? $lang('order.closed') : '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
JSON.parse(this.orderData.delivery_store_info);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到订单信息!'
|
||||
title: this.$lang('order.noOrderInfo')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
@@ -221,8 +221,8 @@ export default {
|
||||
},
|
||||
orderClose() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定关闭此次兑换?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('point.confirmClose'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '关闭成功'
|
||||
title: this.$lang('point.closeSuccess')
|
||||
});
|
||||
this.getOrderData();
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ export default {
|
||||
this.pay();
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '商家已将支付金额调整为' + orderData.pay_money + '元,是否继续支付?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.payAmountAdjusted', { amount: orderData.pay_money }),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.pay();
|
||||
@@ -43,8 +43,8 @@ export default {
|
||||
*/
|
||||
orderClose(order_id, callback) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要关闭该订单吗?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.confirmCloseOrder'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
@@ -57,8 +57,7 @@ export default {
|
||||
typeof callback == 'function' && callback();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '当前订单可能存在拼团,维权等操作,' + res.message +
|
||||
'不可以关闭哦!',
|
||||
title: this.$lang('order.cannotCloseOrder', { message: res.message }),
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
@@ -77,8 +76,8 @@ export default {
|
||||
// 如果不在微信小程序中
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定已经收到货物了吗?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.confirmReceived'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
@@ -172,8 +171,8 @@ export default {
|
||||
// 如果不在微信小程序中
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要进行收货吗?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.confirmTakeDelivery'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
|
||||
@@ -7,8 +7,8 @@ export default {
|
||||
*/
|
||||
cancleRefund(order_goods_id, callback) {
|
||||
uni.showModal({
|
||||
content: '撤销之后本次申请将会关闭,如后续仍有问题可再次发起申请。',
|
||||
cancelText: '暂不撤销',
|
||||
content: this.$lang('order.cancelRefundConfirm'),
|
||||
cancelText: this.$lang('order.notCancelYet'),
|
||||
cancelColor: '#898989',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
|
||||
Reference in New Issue
Block a user