refactor: 通知页面国际化

This commit is contained in:
Captain.B 2021-09-06 17:46:43 +08:00 committed by 刘瑞斌
parent 6a53e523cf
commit cd1fcdaa50
6 changed files with 19 additions and 7 deletions

View File

@ -25,10 +25,10 @@
custom-class="ms-drawer-task"> custom-class="ms-drawer-task">
<div style="margin: 0px 20px 0px"> <div style="margin: 0px 20px 0px">
<el-tabs :active-name="activeName"> <el-tabs :active-name="activeName">
<el-tab-pane label="@提到我的" name="mentionedMe"> <el-tab-pane :label="$t('commons.mentioned_me_notice')" name="mentionedMe">
<mentioned-me-data ref="mentionedMe" :user-list="userList"/> <mentioned-me-data ref="mentionedMe" :user-list="userList"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="系统通知" name="systemNotice"> <el-tab-pane :label="$t('commons.system_notice')" name="systemNotice">
<system-notice-data ref="systemNotice" :user-list="userList"/> <system-notice-data ref="systemNotice" :user-list="userList"/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -163,7 +163,7 @@ export default {
} }
d.user = this.userMap[d.operator]; d.user = this.userMap[d.operator];
let message = d.user.name + getOperation(d.operation) + getResource(d) + ": " + d.resourceName; let message = d.user.name + getOperation(d.operation) + getResource(d) + ": " + d.resourceName;
let title = d.type === 'MENTIONED_ME' ? '@提到我的' : '系统通知'; let title = d.type === 'MENTIONED_ME' ? this.$t('commons.mentioned_me_notice') : this.$t('commons.system_notice');
setTimeout(() => { setTimeout(() => {
this.$notify({ this.$notify({
title: title, title: title,

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div style="padding-left: 320px; padding-bottom: 5px; width: 100%"> <div style="padding-left: 320px; padding-bottom: 5px; width: 100%">
<span style="color: gray; padding-right: 10px">({{ totalCount }} 条消息)</span> <span style="color: gray; padding-right: 10px">({{ totalCount }} {{ $t('commons.notice_count') }})</span>
<el-dropdown @command="handleCommand" style="padding-right: 10px"> <el-dropdown @command="handleCommand" style="padding-right: 10px">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ goPage }}/{{ totalPage }}<i class="el-icon-arrow-down el-icon--right"></i> {{ goPage }}/{{ totalPage }}<i class="el-icon-arrow-down el-icon--right"></i>
@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div style="color: gray; padding-top:20px; text-align: center"> <div style="color: gray; padding-top:20px; text-align: center">
- 仅显示最近3个月的站内消息 - - {{ $t('commons.notice_tips') }} -
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div style="padding-left: 320px; padding-bottom: 5px; width: 100%"> <div style="padding-left: 320px; padding-bottom: 5px; width: 100%">
<span style="color: gray; padding-right: 10px">({{ totalCount }} 条消息)</span> <span style="color: gray; padding-right: 10px">({{ totalCount }} {{ $t('commons.notice_count') }})</span>
<el-dropdown @command="handleCommand" style="padding-right: 10px"> <el-dropdown @command="handleCommand" style="padding-right: 10px">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ goPage }}/{{ totalPage }}<i class="el-icon-arrow-down el-icon--right"></i> {{ goPage }}/{{ totalPage }}<i class="el-icon-arrow-down el-icon--right"></i>
@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div style="color: gray; padding-top: 20px; text-align: center"> <div style="color: gray; padding-top: 20px; text-align: center">
- 仅显示最近3个月的站内消息 - - {{ $t('commons.notice_tips') }} -
</div> </div>
</div> </div>
</template> </template>

View File

@ -169,6 +169,10 @@ export default {
scenario_case: "Scenario Case", scenario_case: "Scenario Case",
task_center: "Task center", task_center: "Task center",
notice_center: "Notice center", notice_center: "Notice center",
notice_count: 'Messages',
notice_tips: 'Only display the news within the last 3 months',
system_notice:'System',
mentioned_me_notice:'@Mentioned Me',
all_module_title: "All module", all_module_title: "All module",
create_user: 'Creator', create_user: 'Creator',
run_message: "The task is being executed, please go to the task center to view the details", run_message: "The task is being executed, please go to the task center to view the details",

View File

@ -170,6 +170,10 @@ export default {
scenario_case: "场景用例", scenario_case: "场景用例",
task_center: "任务中心", task_center: "任务中心",
notice_center: "消息中心", notice_center: "消息中心",
notice_count: '条消息',
notice_tips: '仅显示最近3个月的站内消息',
system_notice: '系统通知',
mentioned_me_notice: '@提到我的',
all_module_title: "全部模块", all_module_title: "全部模块",
create_user: '创建人', create_user: '创建人',
run_message: "任务执行中,请到任务中心查看详情", run_message: "任务执行中,请到任务中心查看详情",

View File

@ -170,6 +170,10 @@ export default {
scenario_case: "場景用例", scenario_case: "場景用例",
task_center: "任务中心", task_center: "任务中心",
notice_center: "消息中心", notice_center: "消息中心",
notice_count: '條消息',
notice_tips: '僅顯示最近3個月的站內消息',
system_notice: '系統通知',
mentioned_me_notice: '@提到我的',
all_module_title: "全部模塊", all_module_title: "全部模塊",
create_user: "創建人", create_user: "創建人",
run_message: "任務執行中,請到任務中心查看詳情", run_message: "任務執行中,請到任務中心查看詳情",