perf: 优化翻译

This commit is contained in:
ibuler
2021-09-28 18:59:34 +08:00
parent 6f5db82ce3
commit 30b936330c
5 changed files with 19 additions and 4 deletions

View File

@@ -3,12 +3,15 @@
v-if="enabled && !isViewed()"
type="success"
:center="false"
:title="this.$t('common.Announcement') + ': ' + announcement.subject"
:title="title"
@close="onClose"
>
<span> {{ announcement.content }}</span>
<span v-if="announcement.link">
<el-link :href="announcement.link" target="_blank" class="link-more"> 查看更多</el-link> <i class="fa fa-share-square-o" />
<el-link :href="announcement.link" target="_blank" class="link-more">
{{ $t('common.ViewMore') }}
</el-link>
<i class="fa fa-share-square-o" />
</span>
</el-alert>
</template>
@@ -33,6 +36,9 @@ export default {
},
enabled() {
return this.publicSettings.ANNOUNCEMENT_ENABLED
},
title() {
return this.$t('common.Announcement') + ': ' + this.announcement.subject
}
},
methods: {

View File

@@ -233,6 +233,7 @@
"ReLogin": "重新登录"
},
"common": {
"ViewMore": "查看更多",
"Announcement": "公告",
"Logging": "日志记录",
"Database": "数据库记录",
@@ -779,6 +780,7 @@
}
},
"setting": {
"Feature": "功能",
"AlibabaCloud": "阿里云",
"TencentCloud": "腾讯云",
"Radius": "Radius",

View File

@@ -231,6 +231,7 @@
"ReLogin": "Re-Login"
},
"common": {
"ViewMore": "View more",
"Announcement": "Announcement",
"Logging": "Logging",
"Database": "Database",
@@ -762,6 +763,7 @@
}
},
"setting": {
"Feature": "Feature",
"SMSProvider": "SMS provider",
"SMS": "SMS setting",
"AlibabaCloud": "Alibaba cloud",

View File

@@ -33,7 +33,7 @@ export default {
},
data() {
return {
title: '公告',
title: this.$t('common.Announcement'),
visible: false,
config: {
fields: [
@@ -45,6 +45,11 @@ export default {
'SUBJECT', 'CONTENT', 'LINK'
],
fieldsMeta: {
CONTENT: {
el: {
rows: 5
}
}
}
}
},

View File

@@ -36,7 +36,7 @@ export default {
]
],
[
'功能', [
this.$t('setting.Feature'), [
'TICKETS_ENABLED', 'ANNOUNCEMENT_ENABLED'
]
]