refactor(dashboard): V2 审计重构 — i18n 补齐 + 共享抽象 + 单测 + a11y
V2 审计报告(docs/architecture/audit/dashboard-audit-report-v2.md)发现并修复: - P0 i18n:10 个子组件硬编码字符串全部接入 next-intl(teacher-quick-actions / teacher-classes-card / teacher-homework-card / teacher-schedule / recent-submissions / teacher-grade-trends / student-grades-card / student-today-schedule-card / student-upcoming-assignments-card / admin-dashboard),新增 ~50 个翻译键 - P1 共享抽象:新增 DashboardGreetingHeader 组件,消除 teacher/student 头部 90% 重复代码,两个 Header 改为薄包装 - P2 单测:为 6 个纯函数添加 31 个单元测试 (tests/integration/dashboard/dashboard-utils.test.ts) - P2 a11y:admin 表格 caption、teacher/student 视图语义化标签 (header / section aria-label / aside aria-label) - 同步架构图 004/005
This commit is contained in:
@@ -64,7 +64,17 @@
|
||||
"grades": "Grades",
|
||||
"attendance": "Attendance",
|
||||
"announcements": "Announcements",
|
||||
"leaveRequest": "Leave Request"
|
||||
"leaveRequest": "Leave Request",
|
||||
"createAssignment": "Create Assignment",
|
||||
"grade": "Grade",
|
||||
"myClasses": "My Classes",
|
||||
"viewAll": "View all",
|
||||
"viewSchedule": "View schedule",
|
||||
"viewAllAssignments": "View all assignments",
|
||||
"viewAllSubmissions": "View all submissions",
|
||||
"createNewAssignment": "Create new assignment",
|
||||
"create": "Create",
|
||||
"createClass": "Create class"
|
||||
},
|
||||
"todo": {
|
||||
"title": "Today's To-Do",
|
||||
@@ -86,13 +96,26 @@
|
||||
"upcomingAssignments": "Upcoming Assignments",
|
||||
"grades": "Grades",
|
||||
"myClasses": "My Classes",
|
||||
"gradeTrends": "Grade Trends"
|
||||
"gradeTrends": "Grade Trends",
|
||||
"homework": "Homework",
|
||||
"recentSubmissions": "Recent Submissions",
|
||||
"classPerformance": "Class Performance",
|
||||
"recentGrades": "Recent Grades"
|
||||
},
|
||||
"table": {
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"role": "Role",
|
||||
"created": "Created"
|
||||
"created": "Created",
|
||||
"student": "Student",
|
||||
"assignment": "Assignment",
|
||||
"submitted": "Submitted",
|
||||
"action": "Action",
|
||||
"title": "Title",
|
||||
"status": "Status",
|
||||
"due": "Due",
|
||||
"score": "Score",
|
||||
"when": "When"
|
||||
},
|
||||
"empty": {
|
||||
"noUsers": "No users",
|
||||
@@ -105,12 +128,31 @@
|
||||
"noChildrenDesc": "Your account is not linked to any student accounts yet. Please contact the school administrator to link your child.",
|
||||
"noStudent": "No student found",
|
||||
"noStudentDesc": "Create a student user to see dashboard.",
|
||||
"contactSupport": "Contact support"
|
||||
"contactSupport": "Contact support",
|
||||
"noClassesYet": "No classes yet",
|
||||
"noClassesDesc": "Create a class to start managing students and schedules.",
|
||||
"noAssignments": "No assignments",
|
||||
"noAssignmentsDesc": "Create an assignment to get started.",
|
||||
"noAssignmentsStudent": "No assignments",
|
||||
"noAssignmentsStudentDesc": "You have no assigned homework right now.",
|
||||
"noClassesToday": "No classes today",
|
||||
"noClassesTodayDesc": "Your timetable is clear for today.",
|
||||
"noNewSubmissions": "No new submissions",
|
||||
"noNewSubmissionsDesc": "All caught up! There are no new submissions to review.",
|
||||
"noData": "No data available",
|
||||
"noDataDesc": "Publish assignments to see class performance trends.",
|
||||
"noGradedWork": "No graded work yet",
|
||||
"noGradedWorkDesc": "Finish and submit assignments to see your score trend."
|
||||
},
|
||||
"badge": {
|
||||
"activeSessions": "{count} active sessions",
|
||||
"users": "{count} users",
|
||||
"childrenLinked": "{count} children linked"
|
||||
"childrenLinked": "{count} children linked",
|
||||
"live": "LIVE",
|
||||
"late": "Late",
|
||||
"inProgress": "In Progress",
|
||||
"upNext": "Up Next",
|
||||
"unknown": "Unknown"
|
||||
},
|
||||
"error": {
|
||||
"loadFailed": "Page load failed",
|
||||
@@ -121,6 +163,26 @@
|
||||
},
|
||||
"chart": {
|
||||
"newUsers": "New users",
|
||||
"newSubmissions": "New submissions"
|
||||
"newSubmissions": "New submissions",
|
||||
"averageScorePercent": "Average Score (%)",
|
||||
"scorePercent": "Score (%)",
|
||||
"classPerformanceDesc": "Average scores for the last {count} assignments",
|
||||
"submittedCount": "{submitted}/{total} submitted",
|
||||
"latest": "Latest",
|
||||
"points": "Points"
|
||||
},
|
||||
"schedule": {
|
||||
"noDueDate": "No due date",
|
||||
"scrollForMore": "Scroll for more",
|
||||
"noMoreClasses": "No more classes today",
|
||||
"homeroom": "Homeroom",
|
||||
"room": "Room"
|
||||
},
|
||||
"action": {
|
||||
"review": "Review",
|
||||
"view": "View",
|
||||
"continue": "Continue",
|
||||
"start": "Start",
|
||||
"grade": "Grade"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,14 @@
|
||||
"titleLabel": "Lesson Plan Title",
|
||||
"titlePlaceholder": "e.g., Autumn - Lesson 1",
|
||||
"blockCount": "{count} sections",
|
||||
"blankHint": "Start from scratch"
|
||||
"blankHint": "Start from scratch",
|
||||
"names": {
|
||||
"tpl_regular": "Regular Lesson",
|
||||
"tpl_review": "Review Lesson",
|
||||
"tpl_experiment": "Experiment Lesson",
|
||||
"tpl_inquiry": "Inquiry Lesson",
|
||||
"tpl_blank": "Blank Template"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
"canvasEmpty": "Canvas is empty",
|
||||
@@ -87,7 +94,9 @@
|
||||
"auto": "Auto",
|
||||
"manual": "Manual save",
|
||||
"revert": "Revert to this version",
|
||||
"revertTitle": "Confirm Revert",
|
||||
"revertConfirm": "Revert to v{versionNo}? A new version will be created.",
|
||||
"revertSuccess": "Reverted to v{versionNo}",
|
||||
"autoLabel": "Auto version"
|
||||
},
|
||||
"knowledgePoint": {
|
||||
@@ -193,6 +202,7 @@
|
||||
"retry": "Retry"
|
||||
},
|
||||
"confirm": {
|
||||
"archive": "Archive this lesson plan?"
|
||||
"archive": "Archive this lesson plan?",
|
||||
"archiveTitle": "Confirm Archive"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,17 @@
|
||||
"grades": "成绩",
|
||||
"attendance": "考勤",
|
||||
"announcements": "通知",
|
||||
"leaveRequest": "请假申请"
|
||||
"leaveRequest": "请假申请",
|
||||
"createAssignment": "新建作业",
|
||||
"grade": "批改",
|
||||
"myClasses": "我的班级",
|
||||
"viewAll": "查看全部",
|
||||
"viewSchedule": "查看课表",
|
||||
"viewAllAssignments": "查看全部作业",
|
||||
"viewAllSubmissions": "查看全部提交",
|
||||
"createNewAssignment": "新建作业",
|
||||
"create": "新建",
|
||||
"createClass": "新建班级"
|
||||
},
|
||||
"todo": {
|
||||
"title": "今日待办",
|
||||
@@ -86,13 +96,26 @@
|
||||
"upcomingAssignments": "即将到期的作业",
|
||||
"grades": "成绩",
|
||||
"myClasses": "我的班级",
|
||||
"gradeTrends": "成绩趋势"
|
||||
"gradeTrends": "成绩趋势",
|
||||
"homework": "作业",
|
||||
"recentSubmissions": "最近提交",
|
||||
"classPerformance": "班级表现",
|
||||
"recentGrades": "最近成绩"
|
||||
},
|
||||
"table": {
|
||||
"name": "姓名",
|
||||
"email": "邮箱",
|
||||
"role": "角色",
|
||||
"created": "创建时间"
|
||||
"created": "创建时间",
|
||||
"student": "学生",
|
||||
"assignment": "作业",
|
||||
"submitted": "提交时间",
|
||||
"action": "操作",
|
||||
"title": "标题",
|
||||
"status": "状态",
|
||||
"due": "截止时间",
|
||||
"score": "分数",
|
||||
"when": "时间"
|
||||
},
|
||||
"empty": {
|
||||
"noUsers": "暂无用户",
|
||||
@@ -105,12 +128,31 @@
|
||||
"noChildrenDesc": "您的账号尚未关联任何学生账号,请联系学校管理员完成绑定。",
|
||||
"noStudent": "未找到学生用户",
|
||||
"noStudentDesc": "请创建学生账号以查看仪表盘。",
|
||||
"contactSupport": "联系客服"
|
||||
"contactSupport": "联系客服",
|
||||
"noClassesYet": "暂无班级",
|
||||
"noClassesDesc": "创建班级以开始管理学生与课表。",
|
||||
"noAssignments": "暂无作业",
|
||||
"noAssignmentsDesc": "创建作业以开始布置任务。",
|
||||
"noAssignmentsStudent": "暂无作业",
|
||||
"noAssignmentsStudentDesc": "当前没有布置给你的作业。",
|
||||
"noClassesToday": "今日无课",
|
||||
"noClassesTodayDesc": "今日课表为空。",
|
||||
"noNewSubmissions": "暂无新提交",
|
||||
"noNewSubmissionsDesc": "全部处理完成!暂无新提交需要批改。",
|
||||
"noData": "暂无数据",
|
||||
"noDataDesc": "发布作业后即可查看班级表现趋势。",
|
||||
"noGradedWork": "暂无已批改作业",
|
||||
"noGradedWorkDesc": "完成并提交作业后即可查看成绩趋势。"
|
||||
},
|
||||
"badge": {
|
||||
"activeSessions": "{count} 个活跃会话",
|
||||
"users": "{count} 位用户",
|
||||
"childrenLinked": "已关联 {count} 个孩子"
|
||||
"childrenLinked": "已关联 {count} 个孩子",
|
||||
"live": "进行中",
|
||||
"late": "已迟交",
|
||||
"inProgress": "进行中",
|
||||
"upNext": "下一节",
|
||||
"unknown": "未知"
|
||||
},
|
||||
"error": {
|
||||
"loadFailed": "页面加载失败",
|
||||
@@ -121,6 +163,26 @@
|
||||
},
|
||||
"chart": {
|
||||
"newUsers": "新增用户",
|
||||
"newSubmissions": "新增提交"
|
||||
"newSubmissions": "新增提交",
|
||||
"averageScorePercent": "平均分 (%)",
|
||||
"scorePercent": "分数 (%)",
|
||||
"classPerformanceDesc": "最近 {count} 份作业的平均分",
|
||||
"submittedCount": "{submitted}/{total} 已提交",
|
||||
"latest": "最新",
|
||||
"points": "得分"
|
||||
},
|
||||
"schedule": {
|
||||
"noDueDate": "无截止日期",
|
||||
"scrollForMore": "滚动查看更多",
|
||||
"noMoreClasses": "今日无更多课程",
|
||||
"homeroom": "班主任",
|
||||
"room": "教室"
|
||||
},
|
||||
"action": {
|
||||
"review": "查看",
|
||||
"view": "查看",
|
||||
"continue": "继续",
|
||||
"start": "开始",
|
||||
"grade": "批改"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,14 @@
|
||||
"titleLabel": "课案标题",
|
||||
"titlePlaceholder": "例如:《秋天》第一课时",
|
||||
"blockCount": "{count} 个环节",
|
||||
"blankHint": "从空白开始"
|
||||
"blankHint": "从空白开始",
|
||||
"names": {
|
||||
"tpl_regular": "常规课",
|
||||
"tpl_review": "复习课",
|
||||
"tpl_experiment": "实验课",
|
||||
"tpl_inquiry": "探究课",
|
||||
"tpl_blank": "空白模板"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
"canvasEmpty": "画布为空",
|
||||
@@ -87,7 +94,9 @@
|
||||
"auto": "自动",
|
||||
"manual": "手动保存",
|
||||
"revert": "回退到此版本",
|
||||
"revertTitle": "确认回退",
|
||||
"revertConfirm": "确认回退到 v{versionNo}?将生成新版本。",
|
||||
"revertSuccess": "已回退到 v{versionNo}",
|
||||
"autoLabel": "自动版本"
|
||||
},
|
||||
"knowledgePoint": {
|
||||
@@ -193,6 +202,7 @@
|
||||
"retry": "重试"
|
||||
},
|
||||
"confirm": {
|
||||
"archive": "确认归档此课案?"
|
||||
"archive": "确认归档此课案?",
|
||||
"archiveTitle": "确认归档"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user