diff --git a/web/scripts/check-i18n.mjs b/web/scripts/check-i18n.mjs index 8f00d5f..3235d10 100644 --- a/web/scripts/check-i18n.mjs +++ b/web/scripts/check-i18n.mjs @@ -26,7 +26,7 @@ const hardcoded = completedViews.filter((name) => { }) // These pages retain Chinese API values or editable business defaults in script. // Guard their templates separately, ignoring non-rendered comments. -for (const name of ['TeachingMonitoringView.vue', 'AcademicPlanningView.vue', 'PersonnelView.vue', 'StatisticsView.vue', 'EvaluationView.vue', 'ApprovalCenterView.vue']) { +for (const name of ['TeachingMonitoringView.vue', 'AcademicPlanningView.vue', 'PersonnelView.vue', 'StatisticsView.vue', 'EvaluationView.vue', 'ApprovalCenterView.vue', 'StudentAttendanceView.vue', 'NotificationCenterView.vue']) { const source = readFileSync(new URL(`../src/views/${name}`, import.meta.url), 'utf8') const start = source.indexOf('') diff --git a/web/src/i18n/messages/en-US.ts b/web/src/i18n/messages/en-US.ts index 3b2664e..52e7e84 100644 --- a/web/src/i18n/messages/en-US.ts +++ b/web/src/i18n/messages/en-US.ts @@ -1,4 +1,6 @@ export default { + studentAttendanceExtra: {"k0": "Appeal pending", "k1": "Approved", "k2": "Rejected", "k3": "Scan the classroom check-in QR code shown by the teacher", "k4": "Cancel scan", "k5": "Turn off flashlight", "k6": "Turn on flashlight", "k7": "Check-in ended", "k8": "Ends in {minutes}m {seconds}s", "k9": "You have already checked in", "k10": "Check-in successful", "k11": "Check-in successful, approximately {distance} m from the check-in point", "k12": "Location permission denied. Allow precise location access in system settings.", "k13": "Location permission denied. Allow this site to access your location in the browser.", "k14": "Location request timed out. Move to an area with a better signal and try again.", "k15": "Unable to get your location. Check your phone’s location services and try again.", "k16": "Not available", "k17": "QR check-in", "k18": "Checked in at {time}", "k19": "Checked in", "k20": "Confirm check-in", "k21": "Within {radius} m", "k22": "Check in with location", "k23": "{courses} courses · {sessions} attendance sessions", "k24": "Teacher not recorded", "k25": "{attended} / {required} sessions attended"}, + notificationBatch: {"k0": "General notice", "k1": "Pending review", "k2": "Course changes", "k3": "Grade notice", "k4": "Attendance notice", "k5": "Course selection notice", "k6": "Academic warning", "k7": "Select a teaching class", "k8": "Current filtered results", "k9": "No recipients selected", "k10": "Loading recipient scope", "k11": "System message", "k12": "All messages marked as read", "k13": "Enter a message title", "k14": "Enter the message content", "k15": "Select a teaching class to receive the message", "k16": "No accounts in this scope can receive messages", "k17": "Confirm sending", "k18": "Confirm send", "k19": "Continue editing", "k20": "Message center", "k21": "View system notices, review tasks, course changes, and grade messages in one place.", "k22": "Unread messages", "k23": "Compose", "k24": "Mark all unread messages as read", "k25": "No unread messages", "k26": "Mark all as read", "k27": "Refresh", "k28": "Message center navigation", "k29": "Inbox", "k30": "Sent", "k31": "Notification settings", "k32": "Search title or content", "k33": "Unread only", "k34": "Manually sent", "k35": "Unread", "k36": "View details →", "k37": "No unread messages match the filters", "k38": "No messages match the filters", "k39": "Previous batch", "k40": "Next batch", "k41": "Recipient scope", "k42": "Compose and send a message", "k43": "Recipients are limited by your data permissions. Messages cannot be recalled after sending.", "k44": "recipient accounts", "k45": "Select recipients", "k46": "All in permitted scope", "k47": "Filter recipients", "k48": "Select individuals", "k49": "Filter candidate accounts", "k50": "All roles", "k51": "All teaching classes", "k52": "Name, student number, employee number, or account", "k53": "Search", "k54": "This includes every enabled account in your permitted scope. Use filters or select individuals to narrow the audience.", "k55": "University account", "k56": "Selected", "k57": "Select", "k58": "No eligible accounts match the filters", "k59": "Clear", "k60": "Recipient teaching class", "k61": "Select a teaching class you teach", "k62": "Teachers can send messages only to active student accounts in their own teaching classes.", "k63": "Edit message", "k64": "General notice", "k65": "Grade, course selection, and other workflow notifications are still sent automatically", "k66": "Message title", "k67": "Summarize the matter in one sentence", "k68": "Message content", "k69": "Tables, links, and external images are supported. Use HTTPS image URLs; local files are not uploaded.", "k70": "No sent messages yet", "k71": "{count} selected recipients", "k72": "At most {count} recipients can be selected per message", "k73": "This message will be sent to {count} accounts in “{audience}” and cannot be recalled.", "k74": "Sent to {count} accounts", "k75": "From {name}", "k76": "Audience: {audience}", "k77": "Batch {page}", "k78": "{count} matching accounts", "k79": "Enrolled {year} · {name}", "k80": "{count} selected", "k81": "Remove {name}", "k82": "{count} more", "k83": "{count} people", "k84": "{chars} characters · source {length}/20000", "k85": "Will be sent to {count} accounts", "k86": "{count} recipient accounts"}, operationsBatch: {"k0": "Recoverable backup", "k1": "No backup has been created.", "k2": "The latest backup passed an isolated restore drill.", "k3": "Restore drill failed.", "k4": "A backup exists, but no restore drill has been run.", "k5": "Healthy", "k6": "Warning", "k7": "Unhealthy", "k8": "Swagger documentation enabled.", "k9": "Swagger documentation disabled.", "k10": "Optionally describe the change window, release version, or shift notes for this backup.", "k11": "Create database backup", "k12": "Start backup", "k13": "Optional, up to 200 characters", "k14": "The note cannot exceed 200 characters.", "k15": "Database backup created.", "k16": "Run restore drill", "k17": "Start isolated drill", "k18": "Operations and audit console", "k19": "Check system availability, failed jobs, and backup recoverability.", "k20": "Refresh status", "k21": "Swagger documentation", "k22": "Documentation and OpenAPI definitions are currently accessible.", "k23": "Documentation is disabled; /swagger returns 404.", "k24": "Open", "k25": "Open documentation", "k26": "System health", "k27": "Current operational status", "k28": "Alerts", "k29": "No active alerts", "k30": "Health checks, failed jobs, and backup freshness are within acceptable limits.", "k31": "Backups and restore drills", "k32": "Create backup", "k33": "Restore drills use an isolated database. Backups that fail validation are not applied to the operational database.", "k34": "No backup note", "k35": "Drill passed", "k36": "Drill failed", "k37": "Drill pending", "k38": "No backups yet. Run a restore drill after creating the first backup.", "k39": "Audit query type", "k40": "Operation log", "k41": "Failed background jobs", "k42": "Request method", "k43": "Status code, e.g. 500", "k44": "Account", "k45": "API path", "k46": "Request ID", "k47": "to", "k48": "Unauthenticated", "k49": "Duration", "k50": "Source IP", "k51": "Client", "k52": "Exception type", "k53": "No matching write operations or failed requests in this time range.", "k54": "Job type", "k55": "Automatic scheduling", "k56": "Timetable publication", "k57": "Automatic makeup exam scheduling", "k58": "Exam and makeup exam scheduling", "k59": "Exam sign-in export", "k60": "Exam and makeup exam publication", "k61": "Course grade statistics refresh", "k62": "Graduation audit calculation", "k63": "Degree award audit calculation", "k64": "Automatic dormitory allocation", "k65": "Dormitory hygiene calculation", "k66": "Comprehensive assessment calculation", "k67": "No failed background jobs in this time range.", "k68": "“{name}” will be restored to an isolated database for integrity checks. The operational database will not be overwritten.", "k69": "{alerts} critical alerts · {events} audit events / 24h", "k70": "Job {id} · {count} attempts"}, usersBatch: {"k0": "Own data", "k1": "Assigned classes", "k2": "Assigned college", "k3": "University-wide data", "k4": "Users and permissions import template.xlsx", "k5": "Users and permissions.xlsx", "k6": "Users and permissions exported", "k7": "Confirm account import", "k8": "Import", "k9": "Confirm privileged account creation", "k10": "Confirm creation", "k11": "Account created", "k12": "Confirm account deactivation", "k13": "Confirm deactivation", "k14": "Account deactivated", "k15": "Account activated", "k16": "Confirm privileged role", "k17": "Confirm authorization", "k18": "Roles and data scope updated", "k19": "The new password must have at least 8 characters.", "k20": "View role capabilities, effective data scopes, and high-risk permissions. Authorization is enforced by the server.", "k21": "Create account", "k22": "Role and permission model", "k23": "Permissions are combined across roles · The broadest data scope applies", "k24": "High risk", "k25": "Search account, name, employee number, or role", "k26": "All account statuses", "k27": "Deactivate", "k28": "All login histories", "k29": "Signed in before", "k30": "Never signed in", "k31": "Employee / student number", "k32": "Assigned administrative classes", "k33": "Last sign-in", "k34": "Never signed in", "k35": "Activate", "k36": "Edit roles", "k37": "Reset password", "k38": "Initial password", "k39": "Combined permissions", "k40": "Search by class code, name, or major", "k41": "College indicates organizational affiliation. Counselor data access comes strictly from the administrative classes selected here.", "k42": "The old password stops working immediately after saving. Notify the user securely.", "k43": "New password", "k44": "Confirm new password", "k45": "Confirm reset", "k46": "Edit roles and data scope", "k47": "No employee or student number linked", "k48": "Deselecting a class removes its assignment. Transfer a class assigned to another counselor in administrative class management first.", "k49": "College indicates organizational affiliation. Counselor access follows assigned classes. Removing the counselor role also removes all class assignments.", "k50": "Save roles", "k51": "Preview passed: {created} new and {updated} updated accounts, {total} total. Import now?", "k52": "Import complete: {created} added, {updated} updated", "k53": "A privileged account for “{name}” will be created. Confirm the person and responsibilities.", "k54": "Deactivating “{name}” invalidates their access tokens and sessions.", "k55": "High-risk platform permissions will be granted to “{name}”. Confirm the person and responsibilities.", "k56": "Password reset for {name}", "k57": "{count} accounts", "k58": "+{count}", "k59": "Enrolled {grade} · {name} · {major}{assignment}", "k60": " (assigned to {name})", "k61": "Effective scope after saving: {scope}"}, approvalBatch: {"k0": "Request course exemption", "k1": "Request a deferred exam", "k2": "Grade change request", "k3": "Request course substitution", "k4": "New request", "k5": "Enter a reason for the request", "k6": "Select a course for exemption", "k7": "Select a course for a deferred exam", "k8": "Select a grade record", "k9": "Select both the original and substitute courses", "k10": "Request submitted", "k11": "Approved", "k12": "Pending review", "k13": "Rejected", "k14": "Flexible course", "k15": "Timetable published", "k16": "Awaiting timetable publication", "k17": "Request changes for courses you take and track review progress and outcomes.", "k18": "Submit teaching requests and track their progress in one place.", "k19": "Manage academic requests and reviews in one place.", "k20": "Request exemption", "k21": "Select from current courses or courses with published timetables", "k22": "Request deferred exam", "k23": "Course and teaching class details are submitted together", "k24": "Request course substitution", "k25": "Current or failed course → passed course", "k26": "Request a class adjustment", "k27": "Request rescheduling, cancellation, makeup classes, or substitution", "k28": "Fill out request", "k29": "Request a grade change", "k30": "Submit the reason for the correction for review", "k31": "No pending requests", "k32": "Exemption requests", "k33": "No exemption requests submitted", "k34": "Deferred exam requests", "k35": "No deferred exam requests submitted", "k36": "Course substitution requests", "k37": "No course substitution requests submitted", "k38": "No requests yet", "k39": "Submit your first request", "k40": "Select a teaching class for exemption", "k41": "Select a teaching class for a deferred exam", "k42": "The list includes current-term courses and unarchived assigned or enrolled courses with published timetables.", "k43": "Search by course name, code, teaching class number, or teacher", "k44": "Teacher to be assigned", "k45": "No matching courses", "k46": "No eligible courses", "k47": "Courses must be published teaching tasks assigned to your administrative class or selected by you. Current-term courses and courses with published timetables are shown.", "k48": "Both substitution conditions must be met", "k49": "The original course must be a current or scheduled course you take, or one you failed. The substitute must have a published score of at least 60.", "k50": "Original course", "k51": "Current courses / previously failed", "k52": "Search courses", "k53": "Enrolled", "k54": "Failed", "k55": "No eligible original courses", "k56": "Published passing grade", "k57": "No passed courses", "k58": "Scheduled courses without published grades cannot be used as substitutes.", "k59": "Grade record", "k60": "Select a published grade", "k61": "Change to", "k62": "Reason for request", "k63": "Explain why you cannot attend the exam on time", "k64": "Explain how the courses correspond in content, credits, or degree requirements", "k65": "Explain the basis and circumstances of your request", "k66": "Select a substitute course", "k67": "Select the original course", "k68": "Enter the reason for rejection", "k69": "Course exemption", "k70": "Deferred exam", "k71": "Grade change", "k72": "Course substitution", "k73": "Student status change", "k74": "Grade review", "k75": "Attendance appeal", "k76": "View →", "k77": "Review comment: {comment}", "k78": "{count} courses available", "k79": "{count} eligible substitutes", "k80": "Pending ({count})", "k81": "My records", "k82": "My records ({count})", "k83": "{count} credits", "k84": "{score} points", "k85": "{teacher} · {credits} credits", "k86": "points"}, diff --git a/web/src/i18n/messages/zh-CN.ts b/web/src/i18n/messages/zh-CN.ts index 1b708a3..1541258 100644 --- a/web/src/i18n/messages/zh-CN.ts +++ b/web/src/i18n/messages/zh-CN.ts @@ -1,4 +1,6 @@ export default { + studentAttendanceExtra: {"k0": "申诉中", "k1": "已通过", "k2": "已驳回", "k3": "请扫描教师展示的课堂签到二维码", "k4": "取消扫码", "k5": "关闭手电筒", "k6": "打开手电筒", "k7": "签到已结束", "k8": "{minutes}分{seconds}秒后结束", "k9": "你已完成本次签到", "k10": "签到成功", "k11": "签到成功,距签到点约 {distance} 米", "k12": "定位权限被拒绝,请在系统设置中允许本应用获取精确位置。", "k13": "定位权限被拒绝,请在浏览器中允许本网站获取位置。", "k14": "获取位置超时,请移到信号较好的位置后重试。", "k15": "无法获取当前位置,请检查手机定位服务后重试。", "k16": "暂无", "k17": "扫码签到", "k18": "已于 {time} 签到", "k19": "已签到", "k20": "确认签到", "k21": "{radius} 米范围内", "k22": "定位并签到", "k23": "{courses} 门课程 · {sessions} 次点名", "k24": "任课教师未登记", "k25": "{attended} / {required} 次到课"}, + notificationBatch: {"k0": "一般通知", "k1": "审核待办", "k2": "课程变动", "k3": "成绩通知", "k4": "考勤消息", "k5": "选课消息", "k6": "学业预警", "k7": "请选择教学班", "k8": "当前筛选结果", "k9": "尚未选择收件人", "k10": "正在读取发信范围", "k11": "系统消息", "k12": "全部消息已标为已读", "k13": "请填写消息标题", "k14": "请填写消息正文", "k15": "请选择接收消息的教学班", "k16": "当前范围内没有可接收消息的账号", "k17": "确认发送消息", "k18": "确认发送", "k19": "继续编辑", "k20": "消息中心", "k21": "系统通知、审核待办、课程变动与成绩消息统一汇总,重要信息不再散落在业务页面。", "k22": "未读消息", "k23": "发消息", "k24": "将全部未读消息标为已读", "k25": "当前没有未读消息", "k26": "全部已读", "k27": "刷新", "k28": "消息中心功能", "k29": "收件箱", "k30": "已发送", "k31": "通知设置", "k32": "搜索标题或正文", "k33": "仅看未读", "k34": "人工发送", "k35": "未读", "k36": "查看详情 →", "k37": "当前筛选范围内没有未读消息", "k38": "当前筛选范围内没有消息", "k39": "上一批", "k40": "下一批", "k41": "发送范围", "k42": "编写并发送消息", "k43": "收件范围始终受当前账号的数据权限约束,发送后不可撤回。", "k44": "个接收账号", "k45": "选择收件人", "k46": "权限范围群发", "k47": "按条件群发", "k48": "指定收件人", "k49": "筛选候选账号", "k50": "全部身份", "k51": "全部教学班", "k52": "姓名、学号、工号或账号", "k53": "查询", "k54": "将覆盖当前权限范围内全部已启用账号;如无需群发,请切换到条件筛选或指定收件人。", "k55": "校级账号", "k56": "已选择", "k57": "选择", "k58": "没有符合条件的可用账号", "k59": "清空", "k60": "接收教学班", "k61": "选择本人任教的教学班", "k62": "任课教师只能向本人所带教学班的有效学生账号发送消息。", "k63": "编辑消息内容", "k64": "普通通知", "k65": "成绩、选课等业务通知仍由对应流程自动发送", "k66": "消息标题", "k67": "用一句话说明需要关注的事项", "k68": "消息正文", "k69": "支持表格、超链接和外链图片;图片请填写 HTTPS 地址,不上传本地文件。", "k70": "还没有发送记录", "k71": "指定的 {count} 名收件人", "k72": "单次最多指定 {count} 名收件人", "k73": "消息将发送给“{audience}”的 {count} 个账号,发送后不可撤回。", "k74": "已发送给 {count} 个账号", "k75": "来自 {name}", "k76": "接收范围:{audience}", "k77": "第 {page} 批", "k78": "共 {count} 个匹配账号", "k79": "{year}级 · {name}", "k80": "已选 {count} 人", "k81": "移除 {name}", "k82": "另有 {count} 人", "k83": "{count} 人", "k84": "{chars} 字 · 源码 {length}/20000", "k85": "将发送给 {count} 个账号", "k86": "{count} 个接收账号"}, operationsBatch: {"k0": "可恢复备份", "k1": "尚未创建备份。", "k2": "最近备份已通过隔离恢复演练。", "k3": "恢复演练失败。", "k4": "备份存在,但尚未执行恢复演练。", "k5": "正常", "k6": "注意", "k7": "异常", "k8": "Swagger 文档已开放。", "k9": "Swagger 文档已关闭。", "k10": "可填写本次备份的变更窗口、发布版本或值班说明。", "k11": "创建数据库备份", "k12": "开始备份", "k13": "选填,最多 200 字", "k14": "说明不能超过 200 字。", "k15": "数据库备份已创建。", "k16": "运行恢复演练", "k17": "开始隔离演练", "k18": "运维与审计控制台", "k19": "检查系统是否可用、任务为何失败,以及备份能否真正恢复。", "k20": "刷新状态", "k21": "Swagger 文档", "k22": "文档与 OpenAPI 定义当前已对外开放。", "k23": "文档当前关闭,访问 /swagger 将返回 404。", "k24": "已开放", "k25": "打开文档", "k26": "系统健康链路", "k27": "当前值守结论", "k28": "异常告警", "k29": "当前没有异常告警", "k30": "健康探针、失败任务与备份时效均在允许范围内。", "k31": "备份与恢复演练", "k32": "创建备份", "k33": "恢复演练只使用隔离数据库;校验失败的备份不会进入业务库。", "k34": "无备份说明", "k35": "演练通过", "k36": "演练失败", "k37": "待演练", "k38": "尚无备份。创建首个备份后,立即运行一次恢复演练。", "k39": "审计查询类型", "k40": "操作日志", "k41": "失败后台任务", "k42": "请求方法", "k43": "状态码,如 500", "k44": "操作账号", "k45": "接口路径", "k46": "请求标识", "k47": "至", "k48": "未认证", "k49": "耗时", "k50": "来源 IP", "k51": "客户端", "k52": "异常类型", "k53": "该时间范围内没有匹配的写操作或失败请求。", "k54": "任务类型", "k55": "自动排课", "k56": "课表发布", "k57": "补考自动安排", "k58": "考试与补考编排", "k59": "考试签到表导出", "k60": "考试与补考发布", "k61": "课程成绩统计刷新", "k62": "毕业资格审核计算", "k63": "学位授予审核计算", "k64": "宿舍自动分配", "k65": "宿舍卫生结果计算", "k66": "综合测评计算", "k67": "该时间范围内没有失败的后台任务。", "k68": "将把“{name}”恢复到隔离数据库并执行完整性检查。当前业务数据库不会被覆盖。", "k69": "{alerts} 个严重告警 · {events} 条审计事件 / 24h", "k70": "任务 {id} · 已尝试 {count} 次"}, usersBatch: {"k0": "本人数据", "k1": "所带班级", "k2": "所属学院", "k3": "全校数据", "k4": "用户与权限导入模板.xlsx", "k5": "用户与权限.xlsx", "k6": "用户与权限已导出", "k7": "确认账号导入", "k8": "正式导入", "k9": "确认创建高权限账号", "k10": "确认创建", "k11": "账号已创建", "k12": "确认停用账号", "k13": "确认停用", "k14": "账号已停用", "k15": "账号已启用", "k16": "确认高权限角色", "k17": "确认授权", "k18": "角色与数据范围已更新", "k19": "新密码至少需要 8 位。", "k20": "统一查看角色能力、有效数据范围和高风险权限;所有授权仍由后端强制执行。", "k21": "创建账号", "k22": "角色权限模型", "k23": "角色叠加取并集 · 数据范围取最高级", "k24": "高风险", "k25": "搜索账号、姓名、工号或角色", "k26": "全部账号状态", "k27": "停用", "k28": "全部登录情况", "k29": "已登录过", "k30": "从未登录", "k31": "工号/学号", "k32": "所带行政班", "k33": "最后登录", "k34": "尚未登录", "k35": "启用", "k36": "调整角色", "k37": "重置密码", "k38": "初始密码", "k39": "合并后功能权限", "k40": "输入班级编码、名称或专业搜索", "k41": "学院仅表示组织归属,辅导员的数据权限严格来自这里选择的行政班。", "k42": "保存后旧密码立即失效,请通过安全渠道通知本人。", "k43": "新密码", "k44": "再次输入新密码", "k45": "确认重置", "k46": "调整角色与数据范围", "k47": "未关联工号/学号", "k48": "取消选择会解除该班绑定;已由其他辅导员负责的班级需先在行政班管理中完成交接。", "k49": "学院是组织归属;辅导员权限以所带行政班为准。移除辅导员角色会同步解除全部班级绑定。", "k50": "保存角色", "k51": "预检通过:将新增 {created} 个账号、更新 {updated} 个账号,共处理 {total} 个。确认正式导入?", "k52": "导入完成:新增 {created} 个,更新 {updated} 个", "k53": "将创建高权限账号“{name}”,请确认人员与职责。", "k54": "停用“{name}”后,其访问令牌与登录会话将失效。", "k55": "将为“{name}”授予高风险平台权限,请确认人员与职责。", "k56": "已重置 {name} 的密码", "k57": "共 {count} 个账号", "k58": "+{count} 个", "k59": "{grade}级 · {name} · {major}{assignment}", "k60": "(已绑定{name})", "k61": "保存后有效范围:{scope}"}, approvalBatch: {"k0": "发起免修申请", "k1": "发起缓考申请", "k2": "成绩修改申请", "k3": "发起课程替代申请", "k4": "发起申请", "k5": "请填写申请原因", "k6": "请选择申请免修的课程", "k7": "请选择申请缓考的课程", "k8": "请选择成绩记录", "k9": "请完整选择被替代课程和替代课程", "k10": "申请已提交", "k11": "已通过", "k12": "待审核", "k13": "已驳回", "k14": "非排时课程", "k15": "课表已发布", "k16": "等待课表发布", "k17": "从实际修读课程发起申请,查看审核进度与处理结果。", "k18": "从一个入口发起教学申请,集中追踪处理进度。", "k19": "集中处理全部教务申请与审核任务。", "k20": "申请免修", "k21": "从当前或已发布课表的修读课程中选择", "k22": "申请缓考", "k23": "课程与教学班信息一并提交", "k24": "申请课程替代", "k25": "修读中或未通过课程 → 已通过课程", "k26": "发起调停课", "k27": "调课、停课、补课、代课统一从审批工作台发起", "k28": "填写申请", "k29": "发起成绩修改", "k30": "提交成绩修正依据,进入同一审批队列", "k31": "暂无待审批", "k32": "免修申请", "k33": "尚未提交免修申请", "k34": "缓考申请", "k35": "尚未提交缓考申请", "k36": "课程替代申请", "k37": "尚未提交课程替代申请", "k38": "还没有申请记录", "k39": "发起第一项申请", "k40": "选择申请免修的教学班", "k41": "选择申请缓考的教学班", "k42": "列表包含当前学期课程,以及仍未归档且课表已发布的行政班或已选课程。", "k43": "搜索课程名称、代码、教学班号或教师", "k44": "教师待定", "k45": "没有匹配的课程", "k46": "暂无可申请课程", "k47": "课程需为已发布教学任务,并分配到您的行政班或已完成选课;当前学期课程或已发布课表的课程均会显示。", "k48": "替代关系须同时满足两个条件", "k49": "被替代课程应为当前或已发布课表的修读课程,或已有未通过成绩的课程;替代课程必须已有正式发布且不低于 60 分的成绩。", "k50": "被替代课程", "k51": "修读课程 / 历史未通过", "k52": "搜索课程", "k53": "修读", "k54": "未通过", "k55": "暂无可被替代课程", "k56": "已发布且成绩及格", "k57": "暂无已通过课程", "k58": "已排课但尚未发布成绩的课程不属于可替代课程。", "k59": "成绩记录", "k60": "选择已发布成绩", "k61": "修改为", "k62": "申请原因", "k63": "请说明无法按时参加考试的原因及相关情况", "k64": "请说明两门课程在内容、学分或培养要求上的对应关系", "k65": "请说明申请依据及相关情况", "k66": "请选择替代课程", "k67": "请选择被替代课程", "k68": "请填写驳回原因", "k69": "免修", "k70": "缓考", "k71": "成绩修改", "k72": "课程替代", "k73": "学籍异动", "k74": "成绩审核", "k75": "考勤申诉", "k76": "查看 →", "k77": "审核意见:{comment}", "k78": "{count} 门可选", "k79": "{count} 门可替代", "k80": "待审批 ({count})", "k81": "我的记录", "k82": "我的记录 ({count})", "k83": "{count} 学分", "k84": "{score} 分", "k85": "{teacher} · {credits} 学分", "k86": "分"}, diff --git a/web/src/views/NotificationCenterView.vue b/web/src/views/NotificationCenterView.vue index fd9af7a..388392b 100644 --- a/web/src/views/NotificationCenterView.vue +++ b/web/src/views/NotificationCenterView.vue @@ -76,15 +76,15 @@ const recipientFilters = reactive({ keyword: '', }) -const categories: Record = { - General: { label: '一般通知', className: 'general' }, - Approval: { label: '审核待办', className: 'approval' }, - Schedule: { label: '课程变动', className: 'schedule' }, - Grade: { label: '成绩通知', className: 'grade' }, - Attendance: { label: '考勤消息', className: 'attendance' }, - CourseSelection: { label: '选课消息', className: 'selection' }, - Warning: { label: '学业预警', className: 'warning' }, -} +const categories = computed>(() => ({ + General: { label: t('notificationBatch.k0'), className: 'general' }, + Approval: { label: t('notificationBatch.k1'), className: 'approval' }, + Schedule: { label: t('notificationBatch.k2'), className: 'schedule' }, + Grade: { label: t('notificationBatch.k3'), className: 'grade' }, + Attendance: { label: t('notificationBatch.k4'), className: 'attendance' }, + CourseSelection: { label: t('notificationBatch.k5'), className: 'selection' }, + Warning: { label: t('notificationBatch.k6'), className: 'warning' }, +})) const selectedTask = computed(() => composer.value?.teachingTasks?.find( @@ -102,15 +102,15 @@ const audienceName = computed(() => { if (composer.value?.audienceType === 'TeachingTask') { return selectedTask.value ? `${selectedTask.value.taskNumber} · ${selectedTask.value.courseName}` - : '请选择教学班' + : t('notificationBatch.k7') } - if (recipientMode.value === 'Filtered') return '当前筛选结果' + if (recipientMode.value === 'Filtered') return t('notificationBatch.k8') if (recipientMode.value === 'Selected') { return selectedRecipients.value.length - ? `指定的 ${selectedRecipients.value.length} 名收件人` - : '尚未选择收件人' + ? t('notificationBatch.k71', { count: selectedRecipients.value.length }) + : t('notificationBatch.k9') } - return composer.value?.audienceName ?? '正在读取发信范围' + return composer.value?.audienceName ?? t('notificationBatch.k10') }) const visibleClasses = computed(() => (composer.value?.administrativeClasses ?? []).filter( @@ -129,11 +129,11 @@ const editorTextLength = computed(() => { }) function categoryLabel(value: string) { - return categories[value]?.label ?? '系统消息' + return categories.value[value]?.label ?? t('notificationBatch.k11') } function categoryClass(value: string) { - return categories[value]?.className ?? 'general' + return categories.value[value]?.className ?? 'general' } async function load(reset = false) { @@ -300,7 +300,7 @@ function toggleRecipient(recipient: any) { } const maximum = composer.value?.maximumSelectedRecipients ?? 500 if (selectedRecipients.value.length >= maximum) { - ElMessage.warning(`单次最多指定 ${maximum} 名收件人`) + ElMessage.warning(t('notificationBatch.k72', { count: maximum })) return } selectedRecipients.value = [...selectedRecipients.value, recipient] @@ -346,7 +346,7 @@ async function markAllRead() { notification.isRead = true }) unreadCount.value = 0 - ElMessage.success('全部消息已标为已读') + ElMessage.success(t('notificationBatch.k12')) } catch (error) { ElMessage.error(apiErrorMessage(error)) } finally { @@ -356,31 +356,31 @@ async function markAllRead() { async function sendMessage() { if (!messageForm.title.trim()) { - ElMessage.warning('请填写消息标题') + ElMessage.warning(t('notificationBatch.k13')) return } if (!editorTextLength.value) { - ElMessage.warning('请填写消息正文') + ElMessage.warning(t('notificationBatch.k14')) return } if (composer.value?.audienceType === 'TeachingTask' && !messageForm.teachingTaskId) { - ElMessage.warning('请选择接收消息的教学班') + ElMessage.warning(t('notificationBatch.k15')) return } if (!recipientCount.value) { - ElMessage.warning('当前范围内没有可接收消息的账号') + ElMessage.warning(t('notificationBatch.k16')) return } try { await ElMessageBox.confirm( - `消息将发送给“${audienceName.value}”的 ${recipientCount.value} 个账号,发送后不可撤回。`, - '确认发送消息', + t('notificationBatch.k73', { audience: audienceName.value, count: recipientCount.value }), + t('notificationBatch.k17'), { type: 'warning', - confirmButtonText: '确认发送', - cancelButtonText: '继续编辑', + confirmButtonText: t('notificationBatch.k18'), + cancelButtonText: t('notificationBatch.k19'), }, ) sending.value = true @@ -405,7 +405,7 @@ async function sendMessage() { ? selectedRecipients.value.map(item => item.id) : [], }) - ElMessage.success(`已发送给 ${data.recipientCount} 个账号`) + ElMessage.success(t('notificationBatch.k74', { count: data.recipientCount })) messageForm.title = '' messageForm.content = '' selectedRecipients.value = [] @@ -426,13 +426,13 @@ onMounted(() => load())
- 消息中心 -

消息中心

-

系统通知、审核待办、课程变动与成绩消息统一汇总,重要信息不再散落在业务页面。

+ {{ t('notificationBatch.k20') }} +

{{ t('notificationBatch.k20') }}

+

{{ t('notificationBatch.k21') }}

- 未读消息 + {{ t('notificationBatch.k22') }} {{ unreadCount }}
load()) :icon="EditPen" @click="changeTab('compose')" > - 发消息 + {{ t('notificationBatch.k23') }} - 全部已读 + {{ t('notificationBatch.k26') }} - 刷新 + {{ t('notificationBatch.k27') }}
-
+
@@ -515,11 +515,11 @@ onMounted(() => load()) v-model="keyword" clearable :prefix-icon="Search" - placeholder="搜索标题或正文" + :placeholder="t('notificationBatch.k32')" @keyup.enter="load(true)" @clear="load(true)" /> - 仅看未读 + {{ t('notificationBatch.k33') }}
@@ -541,8 +541,8 @@ onMounted(() => load())
{{ categoryLabel(notification.category) }} - 人工发送 - 未读 + {{ t('notificationBatch.k34') }} + {{ t('notificationBatch.k35') }}
@@ -554,27 +554,27 @@ onMounted(() => load()) />
- 来自 {{ notification.senderName }} + {{ t('notificationBatch.k75', { name: notification.senderName }) }} - 接收范围:{{ notification.audienceName }} + {{ t('notificationBatch.k76', { audience: notification.audienceName }) }} - 查看详情 → + {{ t('notificationBatch.k36') }}
- 上一批 + {{ t('notificationBatch.k39') }} - 第 {{ page }} 批 + {{ t('notificationBatch.k77', { page: page }) }} - 下一批 + {{ t('notificationBatch.k40') }}
@@ -586,14 +586,14 @@ onMounted(() => load()) >
- 发送范围 -

编写并发送消息

-

收件范围始终受当前账号的数据权限约束,发送后不可撤回。

+ {{ t('notificationBatch.k41') }} +

{{ t('notificationBatch.k42') }}

+

{{ t('notificationBatch.k43') }}

{{ audienceName }} {{ recipientCount }} - 个接收账号 + {{ t('notificationBatch.k44') }}
@@ -604,7 +604,7 @@ onMounted(() => load()) 01 -

选择收件人

+

{{ t('notificationBatch.k45') }}

diff --git a/web/src/views/StudentAttendanceView.vue b/web/src/views/StudentAttendanceView.vue index 5f2e342..7b232bf 100644 --- a/web/src/views/StudentAttendanceView.vue +++ b/web/src/views/StudentAttendanceView.vue @@ -32,15 +32,15 @@ const appealDialog = ref(false) const appealTarget = ref(null) const appealReason = ref('') -const statusLabels: Record = { - Present: '出勤', Absent: '缺勤', Late: '迟到', Leave: '请假', Excused: '免修', -} +const statusLabels = computed>(() => ({ + Present: t('businessLabels.present'), Absent: t('businessLabels.absent'), Late: t('businessLabels.late'), Leave: t('businessLabels.leave'), Excused: t('attendanceBatch.k11'), +})) const statusColors: Record = { Present: 'success', Absent: 'danger', Late: 'warning', Leave: 'info', Excused: undefined, } -const appealStatusLabels: Record = { - None: '', Pending: '申诉中', Approved: '已通过', Rejected: '已驳回', -} +const appealStatusLabels = computed>(() => ({ + None: '', Pending: t('studentAttendanceExtra.k0'), Approved: t('studentAttendanceExtra.k1'), Rejected: t('studentAttendanceExtra.k2'), +})) function getOrCreateAttendanceDeviceId() { const storageKey = 'jiaowu_attendance_device_id' @@ -171,12 +171,12 @@ async function scanCheckInCode() { try { const result = await CapacitorBarcodeScanner.scanBarcode({ hint: CapacitorBarcodeScannerTypeHint.QR_CODE, - scanInstructions: '请扫描教师展示的课堂签到二维码', + scanInstructions: t('studentAttendanceExtra.k3'), cameraDirection: CapacitorBarcodeScannerCameraDirection.BACK, scanOrientation: CapacitorBarcodeScannerScanOrientation.ADAPTIVE, - cancelButtonAccessibilityLabel: '取消扫码', - torchButtonOnAccessibilityLabel: '关闭手电筒', - torchButtonOffAccessibilityLabel: '打开手电筒', + cancelButtonAccessibilityLabel: t('studentAttendanceExtra.k4'), + torchButtonOnAccessibilityLabel: t('studentAttendanceExtra.k5'), + torchButtonOffAccessibilityLabel: t('studentAttendanceExtra.k6'), }) const token = extractCheckInToken(result.ScanResult) if (!token) { @@ -211,10 +211,10 @@ function formatServerTime(value: string) { function remainingLabel(activity: any) { if (!activity?.checkInEndsAt) return '' const remaining = serverUtcTime(activity.checkInEndsAt) - now.value - if (remaining <= 0) return '签到已结束' + if (remaining <= 0) return t('studentAttendanceExtra.k7') const minutes = Math.floor(remaining / 60000) const seconds = Math.floor((remaining % 60000) / 1000) - return `${minutes}分${String(seconds).padStart(2, '0')}秒后结束` + return t('studentAttendanceExtra.k8', { minutes, seconds: String(seconds).padStart(2, '0') }) } async function confirmQrCheckIn() { @@ -226,7 +226,7 @@ async function confirmQrCheckIn() { token, ...deviceAuditPayload(), }) - ElMessage.success(data.alreadyCheckedIn ? '你已完成本次签到' : '签到成功') + ElMessage.success(data.alreadyCheckedIn ? t('studentAttendanceExtra.k9') : t('studentAttendanceExtra.k10')) await router.replace({ path: route.path, query: {} }) await load() } catch (error) { @@ -273,20 +273,18 @@ async function locationCheckIn(activity: any) { ...deviceAuditPayload(), }) ElMessage.success(data.alreadyCheckedIn - ? '你已完成本次签到' - : `签到成功${data.checkInDistanceMeters === null - ? '' - : `,距签到点约 ${Math.round(data.checkInDistanceMeters)} 米`}`) + ? t('studentAttendanceExtra.k9') + : data.checkInDistanceMeters == null ? t('studentAttendanceExtra.k10') : t('studentAttendanceExtra.k11', { distance: Math.round(data.checkInDistanceMeters) })) await load() } catch (error: any) { if (!error?.response) { const message = error?.code === 1 ? isNativeApp - ? '定位权限被拒绝,请在系统设置中允许本应用获取精确位置。' - : '定位权限被拒绝,请在浏览器中允许本网站获取位置。' + ? t('studentAttendanceExtra.k12') + : t('studentAttendanceExtra.k13') : error?.code === 3 - ? '获取位置超时,请移到信号较好的位置后重试。' - : '无法获取当前位置,请检查手机定位服务后重试。' + ? t('studentAttendanceExtra.k14') + : t('studentAttendanceExtra.k15') ElMessage.error(message) } else { ElMessage.error(apiErrorMessage(error)) @@ -320,7 +318,7 @@ function canAppeal(record: any) { } function formatRate(value: number | null) { - return value === null ? '暂无' : `${value.toFixed(1)}%` + return value === null ? t('studentAttendanceExtra.k16') : `${value.toFixed(1)}%` } function rateTone(value: number | null) { @@ -333,7 +331,7 @@ function rateTone(value: number | null) { function recordDate(value: string) { const date = new Date(value) return { - month: `${date.getMonth() + 1}月`, + month: new Intl.DateTimeFormat(getDisplayLocale(), { month: 'short' }).format(date), day: String(date.getDate()).padStart(2, '0'), } } @@ -385,13 +383,13 @@ onUnmounted(() => {
{{ scannedActivity.courseCode }} · {{ scannedActivity.taskNumber }} {{ scannedActivity.courseName }} -

{{ scannedActivity.sheetName }} · 扫码签到

+

{{ scannedActivity.sheetName }} · {{ t('studentAttendanceExtra.k17') }}

{{ remainingLabel(scannedActivity) }} - 已于 {{ formatServerTime(scannedActivity.checkInAt) }} 签到 + {{ t('studentAttendanceExtra.k18', { time: formatServerTime(scannedActivity.checkInAt) }) }} {{ t('attendanceBatch.k5') }}
@@ -401,7 +399,7 @@ onUnmounted(() => { :disabled="!scannedActivity.isOpen || Boolean(scannedActivity.checkInAt)" :loading="checkInTargetId === scannedActivity.sheetId" @click="confirmQrCheckIn" - >{{ scannedActivity.checkInAt ? '已签到' : scannedActivity.isOpen ? '确认签到' : '签到已结束' }} + >{{ scannedActivity.checkInAt ? t('studentAttendanceExtra.k19') : scannedActivity.isOpen ? t('studentAttendanceExtra.k20') : t('studentAttendanceExtra.k7') }}
@@ -410,12 +408,12 @@ onUnmounted(() => {
{{ activity.courseCode }} · {{ activity.taskNumber }} {{ activity.courseName }} -

{{ activity.sheetName }} · {{ activity.locationRadiusMeters }} 米范围内

+

{{ activity.sheetName }} · {{ t('studentAttendanceExtra.k21', { radius: activity.locationRadiusMeters }) }}

{{ remainingLabel(activity) }} - 已于 {{ formatServerTime(activity.checkInAt) }} 签到 + {{ t('studentAttendanceExtra.k18', { time: formatServerTime(activity.checkInAt) }) }} {{ t('attendanceBatch.k6') }}
@@ -425,7 +423,7 @@ onUnmounted(() => { :disabled="Boolean(activity.checkInAt)" :loading="checkInTargetId === activity.sheetId" @click="locationCheckIn(activity)" - >{{ activity.checkInAt ? '已签到' : '定位并签到' }} + >{{ activity.checkInAt ? t('studentAttendanceExtra.k19') : t('studentAttendanceExtra.k22') }}
@@ -435,7 +433,7 @@ onUnmounted(() => { {{ t('attendanceBatch.k7') }} {{ t('attendanceBatch.k8') }} - {{ courseGroups.length }} 门课程 · {{ records.length }} 次点名 + {{ t('studentAttendanceExtra.k23', { courses: courseGroups.length, sessions: records.length }) }}
@@ -444,12 +442,12 @@ onUnmounted(() => {
{{ course.courseCode }} · {{ course.taskNumber }}

{{ course.courseName }}

- {{ course.teacherNames.join('、') || '任课教师未登记' }} + {{ course.teacherNames.join(t('academicPlanning.separator')) || t('studentAttendanceExtra.k24') }}
{{ t('attendanceBatch.k9') }} {{ formatRate(course.attendanceRate) }} - {{ course.attendedCount }} / {{ course.requiredCount }} 次到课 + {{ t('studentAttendanceExtra.k25', { attended: course.attendedCount, required: course.requiredCount }) }}