Skip to content

Commit d6181d5

Browse files
lucas-a-martinsLucas Martins
and
Lucas Martins
authored
Fix updateTemplatePermission when the UI is set to a language other than English (#9766)
* Fix updateTemplatePermission UI in non-english language * Improve fix --------- Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
1 parent c087de4 commit d6181d5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

ui/public/locales/pt_BR.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1482,8 +1482,8 @@
14821482
"label.setting": "Configura\u00e7\u00e3o",
14831483
"label.settings": "Configura\u00e7\u00f5es",
14841484
"label.setup": "Configura\u00e7\u00e3o",
1485-
"label.shared": "Compatilhado",
1486-
"label.sharedexecutable": "Compatilhado",
1485+
"label.shared": "Compartilhado",
1486+
"label.sharedexecutable": "Compartilhado",
14871487
"label.sharedmountpoint": "SharedMountPoint",
14881488
"label.sharedrouterip": "Endere\u00e7os IPv4 para o roteador dentro da rede compartilhada",
14891489
"label.sharedrouteripv6": "Endere\u00e7os IPv6 para o roteador dentro da rede compartilhada",

ui/src/views/image/UpdateTemplateIsoPermissions.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525
<p class="form__label">{{ $t('label.operation') }}</p>
2626
<a-select
2727
v-model:value="selectedOperation"
28-
:defaultValue="$t('label.add')"
28+
:defaultValue="'add'"
2929
@change="fetchData"
3030
v-focus="true"
3131
showSearch
3232
optionFilterProp="value"
3333
:filterOption="(input, option) => {
3434
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
3535
}" >
36-
<a-select-option :value="$t('label.add')">{{ $t('label.add') }}</a-select-option>
37-
<a-select-option :value="$t('label.remove')">{{ $t('label.remove') }}</a-select-option>
38-
<a-select-option :value="$t('label.reset')">{{ $t('label.reset') }}</a-select-option>
36+
<a-select-option :value="'add'">{{ $t('label.add') }}</a-select-option>
37+
<a-select-option :value="'remove'">{{ $t('label.remove') }}</a-select-option>
38+
<a-select-option :value="'reset'">{{ $t('label.reset') }}</a-select-option>
3939
</a-select>
4040
</div>
4141

42-
<template v-if="selectedOperation !== $t('label.reset')">
42+
<template v-if="selectedOperation !== 'reset'">
4343
<div class="form__item">
4444
<p class="form__label">
4545
<span class="required">*</span>
@@ -150,7 +150,7 @@ export default {
150150
selectedAccounts: [],
151151
selectedProjects: [],
152152
selectedAccountsList: '',
153-
selectedOperation: this.$t('label.add'),
153+
selectedOperation: 'add',
154154
selectedShareWith: this.$t('label.account'),
155155
accountError: false,
156156
projectError: false,
@@ -163,15 +163,15 @@ export default {
163163
accountsList () {
164164
return this.accounts.length > 0 ? this.accounts
165165
.filter(a =>
166-
this.selectedOperation === this.$t('label.add')
166+
this.selectedOperation === 'add'
167167
? !this.permittedAccounts.includes(a.name)
168168
: this.permittedAccounts.includes(a.name)
169169
) : this.accounts
170170
},
171171
projectsList () {
172172
return this.projects > 0 ? this.projects
173173
.filter(p =>
174-
this.selectedOperation === this.$t('label.add')
174+
this.selectedOperation === 'add'
175175
? !this.permittedProjects.includes(p.id)
176176
: this.permittedProjects.includes(p.id)
177177
) : this.projects
@@ -252,7 +252,7 @@ export default {
252252
})
253253
},
254254
handleChange (selectedItems) {
255-
if (this.selectedOperation === this.$t('label.add') || this.selectedOperation === this.$t('label.remove')) {
255+
if (this.selectedOperation === 'add' || this.selectedOperation === 'remove') {
256256
if (this.selectedShareWith === this.$t('label.account')) {
257257
this.selectedAccounts = selectedItems
258258
} else {

0 commit comments

Comments
 (0)