-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shreya Bhandari
committed
Sep 4, 2024
1 parent
591ecf5
commit 2193fe8
Showing
8 changed files
with
75 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import { toast } from "react-toastify"; | ||
import WrongAnswerReasons from "../../util/wrongAnswerReasons"; | ||
|
||
export function toastNotifyCorrectness(isCorrect, reason) { | ||
export function toastNotifyCorrectness(isCorrect, reason, translate) { | ||
if (isCorrect) { | ||
toast.success("Correct Answer!", { | ||
toast.success(translate("toast.correct"), { | ||
autoClose: 3000 | ||
}) | ||
} else { | ||
if (reason === WrongAnswerReasons.wrong) { | ||
toast.error("Incorrect Answer!", { | ||
toast.error(translate("toast.incorrect"), { | ||
autoClose: 3000 | ||
}) | ||
} else if (reason === WrongAnswerReasons.sameAsProblem) { | ||
toast.error("Please simplify!", { | ||
toast.error(translate("toast.simplify"), { | ||
autoClose: 3000 | ||
}) | ||
} else if (reason === WrongAnswerReasons.errored) { | ||
toast.error("Our system could not process that answer", { | ||
toast.error(translate("toast.cantProcess"), { | ||
autoClose: 3000 | ||
}) | ||
} | ||
} | ||
} | ||
|
||
export function toastNotifyCompletion() { | ||
toast.info("Step Completed!", { | ||
export function toastNotifyCompletion(translate) { | ||
toast.info(translate("toast.stepComplete"), { | ||
autoClose: 3000 | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
{ | ||
"lessonSelection": | ||
{ | ||
"welcomeInstructor": "Välkommen Instruktör!", | ||
"welcomeInstructor": "Välkommen, lärare!", | ||
"welcomeTo": "Välkommen till", | ||
"resetprogress": "Återställ Framsteg", | ||
"resetprogress": "Nollställ framsteg", | ||
"select": "Vänligen välj en", | ||
"course": "kurs", | ||
"lessonplan": "lektionsplan", | ||
"onlyselect": "Välj" | ||
}, | ||
"problem": | ||
{ | ||
"NextProblem": "Nästa Problem", | ||
"PreviousProblem": "Föregående Problem", | ||
"NextProblem": "Nästa uppgift", | ||
"PreviousProblem": "Föregående uppgift", | ||
"Submit": "Skicka in", | ||
"Feedback": "Återkoppling", | ||
"Response": "Svar", | ||
"Thanks": "Tack för din återkoppling!", | ||
"Description": "Känn dig fri att skicka återkoppling om detta problem om du stöter på några fel. Skicka återkoppling för alla delar av problemet på en gång.", | ||
"Description": "Du får gärna skicka in feedback om du stöter på några buggar i denna uppgift. Skicka gärna all feedback om uppgiftens olika delar på en gång.", | ||
"Derivative": "är en härledning av", | ||
"Used": ", används under" | ||
}, | ||
"platform": | ||
{ | ||
"Mastery": "Behärska Lektionen: ", | ||
"LoggedIn": "Inte inloggad" | ||
"Mastery": "Bemästrande av lektionen: ", | ||
"LoggedIn": "Utloggad" | ||
}, | ||
"hintsystem": | ||
{ | ||
"hint": "Ledtråd " | ||
} | ||
"hint": "Ledtråd ", | ||
"answer": "Svar", | ||
"answerIs": "Svaret är " | ||
}, | ||
"toast": | ||
{ | ||
"correct": "Rätt svar!", | ||
"incorrect": "Fel svar!", | ||
"simplify": "Vänligen förenkla!", | ||
"cantProcess": "Vårt system kunde inte bearbeta det svaret", | ||
"stepComplete": "Steg slutfört!" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters