@magmamath/students-features 1.3.17 → 1.3.18-rc.1
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/i18n/i18n.js +5 -1
- package/dist/commonjs/i18n/i18n.js.map +1 -1
- package/dist/module/i18n/i18n.js +4 -1
- package/dist/module/i18n/i18n.js.map +1 -1
- package/dist/typescript/commonjs/i18n/i18n.d.ts +3 -4
- package/dist/typescript/commonjs/i18n/i18n.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/i18n/i18n.d.ts +3 -4
- package/dist/typescript/module/i18n/i18n.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/i18n/.generated/schema.json +90 -0
- package/src/i18n/i18n.ts +4 -4
|
@@ -9,7 +9,11 @@ var _reactI18next = require("react-i18next");
|
|
|
9
9
|
var _constants = require("@magmamath/frontend-config/translation/constants");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const NAMESPACE = exports.NAMESPACE = _constants.TranslationNamespace.STUDENTS_FEATURES;
|
|
12
|
-
const getText =
|
|
12
|
+
const getText = (key, options) => _i18next.default.t(key, {
|
|
13
|
+
ns: NAMESPACE,
|
|
14
|
+
...options
|
|
15
|
+
});
|
|
16
|
+
exports.getText = getText;
|
|
13
17
|
const useText = () => (0, _reactI18next.useTranslation)(NAMESPACE).t;
|
|
14
18
|
exports.useText = useText;
|
|
15
19
|
//# sourceMappingURL=i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18next","_interopRequireDefault","require","_reactI18next","_constants","e","__esModule","default","NAMESPACE","exports","TranslationNamespace","STUDENTS_FEATURES","getText","i18next","
|
|
1
|
+
{"version":3,"names":["_i18next","_interopRequireDefault","require","_reactI18next","_constants","e","__esModule","default","NAMESPACE","exports","TranslationNamespace","STUDENTS_FEATURES","getText","key","options","i18next","t","ns","useText","useTranslation"],"sourceRoot":"../../../src","sources":["i18n/i18n.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAuF,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhF,MAAMG,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,+BAAoB,CAACC,iBAAiB;AAIxD,MAAMC,OAAO,GAAGA,CAACC,GAAmB,EAAEC,OAAgC,KAC3EC,gBAAO,CAACC,CAAC,CAACH,GAAG,EAAE;EAAEI,EAAE,EAAET,SAAS;EAAE,GAAGM;AAAQ,CAAC,CAAC;AAAAL,OAAA,CAAAG,OAAA,GAAAA,OAAA;AAExC,MAAMM,OAAO,GAAGA,CAAA,KAAM,IAAAC,4BAAc,EAACX,SAAS,CAAC,CAACQ,CAAC;AAAAP,OAAA,CAAAS,OAAA,GAAAA,OAAA","ignoreList":[]}
|
package/dist/module/i18n/i18n.js
CHANGED
|
@@ -4,6 +4,9 @@ import i18next from 'i18next';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { TranslationNamespace } from '@magmamath/frontend-config/translation/constants';
|
|
6
6
|
export const NAMESPACE = TranslationNamespace.STUDENTS_FEATURES;
|
|
7
|
-
export const getText = i18next.
|
|
7
|
+
export const getText = (key, options) => i18next.t(key, {
|
|
8
|
+
ns: NAMESPACE,
|
|
9
|
+
...options
|
|
10
|
+
});
|
|
8
11
|
export const useText = () => useTranslation(NAMESPACE).t;
|
|
9
12
|
//# sourceMappingURL=i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["i18next","useTranslation","TranslationNamespace","NAMESPACE","STUDENTS_FEATURES","getText","
|
|
1
|
+
{"version":3,"names":["i18next","useTranslation","TranslationNamespace","NAMESPACE","STUDENTS_FEATURES","getText","key","options","t","ns","useText"],"sourceRoot":"../../../src","sources":["i18n/i18n.ts"],"mappings":";;AAAA,OAAOA,OAAO,MAAqB,SAAS;AAC5C,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,oBAAoB,QAAQ,kDAAkD;AAEvF,OAAO,MAAMC,SAAS,GAAGD,oBAAoB,CAACE,iBAAiB;AAI/D,OAAO,MAAMC,OAAO,GAAGA,CAACC,GAAmB,EAAEC,OAAgC,KAC3EP,OAAO,CAACQ,CAAC,CAACF,GAAG,EAAE;EAAEG,EAAE,EAAEN,SAAS;EAAE,GAAGI;AAAQ,CAAC,CAAC;AAE/C,OAAO,MAAMG,OAAO,GAAGA,CAAA,KAAMT,cAAc,CAACE,SAAS,CAAC,CAACK,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ParseKeys
|
|
1
|
+
import { ParseKeys } from 'i18next';
|
|
2
2
|
import { TranslationNamespace } from '@magmamath/frontend-config/translation/constants';
|
|
3
3
|
export declare const NAMESPACE = TranslationNamespace.STUDENTS_FEATURES;
|
|
4
4
|
export type TranslationKey = ParseKeys<typeof NAMESPACE>;
|
|
5
|
-
export
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const useText: () => GetText;
|
|
5
|
+
export declare const getText: (key: TranslationKey, options?: Record<string, string>) => string;
|
|
6
|
+
export declare const useText: () => import("i18next").TFunction<TranslationNamespace.STUDENTS_FEATURES, undefined>;
|
|
8
7
|
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAEvF,eAAO,MAAM,SAAS,yCAAyC,CAAA;AAE/D,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAA;AAExD,eAAO,MAAM,OAAO,QAAS,cAAc,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAC9B,CAAA;AAE/C,eAAO,MAAM,OAAO,sFAAoC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAA;AAE5B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAA;AAE5B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,WAsC7C,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ParseKeys
|
|
1
|
+
import { ParseKeys } from 'i18next';
|
|
2
2
|
import { TranslationNamespace } from '@magmamath/frontend-config/translation/constants';
|
|
3
3
|
export declare const NAMESPACE = TranslationNamespace.STUDENTS_FEATURES;
|
|
4
4
|
export type TranslationKey = ParseKeys<typeof NAMESPACE>;
|
|
5
|
-
export
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const useText: () => GetText;
|
|
5
|
+
export declare const getText: (key: TranslationKey, options?: Record<string, string>) => string;
|
|
6
|
+
export declare const useText: () => import("i18next").TFunction<TranslationNamespace.STUDENTS_FEATURES, undefined>;
|
|
8
7
|
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAEvF,eAAO,MAAM,SAAS,yCAAyC,CAAA;AAE/D,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAA;AAExD,eAAO,MAAM,OAAO,QAAS,cAAc,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAC9B,CAAA;AAE/C,eAAO,MAAM,OAAO,sFAAoC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAA;AAE5B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAA;AAE5B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,WAsC7C,CAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chat": {
|
|
3
|
+
"anotherHint": "Give me another hint",
|
|
4
|
+
"answerAgain": "Answer again to get another hint!",
|
|
5
|
+
"errorMessage": "Something went wrong! Try again",
|
|
6
|
+
"getHint": "Get a hint",
|
|
7
|
+
"giveHint": "I need a hint",
|
|
8
|
+
"giveHintOpenChat": "I need a hint",
|
|
9
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
10
|
+
"inputPlaceholder": "Type...",
|
|
11
|
+
"needHint": "I need a hint",
|
|
12
|
+
"showError": "Show error"
|
|
13
|
+
},
|
|
14
|
+
"exampleSolution": {
|
|
15
|
+
"aha": "Aha!",
|
|
16
|
+
"errorMessage": "Something went wrong with generating an example solution",
|
|
17
|
+
"exampleSolution": "Example solution",
|
|
18
|
+
"letMeThink": "Let me think..."
|
|
19
|
+
},
|
|
20
|
+
"gifCelebrations": {
|
|
21
|
+
"almostThere": "Almost there",
|
|
22
|
+
"greatStart": "Great start!",
|
|
23
|
+
"onTheWay": "On the way!"
|
|
24
|
+
},
|
|
25
|
+
"keyboard": {
|
|
26
|
+
"area": "Area",
|
|
27
|
+
"length": "Length",
|
|
28
|
+
"time": "Time",
|
|
29
|
+
"volume": "Volume",
|
|
30
|
+
"weight": "Weight"
|
|
31
|
+
},
|
|
32
|
+
"locale": "en-SE",
|
|
33
|
+
"pmProgress": {
|
|
34
|
+
"allLockedSubtitle": "Your teacher has locked all grades.\nAsk them to unlock grades so you can start practicing.",
|
|
35
|
+
"allLockedTitle": "All grades are locked",
|
|
36
|
+
"allTime": "All time",
|
|
37
|
+
"andMore": "and '{{'count'}}' more...",
|
|
38
|
+
"fluency": "Fluency",
|
|
39
|
+
"grade": "Grade",
|
|
40
|
+
"gradeK": "K",
|
|
41
|
+
"gradeOther": "Other",
|
|
42
|
+
"initErrorSubtitle": "We couldn't load your progress.\nPlease try again later.",
|
|
43
|
+
"initErrorTitle": "Something went wrong",
|
|
44
|
+
"lastWeek": "Last week",
|
|
45
|
+
"loading": "Loading...",
|
|
46
|
+
"nextUp": "Next up!",
|
|
47
|
+
"practiceButton": "PRACTICE",
|
|
48
|
+
"skillLeft": "skill left",
|
|
49
|
+
"skillsLeft": "skills left",
|
|
50
|
+
"stars": "Practice stars",
|
|
51
|
+
"startButton": "START",
|
|
52
|
+
"teacherRecs": "Teacher recommendations",
|
|
53
|
+
"thisWeek": "This week",
|
|
54
|
+
"time": "Practice time",
|
|
55
|
+
"title": "Practice & Progress"
|
|
56
|
+
},
|
|
57
|
+
"teacherFeedback": {
|
|
58
|
+
"noComments": "No comments yet"
|
|
59
|
+
},
|
|
60
|
+
"time": {
|
|
61
|
+
"dayAgo": "day ago",
|
|
62
|
+
"daysAgo": "{{count}} days ago",
|
|
63
|
+
"hourAgo": "hour ago",
|
|
64
|
+
"hoursAgo": "{{count}} hours ago",
|
|
65
|
+
"justNow": "just now",
|
|
66
|
+
"minuteAgo": "minute ago",
|
|
67
|
+
"minutesAgo": "{{count}} minutes ago",
|
|
68
|
+
"monthAgo": "month ago",
|
|
69
|
+
"monthsAgo": "{{count}} months ago",
|
|
70
|
+
"yearAgo": "year ago",
|
|
71
|
+
"yearsAgo": "{{count}} years ago"
|
|
72
|
+
},
|
|
73
|
+
"voice": {
|
|
74
|
+
"attempt": "Attempt {{ number }}",
|
|
75
|
+
"cancel": "Cancel",
|
|
76
|
+
"delete": "Delete",
|
|
77
|
+
"deleteRecording": "Delete recording?",
|
|
78
|
+
"noMicrophoneAccess": "No microphone access.",
|
|
79
|
+
"noMicrophoneAccessBySystem": "Microphone access denied by system settings.",
|
|
80
|
+
"noMicrophoneFound": "No microphone found.",
|
|
81
|
+
"recordingDeleted": "Recording successfully deleted.",
|
|
82
|
+
"redo": "Redo",
|
|
83
|
+
"redoRecording": "Redo recording?",
|
|
84
|
+
"thisWillRemoveRecording": "This will remove your previous recording.",
|
|
85
|
+
"transcriptions": "Transcriptions",
|
|
86
|
+
"transcriptNotAvailable": "Transcript not available",
|
|
87
|
+
"uploadFailed": "Upload failed. Please try again.",
|
|
88
|
+
"youWontBeAbleToRecover": "You won't be able to recover this file once it's gone."
|
|
89
|
+
}
|
|
90
|
+
}
|
package/src/i18n/i18n.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import i18next, { ParseKeys
|
|
1
|
+
import i18next, { ParseKeys } from 'i18next'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { TranslationNamespace } from '@magmamath/frontend-config/translation/constants'
|
|
4
4
|
|
|
5
5
|
export const NAMESPACE = TranslationNamespace.STUDENTS_FEATURES
|
|
6
6
|
|
|
7
7
|
export type TranslationKey = ParseKeys<typeof NAMESPACE>
|
|
8
|
-
export type GetText = TFunction<typeof NAMESPACE>
|
|
9
8
|
|
|
10
|
-
export const getText
|
|
9
|
+
export const getText = (key: TranslationKey, options?: Record<string, string>) =>
|
|
10
|
+
i18next.t(key, { ns: NAMESPACE, ...options })
|
|
11
11
|
|
|
12
|
-
export const useText = ()
|
|
12
|
+
export const useText = () => useTranslation(NAMESPACE).t
|