You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(analytics): translate the hotspot detail lines on /es
The analytics page shipped its per-hotspot "why" line as a prebuilt English
sentence built inside lib/analytics/confusion-hotspots.ts, so on /es every
heading, badge and footer translated while the line carrying the actual
finding stayed in English:
4 of 5 student(s) still failing on their latest attempt · average 52%
3 of 5 student(s) missed it on their latest submission · 60% miss rate
Caught by rendering the page under /es for the QA screenshots, not by a test —
the strings were correct, just not translatable.
Hotspot now carries numbers only (`totalAttempts` replaces `evidence`) and the
page formats them through next-intl. Each signal counts something different, so
each scope gets its own message rather than one generic sentence that would
read wrong for three scopes out of four.
The MCP tool keeps its English `evidence` string on purpose: its reader is a
model, not a localised UI. Noted in the twin-implementation header.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqQTE7LDYPx7d15BcWLGfC
evidence: `${b.stuck.size} of ${b.attempted.size} student(s) still failing on their latest attempt · ${avgAttempts.toFixed(1)} attempt(s) each on average${avgScore==null ? '' : ` · average ${Math.round(avgScore)}%`}`,
549
+
totalAttempts: null,
542
550
})
543
551
}
544
552
returnout
@@ -644,7 +652,7 @@ async function loadExamQuestionMisses(
644
652
avgScore: null,
645
653
avgAttempts: null,
646
654
lessonId: null,
647
-
evidence: `${b.missers.size} of ${b.attempts} student(s) missed it on their latest submission · ${Math.round(missRate*100)}% miss rate`,
Copy file name to clipboardExpand all lines: messages/en.json
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1649,7 +1649,11 @@
1649
1649
"severity": "Severity",
1650
1650
"allClear": "No hotspots in this window — nobody is stuck on an exercise, checkpoint, drill or exam question.",
1651
1651
"noData": "No student activity in this window yet. Once students attempt exercises, checkpoints, practice drills or exams, their results appear here.",
1652
-
"sources": "Based on {practice} practice attempts, {exercises} exercise attempts, {checkpoints} checkpoint attempts and {exams} exam submissions in the last {days} days."
1652
+
"sources": "Based on {practice} practice attempts, {exercises} exercise attempts, {checkpoints} checkpoint attempts and {exams} exam submissions in the last {days} days.",
1653
+
"evidencePractice": "{attempts} attempt(s) by {students} student(s) · average {avg}% · {below} below 70%",
1654
+
"evidenceStuck": "{stuck} of {students} student(s) still failing on their latest attempt · {attempts} attempt(s) each on average",
1655
+
"evidenceAvg": "average {avg}%",
1656
+
"evidenceExam": "{missers} of {students} student(s) missed it on their latest submission · {rate}% miss rate"
Copy file name to clipboardExpand all lines: messages/es.json
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1649,7 +1649,11 @@
1649
1649
"severity": "Gravedad",
1650
1650
"allClear": "Sin puntos de confusión en este periodo: nadie está atascado en un ejercicio, checkpoint, práctica o pregunta de examen.",
1651
1651
"noData": "Aún no hay actividad de estudiantes en este periodo. Cuando intenten ejercicios, checkpoints, prácticas o exámenes, sus resultados aparecerán aquí.",
1652
-
"sources": "Basado en {practice} intentos de práctica, {exercises} intentos de ejercicio, {checkpoints} intentos de checkpoint y {exams} entregas de examen en los últimos {days} días."
1652
+
"sources": "Basado en {practice} intentos de práctica, {exercises} intentos de ejercicio, {checkpoints} intentos de checkpoint y {exams} entregas de examen en los últimos {days} días.",
1653
+
"evidencePractice": "{attempts} intento(s) de {students} estudiante(s) · promedio {avg}% · {below} por debajo del 70%",
1654
+
"evidenceStuck": "{stuck} de {students} estudiante(s) siguen fallando en su último intento · {attempts} intento(s) cada uno en promedio",
1655
+
"evidenceAvg": "promedio {avg}%",
1656
+
"evidenceExam": "{missers} de {students} estudiante(s) la fallaron en su última entrega · {rate}% de fallo"
0 commit comments