Skip to content

Commit c18bbaa

Browse files
committed
feat(quiz): localize incomplete quiz result
1 parent 45b81d9 commit c18bbaa

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

frontend/components/quiz/QuizResult.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ export function QuizResult({
3838
if (isIncomplete && answeredCount > 0) {
3939
return {
4040
icon: <Clock className="w-14 h-14 text-orange-500" />,
41-
title: 'Час вийшов',
42-
message: `Ви відповіли на ${answeredCount} з ${total} питань. Результат не зараховано.`,
41+
title: t('incomplete.title'),
42+
message: t('incomplete.message', { answeredCount, total }),
4343
color: 'text-orange-600 dark:text-orange-400',
4444
};
4545
}
46-
4746
if (score === 0 && answeredCount === 0) {
4847
return {
4948
icon: <Clock className="w-14 h-14 text-gray-500" />,

frontend/messages/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@
130130
"title": "Excellent Work!",
131131
"message": "You have mastered the material well"
132132
},
133+
"incomplete": {
134+
"title": "Time's up",
135+
"message": "You answered {answeredCount} out of {total} questions. Result not counted."
136+
},
133137
"violations": "Quiz completed with rule violations ({count} violations). Result not counted towards leaderboard.",
134138
"pointsAwarded": "+{points} points added to rating",
135139
"noPointsAwarded": "No points awarded (result not improved)",

frontend/messages/pl.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@
130130
"title": "Doskonała Praca!",
131131
"message": "Dobrze opanowałeś materiał"
132132
},
133+
"incomplete": {
134+
"title": "Czas minął",
135+
"message": "Odpowiedzi udzielono na {answeredCount} z {total} pytań. Wynik nie został zaliczony."
136+
},
133137
"violations": "Quiz ukończony z naruszeniami zasad ({count} naruszeń). Wynik nie zaliczony do rankingu.",
134138
"pointsAwarded": "+{points} punktów dodanych do oceny",
135139
"noPointsAwarded": "Nie przyznano punktów (wynik nie poprawiony)",

frontend/messages/uk.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@
130130
"title": "Чудова робота!",
131131
"message": "Ви добре засвоїли матеріал"
132132
},
133+
"incomplete": {
134+
"title": "Час вийшов",
135+
"message": "Ви відповіли на {answeredCount} з {total} питань. Результат не зараховано."
136+
},
133137
"violations": "Квіз завершено з порушеннями правил ({count} порушень). Результат не зараховано до рейтингу.",
134138
"pointsAwarded": "+{points} балів додано до рейтингу",
135139
"noPointsAwarded": "Бали не нараховано (результат не покращено)",

0 commit comments

Comments
 (0)