diff --git a/src/components/courses/create/(sections)/SettingsSection.tsx b/src/components/courses/create/(sections)/SettingsSection.tsx
index 683d461bf..29356391b 100644
--- a/src/components/courses/create/(sections)/SettingsSection.tsx
+++ b/src/components/courses/create/(sections)/SettingsSection.tsx
@@ -38,7 +38,7 @@ export default function SettingsSection({
From 08b9173dfca3dea553f70b380c2367d80a2ba035 Mon Sep 17 00:00:00 2001
From: Marty Byrde <45905689+Marty-Byrde@users.noreply.github.com>
Date: Sun, 5 Apr 2026 11:20:47 +0200
Subject: [PATCH 26/27] ref: simplified "contents"-help button on small screens
This way the label is not shown on small screens to prevent overlapping between the "Check" and "Contents" buttons.
---
.../courses/[share_token]/practice/RenderPracticeQuestion.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx b/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
index 5463505a8..1033e921a 100644
--- a/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
+++ b/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
@@ -106,7 +106,7 @@ export function RenderPracticeQuestion() {
show={isValidationComplete && (question.type === 'single-choice' || question.type === 'multiple-choice')}
/>
-
+
From 47ced7f351fc535aed898244c48bc0abff6e65ba Mon Sep 17 00:00:00 2001
From: Marty Byrde <45905689+Marty-Byrde@users.noreply.github.com>
Date: Sun, 5 Apr 2026 11:25:14 +0200
Subject: [PATCH 27/27] ref: localized `RenderPracticeQuestion` static texts
This commit localizes the "Check Answer", "Continue" and new content-button labels.
---
.../practice/RenderPracticeQuestion.tsx | 13 +++++++------
src/i18n/locales/de.json | 5 +++++
src/i18n/locales/de.ts | 5 +++++
src/i18n/locales/en.json | 5 +++++
src/i18n/locales/en.ts | 5 +++++
5 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx b/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
index 1033e921a..36701cd8c 100644
--- a/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
+++ b/src/components/courses/[share_token]/practice/RenderPracticeQuestion.tsx
@@ -20,7 +20,7 @@ import { usePracticeFeeback } from '@/src/hooks/courses/[share_token]/practice/u
import { useLogger } from '@/src/hooks/log/useLogger'
import { RHFProvider, useRHFContext } from '@/src/hooks/Shared/form/react-hook-form/RHFProvider'
import useRHF from '@/src/hooks/Shared/form/useRHF'
-import { useI18n } from '@/src/i18n/client-localization'
+import { useI18n, useScopedI18n } from '@/src/i18n/client-localization'
import { EvaluateAnswer } from '@/src/lib/courses/[share_token]/practice/EvaluateAnswer'
import { cn } from '@/src/lib/Shared/utils'
import { ChoiceQuestion, Question } from '@/src/schemas/QuestionSchema'
@@ -28,7 +28,8 @@ import { getQuestionInputSchema, QuestionInput } from '@/src/schemas/UserQuestio
import { Any } from '@/types'
export function RenderPracticeQuestion() {
- const t = useI18n()
+ const tAll = useI18n()
+ const t = useScopedI18n('Components.RenderPracticeQuestion')
const { practiceQuestions: questions, questions: unfilteredQuestions, currentQuestionIndex, navigateToQuestion, storeAnswer, contents, categories } = usePracticeStore((store) => store)
const pathname = usePathname()
const logger = useLogger('RenderPracticeQuestion')
@@ -44,7 +45,7 @@ export function RenderPracticeQuestion() {
const categoryId = categories.find((c) => c.name === question.category)!.id
const RHFForm = useRHF(
- getQuestionInputSchema(t),
+ getQuestionInputSchema(tAll),
{
// Warning: Type assertion is intentional.
// By setting the question_id and type, the form-values are (re-) set when the question changes, setting `values` makes the form controlled.
@@ -115,11 +116,11 @@ export function RenderPracticeQuestion() {
variant='base'
isLoading={isSubmitting || isPending}
type='submit'>
- Check Answer
+ {t('check_answer_button_label')}
@@ -132,7 +133,7 @@ export function RenderPracticeQuestion() {
type='button'
size='sm'>
- Content
+ {t('contents_button_label')}
diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json
index 0052d9a49..2e6468fd8 100644
--- a/src/i18n/locales/de.json
+++ b/src/i18n/locales/de.json
@@ -560,6 +560,11 @@
"justify_label": "Ausrichten"
}
}
+ },
+ "RenderPracticeQuestion": {
+ "check_answer_button_label": "Antwort prüfen",
+ "continue_button_label": "Weiter",
+ "contents_button_label": "Hilfe"
}
},
"AccountPage": {
diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts
index b69d1654a..8c3775d92 100644
--- a/src/i18n/locales/de.ts
+++ b/src/i18n/locales/de.ts
@@ -567,6 +567,11 @@ export default {
justify_label: 'Ausrichten'
}
}
+ },
+ RenderPracticeQuestion: {
+ check_answer_button_label: 'Antwort prüfen',
+ continue_button_label: 'Weiter',
+ contents_button_label: 'Hilfe'
}
},
AccountPage: {
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index e079dc690..281c89146 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -572,6 +572,11 @@
"justify_label": "Align justify"
}
}
+ },
+ "RenderPracticeQuestion": {
+ "check_answer_button_label": "Check Answer",
+ "continue_button_label": "Continue",
+ "contents_button_label": "Help"
}
},
"schemas": {
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts
index 1a7ea5c18..26ed8214d 100644
--- a/src/i18n/locales/en.ts
+++ b/src/i18n/locales/en.ts
@@ -570,6 +570,11 @@ export default {
justify_label: 'Align justify'
}
}
+ },
+ RenderPracticeQuestion: {
+ check_answer_button_label: 'Check Answer',
+ continue_button_label: 'Continue',
+ contents_button_label: 'Help'
}
},
schemas: {