@magmamath/students-features 0.9.5-rc.2 → 0.9.5

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.
Files changed (149) hide show
  1. package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +44 -0
  2. package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -0
  3. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +10 -3
  4. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  5. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +2 -4
  6. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -1
  7. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
  8. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
  9. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +2 -1
  10. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  11. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +9 -2
  12. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  13. package/dist/commonjs/features/endOfAssignment/helpers.js +10 -3
  14. package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -1
  15. package/dist/commonjs/features/endOfAssignment/model/model.js +7 -0
  16. package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -1
  17. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -2
  18. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  19. package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js +1 -5
  20. package/dist/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
  21. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +0 -20
  22. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  23. package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js +0 -1
  24. package/dist/commonjs/features/keyboard/types/keyboardGroupIds.js.map +1 -1
  25. package/dist/commonjs/lib/helpers/helpers.js +5 -28
  26. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  27. package/dist/commonjs/shared/translation/constants.js +1 -3
  28. package/dist/commonjs/shared/translation/constants.js.map +1 -1
  29. package/dist/commonjs/shared/translation/localization/ca.json +5 -5
  30. package/dist/commonjs/shared/translation/localization/en.json +5 -5
  31. package/dist/commonjs/shared/translation/localization/gb.json +5 -5
  32. package/dist/commonjs/shared/translation/localization/sct.json +5 -5
  33. package/dist/commonjs/shared/translation/localization/sw.json +5 -5
  34. package/dist/commonjs/shared/translation/types.js +0 -1
  35. package/dist/commonjs/shared/translation/types.js.map +1 -1
  36. package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +38 -0
  37. package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -0
  38. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +10 -3
  39. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  40. package/dist/module/features/endOfAssignment/components/EOAModal.js +2 -4
  41. package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -1
  42. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +6 -4
  43. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
  44. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +3 -2
  45. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  46. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +9 -2
  47. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  48. package/dist/module/features/endOfAssignment/helpers.js +8 -2
  49. package/dist/module/features/endOfAssignment/helpers.js.map +1 -1
  50. package/dist/module/features/endOfAssignment/model/model.js +7 -0
  51. package/dist/module/features/endOfAssignment/model/model.js.map +1 -1
  52. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +2 -2
  53. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  54. package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js +0 -4
  55. package/dist/module/features/keyboard/components/BasicLayout/keyboardGroups.js.map +1 -1
  56. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +1 -21
  57. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  58. package/dist/module/features/keyboard/types/keyboardGroupIds.js +0 -1
  59. package/dist/module/features/keyboard/types/keyboardGroupIds.js.map +1 -1
  60. package/dist/module/lib/helpers/helpers.js +5 -28
  61. package/dist/module/lib/helpers/helpers.js.map +1 -1
  62. package/dist/module/shared/translation/constants.js +1 -3
  63. package/dist/module/shared/translation/constants.js.map +1 -1
  64. package/dist/module/shared/translation/localization/ca.json +5 -5
  65. package/dist/module/shared/translation/localization/en.json +5 -5
  66. package/dist/module/shared/translation/localization/gb.json +5 -5
  67. package/dist/module/shared/translation/localization/sct.json +5 -5
  68. package/dist/module/shared/translation/localization/sw.json +5 -5
  69. package/dist/module/shared/translation/types.js +0 -1
  70. package/dist/module/shared/translation/types.js.map +1 -1
  71. package/dist/typescript/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts +10 -0
  72. package/dist/typescript/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts.map +1 -0
  73. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  74. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +1 -3
  75. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
  76. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +1 -1
  77. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
  78. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  80. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +3 -1
  81. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -1
  82. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +5 -0
  83. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -1
  84. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +2 -2
  85. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -1
  86. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +3 -2
  87. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  88. package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
  89. package/dist/typescript/commonjs/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
  90. package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  91. package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
  92. package/dist/typescript/commonjs/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
  93. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  94. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -42
  95. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  96. package/dist/typescript/commonjs/shared/translation/types.d.ts +1 -2
  97. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  98. package/dist/typescript/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts +10 -0
  99. package/dist/typescript/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.d.ts.map +1 -0
  100. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  101. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +1 -3
  102. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -1
  103. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +1 -1
  104. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
  105. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
  106. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  107. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +3 -1
  108. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -1
  109. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +5 -0
  110. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -1
  111. package/dist/typescript/module/features/endOfAssignment/types.d.ts +2 -2
  112. package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -1
  113. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +3 -2
  114. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  115. package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts +0 -1
  116. package/dist/typescript/module/features/keyboard/components/BasicLayout/keyboardGroups.d.ts.map +1 -1
  117. package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  118. package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts +0 -1
  119. package/dist/typescript/module/features/keyboard/types/keyboardGroupIds.d.ts.map +1 -1
  120. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  121. package/dist/typescript/module/shared/translation/constants.d.ts +0 -42
  122. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  123. package/dist/typescript/module/shared/translation/types.d.ts +1 -2
  124. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  125. package/package.json +2 -2
  126. package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +43 -0
  127. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +20 -10
  128. package/src/features/endOfAssignment/components/EOAModal.tsx +2 -9
  129. package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +6 -6
  130. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +2 -2
  131. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +17 -6
  132. package/src/features/endOfAssignment/helpers.ts +10 -3
  133. package/src/features/endOfAssignment/model/model.ts +5 -1
  134. package/src/features/endOfAssignment/types.ts +2 -1
  135. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +4 -3
  136. package/src/features/keyboard/components/BasicLayout/keyboardGroups.ts +0 -4
  137. package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +0 -21
  138. package/src/features/keyboard/types/keyboardGroupIds.ts +0 -1
  139. package/src/lib/helpers/helpers.ts +8 -23
  140. package/src/shared/translation/constants.ts +0 -2
  141. package/src/shared/translation/localization/ca.json +5 -5
  142. package/src/shared/translation/localization/en.json +5 -5
  143. package/src/shared/translation/localization/gb.json +5 -5
  144. package/src/shared/translation/localization/sct.json +5 -5
  145. package/src/shared/translation/localization/sw.json +5 -5
  146. package/src/shared/translation/types.ts +0 -4
  147. package/dist/commonjs/shared/translation/localization/de.json +0 -42
  148. package/dist/module/shared/translation/localization/de.json +0 -42
  149. package/src/shared/translation/localization/de.json +0 -42
@@ -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: isExam ? ButtonColor.PURPLE : ButtonColor.BLUE,
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
- <NoAnswerContent
88
- solvedAmount={stats?.solvedAmount ?? 0}
89
- problemsAmount={stats?.problemsAmount ?? 0}
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: 600, height: 384 } }
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: 280 } }
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
- isExam: boolean
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
- isExam,
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={isExam ? ButtonColor.PURPLE : ButtonColor.BLUE}
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,6 +27,5 @@ export enum MathEntryKeyboardGroupId {
27
27
  CURRENCY_SW = 'math-entry-currency-sw',
28
28
  CURRENCY_UK = 'math-entry-currency-uk',
29
29
  CURRENCY_US = 'math-entry-currency-us',
30
- CURRENCY_DE = 'math-entry-currency-de',
31
30
  UNDERLINED = 'math-entry-underlined',
32
31
  }
@@ -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
- if (minutes < 60) {
32
- if (minutes === 1) return `1 ${getText('time.minuteAgo')}`
33
- return getText('time.minutesAgo', { count: minutes.toString() })
34
- }
35
-
36
- if (hours < 24) {
37
- if (hours === 1) return `1 ${getText('time.hourAgo')}`
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": "{{count}} minutes ago",
6
+ "time.minutesAgo": "minutes ago",
7
7
  "time.hourAgo": "hour ago",
8
- "time.hoursAgo": "{{count}} hours ago",
8
+ "time.hoursAgo": "hours ago",
9
9
  "time.dayAgo": "day ago",
10
- "time.daysAgo": "{{count}} days ago",
10
+ "time.daysAgo": "days ago",
11
11
  "time.monthAgo": "month ago",
12
- "time.monthsAgo": "{{count}} months ago",
12
+ "time.monthsAgo": "months ago",
13
13
  "time.yearAgo": "year ago",
14
- "time.yearsAgo": "{{count}} years ago",
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": "{{count}} minutes ago",
6
+ "time.minutesAgo": "minutes ago",
7
7
  "time.hourAgo": "hour ago",
8
- "time.hoursAgo": "{{count}} hours ago",
8
+ "time.hoursAgo": "hours ago",
9
9
  "time.dayAgo": "day ago",
10
- "time.daysAgo": "{{count}} days ago",
10
+ "time.daysAgo": "days ago",
11
11
  "time.monthAgo": "month ago",
12
- "time.monthsAgo": "{{count}} months ago",
12
+ "time.monthsAgo": "months ago",
13
13
  "time.yearAgo": "year ago",
14
- "time.yearsAgo": "{{count}} years ago",
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": "{{count}} minutes ago",
6
+ "time.minutesAgo": "minutes ago",
7
7
  "time.hourAgo": "hour ago",
8
- "time.hoursAgo": "{{count}} hours ago",
8
+ "time.hoursAgo": "hours ago",
9
9
  "time.dayAgo": "day ago",
10
- "time.daysAgo": "{{count}} days ago",
10
+ "time.daysAgo": "days ago",
11
11
  "time.monthAgo": "month ago",
12
- "time.monthsAgo": "{{count}} months ago",
12
+ "time.monthsAgo": "months ago",
13
13
  "time.yearAgo": "year ago",
14
- "time.yearsAgo": "{{count}} years ago",
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": "{{count}} minutes ago",
6
+ "time.minutesAgo": "minutes ago",
7
7
  "time.hourAgo": "hour ago",
8
- "time.hoursAgo": "{{count}} hours ago",
8
+ "time.hoursAgo": "hours ago",
9
9
  "time.dayAgo": "day ago",
10
- "time.daysAgo": "{{count}} days ago",
10
+ "time.daysAgo": "days ago",
11
11
  "time.monthAgo": "month ago",
12
- "time.monthsAgo": "{{count}} months ago",
12
+ "time.monthsAgo": "months ago",
13
13
  "time.yearAgo": "year ago",
14
- "time.yearsAgo": "{{count}} years ago",
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": "{{count}} minuter sedan",
6
+ "time.minutesAgo": "minuter sedan",
7
7
  "time.hourAgo": "timme sedan",
8
- "time.hoursAgo": "{{count}} timmar sedan",
8
+ "time.hoursAgo": "timmar sedan",
9
9
  "time.dayAgo": "dag sedan",
10
- "time.daysAgo": "{{count}} dagar sedan",
10
+ "time.daysAgo": "dagar sedan",
11
11
  "time.monthAgo": "månad sedan",
12
- "time.monthsAgo": "{{count}} månader sedan",
12
+ "time.monthsAgo": "månader sedan",
13
13
  "time.yearAgo": "år sedan",
14
- "time.yearsAgo": "{{count}} år sedan",
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>
@@ -1,42 +0,0 @@
1
- {
2
- "locale": "de-DE",
3
- "teacherFeedback.noComments": "Noch keine Kommentare",
4
- "time.justNow": "gerade eben",
5
- "time.minuteAgo": "vor einer Minute",
6
- "time.minutesAgo": "vor {{count}} Minuten",
7
- "time.hourAgo": "vor einer Stunde",
8
- "time.hoursAgo": "vor {{count}} Stunden",
9
- "time.dayAgo": "vor einem Tag",
10
- "time.daysAgo": "vor {{count}} Tagen",
11
- "time.monthAgo": "vor einem Monat",
12
- "time.monthsAgo": "vor {{count}} Monaten",
13
- "time.yearAgo": "vor einem Jahr",
14
- "time.yearsAgo": "vor {{count}} Jahren",
15
- "chat": {
16
- "anotherHint": "Gib mir noch einen Hinweis",
17
- "giveHint": "Ich brauche einen Hinweis",
18
- "giveHintOpenChat": "Ich brauche einen Hinweis",
19
- "answerAgain": "Noch einmal antworten, um einen weiteren Hinweis zu bekommen!",
20
- "errorMessage": "Etwas ist schiefgelaufen! Versuch es erneut",
21
- "howCanIHelp": "Hi! Möchtest du Hilfe?",
22
- "showError": "Fehler anzeigen",
23
- "inputPlaceholder": "Tippe..."
24
- },
25
- "gifCelebrations": {
26
- "greatStart": "Toller Start!",
27
- "onTheWay": "Auf dem Weg!",
28
- "almostThere": "Fast geschafft"
29
- },
30
- "exampleSolution": {
31
- "exampleSolution": "Beispiellösung",
32
- "letMeThink": "Lass mich nachdenken...",
33
- "aha": "Aha!",
34
- "errorMessage": "Beim Erstellen einer Beispiellösung ist etwas schiefgelaufen"
35
- },
36
- "keyboard": {
37
- "length": "Länge",
38
- "area": "Fläche",
39
- "volume": "Volumen",
40
- "weight": "Gewicht"
41
- }
42
- }
@@ -1,42 +0,0 @@
1
- {
2
- "locale": "de-DE",
3
- "teacherFeedback.noComments": "Noch keine Kommentare",
4
- "time.justNow": "gerade eben",
5
- "time.minuteAgo": "vor einer Minute",
6
- "time.minutesAgo": "vor {{count}} Minuten",
7
- "time.hourAgo": "vor einer Stunde",
8
- "time.hoursAgo": "vor {{count}} Stunden",
9
- "time.dayAgo": "vor einem Tag",
10
- "time.daysAgo": "vor {{count}} Tagen",
11
- "time.monthAgo": "vor einem Monat",
12
- "time.monthsAgo": "vor {{count}} Monaten",
13
- "time.yearAgo": "vor einem Jahr",
14
- "time.yearsAgo": "vor {{count}} Jahren",
15
- "chat": {
16
- "anotherHint": "Gib mir noch einen Hinweis",
17
- "giveHint": "Ich brauche einen Hinweis",
18
- "giveHintOpenChat": "Ich brauche einen Hinweis",
19
- "answerAgain": "Noch einmal antworten, um einen weiteren Hinweis zu bekommen!",
20
- "errorMessage": "Etwas ist schiefgelaufen! Versuch es erneut",
21
- "howCanIHelp": "Hi! Möchtest du Hilfe?",
22
- "showError": "Fehler anzeigen",
23
- "inputPlaceholder": "Tippe..."
24
- },
25
- "gifCelebrations": {
26
- "greatStart": "Toller Start!",
27
- "onTheWay": "Auf dem Weg!",
28
- "almostThere": "Fast geschafft"
29
- },
30
- "exampleSolution": {
31
- "exampleSolution": "Beispiellösung",
32
- "letMeThink": "Lass mich nachdenken...",
33
- "aha": "Aha!",
34
- "errorMessage": "Beim Erstellen einer Beispiellösung ist etwas schiefgelaufen"
35
- },
36
- "keyboard": {
37
- "length": "Länge",
38
- "area": "Fläche",
39
- "volume": "Volumen",
40
- "weight": "Gewicht"
41
- }
42
- }
@@ -1,42 +0,0 @@
1
- {
2
- "locale": "de-DE",
3
- "teacherFeedback.noComments": "Noch keine Kommentare",
4
- "time.justNow": "gerade eben",
5
- "time.minuteAgo": "vor einer Minute",
6
- "time.minutesAgo": "vor {{count}} Minuten",
7
- "time.hourAgo": "vor einer Stunde",
8
- "time.hoursAgo": "vor {{count}} Stunden",
9
- "time.dayAgo": "vor einem Tag",
10
- "time.daysAgo": "vor {{count}} Tagen",
11
- "time.monthAgo": "vor einem Monat",
12
- "time.monthsAgo": "vor {{count}} Monaten",
13
- "time.yearAgo": "vor einem Jahr",
14
- "time.yearsAgo": "vor {{count}} Jahren",
15
- "chat": {
16
- "anotherHint": "Gib mir noch einen Hinweis",
17
- "giveHint": "Ich brauche einen Hinweis",
18
- "giveHintOpenChat": "Ich brauche einen Hinweis",
19
- "answerAgain": "Noch einmal antworten, um einen weiteren Hinweis zu bekommen!",
20
- "errorMessage": "Etwas ist schiefgelaufen! Versuch es erneut",
21
- "howCanIHelp": "Hi! Möchtest du Hilfe?",
22
- "showError": "Fehler anzeigen",
23
- "inputPlaceholder": "Tippe..."
24
- },
25
- "gifCelebrations": {
26
- "greatStart": "Toller Start!",
27
- "onTheWay": "Auf dem Weg!",
28
- "almostThere": "Fast geschafft"
29
- },
30
- "exampleSolution": {
31
- "exampleSolution": "Beispiellösung",
32
- "letMeThink": "Lass mich nachdenken...",
33
- "aha": "Aha!",
34
- "errorMessage": "Beim Erstellen einer Beispiellösung ist etwas schiefgelaufen"
35
- },
36
- "keyboard": {
37
- "length": "Länge",
38
- "area": "Fläche",
39
- "volume": "Volumen",
40
- "weight": "Gewicht"
41
- }
42
- }