@magmamath/students-features 0.9.5-rc.2 → 0.9.6-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/model/t2s.js +4 -3
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +44 -0
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +10 -3
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +2 -4
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +2 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +9 -2
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/helpers.js +10 -3
- package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/model/model.js +7 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -2
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js +1 -5
- package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +0 -20
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js +0 -1
- package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js +5 -28
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/constants.js +1 -3
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +5 -5
- package/dist/commonjs/shared/translation/localization/en.json +5 -5
- package/dist/commonjs/shared/translation/localization/gb.json +5 -5
- package/dist/commonjs/shared/translation/localization/sct.json +5 -5
- package/dist/commonjs/shared/translation/localization/sw.json +5 -5
- package/dist/commonjs/shared/translation/types.js +0 -1
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +4 -3
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +38 -0
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +10 -3
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/EOAModal.js +2 -4
- package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +6 -4
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +3 -2
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +9 -2
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
- package/dist/module/features/endOfAssignment/helpers.js +8 -2
- package/dist/module/features/endOfAssignment/helpers.js.map +1 -1
- package/dist/module/features/endOfAssignment/model/model.js +7 -0
- package/dist/module/features/endOfAssignment/model/model.js.map +1 -1
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -2
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js +0 -4
- package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +1 -21
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/module/features/keyboard/types/keyboardGroupIds.js +0 -1
- package/dist/module/features/keyboard/types/keyboardGroupIds.js.map +1 -1
- package/dist/module/lib/helpers/helpers.js +5 -28
- package/dist/module/lib/helpers/helpers.js.map +1 -1
- package/dist/module/shared/translation/constants.js +1 -3
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +5 -5
- package/dist/module/shared/translation/localization/en.json +5 -5
- package/dist/module/shared/translation/localization/gb.json +5 -5
- package/dist/module/shared/translation/localization/sct.json +5 -5
- package/dist/module/shared/translation/localization/sw.json +5 -5
- package/dist/module/shared/translation/types.js +0 -1
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +7 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts +10 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +1 -3
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +3 -1
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +5 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +2 -2
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +3 -2
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -42
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +1 -2
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +7 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts +10 -0
- package/dist/typescript/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +1 -3
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +3 -1
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +5 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +2 -2
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +3 -2
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -42
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +1 -2
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/features/chatbot/model/t2s.ts +3 -2
- package/src/features/chatbot/types/api.types.ts +10 -1
- package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +43 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +20 -10
- package/src/features/endOfAssignment/components/EOAModal.tsx +2 -9
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +6 -6
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +2 -2
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +17 -6
- package/src/features/endOfAssignment/helpers.ts +10 -3
- package/src/features/endOfAssignment/model/model.ts +5 -1
- package/src/features/endOfAssignment/types.ts +2 -1
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +4 -3
- package/src/features/keyboard/components/BasicLayout/keyboardGroups.ts +0 -4
- package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +0 -21
- package/src/features/keyboard/types/keyboardGroupIds.ts +0 -1
- package/src/lib/helpers/helpers.ts +8 -23
- package/src/shared/translation/constants.ts +0 -2
- package/src/shared/translation/localization/ca.json +5 -5
- package/src/shared/translation/localization/en.json +5 -5
- package/src/shared/translation/localization/gb.json +5 -5
- package/src/shared/translation/localization/sct.json +5 -5
- package/src/shared/translation/localization/sw.json +5 -5
- package/src/shared/translation/types.ts +0 -4
- package/dist/commonjs/shared/translation/localization/de.json +0 -42
- package/dist/module/shared/translation/localization/de.json +0 -42
- package/src/shared/translation/localization/de.json +0 -42
|
@@ -77,9 +77,18 @@ export type GoogleText2SpeechPayload = {
|
|
|
77
77
|
pitch: number
|
|
78
78
|
speakingRate: number
|
|
79
79
|
}
|
|
80
|
+
enableTimePointing?: string[]
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
export type
|
|
83
|
+
export type Timepoint = {
|
|
84
|
+
markName: string
|
|
85
|
+
timeSeconds: number
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type GoogleText2SpeechResponse = {
|
|
89
|
+
audioContent?: string
|
|
90
|
+
timepoints?: Timepoint[]
|
|
91
|
+
}
|
|
83
92
|
|
|
84
93
|
export type ChatHintPayload = {
|
|
85
94
|
problemDescription: string
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { EOAModalText } from '@magmamath/students-features'
|
|
5
|
+
|
|
6
|
+
type AssessmentScoreCardProps = {
|
|
7
|
+
textContent: EOAModalText
|
|
8
|
+
solvedAmount?: number
|
|
9
|
+
problemsAmount?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const AssessmentScoreCard = ({
|
|
13
|
+
textContent,
|
|
14
|
+
solvedAmount = 0,
|
|
15
|
+
problemsAmount = 0,
|
|
16
|
+
}: AssessmentScoreCardProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<View style={styles.container}>
|
|
19
|
+
<Text style={styles.text}>
|
|
20
|
+
{solvedAmount} / {problemsAmount} {textContent.stats?.score ?? 'pt'}
|
|
21
|
+
</Text>
|
|
22
|
+
</View>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const styles = StyleSheet.create({
|
|
27
|
+
container: {
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
minHeight: 130,
|
|
31
|
+
minWidth: 410,
|
|
32
|
+
padding: SPACING['400'],
|
|
33
|
+
borderRadius: BORDER_RADIUS['400'],
|
|
34
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
35
|
+
...SHADOWS['1'],
|
|
36
|
+
},
|
|
37
|
+
text: {
|
|
38
|
+
fontSize: 96,
|
|
39
|
+
fontWeight: '700',
|
|
40
|
+
color: COLORS.NEUTRAL_9,
|
|
41
|
+
fontFamily: 'Buenos Aires',
|
|
42
|
+
},
|
|
43
|
+
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react'
|
|
2
2
|
import { View, StyleSheet } from 'react-native'
|
|
3
|
-
|
|
4
3
|
import { useUnit } from 'effector-react'
|
|
5
4
|
import { SPACING, Typography, COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
|
|
6
5
|
|
|
@@ -11,6 +10,8 @@ import { GOOD_DRAWING_CARD_APPEARENCE_DELAY } from '../../constants'
|
|
|
11
10
|
import { AnimatedCardVariant, EOAModalContentProps, EOAModalVariant } from '../../types'
|
|
12
11
|
import { useKeyBoard } from '../../../../shared/hooks/useKeyboard'
|
|
13
12
|
import { KeyboardKeys } from '../../../../lib/constants'
|
|
13
|
+
import { getEoaButtonColor } from '../../helpers'
|
|
14
|
+
import { AssessmentScoreCard } from '../AssessmentScoreCard/AssessmentScoreCard'
|
|
14
15
|
|
|
15
16
|
export const CorrectAnswer = ({ textContent, model, onPracticePress }: EOAModalContentProps) => {
|
|
16
17
|
const popUpData = useUnit(model.$popUpData)
|
|
@@ -22,6 +23,7 @@ export const CorrectAnswer = ({ textContent, model, onPracticePress }: EOAModalC
|
|
|
22
23
|
stats,
|
|
23
24
|
hasRecommendations,
|
|
24
25
|
isExam = false,
|
|
26
|
+
isAssessment = false,
|
|
25
27
|
newerAssignmentAvailable,
|
|
26
28
|
} = popUpData ?? {}
|
|
27
29
|
|
|
@@ -72,14 +74,22 @@ export const CorrectAnswer = ({ textContent, model, onPracticePress }: EOAModalC
|
|
|
72
74
|
</View>
|
|
73
75
|
|
|
74
76
|
<View style={styles.animationContainer}>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
{isAssessment ? (
|
|
78
|
+
<AssessmentScoreCard
|
|
79
|
+
textContent={textContent}
|
|
80
|
+
solvedAmount={stats?.solvedAmount}
|
|
81
|
+
problemsAmount={stats?.problemsAmount}
|
|
82
|
+
/>
|
|
83
|
+
) : (
|
|
84
|
+
<AnimatedCard
|
|
85
|
+
variant={AnimatedCardVariant.CORRECT_ANSWER}
|
|
86
|
+
textContent={textContent}
|
|
87
|
+
solvedAmount={stats?.solvedAmount}
|
|
88
|
+
problemsAmount={stats?.problemsAmount}
|
|
89
|
+
shouldTriggerSparkles={cardsAnimationCompleted}
|
|
90
|
+
onAnimationEnd={onCorrectAnswerAnimationEnd}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
83
93
|
|
|
84
94
|
{modalVariant === EOAModalVariant.HAS_GOOD_DRAWING && (
|
|
85
95
|
<AnimatedCard
|
|
@@ -96,9 +106,9 @@ export const CorrectAnswer = ({ textContent, model, onPracticePress }: EOAModalC
|
|
|
96
106
|
<PracticeButtonGroup
|
|
97
107
|
textContent={textContent}
|
|
98
108
|
isPracticeButtonVisible={isPracticeButtonVisible}
|
|
99
|
-
isExam={isExam}
|
|
100
109
|
onLeftButtonPress={model.hidePopUpAndLeave}
|
|
101
110
|
onRightButtonPress={handlePracticeButtonPress}
|
|
111
|
+
buttonColor={getEoaButtonColor(popUpData)}
|
|
102
112
|
/>
|
|
103
113
|
</View>
|
|
104
114
|
)
|
|
@@ -14,7 +14,6 @@ import { ExamPaused } from './ExamPaused/ExamPaused'
|
|
|
14
14
|
import { ExamSubmit } from './ExamSubmit/ExamSubmit'
|
|
15
15
|
|
|
16
16
|
import { getModalContainerSize, shouldDisplayModalBackground } from '../helpers'
|
|
17
|
-
import { ButtonColor } from '@magmamath/react-native-ui'
|
|
18
17
|
|
|
19
18
|
const MODAL_CONTENT_VARIANTS_MAP = new Map([
|
|
20
19
|
[EOAModalVariant.NO_CORRECT_ANSWERS, NoAnswer],
|
|
@@ -33,7 +32,6 @@ type EOAModalProps = {
|
|
|
33
32
|
model: EOAModel
|
|
34
33
|
textContent: EOAModalText
|
|
35
34
|
onPracticePress: () => void
|
|
36
|
-
buttonColor?: ButtonColor
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
/**
|
|
@@ -42,7 +40,7 @@ type EOAModalProps = {
|
|
|
42
40
|
* Dynamically renders a modal UI after an assignment ends, using the current `modalVariant`
|
|
43
41
|
* to determine which specific view to display (e.g., `NoAnswer`, `CorrectAnswer`, `CheatDetected`).
|
|
44
42
|
*/
|
|
45
|
-
export const EOAModal = ({ model, textContent, onPracticePress
|
|
43
|
+
export const EOAModal = ({ model, textContent, onPracticePress }: EOAModalProps) => {
|
|
46
44
|
const popUpData = useUnit(model.$popUpData)
|
|
47
45
|
const modalVariant = useUnit(model.$modalVariant)
|
|
48
46
|
|
|
@@ -64,12 +62,7 @@ export const EOAModal = ({ model, textContent, onPracticePress, buttonColor }: E
|
|
|
64
62
|
style={getModalContainerSize(modalVariant)}
|
|
65
63
|
onClose={model.hidePopUp}
|
|
66
64
|
content={
|
|
67
|
-
<ModalContent
|
|
68
|
-
model={model}
|
|
69
|
-
textContent={textContent}
|
|
70
|
-
onPracticePress={onPracticePress}
|
|
71
|
-
buttonColor={buttonColor}
|
|
72
|
-
/>
|
|
65
|
+
<ModalContent model={model} textContent={textContent} onPracticePress={onPracticePress} />
|
|
73
66
|
}
|
|
74
67
|
withBackground={withBackground}
|
|
75
68
|
/>
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
import { EOAModalContentProps } from '../../types'
|
|
14
14
|
import { useKeyBoard } from '../../../../shared/hooks/useKeyboard'
|
|
15
15
|
import { KeyboardKeys } from '../../../../lib/constants'
|
|
16
|
+
import { getEoaButtonColor } from '../../helpers'
|
|
17
|
+
import { useUnit } from 'effector-react'
|
|
18
|
+
|
|
19
|
+
export const ExamPaused = ({ textContent, model }: EOAModalContentProps) => {
|
|
20
|
+
const popUpData = useUnit(model.$popUpData)
|
|
16
21
|
|
|
17
|
-
export const ExamPaused = ({
|
|
18
|
-
textContent,
|
|
19
|
-
model,
|
|
20
|
-
buttonColor = ButtonColor.PURPLE,
|
|
21
|
-
}: EOAModalContentProps) => {
|
|
22
22
|
useKeyBoard({
|
|
23
23
|
callback: (event) => {
|
|
24
24
|
if (event.key === KeyboardKeys.ENTER) {
|
|
@@ -39,7 +39,7 @@ export const ExamPaused = ({
|
|
|
39
39
|
|
|
40
40
|
<Button
|
|
41
41
|
variant={ButtonVariant.PRIMARY}
|
|
42
|
-
colorScheme={
|
|
42
|
+
colorScheme={getEoaButtonColor(popUpData)}
|
|
43
43
|
size={ButtonSize.LARGE}
|
|
44
44
|
style={{ text: styles.buttonText }}
|
|
45
45
|
onPress={model.hidePopUpAndLeave}
|
|
@@ -4,7 +4,6 @@ import { View, StyleSheet, Platform, Image } from 'react-native'
|
|
|
4
4
|
import { useUnit } from 'effector-react'
|
|
5
5
|
import {
|
|
6
6
|
Button,
|
|
7
|
-
ButtonColor,
|
|
8
7
|
ButtonSize,
|
|
9
8
|
ButtonVariant,
|
|
10
9
|
COLORS,
|
|
@@ -18,6 +17,7 @@ import { EOAModalContentProps } from '../../types'
|
|
|
18
17
|
import { PracticeButton } from '../../ui/PracticeButton'
|
|
19
18
|
import { useKeyBoard } from '../../../../shared/hooks/useKeyboard'
|
|
20
19
|
import { KeyboardKeys } from '../../../../lib/constants'
|
|
20
|
+
import { getEoaButtonColor } from '../../helpers'
|
|
21
21
|
|
|
22
22
|
export const ExamSubmit = ({ textContent, model, onPracticePress }: EOAModalContentProps) => {
|
|
23
23
|
const popUpData = useUnit(model.$popUpData)
|
|
@@ -60,7 +60,7 @@ export const ExamSubmit = ({ textContent, model, onPracticePress }: EOAModalCont
|
|
|
60
60
|
<Button
|
|
61
61
|
variant={isPracticeButtonVisible ? ButtonVariant.TERTIARY : ButtonVariant.PRIMARY}
|
|
62
62
|
size={ButtonSize.LARGE}
|
|
63
|
-
colorScheme={popUpData
|
|
63
|
+
colorScheme={getEoaButtonColor(popUpData)}
|
|
64
64
|
style={{ text: { textTransform: 'uppercase' } }}
|
|
65
65
|
onPress={model.hidePopUpAndLeave}
|
|
66
66
|
>
|
|
@@ -16,17 +16,19 @@ import { EOAModalContentProps } from '../../types'
|
|
|
16
16
|
import { NoAnswerContent } from './NoAnswerContent'
|
|
17
17
|
import { useKeyBoard } from '../../../../shared/hooks/useKeyboard'
|
|
18
18
|
import { KeyboardKeys } from '../../../../lib/constants'
|
|
19
|
+
import { getEoaButtonColor } from '../../helpers'
|
|
20
|
+
import { AssessmentScoreCard } from '../AssessmentScoreCard/AssessmentScoreCard'
|
|
19
21
|
|
|
20
22
|
export const NoAnswer = ({ model, textContent, onPracticePress }: EOAModalContentProps) => {
|
|
21
23
|
const popUpData = useUnit(model.$popUpData)
|
|
22
24
|
|
|
23
|
-
const { stats, isExam, user } = popUpData ?? {}
|
|
25
|
+
const { stats, isExam, isAssessment, user } = popUpData ?? {}
|
|
24
26
|
|
|
25
27
|
function getButtons() {
|
|
26
28
|
const buttons = [
|
|
27
29
|
{
|
|
28
30
|
text: textContent.leftButtonText ?? '',
|
|
29
|
-
colorScheme:
|
|
31
|
+
colorScheme: getEoaButtonColor(popUpData),
|
|
30
32
|
onPress: () => model.hidePopUpAndLeave(),
|
|
31
33
|
},
|
|
32
34
|
]
|
|
@@ -84,10 +86,19 @@ export const NoAnswer = ({ model, textContent, onPracticePress }: EOAModalConten
|
|
|
84
86
|
</Typography>
|
|
85
87
|
)}
|
|
86
88
|
</View>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
{isAssessment ? (
|
|
90
|
+
<AssessmentScoreCard
|
|
91
|
+
textContent={textContent}
|
|
92
|
+
solvedAmount={stats?.solvedAmount}
|
|
93
|
+
problemsAmount={stats?.problemsAmount}
|
|
94
|
+
/>
|
|
95
|
+
) : (
|
|
96
|
+
<NoAnswerContent
|
|
97
|
+
solvedAmount={stats?.solvedAmount ?? 0}
|
|
98
|
+
problemsAmount={stats?.problemsAmount ?? 0}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
|
|
91
102
|
<View style={styles.buttonsContainer}>
|
|
92
103
|
{buttons.map((button, index) => (
|
|
93
104
|
<Button
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { MODALS_WITH_BACKGROUND } from './constants'
|
|
2
|
-
import { EOAModalVariant } from './types'
|
|
2
|
+
import { EOAModalData, EOAModalVariant } from './types'
|
|
3
|
+
import { ButtonColor } from '@magmamath/react-native-ui'
|
|
3
4
|
|
|
4
5
|
export const getModalContainerSize = (modalVariant: EOAModalVariant) => {
|
|
5
6
|
switch (modalVariant) {
|
|
6
7
|
case EOAModalVariant.EXAM_SUBMIT:
|
|
7
8
|
case EOAModalVariant.EXAM_SAFE_MODE_SUBMIT:
|
|
8
|
-
return { container: { width:
|
|
9
|
+
return { container: { width: 620, height: 384 } }
|
|
9
10
|
case EOAModalVariant.EXAM_PAUSED:
|
|
10
11
|
case EOAModalVariant.EXAM_SAFE_MODE_CHEAT_DETECTED:
|
|
11
12
|
return { container: { width: 560, height: 338 } }
|
|
12
13
|
case EOAModalVariant.EXAM_SAFE_MODE_LEAVE:
|
|
13
|
-
return { container: { width: 550, height:
|
|
14
|
+
return { container: { width: 550, height: 325 } }
|
|
14
15
|
case EOAModalVariant.HAS_GOOD_DRAWING:
|
|
15
16
|
return { container: { width: 957, height: 550 } }
|
|
16
17
|
case EOAModalVariant.HAS_CORRECT_ANSWERS:
|
|
@@ -26,3 +27,9 @@ export const shouldDisplayModalBackground = (modalVariant: EOAModalVariant | nul
|
|
|
26
27
|
|
|
27
28
|
return MODALS_WITH_BACKGROUND.includes(modalVariant)
|
|
28
29
|
}
|
|
30
|
+
|
|
31
|
+
export const getEoaButtonColor = (popupData: EOAModalData | null): ButtonColor => {
|
|
32
|
+
if (popupData?.isAssessment) return ButtonColor.SUNSET
|
|
33
|
+
if (popupData?.isExam) return ButtonColor.PURPLE
|
|
34
|
+
return ButtonColor.BLUE
|
|
35
|
+
}
|
|
@@ -9,6 +9,7 @@ export class EOAModel {
|
|
|
9
9
|
public readonly leavePressed = createEvent()
|
|
10
10
|
public readonly goToFirstProblemPressed = createEvent()
|
|
11
11
|
public readonly recommendationsUpdated = createEvent<boolean>()
|
|
12
|
+
public readonly popUpStatsUpdated = createEvent<Partial<EOAModalData['stats']>>()
|
|
12
13
|
public readonly popUpTriggered = createEvent<EOAEventType>()
|
|
13
14
|
|
|
14
15
|
public readonly $popUpData = createStore<EOAModalData | null>(null)
|
|
@@ -16,6 +17,9 @@ export class EOAModel {
|
|
|
16
17
|
.on(this.recommendationsUpdated, (state, hasRecommendations) =>
|
|
17
18
|
state ? { ...state, hasRecommendations } : state,
|
|
18
19
|
)
|
|
20
|
+
.on(this.popUpStatsUpdated, (state, payload) =>
|
|
21
|
+
state ? { ...state, stats: { ...state.stats, ...payload } } : state,
|
|
22
|
+
)
|
|
19
23
|
.reset(this.hidePopUp)
|
|
20
24
|
|
|
21
25
|
public readonly $modalVariant = createStore<EOAModalVariant | null>(null)
|
|
@@ -33,7 +37,7 @@ export class EOAModel {
|
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
if (eventType === EOAEventType.EXAM_PAUSED) return EOAModalVariant.EXAM_PAUSED
|
|
36
|
-
|
|
40
|
+
|
|
37
41
|
if (eventType === EOAEventType.CHEAT_DETECTED) {
|
|
38
42
|
return EOAModalVariant.EXAM_SAFE_MODE_CHEAT_DETECTED
|
|
39
43
|
}
|
|
@@ -34,11 +34,11 @@ export type EOAModalContentProps = {
|
|
|
34
34
|
textContent: EOAModalText
|
|
35
35
|
model: EOAModel
|
|
36
36
|
onPracticePress?: () => void
|
|
37
|
-
buttonColor?: ButtonColor
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
export type EOAModalData = {
|
|
41
40
|
isExam: boolean
|
|
41
|
+
isAssessment: boolean
|
|
42
42
|
newerAssignmentAvailable?: boolean
|
|
43
43
|
examFinished?: boolean
|
|
44
44
|
cheatDetection?: boolean
|
|
@@ -63,5 +63,6 @@ export type EOAModalText = {
|
|
|
63
63
|
correctAnswersPlural?: string
|
|
64
64
|
goodCalculations?: string
|
|
65
65
|
goodCalculationsPlural?: string
|
|
66
|
+
score?: string
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -11,13 +11,14 @@ import Animated, {
|
|
|
11
11
|
import { ButtonVariant, SPACING, Button, ButtonSize, ButtonColor } from '@magmamath/react-native-ui'
|
|
12
12
|
|
|
13
13
|
import { PracticeButton } from './PracticeButton'
|
|
14
|
+
import { getEoaButtonColor } from '../helpers'
|
|
14
15
|
|
|
15
16
|
type PracticeButtonGroupProps = {
|
|
16
17
|
textContent: { leftButtonText?: string; rightButtonText?: string }
|
|
17
18
|
isPracticeButtonVisible: boolean
|
|
18
19
|
onLeftButtonPress: () => void
|
|
19
20
|
onRightButtonPress: () => void
|
|
20
|
-
|
|
21
|
+
buttonColor?: ButtonColor
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export const PracticeButtonGroup = ({
|
|
@@ -25,7 +26,7 @@ export const PracticeButtonGroup = ({
|
|
|
25
26
|
isPracticeButtonVisible,
|
|
26
27
|
onLeftButtonPress,
|
|
27
28
|
onRightButtonPress,
|
|
28
|
-
|
|
29
|
+
buttonColor = ButtonColor.BLUE,
|
|
29
30
|
}: PracticeButtonGroupProps) => {
|
|
30
31
|
const buttonsContainerOpacity = useSharedValue(0)
|
|
31
32
|
|
|
@@ -45,7 +46,7 @@ export const PracticeButtonGroup = ({
|
|
|
45
46
|
<Button
|
|
46
47
|
variant={isPracticeButtonVisible ? ButtonVariant.TERTIARY : ButtonVariant.PRIMARY}
|
|
47
48
|
size={ButtonSize.LARGE}
|
|
48
|
-
colorScheme={
|
|
49
|
+
colorScheme={buttonColor}
|
|
49
50
|
style={{ text: { textTransform: 'uppercase' } }}
|
|
50
51
|
onPress={onLeftButtonPress}
|
|
51
52
|
>
|
|
@@ -58,7 +58,3 @@ export const MATH_CURRENCY_US_KEYBOARD_GROUP: KeyboardGroup = {
|
|
|
58
58
|
id: MathEntryKeyboardGroupId.CURRENCY_US,
|
|
59
59
|
keys: [MATH_CURRENCY_UNITS.DOLLAR, MATH_CURRENCY_UNITS.CENT],
|
|
60
60
|
}
|
|
61
|
-
export const MATH_CURRENCY_DE_KEYBOARD_GROUP: KeyboardGroup = {
|
|
62
|
-
id: MathEntryKeyboardGroupId.CURRENCY_DE,
|
|
63
|
-
keys: [MATH_CURRENCY_UNITS.EURO, MATH_CURRENCY_UNITS.DOLLAR, MATH_CURRENCY_UNITS.POUND],
|
|
64
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { KeyboardGroup, KeyboardType } from '../types/types'
|
|
2
2
|
import {
|
|
3
|
-
MATH_CURRENCY_DE_KEYBOARD_GROUP,
|
|
4
3
|
MATH_CURRENCY_SW_KEYBOARD_GROUP,
|
|
5
4
|
MATH_CURRENCY_UK_KEYBOARD_GROUP,
|
|
6
5
|
MATH_CURRENCY_US_KEYBOARD_GROUP,
|
|
@@ -99,20 +98,6 @@ export const KEYBOARD_GROUPS_BY_LOCALE: Record<Locale, Record<KeyboardType, Keyb
|
|
|
99
98
|
[KeyboardType.BasicTime]: MATH_TIME_SW_KEYBOARD_GROUP,
|
|
100
99
|
[KeyboardType.Numpad]: MATH_ENTRY_NUMBERS_SW_KEYBOARD_GROUP,
|
|
101
100
|
}),
|
|
102
|
-
[Locale.DE]: createKeyboardLocale({
|
|
103
|
-
[KeyboardType.Basic]: MATH_ENTRY_BASIC_SW_KEYBOARD_GROUP,
|
|
104
|
-
[KeyboardType.BasicPlus]: MATH_ENTRY_BASIC_SW_PLUS,
|
|
105
|
-
[KeyboardType.BasicPlusMobile]: MATH_ENTRY_BASIC_PLUS_MOBILE_SW,
|
|
106
|
-
[KeyboardType.BasicPlusPlus]: MATH_ENTRY_BASIC_PLUS_PLUS_SW,
|
|
107
|
-
[KeyboardType.BasicPlusPlusMobile]: MATH_ENTRY_BASIC_PLUS_PLUS_MOBILE_SW,
|
|
108
|
-
[KeyboardType.BasicUnits]: {
|
|
109
|
-
...MATH_ENTRY_LENGTH_UNITS_US_KEYBOARD_GROUPS,
|
|
110
|
-
keys: MATH_ENTRY_LENGTH_UNITS_US_KEYBOARD_GROUPS.keys[0],
|
|
111
|
-
},
|
|
112
|
-
[KeyboardType.BasicCurrency]: MATH_CURRENCY_DE_KEYBOARD_GROUP,
|
|
113
|
-
[KeyboardType.BasicTime]: MATH_TIME_SW_KEYBOARD_GROUP,
|
|
114
|
-
[KeyboardType.Numpad]: MATH_ENTRY_NUMBERS_SW_KEYBOARD_GROUP,
|
|
115
|
-
}),
|
|
116
101
|
}
|
|
117
102
|
export const KEYBOARD_UNITS_GROUPS_BY_LOCALE: Record<
|
|
118
103
|
Locale,
|
|
@@ -134,10 +119,4 @@ export const KEYBOARD_UNITS_GROUPS_BY_LOCALE: Record<
|
|
|
134
119
|
[KeyboardUnitsGroupType.VOLUME]: MATH_ENTRY_VOLUME_UNITS_SW_KEYBOARD_GROUPS,
|
|
135
120
|
[KeyboardUnitsGroupType.WEIGHT]: MATH_ENTRY_WEIGHT_UNITS_SW_KEYBOARD_GROUPS,
|
|
136
121
|
}),
|
|
137
|
-
[Locale.DE]: createKeyboardUnitsLocale({
|
|
138
|
-
[KeyboardUnitsGroupType.LENGTH]: MATH_ENTRY_LENGTH_UNITS_SW_KEYBOARD_GROUPS,
|
|
139
|
-
[KeyboardUnitsGroupType.AREA]: MATH_ENTRY_AREA_UNITS_SW_KEYBOARD_GROUPS,
|
|
140
|
-
[KeyboardUnitsGroupType.VOLUME]: MATH_ENTRY_VOLUME_UNITS_SW_KEYBOARD_GROUPS,
|
|
141
|
-
[KeyboardUnitsGroupType.WEIGHT]: MATH_ENTRY_WEIGHT_UNITS_SW_KEYBOARD_GROUPS,
|
|
142
|
-
}),
|
|
143
122
|
}
|
|
@@ -27,27 +27,12 @@ export const getRelativeTimeText = (date: Date) => {
|
|
|
27
27
|
const years = getYears(days)
|
|
28
28
|
|
|
29
29
|
if (seconds < 60) return getText('time.justNow')
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return getText('time.
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return getText('time.hoursAgo', { count: hours.toString() })
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (days < 30) {
|
|
42
|
-
if (days === 1) return `1 ${getText('time.dayAgo')}`
|
|
43
|
-
return getText('time.daysAgo', { count: days.toString() })
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (months < 12) {
|
|
47
|
-
if (months === 1) return `1 ${getText('time.monthAgo')}`
|
|
48
|
-
return getText('time.monthsAgo', { count: months.toString() })
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (years === 1) return `1 ${getText('time.yearAgo')}`
|
|
52
|
-
return getText('time.yearsAgo', { count: years.toString() })
|
|
30
|
+
if (minutes < 60)
|
|
31
|
+
return `${minutes} ${minutes === 1 ? getText('time.minuteAgo') : getText('time.minutesAgo')}`
|
|
32
|
+
if (hours < 24)
|
|
33
|
+
return `${hours} ${hours === 1 ? getText('time.hourAgo') : getText('time.hoursAgo')}`
|
|
34
|
+
if (days < 30) return `${days} ${days === 1 ? getText('time.dayAgo') : getText('time.daysAgo')}`
|
|
35
|
+
if (months < 12)
|
|
36
|
+
return `${months} ${months === 1 ? getText('time.monthAgo') : getText('time.monthsAgo')}`
|
|
37
|
+
return `${years} ${years === 1 ? getText('time.yearAgo') : getText('time.yearsAgo')}`
|
|
53
38
|
}
|
|
@@ -4,7 +4,6 @@ import GB from './localization/gb.json'
|
|
|
4
4
|
import SW from './localization/sw.json'
|
|
5
5
|
import CA from './localization/ca.json'
|
|
6
6
|
import SCT from './localization/sct.json'
|
|
7
|
-
import DE from './localization/de.json'
|
|
8
7
|
|
|
9
8
|
export const LOCALIZATION_CONFIGS = {
|
|
10
9
|
[Locale.EN]: EN,
|
|
@@ -12,5 +11,4 @@ export const LOCALIZATION_CONFIGS = {
|
|
|
12
11
|
[Locale.SW]: SW,
|
|
13
12
|
[Locale.CA]: CA,
|
|
14
13
|
[Locale.SCT]: SCT,
|
|
15
|
-
[Locale.DE]: DE,
|
|
16
14
|
}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"teacherFeedback.noComments": "No comments yet",
|
|
4
4
|
"time.justNow": "just now",
|
|
5
5
|
"time.minuteAgo": "minute ago",
|
|
6
|
-
"time.minutesAgo": "
|
|
6
|
+
"time.minutesAgo": "minutes ago",
|
|
7
7
|
"time.hourAgo": "hour ago",
|
|
8
|
-
"time.hoursAgo": "
|
|
8
|
+
"time.hoursAgo": "hours ago",
|
|
9
9
|
"time.dayAgo": "day ago",
|
|
10
|
-
"time.daysAgo": "
|
|
10
|
+
"time.daysAgo": "days ago",
|
|
11
11
|
"time.monthAgo": "month ago",
|
|
12
|
-
"time.monthsAgo": "
|
|
12
|
+
"time.monthsAgo": "months ago",
|
|
13
13
|
"time.yearAgo": "year ago",
|
|
14
|
-
"time.yearsAgo": "
|
|
14
|
+
"time.yearsAgo": "years ago",
|
|
15
15
|
"chat": {
|
|
16
16
|
"anotherHint": "Give me another hint",
|
|
17
17
|
"giveHint": "I need a hint",
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"teacherFeedback.noComments": "No comments yet",
|
|
4
4
|
"time.justNow": "just now",
|
|
5
5
|
"time.minuteAgo": "minute ago",
|
|
6
|
-
"time.minutesAgo": "
|
|
6
|
+
"time.minutesAgo": "minutes ago",
|
|
7
7
|
"time.hourAgo": "hour ago",
|
|
8
|
-
"time.hoursAgo": "
|
|
8
|
+
"time.hoursAgo": "hours ago",
|
|
9
9
|
"time.dayAgo": "day ago",
|
|
10
|
-
"time.daysAgo": "
|
|
10
|
+
"time.daysAgo": "days ago",
|
|
11
11
|
"time.monthAgo": "month ago",
|
|
12
|
-
"time.monthsAgo": "
|
|
12
|
+
"time.monthsAgo": "months ago",
|
|
13
13
|
"time.yearAgo": "year ago",
|
|
14
|
-
"time.yearsAgo": "
|
|
14
|
+
"time.yearsAgo": "years ago",
|
|
15
15
|
"chat": {
|
|
16
16
|
"anotherHint": "Give me another hint",
|
|
17
17
|
"giveHint": "I need a hint",
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"teacherFeedback.noComments": "No comments yet",
|
|
4
4
|
"time.justNow": "just now",
|
|
5
5
|
"time.minuteAgo": "minute ago",
|
|
6
|
-
"time.minutesAgo": "
|
|
6
|
+
"time.minutesAgo": "minutes ago",
|
|
7
7
|
"time.hourAgo": "hour ago",
|
|
8
|
-
"time.hoursAgo": "
|
|
8
|
+
"time.hoursAgo": "hours ago",
|
|
9
9
|
"time.dayAgo": "day ago",
|
|
10
|
-
"time.daysAgo": "
|
|
10
|
+
"time.daysAgo": "days ago",
|
|
11
11
|
"time.monthAgo": "month ago",
|
|
12
|
-
"time.monthsAgo": "
|
|
12
|
+
"time.monthsAgo": "months ago",
|
|
13
13
|
"time.yearAgo": "year ago",
|
|
14
|
-
"time.yearsAgo": "
|
|
14
|
+
"time.yearsAgo": "years ago",
|
|
15
15
|
"chat": {
|
|
16
16
|
"anotherHint": "Give me another hint",
|
|
17
17
|
"giveHint": "I need a hint",
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"teacherFeedback.noComments": "No comments yet",
|
|
4
4
|
"time.justNow": "just now",
|
|
5
5
|
"time.minuteAgo": "minute ago",
|
|
6
|
-
"time.minutesAgo": "
|
|
6
|
+
"time.minutesAgo": "minutes ago",
|
|
7
7
|
"time.hourAgo": "hour ago",
|
|
8
|
-
"time.hoursAgo": "
|
|
8
|
+
"time.hoursAgo": "hours ago",
|
|
9
9
|
"time.dayAgo": "day ago",
|
|
10
|
-
"time.daysAgo": "
|
|
10
|
+
"time.daysAgo": "days ago",
|
|
11
11
|
"time.monthAgo": "month ago",
|
|
12
|
-
"time.monthsAgo": "
|
|
12
|
+
"time.monthsAgo": "months ago",
|
|
13
13
|
"time.yearAgo": "year ago",
|
|
14
|
-
"time.yearsAgo": "
|
|
14
|
+
"time.yearsAgo": "years ago",
|
|
15
15
|
"chat": {
|
|
16
16
|
"anotherHint": "Give me another hint",
|
|
17
17
|
"giveHint": "I need a hint",
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
"teacherFeedback.noComments": "Inga kommentarer än",
|
|
4
4
|
"time.justNow": "alldeles nyss",
|
|
5
5
|
"time.minuteAgo": "minut sedan",
|
|
6
|
-
"time.minutesAgo": "
|
|
6
|
+
"time.minutesAgo": "minuter sedan",
|
|
7
7
|
"time.hourAgo": "timme sedan",
|
|
8
|
-
"time.hoursAgo": "
|
|
8
|
+
"time.hoursAgo": "timmar sedan",
|
|
9
9
|
"time.dayAgo": "dag sedan",
|
|
10
|
-
"time.daysAgo": "
|
|
10
|
+
"time.daysAgo": "dagar sedan",
|
|
11
11
|
"time.monthAgo": "månad sedan",
|
|
12
|
-
"time.monthsAgo": "
|
|
12
|
+
"time.monthsAgo": "månader sedan",
|
|
13
13
|
"time.yearAgo": "år sedan",
|
|
14
|
-
"time.yearsAgo": "
|
|
14
|
+
"time.yearsAgo": "år sedan",
|
|
15
15
|
"chat": {
|
|
16
16
|
"anotherHint": "Ge mig en till ledtråd",
|
|
17
17
|
"giveHint": "Ge mig en ledtråd",
|
|
@@ -3,8 +3,6 @@ import swTranslations from './localization/sw.json'
|
|
|
3
3
|
import gbTranslations from './localization/gb.json'
|
|
4
4
|
import caTranslations from './localization/ca.json'
|
|
5
5
|
import sctTranslations from './localization/sct.json'
|
|
6
|
-
import deTranslations from "./localization/de.json"
|
|
7
|
-
|
|
8
6
|
import { RetrieveKeys } from '../../lib/types/keys'
|
|
9
7
|
import { ISValidTranslation } from './validation.types'
|
|
10
8
|
|
|
@@ -18,7 +16,6 @@ export enum Locale {
|
|
|
18
16
|
GB = 'en-GB',
|
|
19
17
|
CA = 'en-CA',
|
|
20
18
|
SCT = 'en-SCT',
|
|
21
|
-
DE = 'de-DE'
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
// Validation of translations, do not remove
|
|
@@ -27,4 +24,3 @@ type ISValidSW = ISValidTranslation<typeof swTranslations>
|
|
|
27
24
|
type ISValidGB = ISValidTranslation<typeof gbTranslations>
|
|
28
25
|
type ISValidCA = ISValidTranslation<typeof caTranslations>
|
|
29
26
|
type ISValidSCT = ISValidTranslation<typeof sctTranslations>
|
|
30
|
-
type ISValidDE = ISValidTranslation<typeof deTranslations>
|