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:
SpecialX
2026-06-22 17:01:00 +08:00
parent 10c668f36a
commit e997abaf5e
41 changed files with 1811 additions and 516 deletions

View File

@@ -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": "确认归档"
}
}