refactor: 将项目内硬编码文本替换为多语言调用
统一替换所有页面和组件中的硬编码字符串为 $lang 多语言方法调用,提升项目国际化适配能力
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
<view class="oper-wrapper" :style="{ display: sD, top: tp }">
|
||||
<view class="oper">
|
||||
<view class="btn-wrapper" v-if="sO">
|
||||
<view @click="fClose" class="cancel" :style="{ width: bW }"><text>取消</text></view>
|
||||
<view @click="fClose" class="cancel" :style="{ width: bW }"><text>{{ $lang('common.cancel') }}</text></view>
|
||||
<view @click="fSelect" :style="{ width: bW }"><text class="iconfont icon-shangchuan"></text></view>
|
||||
<view @click="fRotate" :style="{ width: bW, display: bD }"><text class="iconfont icon-xuanzhuan"></text></view>
|
||||
<!-- <view @click="fPreview" hover-class="hover" :style="{width: bW}"><text>预览</text></view> -->
|
||||
<view @click="fUpload" :style="{ width: bW }"><text class="upload">上传</text></view>
|
||||
<view @click="fUpload" :style="{ width: bW }"><text class="upload">{{ $lang('common.upload') }}</text></view>
|
||||
</view>
|
||||
<view class="clr-wrapper" v-else>
|
||||
<slider
|
||||
@@ -35,7 +35,7 @@
|
||||
block-color="grey"
|
||||
show-value
|
||||
></slider>
|
||||
<view @click="fPrvUpload" hover-class="hover" :style="{ width: bW }"><text>上传</text></view>
|
||||
<view @click="fPrvUpload" hover-class="hover" :style="{ width: bW }"><text>{{ $lang('common.upload') }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
title: this.$lang('common.loading'),
|
||||
mask: true
|
||||
});
|
||||
// #endif
|
||||
@@ -232,9 +232,9 @@ export default {
|
||||
style.left = ((this.wW - sW) | 0) / 2 + 'px';
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '裁剪框的宽或高没有设置',
|
||||
showCancel: false
|
||||
});
|
||||
title: this.$lang('imgCropping.cropBoxSizeNotSet'),
|
||||
showCancel: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.sS = style;
|
||||
@@ -252,7 +252,7 @@ export default {
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '请选择正确图片'
|
||||
title: this.$lang('imgCropping.selectCorrectImage')
|
||||
});
|
||||
},
|
||||
complete() {
|
||||
@@ -282,9 +282,9 @@ export default {
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
});
|
||||
title: this.$lang('common.loading'),
|
||||
mask: true
|
||||
});
|
||||
// #endif
|
||||
|
||||
this.sD = 'none';
|
||||
@@ -439,9 +439,9 @@ export default {
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
});
|
||||
title: this.$lang('common.loading'),
|
||||
mask: true
|
||||
});
|
||||
// #endif
|
||||
|
||||
this.sD = 'none';
|
||||
@@ -750,9 +750,9 @@ export default {
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
});
|
||||
title: this.$lang('common.loading'),
|
||||
mask: true
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
@@ -1152,9 +1152,9 @@ export default {
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
});
|
||||
title: this.$lang('common.loading'),
|
||||
mask: true
|
||||
});
|
||||
// #endif
|
||||
|
||||
if (!this.prvImgData) {
|
||||
|
||||
Reference in New Issue
Block a user