From 00452e6965ddf74a4c8556029f4deccddab10cba Mon Sep 17 00:00:00 2001 From: biss Date: Sat, 31 Oct 2026 11:13:41 +0800 Subject: [PATCH] feat: localize course grade analytics --- web/src/i18n/messages/en-US.ts | 3 + web/src/i18n/messages/zh-CN.ts | 3 + web/src/views/CourseGradeStatisticsView.vue | 75 ++++++++++----------- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/web/src/i18n/messages/en-US.ts b/web/src/i18n/messages/en-US.ts index c53dd36..3a0fa4d 100644 --- a/web/src/i18n/messages/en-US.ts +++ b/web/src/i18n/messages/en-US.ts @@ -175,6 +175,9 @@ export default { plugins: { title: 'Unified plugin platform', description: 'Manage built-in business capabilities, runtime state, and server-side access boundaries in one place.', runningCount: '/ {total} plugins running', safetyTitle: 'Disabling does not delete data', safetyDescription: 'State changes immediately affect menus, routes, and APIs. Existing business endpoints still enforce role permissions and data scope.', signedPackages: 'Signed plugin packages', packageDescription: 'Uploads enter staging only. Validated packages must still be marked for activation and the service restarted.', selectZip: 'Select ZIP package', selectSignature: 'Select signature file', validateStage: 'Validate and stage', noPackages: 'No signed plugin packages uploaded', pluginVersion: 'Plugin / version', publisher: 'Publisher', verification: 'Verification', status: 'Status', actions: 'Actions', rollback: 'Roll back to this version', activate: 'Activate', delete: 'Delete', awaitingRestart: 'Awaiting restart', running: 'Running', disabled: 'Disabled', navigationCount: '{count} page entries', waitRestart: 'Mark and await restart', cancel: 'Cancel', enable: 'enable', disable: 'disable', bundled: 'Installed with the current system version', packageStatuses: { Staged: 'Staged', PendingActivation: 'Activation pending', Active: 'Active version', Superseded: 'Previous version', Failed: 'Load failed' }, messages: { selectFiles: 'Select the plugin ZIP package and its signature file.', staged: 'Signature verified. The plugin package is now staged.', activateConfirm: 'Version {version} will activate after the next service restart. The active version will be retained for rollback.', activateTitle: 'Activate {name}', activationPending: 'Marked for activation. Restart the service using the maintenance procedure.', deleteConfirm: 'Delete the package record for {name} {version}?', deleteTitle: 'Delete plugin package', deleted: 'Plugin package record deleted.', enableConfirm: 'Users with the existing role permissions will see and be able to use “{name}” again.', disableConfirm: 'The menu, pages, and backend APIs for “{name}” will be disabled. Existing data will not be deleted.', stateTitle: '{action} {name}', confirmState: 'Confirm {action}', stateChanged: '{name} has been {action}d.' }, }, + courseStats: { + title: 'Course grade analytics', publishedOnly: 'This page uses formally published grades', back: 'Back', refresh: 'Refresh', generating: 'Statistics are being generated. Refresh shortly.', scope: 'Statistics scope', classStudents: 'Students in this administrative class', myClass: 'My class', classmates: 'Classmates', myMajor: 'My major', majorStudents: 'Students in the major', myCollege: 'My college', collegeStudents: 'Students in the college', university: 'University', universityStudents: 'All university students', peopleCount: '{count} students', scopeAverage: '{scope} average', population: 'Population: {caption} · {count} students', highest: 'Highest score', lowest: 'Lowest score', passed: 'Passed', passRate: 'Pass rate', empty: 'No course statistics available', distributionTitle: '{scope} score distribution', distributionDescription: 'Calculated for the current tab only, with {count} students. Bar labels show counts and percentages.', comparisonTitle: 'Cross-level analysis', comparisonDescription: 'Compare minimum–maximum score ranges, averages, and pass rates across all four levels. The current level is highlighted.', scoreBand: 'Score band', people: 'Students', scopePeople: '{scope} students', scoreRange: 'Score range', average: 'Average', score: 'Score', rangeStart: 'Range start', insights: { lowPass: 'The pass rate is {rate}%. Review coursework and final-exam components for low-scoring students and arrange targeted support.', lowAverage: 'The average is {average}. Review commonly missed topics and teaching pace, then reinforce by score band.', highDeviation: 'Scores vary widely. Review learning differences across classes or groups, grading standards, and teaching support.', stable: 'The average is {average} and the pass rate is {rate}%. Performance is stable; continue following up with lower-scoring students.' }, chart: { distributionTooltip: '{range} points
Students {count}
Share {rate}%', barLabel: '{count} students\n{rate}%', comparisonTooltip: '{scope}
Highest {highest}
Average {average}
Lowest {lowest}
Pass rate {rate}%' }, + }, 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 ea0481e..7d34298 100644 --- a/web/src/i18n/messages/zh-CN.ts +++ b/web/src/i18n/messages/zh-CN.ts @@ -175,6 +175,9 @@ export default { plugins: { title: '统一插件平台', description: '集中管理内置业务能力的入口、运行状态和服务端访问边界。', runningCount: '/ {total} 个插件运行中', safetyTitle: '停用不会删除数据', safetyDescription: '状态变更立即作用于菜单、路由和 API;角色权限与数据范围校验仍由原业务接口负责。', signedPackages: '签名插件包', packageDescription: '上传只进入暂存区;校验通过后仍需标记激活并重启服务。', selectZip: '选择 ZIP 包', selectSignature: '选择签名文件', validateStage: '校验并暂存', noPackages: '尚未上传签名插件包', pluginVersion: '插件 / 版本', publisher: '发布者', verification: '校验', status: '状态', actions: '操作', rollback: '回滚到此版本', activate: '激活', delete: '删除', awaitingRestart: '等待重启', running: '运行中', disabled: '已停用', navigationCount: '{count} 个页面入口', waitRestart: '标记并等待重启', cancel: '取消', enable: '启用', disable: '停用', bundled: '随当前系统版本安装', packageStatuses: { Staged: '已暂存', PendingActivation: '待重启激活', Active: '活动版本', Superseded: '历史版本', Failed: '装载失败' }, messages: { selectFiles: '请选择插件 ZIP 包和对应的签名文件。', staged: '签名校验通过,插件包已进入暂存区。', activateConfirm: '版本 {version} 将在下次服务重启时激活。当前活动版本会保留,可用同样方式回滚。', activateTitle: '激活 {name}', activationPending: '已标记为待激活,请按维护流程重启服务。', deleteConfirm: '确认删除 {name} {version} 的包记录?', deleteTitle: '删除插件包', deleted: '插件包记录已删除。', enableConfirm: '启用后,具备原有角色权限的用户将重新看到并可使用“{name}”。', disableConfirm: '停用后,“{name}”的菜单、页面和后端接口都会关闭,已有数据不会删除。', stateTitle: '{action}{name}', confirmState: '确认{action}', stateChanged: '{name}已{action}。' }, }, + courseStats: { + title: '课程成绩分析', publishedOnly: '本页数据来自已正式发布成绩', back: '返回', refresh: '刷新', generating: '统计数据正在生成,请稍后刷新。', scope: '统计范围', classStudents: '该行政班学生', myClass: '本班', classmates: '同班同学', myMajor: '本专业', majorStudents: '专业学生', myCollege: '本学院', collegeStudents: '学院学生', university: '本校', universityStudents: '全校学生', peopleCount: '{count} 人', scopeAverage: '{scope}平均分', population: '统计对象:{caption} · {count} 人', highest: '最高分', lowest: '最低分', passed: '合格人数', passRate: '合格率', empty: '暂无可展示的课程统计', distributionTitle: '{scope}分数段分布', distributionDescription: '按当前标签页单独统计,共 {count} 人;柱顶显示人数和占比。', comparisonTitle: '各层级整体分析', comparisonDescription: '同时比较四个层级的最低—最高分区间、平均分和合格率;当前标签对应层级高亮。', scoreBand: '分数段', people: '人数', scopePeople: '{scope}人数', scoreRange: '分数区间', average: '平均分', score: '分数', rangeStart: '区间起点', insights: { lowPass: '合格率为 {rate}%,建议优先复核低分段学生的平时与期末分项,并安排针对性答疑。', lowAverage: '平均分为 {average},建议检查易失分知识点与教学进度,结合分数段安排补强。', highDeviation: '成绩离散度较高,建议关注不同教学班或学生群体的学习差异,核对评价标准与教学支持。', stable: '平均分 {average}、合格率 {rate}%,当前表现稳定;可重点关注低分段学生的持续跟进。' }, chart: { distributionTooltip: '{range} 分
人数 {count} 人
占比 {rate}%', barLabel: '{count} 人\n{rate}%', comparisonTooltip: '{scope}
最高分 {highest}
平均分 {average}
最低分 {lowest}
合格率 {rate}%' }, + }, api: { 'data.constraint_conflict': '数据约束冲突。', 'server.unhandled_error': '服务器处理请求时发生错误。', diff --git a/web/src/views/CourseGradeStatisticsView.vue b/web/src/views/CourseGradeStatisticsView.vue index cd4798c..b081bd9 100644 --- a/web/src/views/CourseGradeStatisticsView.vue +++ b/web/src/views/CourseGradeStatisticsView.vue @@ -1,5 +1,6 @@