feat(announcements,messaging): 公告与消息模块审计重构 — i18n + Error Boundary + a11y

- 新增审计报告 docs/architecture/audit/announcements-messages-audit-report.md
- 新增中英双语 i18n 字典 announcements.json / messages.json(11/13 个命名空间)
- 重构所有 announcements 和 messaging 组件接入 next-intl(useTranslations)
- 所有页面 page.tsx 使用 generateMetadata + getTranslations 替代硬编码 metadata
- 新增 7 个 error.tsx 错误边界(4 公告 + 3 消息),统一 EmptyState + i18n + 重试
- a11y 改进:announcement-card / message-list / notification-dropdown 添加 aria-label
- 同步架构图 004 和 005:i18n.messages 清单 + 已知问题修复记录
This commit is contained in:
SpecialX
2026-06-22 16:02:07 +08:00
parent 21c1e7a286
commit fde711ce46
30 changed files with 1085 additions and 261 deletions

View File

@@ -0,0 +1,90 @@
{
"title": {
"list": "公告",
"detail": "公告详情",
"adminList": "公告管理",
"edit": "编辑公告",
"create": "新建公告"
},
"description": {
"list": "随时了解学校最新公告动态。",
"adminList": "创建并管理全校公告。",
"edit": "更新公告详情。"
},
"filter": {
"all": "全部",
"published": "已发布",
"draft": "草稿",
"archived": "已归档",
"placeholder": "按状态筛选"
},
"status": {
"draft": "草稿",
"published": "已发布",
"archived": "已归档"
},
"type": {
"school": "全校",
"grade": "年级",
"class": "班级"
},
"form": {
"title": "标题",
"titlePlaceholder": "公告标题",
"content": "内容",
"contentPlaceholder": "请输入公告内容...",
"type": "类型",
"typePlaceholder": "选择类型",
"status": "状态",
"statusPlaceholder": "选择状态",
"targetGrade": "目标年级",
"targetGradePlaceholder": "选择年级(可选)",
"targetClass": "目标班级",
"targetClassPlaceholder": "选择班级(可选)",
"submit": "保存",
"create": "创建",
"cancel": "取消",
"saving": "保存中..."
},
"actions": {
"new": "新建公告",
"publish": "发布",
"archive": "归档",
"edit": "编辑",
"delete": "删除",
"back": "返回"
},
"messages": {
"created": "公告已创建",
"updated": "公告已更新",
"deleted": "公告已删除",
"published": "公告已发布",
"archived": "公告已归档",
"notFound": "公告不存在",
"createFailed": "创建公告失败",
"updateFailed": "保存公告失败",
"publishFailed": "发布失败",
"archiveFailed": "归档失败",
"deleteFailed": "删除失败",
"invalidForm": "表单数据无效",
"invalidState": "表单状态无效"
},
"meta": {
"publishedAt": "发布于 {date}",
"createdAt": "创建于 {date}",
"updatedAt": "更新于 {date}",
"author": "作者:{name}"
},
"empty": {
"noAnnouncements": "暂无公告",
"noAnnouncementsDesc": "目前还没有任何公告。",
"noMatch": "当前筛选条件下暂无公告。",
"deleteTitle": "删除公告",
"deleteDesc": "此操作将永久删除"{title}"。"
},
"error": {
"loadFailed": "公告加载失败",
"loadFailedDesc": "抱歉,加载公告时发生了意外错误。请稍后重试。",
"retry": "重试"
}
}