Skip to content

Commit

Permalink
Merge pull request #403 from Aar-if/forty
Browse files Browse the repository at this point in the history
Issue #0000 feat: Course planner translation fixes
  • Loading branch information
itsvick authored Dec 4, 2024
2 parents ae778ee + 30d340b commit 42ab313
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 83 deletions.
8 changes: 7 additions & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,13 @@
"NO_DATA_POST": "No data available for Learners Post-requisites",
"FACILITATORS": "Facilitators Requisites",
"NO_DATA": "No data available for Facilitators Requisites",
"DOWNLOAD_SAMPLE_CSV": "Download Sample CSV"
"DOWNLOAD_SAMPLE_CSV": "Download Sample CSV",
"BOARDS":"Boards",
"SELECT_MEDIUM":"Select Medium",
"SELECT_GRADE":"Select Grade",
"SELECT_TYPE":"Select Type",
"CLEAR_SELECTION":"Clear Selection",
"SELECT_ALL_MESSSAGE":"Select Medium, Grade, and Type"
},
"MASTER": {
"STATE": "States",
Expand Down
68 changes: 38 additions & 30 deletions public/locales/hi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,36 +393,44 @@
"ADMIN_UPDATED_SUCCESSFULLY": "एडमिन को सफलतापूर्वक अपडेट किया गया है!"
},
"COURSE_PLANNER": {
"GRADE": "कक्षा",
"MEDIUM": "माध्यम",
"FILTER": "फ़िल्टर",
"BOARDS_FULLY_UPLOADED": "बोर्ड पूरी तरह से अपलोड हो गए हैं",
"ACTIVITY": "गतिविधि",
"COPY_LINK": "लिंक कॉपी करें",
"SEARCH": "खोज",
"DATA_NOT_FOUND": "डेटा नहीं मिला",
"SUBJECTS_UPLOADED": "विषय अपलोड किए गए",
"IMPORT_PLANNER": "प्लानर इम्पोर्ट करें",
"REMOVE_FILE": "हटाएं",
"IMPORT_PLANNER_TO_UPLOADING": "प्लानर इम्पोर्ट' पर क्लिक करें शुरू करने के लिए",
"TOPIC_DETAILS": "विषय विवरण",
"BROWSE_FILE": "फ़ाइल ब्राउज़ करें",
"UPLOAD": "अपलोड करें",
"COURSE_CREATED_SUCCESSFULLY": "कोर्स सफलतापूर्वक बनाया गया",
"COURSE_NOT_CREATED": "कोर्स नहीं बनाया गया",
"SUB-TOPIC": "उप-विषय",
"SUBTOPICS": "उप-विषय",
"RESOURCES": "संसाधन",
"TOPIC": "विषय",
"DURATION/MONTH": "अवधि/माह",
"LEARNERS_PREREQISITE": "शिक्षार्थियों की पूर्व-आवश्यकताएँ",
"NO_DATA_PRE": "शिक्षार्थियों की पूर्व-आवश्यकताओं के लिए कोई डेटा उपलब्ध नहीं है",
"LEARNERS_POSTREQISITE": "शिक्षार्थियों की पश्च-आवश्यकताएँ",
"NO_DATA_POST": "शिक्षार्थियों की पश्च-आवश्यकताओं के लिए कोई डेटा उपलब्ध नहीं है",
"FACILITATORS": "सुविधाकर्ताओं की आवश्यकताएँ",
"NO_DATA": "सुविधाकर्ताओं की आवश्यकताओं के लिए कोई डेटा उपलब्ध नहीं है",
"DOWNLOAD_SAMPLE_CSV": "सैंपल CSV डाउनलोड करें"
},
"GRADE": "ग्रेड",
"MEDIUM": "माध्यम",
"FILTER": "फ़िल्टर",
"BOARDS_FULLY_UPLOADED": "बोर्ड पूरी तरह से अपलोड हो गए हैं",
"ACTIVITY": "गतिविधि",
"COPY_LINK": "लिंक कॉपी करें",
"SEARCH": "खोज",
"DATA_NOT_FOUND": "डेटा नहीं मिला",
"SUBJECTS_UPLOADED": "विषय अपलोड हो गए हैं",
"IMPORT_PLANNER": "इम्पोर्ट प्लानर",
"REMOVE_FILE": "फ़ाइल हटाएं",
"IMPORT_PLANNER_TO_UPLOADING": "अपलोड शुरू करने के लिए ‘इम्पोर्ट प्लानर’ पर क्लिक करें",
"TOPIC_DETAILS": "विषय विवरण",
"BROWSE_FILE": "फ़ाइल ब्राउज़ करें",
"UPLOAD": "अपलोड करें",
"COURSE_CREATED_SUCCESSFULLY": "कोर्स सफलतापूर्वक बनाया गया",
"COURSE_NOT_CREATED": "कोर्स नहीं बना",
"UPLOAD_FAILED": "अपलोड विफल",
"SUB-TOPIC": "उप-विषय",
"SUBTOPICS": "उप-विषय",
"RESOURCES": "संसाधन",
"TOPIC": "विषय",
"DURATION/MONTH": "अवधि/माह",
"LEARNERS_PREREQISITE": "शिक्षार्थियों के पूर्व-आवश्यकताएँ",
"NO_DATA_PRE": "शिक्षार्थियों के पूर्व-आवश्यकताओं के लिए डेटा उपलब्ध नहीं है",
"LEARNERS_POSTREQISITE": "शिक्षार्थियों के पश्चात-आवश्यकताएँ",
"NO_DATA_POST": "शिक्षार्थियों के पश्चात-आवश्यकताओं के लिए डेटा उपलब्ध नहीं है",
"FACILITATORS": "सुविधाकर्ताओं की आवश्यकताएँ",
"NO_DATA": "सुविधाकर्ताओं की आवश्यकताओं के लिए डेटा उपलब्ध नहीं है",
"DOWNLOAD_SAMPLE_CSV": "नमूना CSV डाउनलोड करें",
"BOARDS": "बोर्ड",
"SELECT_MEDIUM": "माध्यम चयन करें",
"SELECT_GRADE": "ग्रेड चयन करें",
"SELECT_TYPE": "प्रकार चयन करें",
"CLEAR_SELECTION": "चयन साफ करें",
"SELECT_ALL_MESSSAGE": "माध्यम, ग्रेड, और प्रकार चयन करें"
},

"FORM_ERROR_MESSAGES": {
"INVALID_INPUT": "अमान्य इनपुट।",
"FIELD_REQUIRED": "{{field}} आवश्यक है",
Expand Down
69 changes: 38 additions & 31 deletions public/locales/mr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,37 +379,44 @@
"ADMIN_UPDATED_SUCCESSFULLY": "अ‍ॅडमिन यशस्वीपणे अद्ययावत केला"
},
"COURSE_PLANNER": {

"LEARNERS_PREREQISITE": "विद्यार्थ्यांसाठीच्या पूर्व-आवश्यकता",
"NO_DATA_PRE": "विद्यार्थ्यांसाठी पूर्व-आवश्यकतेसाठी कोणताही डेटा उपलब्ध नाही",
"LEARNERS_POSTREQISITE": "विद्यार्थ्यांसाठी नंतरच्या आवश्यकता",
"NO_DATA_POST": "विद्यार्थ्यांसाठी नंतरच्या आवश्यकतेसाठी कोणताही डेटा उपलब्ध नाही",
"FACILITATORS": "फैसिलिटेटरच्या आवश्यकता",
"NO_DATA": "फैसिलिटेटरसाठी कोणताही डेटा उपलब्ध नाही",
"DOWNLOAD_SAMPLE_CSV": "नमुना CSV डाउनलोड करा",
"GRADE": "इयत्ता",
"MEDIUM": "माध्यम",
"FILTER": "फिल्टर",
"BOARDS_FULLY_UPLOADED": "बोर्ड्स पूर्णपणे अपलोड केले",
"ACTIVITY": "क्रियाकलाप",
"COPY_LINK": "लिंक कॉपी करा",
"SEARCH": "शोधा",
"DATA_NOT_FOUND": "डेटा सापडला नाही",
"SUBJECTS_UPLOADED": "विषय अपलोड केले",
"IMPORT_PLANNER": "नियोजक आयात करा",
"REMOVE_FILE": "काढा",
"IMPORT_PLANNER_TO_UPLOADING": "‘आयात नियोजक’ वर क्लिक करा सुरू करण्यासाठी अपलोड करा",
"TOPIC_DETAILS": "विषय तपशील",
"BROWSE_FILE": "फाइल शोधा",
"UPLOAD": "अपलोड करा",
"COURSE_CREATED_SUCCESSFULLY": "कोर्स यशस्वीपणे तयार केला",
"COURSE_NOT_CREATED": "कोर्स तयार नाही",
"SUB-TOPIC": "उपघटक ",
"SUBTOPICS": "उपघटक ",
"RESOURCES": "साधने",
"TOPIC": "विषय",
"DURATION/MONTH": "कालावधी/महिना"
},
"GRADE": "ग्रेड",
"MEDIUM": "माध्यम",
"FILTER": "फिल्टर",
"BOARDS_FULLY_UPLOADED": "बोर्ड पूर्णपणे अपलोड केले गेले आहेत",
"ACTIVITY": "क्रियाकलाप",
"COPY_LINK": "लिंक कॉपी करा",
"SEARCH": "शोधा",
"DATA_NOT_FOUND": "डेटा सापडला नाही",
"SUBJECTS_UPLOADED": "विषय अपलोड केले गेले आहेत",
"IMPORT_PLANNER": "आयात प्लॅनर",
"REMOVE_FILE": "फाईल काढा",
"IMPORT_PLANNER_TO_UPLOADING": "अपलोड सुरू करण्यासाठी 'आयात प्लॅनर' वर क्लिक करा",
"TOPIC_DETAILS": "विषय तपशील",
"BROWSE_FILE": "फाईल ब्राउझ करा",
"UPLOAD": "अपलोड करा",
"COURSE_CREATED_SUCCESSFULLY": "कोर्स यशस्वीरित्या तयार झाला",
"COURSE_NOT_CREATED": "कोर्स तयार केला गेला नाही",
"UPLOAD_FAILED": "अपलोड अयशस्वी",
"SUB-TOPIC": "उपविषय",
"SUBTOPICS": "उपविषय",
"RESOURCES": "साधने",
"TOPIC": "विषय",
"DURATION/MONTH": "कालावधी/महिना",
"LEARNERS_PREREQISITE": "शिक्षार्थ्यांची पूर्व आवश्यकता",
"NO_DATA_PRE": "शिक्षार्थ्यांच्या पूर्व आवश्यकतांसाठी डेटा उपलब्ध नाही",
"LEARNERS_POSTREQISITE": "शिक्षार्थ्यांची पोस्ट आवश्यकता",
"NO_DATA_POST": "शिक्षार्थ्यांच्या पोस्ट आवश्यकतांसाठी डेटा उपलब्ध नाही",
"FACILITATORS": "सुविधाकारांची आवश्यकता",
"NO_DATA": "सुविधाकारांची आवश्यकतांसाठी डेटा उपलब्ध नाही",
"DOWNLOAD_SAMPLE_CSV": "नमुना CSV डाउनलोड करा",
"BOARDS": "बोर्ड",
"SELECT_MEDIUM": "माध्यम निवडा",
"SELECT_GRADE": "ग्रेड निवडा",
"SELECT_TYPE": "प्रकार निवडा",
"CLEAR_SELECTION": "निवड साफ करा",
"SELECT_ALL_MESSSAGE": "माध्यम, ग्रेड आणि प्रकार निवडा"
},


"FORM_ERROR_MESSAGES": {
"INVALID_INPUT": "अवैध इनपुट",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/importCsv.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ const ImportCsv = () => {
color: "#7C766F",
}}
>
{`${subTopic?.learningResources?.length} Resources`}
{`${subTopic?.learningResources?.length} ${t("COURSE_PLANNER.RESOURCES")}`}
</Box>
<Box
sx={{
Expand Down
20 changes: 11 additions & 9 deletions src/pages/stateDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import Loader from "@/components/Loader";
import coursePlannerStore from "@/store/coursePlannerStore";
import taxonomyStore from "@/store/tanonomyStore";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { useTranslation, UseTranslation } from "next-i18next";

const StateDetails = () => {
const router = useRouter();
const { state } = router.query;
const { t } = useTranslation();
const store = coursePlannerStore();
const setBoard = taxonomyStore((state) => state.setBoard);

Expand Down Expand Up @@ -75,18 +77,18 @@ const StateDetails = () => {
<IconButton onClick={handleBackClick}>
<ArrowBackIcon />
</IconButton>
<Typography variant="h2">
{state || "States"}
</Typography>
<Typography variant="h2">{state || t("MASTER.STATE")}</Typography>
</Box>
<Divider />
<Box sx={{mx:'16px'}}>
<Box
sx={{ display: "flex", alignItems: "center", gap: 2, mt: 2, }}
>
<Typography variant="h2">Boards:</Typography>
<Box sx={{ mx: "16px" }}>
<Box sx={{ display: "flex", alignItems: "center", gap: 2, mt: 2 }}>
<Typography variant="h2">{t("COURSE_PLANNER.BOARDS")}</Typography>
</Box>
<Grid container spacing={2} sx={{ overflow: "hidden", maxWidth: "100%", }}>
<Grid
container
spacing={2}
sx={{ overflow: "hidden", maxWidth: "100%" }}
>
{boards.map((board: any, index: number) => (
<Grid item xs={12} sm={6} md={4} lg={3} key={index}>
<Box
Expand Down
23 changes: 12 additions & 11 deletions src/pages/subjectDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, MouseEvent } from "react";
import React, { useState, useEffect, MouseEvent, useTransition } from "react";
import { useRouter } from "next/router";
import {
Box,
Expand Down Expand Up @@ -36,6 +36,7 @@ import { telemetryFactory } from "@/utils/telemetry";
import theme from "@/components/theme/theme";
import { FRAMEWORK_ID } from "../../app.config";
import axios from "axios";
import { useTranslation, UseTranslation } from "next-i18next";

// Define Card interface
interface Card {
Expand All @@ -59,6 +60,7 @@ interface FoundCard {

const SubjectDetails = () => {
const router = useRouter();
const { t } = useTranslation();
const { boardDetails, boardName } = router.query as {
boardDetails?: any;
boardName?: any;
Expand Down Expand Up @@ -603,7 +605,7 @@ const SubjectDetails = () => {
}}
>
<MenuItem value="">
<Typography>Select Medium</Typography>
<Typography>{t("COURSE_PLANNER.SELECT_MEDIUM")}</Typography>
</MenuItem>
{medium.map((item: any) => (
<MenuItem key={item.name} value={item.name}>
Expand Down Expand Up @@ -634,7 +636,7 @@ const SubjectDetails = () => {
}}
>
<MenuItem value="">
<Typography>Select Grade</Typography>
<Typography>{t("COURSE_PLANNER.SELECT_GRADE")}</Typography>
</MenuItem>
{grade.map((item: any) => (
<MenuItem key={item.name} value={item.name}>
Expand Down Expand Up @@ -665,7 +667,7 @@ const SubjectDetails = () => {
}}
>
<MenuItem value="">
<Typography>Select Type</Typography>
<Typography>{t("COURSE_PLANNER.SELECT_TYPE")}</Typography>
</MenuItem>
{type.map((item: any) => (
<MenuItem key={item.name} value={item.name}>
Expand All @@ -688,7 +690,7 @@ const SubjectDetails = () => {
width: "100%",
}}
>
Clear Selection
{t("COURSE_PLANNER.CLEAR_SELECTION")}
</Button>
</Grid>
</Grid>
Expand All @@ -699,13 +701,12 @@ const SubjectDetails = () => {
alignItems: "center",
marginTop: "16px",
marginBottom: "16px",
gap:'5px'
gap: "5px",
}}
onClick={handleBackClick}
>

<ArrowBackIcon />

<ArrowBackIcon />

<Typography variant="h2">{boardName}</Typography>
{/* <Typography variant="h2" sx={{ ml: 1 }}>
Boardasahskj
Expand Down Expand Up @@ -755,9 +756,9 @@ const SubjectDetails = () => {
<Typography
variant="h4"
align="center"
sx={{ marginTop: "24px", color: "#6B7280", mx:'16px' }}
sx={{ marginTop: "24px", color: "#6B7280", mx: "16px" }}
>
Select Medium, Grade, and Type
{t("COURSE_PLANNER.SELECT_ALL_MESSSAGE")}
</Typography>
)}
</Grid>
Expand Down

0 comments on commit 42ab313

Please sign in to comment.