mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI: Fix missing locale strings for Status widget (#8792)
This commit is contained in:
parent
5f8450f28f
commit
d4a5459a83
@ -166,23 +166,24 @@ export default {
|
|||||||
if (!(state && this.displayText)) {
|
if (!(state && this.displayText)) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
let result
|
||||||
if (this.$route.path === '/vmsnapshot' || this.$route.path.includes('/vmsnapshot/')) {
|
if (this.$route.path === '/vmsnapshot' || this.$route.path.includes('/vmsnapshot/')) {
|
||||||
return this.$t('message.vmsnapshot.state.' + state.toLowerCase())
|
result = this.$t('message.vmsnapshot.state.' + state.toLowerCase())
|
||||||
|
} else if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) {
|
||||||
|
result = this.$t('message.vm.state.' + state.toLowerCase())
|
||||||
|
} else if (this.$route.path === '/volume' || this.$route.path.includes('/volume/')) {
|
||||||
|
result = this.$t('message.volume.state.' + state.toLowerCase())
|
||||||
|
} else if (this.$route.path === '/guestnetwork' || this.$route.path.includes('/guestnetwork/')) {
|
||||||
|
result = this.$t('message.guestnetwork.state.' + state.toLowerCase())
|
||||||
|
} else if (this.$route.path === '/publicip' || this.$route.path.includes('/publicip/')) {
|
||||||
|
result = this.$t('message.publicip.state.' + state.toLowerCase())
|
||||||
}
|
}
|
||||||
if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) {
|
|
||||||
return this.$t('message.vm.state.' + state.toLowerCase())
|
if (!result || (result.startsWith('message.') && result.endsWith('.state.' + state.toLowerCase()))) {
|
||||||
|
// Nothing for snapshots, vpcs, gateways, vnpnconn, vpnuser, kubectl, event, project, account, infra. They're all self explanatory
|
||||||
|
result = this.$t(state)
|
||||||
}
|
}
|
||||||
if (this.$route.path === '/volume' || this.$route.path.includes('/volume/')) {
|
return result
|
||||||
return this.$t('message.volume.state.' + state.toLowerCase())
|
|
||||||
}
|
|
||||||
if (this.$route.path === '/guestnetwork' || this.$route.path.includes('/guestnetwork/')) {
|
|
||||||
return this.$t('message.guestnetwork.state.' + state.toLowerCase())
|
|
||||||
}
|
|
||||||
if (this.$route.path === '/publicip' || this.$route.path.includes('/publicip/')) {
|
|
||||||
return this.$t('message.publicip.state.' + state.toLowerCase())
|
|
||||||
}
|
|
||||||
// Nothing for snapshots, vpcs, gateways, vnpnconn, vpnuser, kubectl, event, project, account, infra. They're all self explanatory
|
|
||||||
return this.$t(state)
|
|
||||||
},
|
},
|
||||||
getStyle () {
|
getStyle () {
|
||||||
let styles = { display: 'inline-flex' }
|
let styles = { display: 'inline-flex' }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user