Skip to content

Commit bc1498d

Browse files
authored
ui: Fix column names translation issue (#6025)
* ui: Fix column names translation issue * update labels
1 parent 982462b commit bc1498d

File tree

4 files changed

+8
-20
lines changed

4 files changed

+8
-20
lines changed

ui/public/locales/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@
444444
"label.annotated.by": "Annotator",
445445
"label.annotation": "Comment",
446446
"label.annotations": "Comments",
447-
"label.annotation.admins.only": "Only visible to Administrators",
448-
"label.annotation.entity": "Entity",
449-
"label.annotation.entity.type": "Entity Type",
447+
"label.adminsonly": "Only visible to Administrators",
448+
"label.entityid": "Entity",
449+
"label.entitytype": "Entity Type",
450450
"label.annotation.everyone": "Visible to everyone",
451451
"label.anti.affinity": "Anti-affinity",
452452
"label.anti.affinity.group": "Anti-affinity Group",

ui/src/components/view/AnnotationsTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
slot="avatar"
4040
icon="message" />
4141
<a-popconfirm
42-
:title="$t('label.make') + ' ' + (item.adminsonly ? $t('label.annotation.everyone') : $t('label.annotation.admins.only')) + ' ?'"
42+
:title="$t('label.make') + ' ' + (item.adminsonly ? $t('label.annotation.everyone') : $t('label.adminsonly')) + ' ?'"
4343
v-if="['Admin'].includes($store.getters.userInfo.roletype)"
4444
slot="actions"
4545
key="visibility"
@@ -52,7 +52,7 @@
5252
color: item.adminsonly ? $config.theme['@primary-color'] : $config.theme['@disabled-color']
5353
}]" />
5454
<span>
55-
{{ item.adminsonly ? $t('label.annotation.admins.only') : $t('label.annotation.everyone') }}
55+
{{ item.adminsonly ? $t('label.adminsonly') : $t('label.annotation.everyone') }}
5656
</span>
5757
</a-popconfirm>
5858
</a-comment>
@@ -100,7 +100,7 @@
100100
:value="annotation"
101101
:placeholder="$t('label.add.note')" />
102102
<a-checkbox @change="toggleNoteVisibility" v-if="['Admin'].includes(this.$store.getters.userInfo.roletype)" style="margin-top: 10px">
103-
{{ $t('label.annotation.admins.only') }}
103+
{{ $t('label.adminsonly') }}
104104
</a-checkbox>
105105
<a-button
106106
style="margin-top: 10px; float: right"

ui/src/components/view/SearchView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
:key="index"
5252
:label="field.name==='keyword' ?
5353
('listAnnotations' in $store.getters.apis ? $t('label.annotation') : $t('label.name')) :
54-
(field.name==='entitytype' ? $t('label.annotation.entity.type') : $t('label.' + field.name))">
54+
(field.name==='entitytype' ? $t('label.entity.type') : $t('label.' + field.name))">
5555
<a-select
5656
allowClear
5757
v-if="field.type==='list'"

ui/src/views/AutogenView.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
slot="overlay" >
8383
<a-menu-item v-for="(column, idx) in columnKeys" :key="idx" @click="updateSelectedColumns(column)">
8484
<a-checkbox :id="idx.toString()" :checked="selectedColumns.includes(getColumnKey(column))"/>
85-
{{ $t('label.' + getColumnKey(column)) }}
85+
{{ $t('label.' + String(getColumnKey(column)).toLowerCase()) }}
8686
</a-menu-item>
8787
</a-menu>
8888
</a-dropdown>
@@ -927,18 +927,6 @@ export default {
927927
})
928928
}
929929
930-
if (this.apiName === 'listAnnotations') {
931-
this.columns.map(col => {
932-
if (col.title === 'label.entityid') {
933-
col.title = this.$t('label.annotation.entity')
934-
} else if (col.title === 'label.entitytype') {
935-
col.title = this.$t('label.annotation.entity.type')
936-
} else if (col.title === 'label.adminsonly') {
937-
col.title = this.$t('label.annotation.admins.only')
938-
}
939-
})
940-
}
941-
942930
for (let idx = 0; idx < this.items.length; idx++) {
943931
this.items[idx].key = idx
944932
for (const key in customRender) {

0 commit comments

Comments
 (0)