diff --git a/web/src/i18n/messages/en-US.ts b/web/src/i18n/messages/en-US.ts index 8ea0d1c..337bf79 100644 --- a/web/src/i18n/messages/en-US.ts +++ b/web/src/i18n/messages/en-US.ts @@ -91,6 +91,15 @@ export default { metric: { gpaHint: 'Weighted by course credits', weighted: 'Credit-weighted average', weightedHint: 'Final course scores weighted by credits', average: 'Average score', averageHint: 'Arithmetic mean of published final scores' }, trendTitle: 'Academic performance by term', trendHint: 'GPA uses the left axis (0–4); scores use the right axis (0–100).', trendEmpty: 'No published grades are available for a trend chart', }, + calendar: { + title: 'Academic calendar', description: 'Teaching dates, public holidays, and upcoming reminders share one calendar. These reminders do not change any business rules or deadlines.', add: 'Add event', currentTerm: 'Current term', today: 'Today', teachingSchedule: 'Teaching event', due: 'Due soon', info: 'Calendar reminders are informational. They are not tasks and do not restrict any workflow.', monthAgenda: 'This month', items: '{count} items', audience: 'Audience: {audience}', dueReminder: 'Due soon', edit: 'Edit', delete: 'Delete', empty: 'No events this month', allRoles: 'All roles', examTitle: 'Exam: {course}', cancel: 'Cancel', save: 'Save', + kinds: { course: 'Course selection', grade: 'Grades', evaluation: 'Evaluation', exam: 'Exam', graduation: 'Graduation audit', holiday: 'Public holiday', other: 'Other' }, + roles: { SuperAdmin: 'Super administrator', AcademicAdmin: 'Academic administrator', CollegeAdmin: 'College administrator', Leader: 'Leader', Counselor: 'Counselor', Teacher: 'Teacher', Student: 'Student', MaintenanceAdmin: 'Maintenance administrator', MaintenanceStaff: 'Maintenance staff', PhysicalEducationAdmin: 'Physical education administrator', DormitoryAdmin: 'Dormitory administrator', StudentAffairsAdmin: 'Student affairs administrator' }, + dialog: { edit: 'Edit calendar event', add: 'Add calendar event' }, + form: { term: 'Term', name: 'Event name', type: 'Event type', range: 'Start / end', to: 'to', reminder: 'Advance reminder', reminderHint: 'days (controls due-soon highlighting only)', roles: 'Audience roles', rolesHint: 'Leave empty to show the event to all roles.', description: 'Description', enabled: 'Enabled' }, + messages: { selectTerm: 'Select the term that will receive the holiday events.', syncConfirm: 'Sync public holidays for {year} and replace previously synced data for that year in this term?', synced: 'Synced {count} holiday or adjusted-workday events covering {days} days.', required: 'Enter a term, event name, and start date.', saved: 'Calendar event saved. It is used only for display and reminders.', deleteConfirm: 'Delete “{title}”?', deleteTitle: 'Delete event', deleted: 'Event deleted' }, + sync: { title: 'Sync public holidays', action: 'Sync public holidays', confirm: 'Sync', intro: 'Read the selected year from the holiday data source and add it to the current term. Syncing the same year again replaces previously synced data.', preview: 'Preview data', previewHint: 'Select Preview to load holiday data', dayOff: 'Day off', workday: 'Adjusted workday', submit: 'Sync to current term' }, + }, api: { 'data.constraint_conflict': 'A data constraint conflict occurred.', 'server.unhandled_error': 'The server encountered an error while processing the request.', diff --git a/web/src/i18n/messages/zh-CN.ts b/web/src/i18n/messages/zh-CN.ts index e5dc17e..ea2820b 100644 --- a/web/src/i18n/messages/zh-CN.ts +++ b/web/src/i18n/messages/zh-CN.ts @@ -91,6 +91,15 @@ export default { metric: { gpaHint: '绩点按课程学分加权', weighted: '加权平均成绩', weightedHint: '课程总评按课程学分加权', average: '平均成绩', averageHint: '已发布课程总评的算术平均' }, trendTitle: '各学期学业成绩变化', trendHint: 'GPA 使用左轴(0–4),两项成绩使用右轴(0–100)。', trendEmpty: '暂无可绘制趋势的已发布成绩', }, + calendar: { + title: '学期校历', description: '教学日程、法定节假日与临期提醒都落在同一张日历上;仅作提醒,不改变任何业务办理规则。', add: '新增日程', currentTerm: '当前学期', today: '今天', teachingSchedule: '教学日程', due: '临期', info: '这里是校历提醒,不表示您有待办,也不会限制任何业务操作。', monthAgenda: '本月安排', items: '{count} 项', audience: '面向:{audience}', dueReminder: '临期提醒', edit: '编辑', delete: '删除', empty: '本月暂无日程', allRoles: '全部角色', examTitle: '考试:{course}', cancel: '取消', save: '保存', + kinds: { course: '选课', grade: '成绩', evaluation: '评教', exam: '考试', graduation: '毕业审核', holiday: '法定节假日', other: '其他' }, + roles: { SuperAdmin: '超级管理员', AcademicAdmin: '校级教务管理员', CollegeAdmin: '学院教务管理员', Leader: '领导', Counselor: '辅导员', Teacher: '教师', Student: '学生', MaintenanceAdmin: '维修管理员', MaintenanceStaff: '维修人员', PhysicalEducationAdmin: '体测管理员', DormitoryAdmin: '宿管管理员', StudentAffairsAdmin: '学工管理员' }, + dialog: { edit: '编辑校历日程', add: '新增校历日程' }, + form: { term: '所属学期', name: '日程名称', type: '日程类型', range: '开始 / 结束', to: '至', reminder: '提前提醒', reminderHint: '天(只控制页面临期提示)', roles: '面向角色', rolesHint: '不选则向所有角色显示。', description: '说明', enabled: '启用' }, + messages: { selectTerm: '请先选择要写入节假日的学期。', syncConfirm: '将同步 {year} 年节假日,并替换该学期已同步的同年度数据。', synced: '已同步 {count} 个节假日/调休日程,覆盖 {days} 天。', required: '请填写学期、日程名称和开始日期。', saved: '校历日程已保存;它只用于展示和提醒。', deleteConfirm: '删除“{title}”吗?', deleteTitle: '删除日程', deleted: '日程已删除' }, + sync: { title: '同步法定节假日', action: '同步法定节假日', confirm: '确认同步', intro: '从节假日数据源读取指定年份,写入当前选择的学期。再次同步同一年会替换此前同步的数据。', preview: '预览数据', previewHint: '点击预览以加载节假日数据', dayOff: '休息', workday: '调休上班', submit: '同步到当前学期' }, + }, api: { 'data.constraint_conflict': '数据约束冲突。', 'server.unhandled_error': '服务器处理请求时发生错误。', diff --git a/web/src/views/AcademicCalendarView.vue b/web/src/views/AcademicCalendarView.vue index 1b676a4..3892b33 100644 --- a/web/src/views/AcademicCalendarView.vue +++ b/web/src/views/AcademicCalendarView.vue @@ -1,5 +1,6 @@

- 从节假日数据源读取指定年份,写入当前选择的学期。再次同步同一年会替换此前同步的数据。 + {{ t('calendar.sync.intro') }}

{ controls-position="right" /> 预览数据{{ t('calendar.sync.preview') }}
{ :class="{ workday: !item.isOffDay }" > {{ item.date }}{{ item.name }} · {{ item.isOffDay ? "休息" : "调休上班" }} + >{{ item.name }} · {{ item.isOffDay ? t('calendar.sync.dayOff') : t('calendar.sync.workday') }}
@@ -909,7 +881,7 @@ onMounted(async () => { content: "●"; } .calendar-event.holiday:after { - content: "休"; + content: "○"; } .weekdays span { padding: 7px 2px;