diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 17c466c2..ef584067 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -573,8 +573,10 @@ "COLLAPSE_ALL": "Collapse All", "EXPAND_ALL": "Expand All", "RESOURCES": "Resources", - "MARK_AS_COMPLETED": "Mark As Complete" - + "MARK_AS_COMPLETED": "Mark As Complete", + "COURSE_TYPE": "Course Type", + "SUBTOPICS_SELECTED": "subtopics selected", + "NO_RESOURCES_FOUND": "No resources found" }, "ASSESSMENTS": { "ASSESSMENTS": "Assessments", diff --git a/public/locales/hi/common.json b/public/locales/hi/common.json index c982f4ef..15b9a819 100644 --- a/public/locales/hi/common.json +++ b/public/locales/hi/common.json @@ -564,15 +564,17 @@ "ENTER_VALID_CENTER_NAME": "वैध केंद्र नाम दर्ज करें" }, "COURSE_PLANNER": { - "COURSE_PLANNER": "पाठ्यक्रम योजना", - "FOUNDATION_COURSE": "आधार पाठ्यक्रम", - "MAIN_COURSE": "मुख्य पाठ्यक्रम", - "COLLAPSE_ALL": "सभी को संक्षिप्त करें", - "EXPAND_ALL": "सभी को विस्तृत करें", - "RESOURCES": "संसाधन", - - "MARK_AS_COMPLETED": "पूर्ण के रूप में चिह्नित करें" - }, + "COURSE_PLANNER": "कोर्स योजना", + "FOUNDATION_COURSE": "फाउंडेशन कोर्स", + "MAIN_COURSE": "मुख्य कोर्स", + "COLLAPSE_ALL": "सभी को संकुचित करें", + "EXPAND_ALL": "सभी को विस्तारित करें", + "RESOURCES": "संसाधन", + "MARK_AS_COMPLETED": "पूर्ण के रूप में चिह्नित करें", + "COURSE_TYPE": "कोर्स प्रकार", + "SUBTOPICS_SELECTED": "उपविषयों का चयन किया गया", + "NO_RESOURCES_FOUND": "कोई संसाधन नहीं मिला" +}, "ASSESSMENTS": { "ASSESSMENTS": "मूल्यांकन", "CENTER": "केंद्र", diff --git a/public/locales/mr/common.json b/public/locales/mr/common.json index 4c3f9f55..adeffbf3 100644 --- a/public/locales/mr/common.json +++ b/public/locales/mr/common.json @@ -562,15 +562,17 @@ "ENTER_VALID_CENTER_NAME": "वैध केंद्राचे नाव प्रविष्ट करा." }, "COURSE_PLANNER": { - "COURSE_PLANNER": "पाठ्यक्रम योजना", - "FOUNDATION_COURSE": "आधार पाठ्यक्रम", - "MAIN_COURSE": "मुख्य पाठ्यक्रम", - "COLLAPSE_ALL": "सर्व संक्षिप्त करा.", - "EXPAND_ALL": "सर्व विस्तृत करा.", - "RESOURCES": "संसाधन", - "MARK_AS_COMPLETED": "पूर्ण म्हणून चिन्हांकित करा" - - }, + "COURSE_PLANNER": "कोर्स योजना", + "FOUNDATION_COURSE": "फाउंडेशन कोर्स", + "MAIN_COURSE": "मुख्य कोर्स", + "COLLAPSE_ALL": "सर्व संकुचित करा", + "EXPAND_ALL": "सर्व विस्तारित करा", + "RESOURCES": "साधने", + "MARK_AS_COMPLETED": "पूर्ण म्हणून चिन्हांकित करा", + "COURSE_TYPE": "कोर्स प्रकार", + "SUBTOPICS_SELECTED": "उपविषय निवडलेले आहेत", + "NO_RESOURCES_FOUND": "कोणतीही साधने सापडली नाही" +}, "ASSESSMENTS": { "ASSESSMENTS": "मूल्यांकन", diff --git a/src/components/CourseAccordion.tsx b/src/components/CourseAccordion.tsx index 0f930f58..1b93eef3 100644 --- a/src/components/CourseAccordion.tsx +++ b/src/components/CourseAccordion.tsx @@ -1,27 +1,42 @@ import React, { useEffect } from 'react'; -import { Box, Accordion, AccordionSummary, AccordionDetails, Typography } from '@mui/material'; +import { + Box, + Accordion, + AccordionSummary, + AccordionDetails, + Typography, +} from '@mui/material'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; import { useTheme } from '@mui/material/styles'; import CoursePlannerCards from './CoursePlannerCards'; +import { useTranslation } from 'next-i18next'; interface CourseAccordionProps { title: any; type: string; - resources: any; + resources: any; expanded: boolean; onChange?: (event: React.SyntheticEvent, expanded: boolean) => void; } -const CourseAccordion: React.FC = ({ title, type, resources, expanded, onChange }) => { +const CourseAccordion: React.FC = ({ + title, + type, + resources, + expanded, + onChange, +}) => { const theme = useTheme(); - + const { t } = useTranslation(); useEffect(() => { - console.log("resources", type, resources); + console.log('resources', type, resources); }, []); return ( - = ({ title, type, resource > - { - resources?.length === 0 && No resources found - } + {resources?.length === 0 && ( + + {t('COURSE_PLANNER.NO_RESOURCES_FOUND')} + + )} diff --git a/src/components/FacilitatorDrawer.tsx b/src/components/FacilitatorDrawer.tsx index 64113a9b..8f521708 100644 --- a/src/components/FacilitatorDrawer.tsx +++ b/src/components/FacilitatorDrawer.tsx @@ -72,7 +72,7 @@ const FacilitatorDrawer: React.FC = ({ }} > {selectedCount > 0 - ? `${selectedCount} subtopics selected` + ? `${selectedCount} ${t('COURSE_PLANNER.SUBTOPICS_SELECTED')}` : `${t('ASSESSMENTS.NO_SUBTOPIC_SELECTED')}`} = ({ }} > {secondary && ( - +