Skip to content

Commit 4c801e2

Browse files
lucas-a-martinsLucas Martins
andauthored
Fix Create dropdown menu not changing language (apache#10023)
Co-authored-by: Lucas Martins <[email protected]>
1 parent 0eb94a1 commit 4c801e2

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

ui/public/locales/pt_BR.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@
422422
"label.cputotalghz": "Total",
423423
"label.cpuused": "CPU utilizada",
424424
"label.cpuusedghz": "CPU utilizada",
425+
"label.create": "Criar",
426+
"label.create.instance": "Criar nova instância",
425427
"label.create.account": "Criar conta",
426428
"label.create.backup": "Iniciar backup",
427429
"label.create.network": "Criar nova rede",
@@ -1756,6 +1758,7 @@
17561758
"label.vmwaredcname": "Nome do datacenter VMware",
17571759
"label.vmwaredcvcenter": "Vcednter do datacenter VMware",
17581760
"label.vmwarenetworklabel": "Etiqueta de tr\u00e1fego VMware",
1761+
"label.vnf.appliance.add": "Adicionar VNF Appliance",
17591762
"label.vnmc": "VNMC",
17601763
"label.volgroup": "Grupo de volume",
17611764
"label.volume": "Disco",

ui/src/components/header/CreateMenu.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
</a-col>
3333
<a-col>
3434
<h3 style="margin-bottom: 0px;">
35-
{{ menuItem.title }}
35+
{{ $t(menuItem.title) }}
3636
</h3>
37-
<small>{{ menuItem.subtitle }}</small>
37+
<small>{{ $t(menuItem.subtitle) }}</small>
3838
</a-col>
3939
</a-row>
4040
</router-link>
@@ -56,50 +56,50 @@ export default {
5656
const menuItems = [
5757
{
5858
api: 'deployVirtualMachine',
59-
title: this.$t('label.instance'),
60-
subtitle: this.$t('label.create.instance'),
59+
title: 'label.instance',
60+
subtitle: 'label.create.instance',
6161
icon: 'cloud-server-outlined',
6262
route: { path: '/action/deployVirtualMachine' }
6363
},
6464
{
6565
api: 'createKubernetesCluster',
66-
title: this.$t('label.kubernetes'),
67-
subtitle: this.$t('label.kubernetes.cluster.create'),
66+
title: 'label.kubernetes',
67+
subtitle: 'label.kubernetes.cluster.create',
6868
icon: ['fa-solid', 'fa-dharmachakra'],
6969
route: { path: '/kubernetes', query: { action: 'createKubernetesCluster' } }
7070
},
7171
{
7272
api: 'createVolume',
73-
title: this.$t('label.volume'),
74-
subtitle: this.$t('label.action.create.volume'),
73+
title: 'label.volume',
74+
subtitle: 'label.action.create.volume',
7575
icon: 'hdd-outlined',
7676
route: { path: '/volume', query: { action: 'createVolume' } }
7777
},
7878
{
7979
api: 'createNetwork',
80-
title: this.$t('label.network'),
81-
subtitle: this.$t('label.add.network'),
80+
title: 'label.network',
81+
subtitle: 'label.add.network',
8282
icon: 'apartment-outlined',
8383
route: { path: '/guestnetwork', query: { action: 'createNetwork' } }
8484
},
8585
{
8686
api: 'createVPC',
87-
title: this.$t('label.vpc'),
88-
subtitle: this.$t('label.add.vpc'),
87+
title: 'label.vpc',
88+
subtitle: 'label.add.vpc',
8989
icon: 'deployment-unit-outlined',
9090
route: { path: '/vpc', query: { action: 'createVPC' } }
9191
},
9292
{
9393
api: 'registerTemplate',
94-
title: this.$t('label.templatename'),
95-
subtitle: this.$t('label.action.register.template'),
94+
title: 'label.templatename',
95+
subtitle: 'label.action.register.template',
9696
icon: 'picture-outlined',
9797
route: { path: '/template', query: { action: 'registerTemplate' } }
9898
},
9999
{
100100
api: 'deployVnfAppliance',
101-
title: this.$t('label.vnf.appliance'),
102-
subtitle: this.$t('label.vnf.appliance.add'),
101+
title: 'label.vnf.appliance',
102+
subtitle: 'label.vnf.appliance.add',
103103
icon: 'gateway-outlined',
104104
route: { path: '/action/deployVnfAppliance' }
105105
}

0 commit comments

Comments
 (0)