feat(shared,tests): add error boundaries, lib utils, i18n messages, and integration tests
Some checks failed
CI / scheduled-backup (push) Has been skipped
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled

shared:

- Add class-filter, error-state, route-error, section-error-boundary, widget-boundary components

- Add ui/alert component

- Add constants directory

- Add breached-password, export-utils, permission-bitmap, rate-limit, resolve-action-error, route-permissions, route-resolver, type-guards lib

- Add i18n messages (en, zh-CN) for invitation-codes, parent, questions, rbac

tests:

- Add integration tests for elective

- Add tests/setup/empty-stub

scripts:

- Add update-md.cjs, tmp_append_en.ps1, tmp_merge_en.ps1 utilities
This commit is contained in:
SpecialX
2026-07-03 10:26:38 +08:00
parent 21142f9b99
commit 0e63c24ed9
97 changed files with 9753 additions and 819 deletions

View File

@@ -7,7 +7,12 @@
"learning": "Learning",
"mastered": "Mastered",
"dueReview": "Due Review",
"masteredRate": "Mastery Rate"
"masteredRate": "Mastery Rate",
"totalDesc": "Total collected errors",
"newDesc": "Not yet reviewed",
"learningDesc": "Being reviewed",
"masteredDesc": "Mastery rate {rate}%",
"dueReviewDesc": "Due today"
},
"status": {
"new": "New",
@@ -36,7 +41,9 @@
"saveNote": "Save Note",
"archive": "Archive",
"delete": "Delete",
"collect": "Collect Errors"
"collect": "Collect Errors",
"cancel": "Cancel",
"adding": "Adding..."
},
"fields": {
"question": "Select Question",
@@ -45,7 +52,24 @@
"masteryLevel": "Mastery Level",
"reviewCount": "Review Count",
"nextReview": "Next Review",
"createdAt": "Added At"
"createdAt": "Added At",
"student": "Student",
"className": "Class"
},
"masteryLevel": {
"0": "Not Started",
"1": "Beginner",
"2": "Familiar",
"3": "Proficient",
"4": "Skilled",
"5": "Mastered"
},
"questionType": {
"single_choice": "Single Choice",
"multiple_choice": "Multiple Choice",
"judgment": "True/False",
"text": "Short Answer",
"composite": "Composite"
},
"errorTags": {
"concept": "Concept Gap",
@@ -56,13 +80,59 @@
"memory": "Memory Error",
"time": "Out of Time"
},
"itemCard": {
"questionDeleted": "Question deleted",
"questionContent": "Question content",
"difficulty": "Difficulty {level}",
"mastery": "Mastery: {level}",
"reviewTimes": "Reviewed {count} times",
"needReview": "Needs review",
"nextReview": "Next {date}",
"addedAt": "Added on {date}",
"masteryOutOf": "Mastery: {level}/5"
},
"detailDialog": {
"question": "Question",
"myAnswer": "My Answer",
"correctAnswer": "Correct Answer",
"aiAnalysis": "AI Analysis",
"reviewSelf": "Self Review",
"studyNote": "Study Note",
"notePlaceholder": "Record your reflections, solutions, common mistakes...",
"errorTagsLabel": "Error Reason Tags",
"reviewHistory": "Review History",
"questionDeleted": "Question deleted",
"variantPractice": "Variant Practice",
"variantPracticeDesc": "Practice with variants from this error"
},
"filters": {
"searchPlaceholder": "Search notes...",
"status": "Status",
"source": "Source",
"review": "Review",
"allStatus": "All Status",
"allSource": "All Sources",
"allErrors": "All Errors",
"dueOnly": "Due Only"
},
"addDialog": {
"title": "Add Error",
"description": "Select a question from the question bank to add to your error book. Errors are also auto-collected after completing homework/exams.",
"selectQuestion": "Select Question",
"selectPlaceholder": "Select from bank...",
"noteLabel": "Study Note (optional)",
"notePlaceholder": "Record error reasons, solutions...",
"errorTagsLabel": "Error Reason Tags",
"questionPreview": "Question"
},
"empty": {
"title": "Error book is empty",
"description": "Wrong answers from exams and homework will be collected here automatically. You can also add manually."
},
"teacher": {
"title": "Error Analysis",
"description": "View class error statistics and weak knowledge points",
"description": "View class error statistics and weak knowledge points to support precision teaching",
"descriptionShort": "View class error statistics and weak knowledge points by subject.",
"coverage": "Student Coverage",
"totalErrors": "Total Errors",
"avgMastery": "Avg Mastery Rate",
@@ -71,7 +141,16 @@
"studentDetail": "Student Error Details",
"topWrong": "Top Wrong Questions",
"noClass": "No classes assigned",
"noStudent": "No students in class"
"noClassDesc": "You have not been assigned to any class. Unable to view error analysis data.",
"noStudent": "No students in class",
"noStudentDesc": "There are no students in the class. Unable to view error analysis data.",
"noChapterDataTitle": "No Chapter Error Data",
"noChapterDataDesc": "Knowledge points have not been linked to chapters. Unable to display chapter-level statistics.",
"noKpDataTitle": "No Knowledge Point Data",
"noKpDataDesc": "Errors have not been linked to knowledge points. Unable to display weak point statistics.",
"noStudentErrorsTitle": "No Student Errors",
"noStudentErrorsDesc": "No student error data for the selected range.",
"studentsCount": "{total} students total, {withErrors} with errors"
},
"parent": {
"title": "Child Error Book",
@@ -89,7 +168,7 @@
},
"admin": {
"title": "School-wide Error Analysis",
"description": "School-wide error statistics and weak point analysis",
"description": "School-wide error statistics and weak point analysis for teaching decisions",
"description2": "View school-wide error statistics and weak knowledge points by subject.",
"noPermissionTitle": "Insufficient Permissions",
"noPermissionDescription": "You do not have permission to view school-wide error analysis data.",
@@ -104,6 +183,100 @@
"noStudentErrorsTitle": "No Student Errors",
"noStudentErrorsDescription": "No student error data for the selected subject."
},
"analyticsStats": {
"coverage": "Coverage",
"coverageSub": "/ {total}",
"totalErrors": "Total Errors",
"totalErrorsSub": "{avg} per student",
"avgMastery": "Avg Mastery",
"avgMasteryGood": "Good",
"avgMasteryNeedImprove": "Needs improvement",
"dueReview": "Due Review",
"dueReviewNeedAttention": "Needs attention",
"dueReviewNone": "None due",
"knowledgePoints": "Knowledge Points",
"knowledgePointsWide": "Wide range",
"knowledgePointsFocused": "Focused"
},
"subjectTabs": {
"all": "All Subjects",
"dueReview": "Due {count}"
},
"classFilter": {
"all": "All Classes",
"errorCount": "{count} errors",
"dueReview": "{count} due"
},
"topWrong": {
"title": "Top Wrong Questions",
"topTitle": "Top 10 Wrong Questions",
"emptyTitle": "No frequent wrong questions",
"emptyDesc": "After students complete homework or exams, frequency statistics will appear here.",
"errorCount": "{count} students wrong",
"masteredCount": "{count} mastered",
"masteryRate": "Mastery rate {rate}%"
},
"weaknessChart": {
"title": "Weak Knowledge Points Top {count}",
"errorCount": "Errors",
"chapterLabel": "Chapter: {title}",
"masteredLabel": "Mastered",
"masteryRateLabel": "Mastery Rate",
"unclassified": "Unclassified"
},
"chapterChart": {
"title": "Chapter Error Distribution",
"errorCount": "Errors",
"masteredLabel": "Mastered",
"masteryRateLabel": "Mastery Rate",
"knowledgePointCount": "Knowledge Points",
"weakKpsLabel": "Weak points:",
"knowledgePointBadge": "{count} knowledge points"
},
"classErrorBar": {
"title": "Class Error Comparison",
"errorCount": "Total Errors",
"studentCount": "Students",
"avgPerStudent": "Avg per student",
"avgMastery": "Avg Mastery",
"dueReview": "Due Review"
},
"subjectDistChart": {
"title": "Subject Error Distribution",
"errorCount": "Errors",
"masteredLabel": "Mastered",
"masteryRateLabel": "Mastery Rate"
},
"groupedTable": {
"unclassified": "Unclassified",
"studentCount": "{count}",
"studentsWithErrors": "{count} with errors",
"totalErrors": "Total Errors",
"avgMastery": "Avg Mastery",
"student": "Student",
"new": "New",
"learning": "Learning",
"mastered": "Mastered",
"dueReview": "Due",
"masteryRate": "Mastery Rate",
"unknown": "Unknown"
},
"classOverview": {
"coverage": "Coverage",
"coverageDesc": "Students with error records",
"totalErrors": "Total Errors",
"totalErrorsDesc": "Class cumulative errors",
"avgMastery": "Avg Mastery",
"avgMasteryDesc": "Mastered error ratio",
"weakPoints": "Weak Points",
"weakPointsDesc": "Needs focus",
"weakPointsTitle": "Weak Knowledge Points Top 10",
"subjectDist": "Subject Distribution",
"noData": "No data",
"errorsAndMastery": "{count} errors \u00b7 {rate}% mastery",
"noStudentData": "No student error data",
"noStudentDataDesc": "After students complete homework or exams, error data will be summarized here."
},
"messages": {
"added": "Error added",
"noteSaved": "Note saved",
@@ -118,6 +291,8 @@
"archiveFailed": "Archive failed",
"collectFailed": "Failed to collect errors",
"notFound": "Error not found or access denied",
"selectQuestion": "Please select a question"
"selectQuestion": "Please select a question",
"recordFailed": "Record failed",
"addedShort": "Added"
}
}