From bf8942a61c42b14c289fce11c6f858f8a25fb323 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 24 Feb 2022 16:28:42 +0530 Subject: [PATCH 1/2] refactor: i18n translations Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../nc-gui/components/ProjectTreeView.vue | 8 ++--- packages/nc-gui/components/auth/apiTokens.vue | 17 ++++++---- packages/nc-gui/components/auth/roles.vue | 5 +-- .../nc-gui/components/import/excelImport.vue | 33 ++++++++++++------- .../nc-gui/components/project/appStore.vue | 2 +- .../nc-gui/components/project/auditTab.vue | 14 ++++++-- .../components/project/auditTab/audit.vue | 15 ++++++--- .../spreadsheet/components/editColumn.vue | 16 +++++---- .../components/editVirtualColumn.vue | 2 +- .../nc-gui/components/templates/editor.vue | 10 +++--- packages/nc-gui/components/utils/language.vue | 5 ++- 11 files changed, 83 insertions(+), 44 deletions(-) diff --git a/packages/nc-gui/components/ProjectTreeView.vue b/packages/nc-gui/components/ProjectTreeView.vue index d207a8b22d..c4911cbbb5 100644 --- a/packages/nc-gui/components/ProjectTreeView.vue +++ b/packages/nc-gui/components/ProjectTreeView.vue @@ -943,7 +943,7 @@ export default { this.changeActiveTab(tabIndex); } else { console.log('add app store tab'); - let item = {name: 'App Store', key: `appStore`}; + let item = {name: `${this.$t('title.appStore')} `, key: `appStore`}; item._nodes = {env: '_noco'}; item._nodes.type = 'appStore'; this.$store.dispatch('tabs/ActAddTab', item); @@ -979,7 +979,7 @@ export default { this.changeActiveTab(tabIndex); } else { console.log('add roles tab'); - let item = {name: 'Team & Auth ', key: `roles`}; + let item = {name: `${this.$t('title.team&auth')} `, key: `roles`}; item._nodes = {env: '_noco'}; item._nodes.type = 'roles'; this.$store.dispatch('tabs/ActAddTab', item); @@ -991,7 +991,7 @@ export default { this.changeActiveTab(tabIndex); } else { console.log('add acl tab'); - let item = {name: 'Meta Management', key: `disableOrEnableModel`}; + let item = {name: `${this.$t('title.metaMgmt')}`, key: `disableOrEnableModel`}; item._nodes = {env: '_noco'}; item._nodes.type = 'disableOrEnableModel'; this.$store.dispatch('tabs/ActAddTab', item); @@ -1002,7 +1002,7 @@ export default { this.changeActiveTab(tabIndex); } else { console.log('add audit tab'); - let item = {name: 'Audit', key: `migrationsDir`}; + let item = {name: `${this.$t('title.audit')}`, key: `migrationsDir`}; item._nodes = { env: '_noco', dbAlias: 'db' diff --git a/packages/nc-gui/components/auth/apiTokens.vue b/packages/nc-gui/components/auth/apiTokens.vue index 2dc1145fc6..acd04123da 100644 --- a/packages/nc-gui/components/auth/apiTokens.vue +++ b/packages/nc-gui/components/auth/apiTokens.vue @@ -32,7 +32,8 @@ mdi-plus - New Token + + {{ $t('activity.newToken') }} @@ -41,13 +42,16 @@ - Description + + {{ $t('labels.description') }} - Token + + {{ $t('labels.token') }} - Actions + + {{ $t('labels.action') }} @@ -90,7 +94,8 @@ mdi-plus - Add New Token + + {{ $t('activity.newToken') }} @@ -110,7 +115,7 @@ v-model="tokenObj.description" filled dense - label="Description" + :label="$t('labels.description')" /> diff --git a/packages/nc-gui/components/auth/roles.vue b/packages/nc-gui/components/auth/roles.vue index 21f49214b9..c2c7ed2394 100644 --- a/packages/nc-gui/components/auth/roles.vue +++ b/packages/nc-gui/components/auth/roles.vue @@ -36,7 +36,7 @@ refresh - {{ $t('general.reload')}} + {{ $t('general.reload') }} mdi-plus - New Role + + {{ $t('activity.newRole') }}

- Select File to Upload + + {{ $t('msg.info.upload') }}

- or drag and drop file + + {{ $t('msg.info.upload_sub') }}

- Supported: .xls, .xlsx, .xlsm, .ods, .ots + + {{ $t('msg.info.excelSupport') }}

@@ -52,18 +55,20 @@
+ - Load + + {{ $t('general.load') }}
@@ -75,20 +80,21 @@
- {{ showMore ? 'Hide' : 'Show' }} more + + {{ showMore ? $t('general.hideAll') : $t('general.showMore') }} mdi-menu-{{ showMore ? 'up' : 'down' }}

- + @@ -118,7 +124,8 @@ mdi-file-excel-outline - Import + + {{ $t('activity.import') }} Create template from Excel @@ -128,8 +135,9 @@ diff --git a/packages/nc-gui/components/project/appStore.vue b/packages/nc-gui/components/project/appStore.vue index e79d0a814f..ed9e70492e 100644 --- a/packages/nc-gui/components/project/appStore.vue +++ b/packages/nc-gui/components/project/appStore.vue @@ -133,7 +133,7 @@ v-model="query" dense hide-details - placeholder="Search apps" + :placeholder="$t('placeholder.searchApps')" color="primary" class="search-field caption" > diff --git a/packages/nc-gui/components/project/auditTab.vue b/packages/nc-gui/components/project/auditTab.vue index 72c30cc72f..0f60d7b0ee 100644 --- a/packages/nc-gui/components/project/auditTab.vue +++ b/packages/nc-gui/components/project/auditTab.vue @@ -1,11 +1,21 @@