i18n: replace hardcoded strings with language translations
批量将项目中多处硬编码的文本替换为多语言翻译条目,统一项目文案管理,提升多语言适配效率,包括导航提示、操作反馈、空状态提示、表单占位符等各类文本内容。
This commit is contained in:
@@ -224,7 +224,7 @@
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
title: this.$lang('member.withdrawApplySuccess')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal', {},
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
bindDateChange: function (e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.date = tempArr[0] + this.$lang('common.year') + tempArr[1] + this.$lang('common.month');
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
success: res => {
|
||||
let balanceType = Object.assign(res.balance, res.balance_money),
|
||||
typeArr = [{
|
||||
label: '全部',
|
||||
label: this.$lang('common.all'),
|
||||
value: '0'
|
||||
}];
|
||||
for (var index in balanceType) {
|
||||
|
||||
@@ -208,19 +208,19 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.mpShareData?.appMessage || {
|
||||
title: '专属会员权益,快来体验',
|
||||
title: this.$lang('member.memberRightsTip'),
|
||||
path: '/pages_tool/member/card'
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
return this.mpShareData?.timeLine || {
|
||||
title: '专属会员权益,快来体验',
|
||||
title: this.$lang('member.memberRightsTip'),
|
||||
query: '/pages_tool/member/card'
|
||||
};
|
||||
},
|
||||
onAddToFavorites() {
|
||||
return {
|
||||
title: '专属会员权益,快来体验',
|
||||
title: this.$lang('member.memberRightsTip'),
|
||||
path: '/pages_tool/member/card'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
title: this.$lang('member.goingToDetail'),
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '头像上传失败'
|
||||
title: this.$lang('member.uploadAvatarFailed')
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
this.memberInfo.headimg = this.imgurl;
|
||||
this.$store.commit('setMemberInfo', this.memberInfo);
|
||||
this.$util.showToast({
|
||||
title: '头像修改成功'
|
||||
title: this.$lang('member.avatarModifySuccess')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {}, 'redirectTo');
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
bindDateChange: function(e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.date = tempArr[0] + this.$lang('common.year') + tempArr[1] + this.$lang('common.month');
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: "删除成功"
|
||||
title: this.$lang('collection.deleteSuccess')
|
||||
})
|
||||
let array = this.collectionList;
|
||||
let newArray = array.filter((v) => {
|
||||
|
||||
@@ -98,12 +98,12 @@ export default {
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存成功"
|
||||
title: this.$lang('member.saveSuccess')
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存失败,请稍后重试"
|
||||
title: this.$lang('member.saveFailed')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.membersignin) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启会员签到',
|
||||
title: this.$lang('member.merchantNotOpenSignin'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -198,7 +198,7 @@ export default {
|
||||
sign() {
|
||||
if (this.signState == 0) {
|
||||
this.$util.showToast({
|
||||
title: '签到未开启'
|
||||
title: this.$lang('member.signinNotEnabled')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ export default {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/member/signin';
|
||||
|
||||
this.$util.setPublicShare({
|
||||
title: '签到有礼',
|
||||
desc: '天天签到,积分好礼送不停',
|
||||
title: this.$lang('member.signinGift'),
|
||||
desc: this.$lang('member.signinGiftDesc'),
|
||||
link: shareUrl,
|
||||
imgUrl: ''
|
||||
},
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
onShareAppMessage() {
|
||||
var path = '/pages_tool/member/signin';
|
||||
return {
|
||||
title: '签到有礼,天天签到,积分好礼送不停',
|
||||
title: this.$lang('member.signinGift') + ',' + this.$lang('member.signinGiftDesc'),
|
||||
imageUrl: '',
|
||||
path: path,
|
||||
success: res => {},
|
||||
|
||||
Reference in New Issue
Block a user