This is an automated email from the ASF dual-hosted git repository.
nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new bc1498d ui: Fix column names translation issue (#6025)
bc1498d is described below
commit bc1498de40c501324ddcd74f13cf1216a6c55864
Author: Pearl Dsilva <[email protected]>
AuthorDate: Wed Feb 23 07:35:09 2022 +0530
ui: Fix column names translation issue (#6025)
* ui: Fix column names translation issue
* update labels
---
ui/public/locales/en.json | 6 +++---
ui/src/components/view/AnnotationsTab.vue | 6 +++---
ui/src/components/view/SearchView.vue | 2 +-
ui/src/views/AutogenView.vue | 14 +-------------
4 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index c3ee434..47240cd 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -444,9 +444,9 @@
"label.annotated.by": "Annotator",
"label.annotation": "Comment",
"label.annotations": "Comments",
-"label.annotation.admins.only": "Only visible to Administrators",
-"label.annotation.entity": "Entity",
-"label.annotation.entity.type": "Entity Type",
+"label.adminsonly": "Only visible to Administrators",
+"label.entityid": "Entity",
+"label.entitytype": "Entity Type",
"label.annotation.everyone": "Visible to everyone",
"label.anti.affinity": "Anti-affinity",
"label.anti.affinity.group": "Anti-affinity Group",
diff --git a/ui/src/components/view/AnnotationsTab.vue
b/ui/src/components/view/AnnotationsTab.vue
index 5223c40..ad7380e 100644
--- a/ui/src/components/view/AnnotationsTab.vue
+++ b/ui/src/components/view/AnnotationsTab.vue
@@ -39,7 +39,7 @@
slot="avatar"
icon="message" />
<a-popconfirm
- :title="$t('label.make') + ' ' + (item.adminsonly ?
$t('label.annotation.everyone') : $t('label.annotation.admins.only')) + ' ?'"
+ :title="$t('label.make') + ' ' + (item.adminsonly ?
$t('label.annotation.everyone') : $t('label.adminsonly')) + ' ?'"
v-if="['Admin'].includes($store.getters.userInfo.roletype)"
slot="actions"
key="visibility"
@@ -52,7 +52,7 @@
color: item.adminsonly ? $config.theme['@primary-color'] :
$config.theme['@disabled-color']
}]" />
<span>
- {{ item.adminsonly ? $t('label.annotation.admins.only') :
$t('label.annotation.everyone') }}
+ {{ item.adminsonly ? $t('label.adminsonly') :
$t('label.annotation.everyone') }}
</span>
</a-popconfirm>
</a-comment>
@@ -100,7 +100,7 @@
:value="annotation"
:placeholder="$t('label.add.note')" />
<a-checkbox @change="toggleNoteVisibility"
v-if="['Admin'].includes(this.$store.getters.userInfo.roletype)"
style="margin-top: 10px">
- {{ $t('label.annotation.admins.only') }}
+ {{ $t('label.adminsonly') }}
</a-checkbox>
<a-button
style="margin-top: 10px; float: right"
diff --git a/ui/src/components/view/SearchView.vue
b/ui/src/components/view/SearchView.vue
index 76f5170..b72ad83 100644
--- a/ui/src/components/view/SearchView.vue
+++ b/ui/src/components/view/SearchView.vue
@@ -51,7 +51,7 @@
:key="index"
:label="field.name==='keyword' ?
('listAnnotations' in $store.getters.apis ?
$t('label.annotation') : $t('label.name')) :
- (field.name==='entitytype' ?
$t('label.annotation.entity.type') : $t('label.' + field.name))">
+ (field.name==='entitytype' ? $t('label.entity.type') :
$t('label.' + field.name))">
<a-select
allowClear
v-if="field.type==='list'"
diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index 0214246..eab0f1a 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -82,7 +82,7 @@
slot="overlay" >
<a-menu-item v-for="(column, idx) in columnKeys"
:key="idx" @click="updateSelectedColumns(column)">
<a-checkbox :id="idx.toString()"
:checked="selectedColumns.includes(getColumnKey(column))"/>
- {{ $t('label.' + getColumnKey(column)) }}
+ {{ $t('label.' +
String(getColumnKey(column)).toLowerCase()) }}
</a-menu-item>
</a-menu>
</a-dropdown>
@@ -927,18 +927,6 @@ export default {
})
}
- if (this.apiName === 'listAnnotations') {
- this.columns.map(col => {
- if (col.title === 'label.entityid') {
- col.title = this.$t('label.annotation.entity')
- } else if (col.title === 'label.entitytype') {
- col.title = this.$t('label.annotation.entity.type')
- } else if (col.title === 'label.adminsonly') {
- col.title = this.$t('label.annotation.admins.only')
- }
- })
- }
-
for (let idx = 0; idx < this.items.length; idx++) {
this.items[idx].key = idx
for (const key in customRender) {