refactor: 完成多语言国际化全量替换与补充
1. 新增大量中英文语言包文件,覆盖自定义组件、页面、工具类的文案 2. 替换硬编码文本为多语言调用,统一全局文案管理 3. 优化语言包结构,拆分公共模块与业务模块 4. 修复部分语言加载与国际化适配问题
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
</view>
|
||||
<block v-if="g0>0">
|
||||
<view class="foot">
|
||||
<view @tap="generateImage" class="item" style="margin-right:30rpx;">{{ $lang('exportImage') }}</view>
|
||||
<view @tap="generatePdf" class="item">{{ $lang('exportPdf') }}</view>
|
||||
<view @tap="generateImage" class="item" style="margin-right:30rpx;">{{ $lang('seal.medium.detail.exportImage') }}</view>
|
||||
<view @tap="generatePdf" class="item">{{ $lang('seal.medium.detail.exportPdf') }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.title = this.$lang('title');
|
||||
this.title = this.$lang('seal.medium.detail.title');
|
||||
if (options.keyword) {
|
||||
this.keyword = options.keyword;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
methods: {
|
||||
generatePdf() {
|
||||
const url = this.$util.img(this.info.files_url);
|
||||
uni.showLoading({ title: this.$lang('loading') });
|
||||
uni.showLoading({ title: this.$lang('seal.medium.detail.loading') });
|
||||
try {
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
},
|
||||
complete: (res) => {
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({ title: this.$lang('fileNotExist'), icon: 'none' });
|
||||
uni.showToast({ title: this.$lang('seal.medium.detail.fileNotExist'), icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
},
|
||||
generateImage() {
|
||||
const url = this.$util.img(this.info.img_url);
|
||||
uni.showLoading({ title: this.$lang('loading') });
|
||||
uni.showLoading({ title: this.$lang('seal.medium.detail.loading') });
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
@@ -90,21 +90,21 @@ export default {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({ title: this.$lang('saveSuccess') });
|
||||
this.$util.showToast({ title: this.$lang('seal.medium.detail.saveSuccess') });
|
||||
},
|
||||
fail: (err) => {
|
||||
if (err.errMsg !== 'saveImageToPhotosAlbum:fail auth deny' && err.errMsg !== 'saveImageToPhotosAlbum:fail:auth denied') {
|
||||
this.$util.showToast({ title: this.$lang('saveFailed') });
|
||||
this.$util.showToast({ title: this.$lang('seal.medium.detail.saveFailed') });
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({ title: this.$lang('downloadFailed') });
|
||||
this.$util.showToast({ title: this.$lang('seal.medium.detail.downloadFailed') });
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
this.$util.showToast({ title: this.$lang('downloadFailed') });
|
||||
this.$util.showToast({ title: this.$lang('seal.medium.detail.downloadFailed') });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user