From 6ba9651f34c31c2d9b52aa2f93c0d90bf1c4562e Mon Sep 17 00:00:00 2001 From: Ahmed Darrazi Date: Thu, 18 Dec 2025 23:35:27 +0100 Subject: [PATCH] lang bugfix --- .../student/partials/assignment-columns.tsx | 32 +++++++++---------- .../js/pages/student/partials/quiz-status.tsx | 26 +++++++-------- .../student/tabs-content/course-quizzes.tsx | 4 +-- .../student/tabs-content/course-resources.tsx | 30 ++++++++--------- .../js/pages/student/tabs-content/quizzes.tsx | 4 +-- .../pages/student/tabs-content/resources.tsx | 30 ++++++++--------- 6 files changed, 63 insertions(+), 63 deletions(-) diff --git a/resources/js/pages/student/partials/assignment-columns.tsx b/resources/js/pages/student/partials/assignment-columns.tsx index aa214f56..00473d3f 100644 --- a/resources/js/pages/student/partials/assignment-columns.tsx +++ b/resources/js/pages/student/partials/assignment-columns.tsx @@ -4,48 +4,48 @@ import { format } from 'date-fns'; import { AlertCircle, Clock } from 'lucide-react'; import AssignmentDialog from './assignment-dialog'; -// Function to format date +// Funktion zum Formatieren des Datums const formatDate = (dateString: string | undefined) => { - if (!dateString) return 'N/A'; + if (!dateString) return 'k.A.'; const date = new Date(dateString); return format(date, 'MMMM dd, yyyy, hh:mm a'); }; -// Function to check if deadline has passed +// Funktion zum Prüfen, ob die Frist abgelaufen ist const isDeadlinePassed = (deadline: string) => { if (!deadline) return false; return new Date() > new Date(deadline); }; -// Function to get submission status +// Funktion, um den Abgabestatus zu ermitteln const getSubmissionStatus = (assignment: CourseAssignment) => { if (!assignment.submissions || assignment.submissions.length === 0) { - return { status: 'not_submitted', label: 'Not Submitted', variant: 'secondary' as const }; + return { status: 'not_submitted', label: 'Nicht eingereicht', variant: 'secondary' as const }; } const latestSubmission = assignment.submissions[0]; if (latestSubmission.status === 'graded') { - return { status: 'graded', label: 'Graded', variant: 'default' as const }; + return { status: 'graded', label: 'Bewertet', variant: 'default' as const }; } else if (latestSubmission.is_late) { - return { status: 'late', label: 'Late Submission', variant: 'destructive' as const }; + return { status: 'late', label: 'Verspätete Abgabe', variant: 'destructive' as const }; } else { - return { status: 'submitted', label: 'Submitted', variant: 'default' as const }; + return { status: 'submitted', label: 'Eingereicht', variant: 'default' as const }; } }; export const AssignmentColumns: ColumnDef[] = [ { accessorKey: 'title', - header: 'Title', + header: 'Titel', cell: ({ row }) => { const assignment = row.original; return (

{assignment.title}

- Total Marks: {assignment.total_mark} - Pass Marks: {assignment.pass_mark} + Gesamtpunktzahl: {assignment.total_mark} + Bestehenspunktzahl: {assignment.pass_mark}
); @@ -53,7 +53,7 @@ export const AssignmentColumns: ColumnDef[] = [ }, { accessorKey: 'deadline', - header: 'Deadline', + header: 'Frist', cell: ({ row }) => { const assignment = row.original; const deadlinePassed = isDeadlinePassed(assignment.deadline); @@ -68,7 +68,7 @@ export const AssignmentColumns: ColumnDef[] = [ }, { accessorKey: 'marks_obtained', - header: () =>
Obtained Marks
, + header: () =>
Erhaltene Punkte
, cell: ({ row }) => { const assignment = row.original; const hasSubmission = assignment.submissions && assignment.submissions.length > 0; @@ -87,11 +87,11 @@ export const AssignmentColumns: ColumnDef[] = [

{latestSubmission?.marks_obtained} / {totalMarks}

- {isLate &&

(Late: Max {latestSubmission?.assignment?.late_total_mark})

} + {isLate &&

(Verspätet: Max {latestSubmission?.assignment?.late_total_mark})

} ) : (
-

Not Graded

+

Nicht bewertet

Max: {totalMarks}

)} @@ -115,7 +115,7 @@ export const AssignmentColumns: ColumnDef[] = [ }, { id: 'actions', - header: () =>
Action
, + header: () =>
Aktion
, cell: ({ row }) => { const assignment = row.original; diff --git a/resources/js/pages/student/partials/quiz-status.tsx b/resources/js/pages/student/partials/quiz-status.tsx index 84a1c190..81a10c8a 100644 --- a/resources/js/pages/student/partials/quiz-status.tsx +++ b/resources/js/pages/student/partials/quiz-status.tsx @@ -21,12 +21,12 @@ const QuizIcon = ({ quiz, latestSubmission }: { quiz: SectionQuiz; latestSubmiss return (
- {/* Quiz Icon */} + {/* Quiz-Symbol */}
- {/* Quiz Info */} + {/* Quiz-Info */}

{quiz.title}

@@ -37,7 +37,7 @@ const QuizIcon = ({ quiz, latestSubmission }: { quiz: SectionQuiz; latestSubmiss )} {!hasAttempted && ( - Not Submitted + Nicht eingereicht )}
@@ -90,15 +90,15 @@ const QuizStatus = ({ quiz, completed }: Props) => { ) : ( )}
@@ -112,7 +112,7 @@ const QuizStatus = ({ quiz, completed }: Props) => {
- {/* Marks Display */} + {/* Punkteanzeige */} {hasAttempted && (

diff --git a/resources/js/pages/student/tabs-content/course-quizzes.tsx b/resources/js/pages/student/tabs-content/course-quizzes.tsx index afcfd671..a7be0327 100644 --- a/resources/js/pages/student/tabs-content/course-quizzes.tsx +++ b/resources/js/pages/student/tabs-content/course-quizzes.tsx @@ -25,7 +25,7 @@ const CourseQuizzes = () => { section.section_quizzes.map((quiz) => ) ) : (

-

There is no quiz added

+

Kein Quiz vorhanden

)} @@ -35,7 +35,7 @@ const CourseQuizzes = () => { ) : (
-

There is no quiz added

+

Kein Quiz vorhanden

)} diff --git a/resources/js/pages/student/tabs-content/course-resources.tsx b/resources/js/pages/student/tabs-content/course-resources.tsx index 026b9a7e..5ec09809 100644 --- a/resources/js/pages/student/tabs-content/course-resources.tsx +++ b/resources/js/pages/student/tabs-content/course-resources.tsx @@ -10,21 +10,21 @@ const CourseResources = () => { const { props } = usePage(); const { resources } = props; - // Function to format date in Bengali style if needed + // Funktion zum Formatieren von Datum/Uhrzeit (bei Bedarf auf Deutsch) const formatDate = (dateString: string) => { const date = new Date(dateString); return format(date, 'MMMM dd, yyyy, hh:mm a'); }; - // Helper to handle file download + // Helferfunktion zum Herunterladen von Dateien const handleDownload = async (resource: LessonResource, e: React.MouseEvent) => { e.preventDefault(); try { - // For non-link resources, use the download endpoint + // Für nicht-verlinkte Ressourcen den Download-Endpunkt verwenden const url = route('resources.download', resource.id); window.open(url, '_blank'); } catch (error) { - // Fallback to direct download if the endpoint fails + // Fallback: Direktes Öffnen/Herunterladen, falls der Endpunkt fehlschlägt window.open(resource.resource, '_blank'); } }; @@ -34,12 +34,12 @@ const CourseResources = () => { {resources && resources.length > 0 ? ( resources.map((section, sectionIndex) => ( - {/* Module Header */} + {/* Modul-Überschrift */}
-

Module: {section.title}

+

Modul: {section.title}

- {/* Lessons Table */} + {/* Lektionen-Tabelle */}
{section.section_lessons && section.section_lessons.length > 0 ? ( section.section_lessons.map((lesson) => @@ -48,7 +48,7 @@ const CourseResources = () => { {/* Lesson Title */}

- Lesson: {lesson.title} + Lektion: {lesson.title}

@@ -57,9 +57,9 @@ const CourseResources = () => { - Title - Date & Time - Action + Titel + Datum & Uhrzeit + Aktion @@ -73,13 +73,13 @@ const CourseResources = () => { ) : ( )} @@ -93,14 +93,14 @@ const CourseResources = () => { ) : null, ) ) : ( -
No lessons found in this module.
+
Keine Lektionen in diesem Modul gefunden.
)} )) ) : (
-

No resources available for this course yet.

+

Für diesen Kurs sind noch keine Ressourcen verfügbar.

)} diff --git a/resources/js/pages/student/tabs-content/quizzes.tsx b/resources/js/pages/student/tabs-content/quizzes.tsx index e5ccb586..0305b33b 100644 --- a/resources/js/pages/student/tabs-content/quizzes.tsx +++ b/resources/js/pages/student/tabs-content/quizzes.tsx @@ -25,7 +25,7 @@ const Quizzes = () => { section.section_quizzes.map((quiz) => ) ) : (
-

There is no quiz added

+

Kein Quiz vorhanden

)} @@ -35,7 +35,7 @@ const Quizzes = () => { ) : (
-

There is no quiz added

+

Kein Quiz vorhanden

)} diff --git a/resources/js/pages/student/tabs-content/resources.tsx b/resources/js/pages/student/tabs-content/resources.tsx index 2d85014b..1098b9f9 100644 --- a/resources/js/pages/student/tabs-content/resources.tsx +++ b/resources/js/pages/student/tabs-content/resources.tsx @@ -10,21 +10,21 @@ const Resources = () => { const { props } = usePage(); const { resources } = props; - // Function to format date in Bengali style if needed + // Funktion zum Formatieren von Datum/Uhrzeit (bei Bedarf auf Deutsch) const formatDate = (dateString: string) => { const date = new Date(dateString); return format(date, 'MMMM dd, yyyy, hh:mm a'); }; - // Helper to handle file download + // Helferfunktion zum Herunterladen von Dateien const handleDownload = async (resource: LessonResource, e: React.MouseEvent) => { e.preventDefault(); try { - // For non-link resources, use the download endpoint + // Für nicht-verlinkte Ressourcen den Download-Endpunkt verwenden const url = route('resources.download', resource.id); window.open(url, '_blank'); } catch (error) { - // Fallback to direct download if the endpoint fails + // Fallback: Direktes Öffnen/Herunterladen, falls der Endpunkt fehlschlägt window.open(resource.resource, '_blank'); } }; @@ -34,12 +34,12 @@ const Resources = () => { {resources && resources.length > 0 ? ( resources.map((section, sectionIndex) => ( - {/* Module Header */} + {/* Modul-Überschrift */}
-

Module: {section.title}

+

Modul: {section.title}

- {/* Lessons Table */} + {/* Lektionen-Tabelle */}
{section.section_lessons && section.section_lessons.length > 0 ? ( section.section_lessons.map((lesson) => @@ -48,7 +48,7 @@ const Resources = () => { {/* Lesson Title */}

- Lesson: {lesson.title} + Lektion: {lesson.title}

@@ -57,9 +57,9 @@ const Resources = () => {
- Title - Date & Time - Action + Titel + Datum & Uhrzeit + Aktion @@ -73,13 +73,13 @@ const Resources = () => { ) : ( )} @@ -93,14 +93,14 @@ const Resources = () => { ) : null, ) ) : ( -
No lessons found in this module.
+
Keine Lektionen in diesem Modul gefunden.
)} )) ) : (
-

No resources available for this course yet.

+

Für diesen Kurs sind noch keine Ressourcen verfügbar.

)}