diff --git a/ui/src/components/header/HeaderNotice.vue b/ui/src/components/header/HeaderNotice.vue index ab9247e4202..03a5acd2017 100644 --- a/ui/src/components/header/HeaderNotice.vue +++ b/ui/src/components/header/HeaderNotice.vue @@ -110,7 +110,7 @@ export default { }) } }).catch(function (e) { - console.log('Error encountered while fetching async job result' + e) + console.log(this.$t('error.fetching.async.job.result') + e) }) } } diff --git a/ui/src/components/view/DedicateData.vue b/ui/src/components/view/DedicateData.vue index 5c9bea3567b..af50eac2b41 100644 --- a/ui/src/components/view/DedicateData.vue +++ b/ui/src/components/view/DedicateData.vue @@ -20,7 +20,7 @@
{{ $t('label.dedicated') }} -
Yes
+
{{ $t('label.yes') }}

{{ $t('label.domainid') }}
@@ -38,7 +38,7 @@

{{ $t('label.dedicated') }} -
No
+
{{ $t('label.no') }}
{{ dedicatedButtonLabel }} @@ -71,9 +71,9 @@ export default { return { modalActive: false, dedicateButtonAvailable: true, - dedicatedButtonLabel: 'Dedicate', - releaseButtonLabel: 'Release', - dedicatedModalLabel: 'Dedicate', + dedicatedButtonLabel: this.$t('label.dedicate'), + releaseButtonLabel: this.$t('label.release'), + dedicatedModalLabel: this.$t('label.dedicate'), dedicatedDomainId: null, dedicatedAccountId: null } @@ -185,12 +185,12 @@ export default { status: 'progress' }) }, - errorMessage: 'Failed to release dedicated zone', + errorMessage: this.$t('error.release.dedicate.zone'), errorMethod: () => { this.parentFetchData() }, loadingMessage: this.$t('message.releasing.dedicated.zone'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() } @@ -215,12 +215,12 @@ export default { status: 'progress' }) }, - errorMessage: 'Failed to release dedicated pod', + errorMessage: this.$t('error.release.dedicate.pod'), errorMethod: () => { this.parentFetchData() }, loadingMessage: this.$t('message.releasing.dedicated.pod'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() } @@ -245,12 +245,12 @@ export default { status: 'progress' }) }, - errorMessage: 'Failed to release dedicated cluster', + errorMessage: this.$t('error.release.dedicate.cluster'), errorMethod: () => { this.parentFetchData() }, loadingMessage: this.$t('message.releasing.dedicated.cluster'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() } @@ -275,12 +275,12 @@ export default { status: 'progress' }) }, - errorMessage: 'Failed to release dedicated host', + errorMessage: this.$t('error.release.dedicate.host'), errorMethod: () => { this.parentFetchData() }, loadingMessage: this.$t('message.releasing.dedicated.host'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() } diff --git a/ui/src/components/view/DedicateDomain.vue b/ui/src/components/view/DedicateDomain.vue index 01d730647b2..555a55e14b8 100644 --- a/ui/src/components/view/DedicateDomain.vue +++ b/ui/src/components/view/DedicateDomain.vue @@ -29,7 +29,7 @@
-

Account

+

{{ $t('label.account') }}

{{ account.name }} diff --git a/ui/src/components/view/DedicateModal.vue b/ui/src/components/view/DedicateModal.vue index a518520d8d0..9cabd23595b 100644 --- a/ui/src/components/view/DedicateModal.vue +++ b/ui/src/components/view/DedicateModal.vue @@ -99,18 +99,18 @@ export default { this.$store.dispatch('AddAsyncJob', { title: this.$t('label.zone.dedicated'), jobid: response.dedicatezoneresponse.jobid, - description: `Domain ID: ${this.dedicatedDomainId}`, + description: `${this.$t('label.domain.id')} : ${this.dedicatedDomainId}`, status: 'progress' }) }, - errorMessage: 'Failed to dedicate zone', + errorMessage: this.$t('error.dedicate.zone.failed'), errorMethod: () => { this.parentFetchData() this.fetchParentData() this.dedicatedDomainModal = false }, loadingMessage: this.$t('message.dedicating.zone'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() this.fetchParentData() @@ -143,18 +143,18 @@ export default { this.$store.dispatch('AddAsyncJob', { title: this.$t('label.pod.dedicated'), jobid: response.dedicatepodresponse.jobid, - description: `Domain ID: ${this.dedicatedDomainId}`, + description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`, status: 'progress' }) }, - errorMessage: 'Failed to dedicate pod', + errorMessage: this.$t('error.dedicate.pod.failed'), errorMethod: () => { this.parentFetchData() this.fetchParentData() this.dedicatedDomainModal = false }, loadingMessage: this.$t('message.dedicating.pod'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() this.fetchParentData() @@ -187,18 +187,18 @@ export default { this.$store.dispatch('AddAsyncJob', { title: this.$t('message.cluster.dedicated'), jobid: response.dedicateclusterresponse.jobid, - description: `Domain ID: ${this.dedicatedDomainId}`, + description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`, status: 'progress' }) }, - errorMessage: 'Failed to dedicate cluster', + errorMessage: this.$t('error.dedicate.cluster.failed'), errorMethod: () => { this.parentFetchData() this.fetchParentData() this.dedicatedDomainModal = false }, loadingMessage: this.$t('message.dedicating.cluster'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() this.fetchParentData() @@ -231,18 +231,18 @@ export default { this.$store.dispatch('AddAsyncJob', { title: this.$t('message.host.dedicated'), jobid: response.dedicatehostresponse.jobid, - description: `Domain ID: ${this.dedicatedDomainId}`, + description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`, status: 'progress' }) }, - errorMessage: 'Failed to dedicate host', + errorMessage: this.$t('error.dedicate.host.failed'), errorMethod: () => { this.parentFetchData() this.fetchParentData() this.dedicatedDomainModal = false }, loadingMessage: this.$t('message.dedicating.host'), - catchMessage: 'Error encountered while fetching async job result', + catchMessage: this.$t('error.fetching.async.job.result'), catchMethod: () => { this.parentFetchData() this.fetchParentData() diff --git a/ui/src/components/view/DetailSettings.vue b/ui/src/components/view/DetailSettings.vue index 641f25f5551..2866d138bfe 100644 --- a/ui/src/components/view/DetailSettings.vue +++ b/ui/src/components/view/DetailSettings.vue @@ -85,10 +85,10 @@
@@ -185,8 +185,8 @@ export default { } if (!(apiName in this.$store.getters.apis)) { this.$notification.error({ - message: 'Failed to execute API: ' + apiName, - description: 'User is not permitted to use the API' + message: this.$t('error.execute.api.failed') + ' ' + apiName, + description: this.$t('message.user.not.permitted.api') }) return } @@ -221,7 +221,7 @@ export default { }, addDetail () { if (this.newKey === '' || this.newValue === '') { - this.error = 'Must provide a valid key and value for setting' + this.error = this.$t('message.error.provide.setting') return } this.error = false diff --git a/ui/src/components/view/DetailsTab.vue b/ui/src/components/view/DetailsTab.vue index cfa340fd665..f07411859c2 100644 --- a/ui/src/components/view/DetailsTab.vue +++ b/ui/src/components/view/DetailsTab.vue @@ -33,6 +33,10 @@ {{ volume.type }} - {{ volume.path }} ({{ parseFloat(volume.size / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB)
+
+ {{ $t(resource[item].toLowerCase()) }} + {{ resource[item] }} +
{{ resource[item] }}
diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 4cad5c813f4..adf936f90e1 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -29,10 +29,13 @@ -

- {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }} -

- +
{{ $t(resource.name.toLowerCase()) }}
+
+

+ {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }} +

+ +
@@ -41,7 +44,10 @@ {{ resource.instancename }} - {{ resource.type }} + {{ $t(resource.type.toLowerCase()) }} + + {{ resource.type }} + {{ $t('label.issourcenat') }} @@ -94,7 +100,7 @@
{{ resource.id }} @@ -146,7 +152,7 @@
{{ $t('label.memory') }}
- {{ resource.memory }} MB Memory + {{ resource.memory + ' ' + $t('label.mb.memory') }}
@@ -163,7 +169,7 @@
{{ $t('label.memory') }}
- {{ resource.memorytotalgb }} Memory + {{ resource.memorytotalgb + ' ' + $t('label.memory') }}
@@ -191,7 +197,7 @@
- {{ resource.memorytotal }} Memory + {{ resource.memorytotal + ' ' + $t('label.memory') }}
{{ resource.sizegb || (resource.size/1024.0) }}
- Read {{ toSize(resource.diskkbsread) }} - Write {{ toSize(resource.diskkbswrite) }}
- Read (IO) {{ resource.diskioread }} - Write (IO) {{ resource.diskiowrite }} + {{ $t('label.read') + ' ' + toSize(resource.diskkbsread) }} + {{ $t('label.write') + ' ' + toSize(resource.diskkbswrite) }}
+ {{ $t('label.read.io') + ' ' + resource.diskioread }} + {{ $t('label.writeio') + ' ' + resource.diskiowrite }}
@@ -259,8 +265,8 @@
- RX {{ toSize(resource.networkkbsread) }} - TX {{ toSize(resource.networkkbswrite) }} + RX {{ toSize(resource.networkkbsread) }} + TX {{ toSize(resource.networkkbswrite) }}
{{ resource.nic.length }} NIC(s)
- View {{ $t(item.title) }} + {{ $t('label.view') + ' ' + $t(item.title) }}
@@ -513,9 +519,9 @@ {{ $t('label.apikey') }} - + @@ -530,9 +536,9 @@ {{ $t('label.secretkey') }} - + diff --git a/ui/src/components/view/ListResourceTable.vue b/ui/src/components/view/ListResourceTable.vue index a582c9c1b22..7ac54d8755d 100644 --- a/ui/src/components/view/ListResourceTable.vue +++ b/ui/src/components/view/ListResourceTable.vue @@ -56,8 +56,8 @@ :current="options.page" :pageSize="options.pageSize" :total="total" - :showTotal="total => `Total ${total} ${$t('label.items')}`" - :pageSizeOptions="['10', '20', '40']" + :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`" + :pageSizeOptions="device === 'desktop' ? ['20', '50', '100', '500'] : ['10', '20', '50', '100', '500']" @change="handleTableChange" @showSizeChange="handlePageSizeChange" showSizeChanger> @@ -72,6 +72,7 @@