From 9d0bdd5f695dff9b0b743a7d090dacb9a0922170 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 8 May 2020 19:54:32 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9i18n=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ActionsGroup/index.vue | 4 +- src/components/ActiveCard/index.vue | 4 +- src/components/AutoDataForm/index.vue | 2 + src/components/AutoDataTable/index.vue | 6 +- src/components/DataForm/index.vue | 4 +- src/components/DetailCard/index.vue | 2 +- src/components/Dialog/index.vue | 4 +- src/components/DialogAction/index.vue | 18 +- src/components/ListTable/TableAction.vue | 4 +- .../ListTable/formatters/ActionsFormatter.vue | 2 +- src/components/QuickActions/index.vue | 2 +- src/components/RelationCard/index.vue | 2 +- src/i18n/i18n.js | 12 +- src/i18n/langs/cn.js | 198 +++++++++--------- src/i18n/langs/en.js | 2 +- .../GenericCreateUpdateForm/index.vue | 2 +- .../components/GenericDetailPage/index.vue | 6 +- .../components/NavHeader/AccountDropdown.vue | 8 +- src/layout/components/NavHeader/index.vue | 8 +- .../SystemUser/SystemUserCreateUpdate.vue | 2 +- .../SystemUserDetail/AutoPushCard.vue | 4 +- .../users/groups/UserGroupDetail/index.vue | 2 +- src/views/users/users/UserDetail/UserInfo.vue | 44 ++-- src/views/users/users/UserDetail/index.vue | 4 +- 24 files changed, 165 insertions(+), 181 deletions(-) diff --git a/src/components/ActionsGroup/index.vue b/src/components/ActionsGroup/index.vue index 26a7ac94f..d89389df0 100644 --- a/src/components/ActionsGroup/index.vue +++ b/src/components/ActionsGroup/index.vue @@ -41,7 +41,7 @@ export default { moreActionsTitle: { type: String, default() { - return this.$tco('More actions') + return this.$ttc('moreActions') } } }, @@ -66,7 +66,7 @@ export default { return actions }, iMoreActionsTitle() { - return this.moreActionsTitle || this.$tco('More actions') + return this.moreActionsTitle || this.$ttc('moreActions') } }, mounted() { diff --git a/src/components/ActiveCard/index.vue b/src/components/ActiveCard/index.vue index 1f7c7613d..78b37dcda 100644 --- a/src/components/ActiveCard/index.vue +++ b/src/components/ActiveCard/index.vue @@ -49,9 +49,9 @@ export default { HandleChangeAction(index, row) { this.$axios.patch(this.url, { is_active: row.is_active } ).then(res => { - this.$message.success(this.$tco('Update success')) + this.$message.success(this.$ttc('updateSuccessMsg')) }).catch(err => { - this.$message.error(this.$tco('Update failed' + ' ' + err)) + this.$message.error(this.$ttc('updateFailedMsg' + ' ' + err)) }) } } diff --git a/src/components/AutoDataForm/index.vue b/src/components/AutoDataForm/index.vue index 2b5a49663..b3b2d306b 100644 --- a/src/components/AutoDataForm/index.vue +++ b/src/components/AutoDataForm/index.vue @@ -52,6 +52,8 @@ export default { optionUrlMeta(this.url).then(data => { this.meta = data.actions[this.method.toUpperCase()] || {} this.generateColumns() + }).catch(err => { + console.log(err) }).finally(() => { this.loading = false }) diff --git a/src/components/AutoDataTable/index.vue b/src/components/AutoDataTable/index.vue index f356cd7cd..93a7ec3d8 100644 --- a/src/components/AutoDataTable/index.vue +++ b/src/components/AutoDataTable/index.vue @@ -35,7 +35,7 @@ export default { this.meta = data.actions[this.method.toUpperCase()] || {} this.generateColumns() }).catch(() => { - this.totalConfig = this.config + // this.totalConfig = this.config }).finally(() => { this.loading = false }) @@ -50,7 +50,7 @@ export default { case 'actions': col = { prop: 'id', - label: this.$tco('Actions'), + label: this.$ttc('actions'), align: 'center', formatter: ActionsFormatter, width: '150px', @@ -58,7 +58,7 @@ export default { } break case 'is_valid': - col.label = this.$tco('Validity') + col.label = this.$ttc('validity') col.formatter = BooleanFormatter col.align = 'center' col.width = '80px' diff --git a/src/components/DataForm/index.vue b/src/components/DataForm/index.vue index df44861af..5e2effe33 100644 --- a/src/components/DataForm/index.vue +++ b/src/components/DataForm/index.vue @@ -14,8 +14,8 @@ {{ button.title }} - {{ $tco('Reset') }} - {{ $tco('Submit') }} + {{ $ttc('reset') }} + {{ $ttc('submit') }} diff --git a/src/components/DetailCard/index.vue b/src/components/DetailCard/index.vue index 6e41a29c5..2e6759418 100644 --- a/src/components/DetailCard/index.vue +++ b/src/components/DetailCard/index.vue @@ -22,7 +22,7 @@ export default { title: { type: String, default() { - return this.$tco('basicInfoTitle') + return this.$ttc('basicInfo') } }, items: { diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue index 380298e4e..023dc4de5 100644 --- a/src/components/Dialog/index.vue +++ b/src/components/Dialog/index.vue @@ -7,8 +7,8 @@ diff --git a/src/components/DialogAction/index.vue b/src/components/DialogAction/index.vue index 0532655ca..942af61f5 100644 --- a/src/components/DialogAction/index.vue +++ b/src/components/DialogAction/index.vue @@ -1,6 +1,6 @@