This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new d4a5459a830 UI: Fix missing locale strings for Status widget (#8792)
d4a5459a830 is described below
commit d4a5459a8300a37712bb0bd60b21bb1baf52ea91
Author: Vishesh <[email protected]>
AuthorDate: Fri Apr 19 15:01:51 2024 +0530
UI: Fix missing locale strings for Status widget (#8792)
---
ui/src/components/widgets/Status.vue | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/ui/src/components/widgets/Status.vue
b/ui/src/components/widgets/Status.vue
index 62438820314..73b1a9af930 100644
--- a/ui/src/components/widgets/Status.vue
+++ b/ui/src/components/widgets/Status.vue
@@ -166,23 +166,24 @@ export default {
if (!(state && this.displayText)) {
return ''
}
+ let result
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 (this.$route.path === '/volume' ||
this.$route.path.includes('/volume/')) {
- 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())
+
+ 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)
}
- // Nothing for snapshots, vpcs, gateways, vnpnconn, vpnuser, kubectl,
event, project, account, infra. They're all self explanatory
- return this.$t(state)
+ return result
},
getStyle () {
let styles = { display: 'inline-flex' }