i18n: replace hardcoded strings with language translations

批量将项目中多处硬编码的文本替换为多语言翻译条目,统一项目文案管理,提升多语言适配效率,包括导航提示、操作反馈、空状态提示、表单占位符等各类文本内容。
This commit is contained in:
2026-06-22 17:59:25 +08:00
parent 4715f06b2f
commit b30ba914b9
59 changed files with 212 additions and 213 deletions

View File

@@ -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>

View File

@@ -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;
}