@contractspec/module.learning-journey 2.4.0 → 2.6.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/browser/engines/index.js +149 -0
- package/dist/browser/engines/xp.js +149 -0
- package/dist/browser/entities/index.js +4 -0
- package/dist/browser/entities/learner.js +4 -0
- package/dist/browser/i18n/catalogs/en.js +43 -0
- package/dist/browser/i18n/catalogs/es.js +43 -0
- package/dist/browser/i18n/catalogs/fr.js +43 -0
- package/dist/browser/i18n/catalogs/index.js +127 -0
- package/dist/browser/i18n/index.js +169 -0
- package/dist/browser/i18n/keys.js +16 -0
- package/dist/browser/i18n/locale.js +13 -0
- package/dist/browser/i18n/messages.js +139 -0
- package/dist/browser/index.js +153 -0
- package/dist/engines/index.js +149 -0
- package/dist/engines/xp.d.ts +7 -0
- package/dist/engines/xp.js +149 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +4 -0
- package/dist/entities/learner.d.ts +2 -0
- package/dist/entities/learner.js +4 -0
- package/dist/i18n/catalogs/en.d.ts +6 -0
- package/dist/i18n/catalogs/en.js +44 -0
- package/dist/i18n/catalogs/es.d.ts +6 -0
- package/dist/i18n/catalogs/es.js +44 -0
- package/dist/i18n/catalogs/fr.d.ts +6 -0
- package/dist/i18n/catalogs/fr.js +44 -0
- package/dist/i18n/catalogs/index.d.ts +8 -0
- package/dist/i18n/catalogs/index.js +128 -0
- package/dist/i18n/i18n.test.d.ts +1 -0
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.js +170 -0
- package/dist/i18n/keys.d.ts +25 -0
- package/dist/i18n/keys.js +17 -0
- package/dist/i18n/locale.d.ts +8 -0
- package/dist/i18n/locale.js +14 -0
- package/dist/i18n/messages.d.ts +14 -0
- package/dist/i18n/messages.js +140 -0
- package/dist/index.js +153 -0
- package/dist/node/engines/index.js +149 -0
- package/dist/node/engines/xp.js +149 -0
- package/dist/node/entities/index.js +4 -0
- package/dist/node/entities/learner.js +4 -0
- package/dist/node/i18n/catalogs/en.js +43 -0
- package/dist/node/i18n/catalogs/es.js +43 -0
- package/dist/node/i18n/catalogs/fr.js +43 -0
- package/dist/node/i18n/catalogs/index.js +127 -0
- package/dist/node/i18n/index.js +169 -0
- package/dist/node/i18n/keys.js +16 -0
- package/dist/node/i18n/locale.js +13 -0
- package/dist/node/i18n/messages.js +139 -0
- package/dist/node/index.js +153 -0
- package/package.json +146 -5
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// src/i18n/catalogs/en.ts
|
|
2
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
3
|
+
var enMessages = defineTranslation({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "learning-journey.messages",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
domain: "learning-journey",
|
|
8
|
+
description: "XP source labels for the learning-journey module",
|
|
9
|
+
owners: ["platform"],
|
|
10
|
+
stability: "experimental"
|
|
11
|
+
},
|
|
12
|
+
locale: "en",
|
|
13
|
+
fallback: "en",
|
|
14
|
+
messages: {
|
|
15
|
+
"xp.source.base": {
|
|
16
|
+
value: "Base",
|
|
17
|
+
description: "XP breakdown label for base XP"
|
|
18
|
+
},
|
|
19
|
+
"xp.source.scoreBonus": {
|
|
20
|
+
value: "Score Bonus",
|
|
21
|
+
description: "XP breakdown label for score-based bonus"
|
|
22
|
+
},
|
|
23
|
+
"xp.source.perfectScore": {
|
|
24
|
+
value: "Perfect Score",
|
|
25
|
+
description: "XP breakdown label for perfect score bonus"
|
|
26
|
+
},
|
|
27
|
+
"xp.source.firstAttempt": {
|
|
28
|
+
value: "First Attempt",
|
|
29
|
+
description: "XP breakdown label for first attempt bonus"
|
|
30
|
+
},
|
|
31
|
+
"xp.source.retryPenalty": {
|
|
32
|
+
value: "Retry Penalty",
|
|
33
|
+
description: "XP breakdown label for retry penalty"
|
|
34
|
+
},
|
|
35
|
+
"xp.source.streakBonus": {
|
|
36
|
+
value: "Streak Bonus",
|
|
37
|
+
description: "XP breakdown label for streak bonus"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// src/i18n/catalogs/fr.ts
|
|
43
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
44
|
+
var frMessages = defineTranslation2({
|
|
45
|
+
meta: {
|
|
46
|
+
key: "learning-journey.messages",
|
|
47
|
+
version: "1.0.0",
|
|
48
|
+
domain: "learning-journey",
|
|
49
|
+
description: "XP source labels (French)",
|
|
50
|
+
owners: ["platform"],
|
|
51
|
+
stability: "experimental"
|
|
52
|
+
},
|
|
53
|
+
locale: "fr",
|
|
54
|
+
fallback: "en",
|
|
55
|
+
messages: {
|
|
56
|
+
"xp.source.base": {
|
|
57
|
+
value: "Base",
|
|
58
|
+
description: "XP breakdown label for base XP"
|
|
59
|
+
},
|
|
60
|
+
"xp.source.scoreBonus": {
|
|
61
|
+
value: "Bonus de score",
|
|
62
|
+
description: "XP breakdown label for score-based bonus"
|
|
63
|
+
},
|
|
64
|
+
"xp.source.perfectScore": {
|
|
65
|
+
value: "Score parfait",
|
|
66
|
+
description: "XP breakdown label for perfect score bonus"
|
|
67
|
+
},
|
|
68
|
+
"xp.source.firstAttempt": {
|
|
69
|
+
value: "Premier essai",
|
|
70
|
+
description: "XP breakdown label for first attempt bonus"
|
|
71
|
+
},
|
|
72
|
+
"xp.source.retryPenalty": {
|
|
73
|
+
value: "Pénalité de réessai",
|
|
74
|
+
description: "XP breakdown label for retry penalty"
|
|
75
|
+
},
|
|
76
|
+
"xp.source.streakBonus": {
|
|
77
|
+
value: "Bonus de série",
|
|
78
|
+
description: "XP breakdown label for streak bonus"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// src/i18n/catalogs/es.ts
|
|
84
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
85
|
+
var esMessages = defineTranslation3({
|
|
86
|
+
meta: {
|
|
87
|
+
key: "learning-journey.messages",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
domain: "learning-journey",
|
|
90
|
+
description: "XP source labels (Spanish)",
|
|
91
|
+
owners: ["platform"],
|
|
92
|
+
stability: "experimental"
|
|
93
|
+
},
|
|
94
|
+
locale: "es",
|
|
95
|
+
fallback: "en",
|
|
96
|
+
messages: {
|
|
97
|
+
"xp.source.base": {
|
|
98
|
+
value: "Base",
|
|
99
|
+
description: "XP breakdown label for base XP"
|
|
100
|
+
},
|
|
101
|
+
"xp.source.scoreBonus": {
|
|
102
|
+
value: "Bonificación por puntuación",
|
|
103
|
+
description: "XP breakdown label for score-based bonus"
|
|
104
|
+
},
|
|
105
|
+
"xp.source.perfectScore": {
|
|
106
|
+
value: "Puntuación perfecta",
|
|
107
|
+
description: "XP breakdown label for perfect score bonus"
|
|
108
|
+
},
|
|
109
|
+
"xp.source.firstAttempt": {
|
|
110
|
+
value: "Primer intento",
|
|
111
|
+
description: "XP breakdown label for first attempt bonus"
|
|
112
|
+
},
|
|
113
|
+
"xp.source.retryPenalty": {
|
|
114
|
+
value: "Penalización por reintento",
|
|
115
|
+
description: "XP breakdown label for retry penalty"
|
|
116
|
+
},
|
|
117
|
+
"xp.source.streakBonus": {
|
|
118
|
+
value: "Bonificación por racha",
|
|
119
|
+
description: "XP breakdown label for streak bonus"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// src/i18n/messages.ts
|
|
125
|
+
import {
|
|
126
|
+
createI18nFactory
|
|
127
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
128
|
+
var factory = createI18nFactory({
|
|
129
|
+
specKey: "learning-journey.messages",
|
|
130
|
+
catalogs: [enMessages, frMessages, esMessages]
|
|
131
|
+
});
|
|
132
|
+
var createLearningJourneyI18n = factory.create;
|
|
133
|
+
var getDefaultI18n = factory.getDefault;
|
|
134
|
+
var resetI18nRegistry = factory.resetRegistry;
|
|
135
|
+
|
|
136
|
+
// src/i18n/locale.ts
|
|
137
|
+
import {
|
|
138
|
+
DEFAULT_LOCALE,
|
|
139
|
+
SUPPORTED_LOCALES,
|
|
140
|
+
resolveLocale,
|
|
141
|
+
isSupportedLocale
|
|
142
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
143
|
+
|
|
144
|
+
// src/i18n/keys.ts
|
|
145
|
+
var XP_SOURCE_KEYS = {
|
|
146
|
+
"xp.source.base": "xp.source.base",
|
|
147
|
+
"xp.source.scoreBonus": "xp.source.scoreBonus",
|
|
148
|
+
"xp.source.perfectScore": "xp.source.perfectScore",
|
|
149
|
+
"xp.source.firstAttempt": "xp.source.firstAttempt",
|
|
150
|
+
"xp.source.retryPenalty": "xp.source.retryPenalty",
|
|
151
|
+
"xp.source.streakBonus": "xp.source.streakBonus"
|
|
152
|
+
};
|
|
153
|
+
var I18N_KEYS = {
|
|
154
|
+
...XP_SOURCE_KEYS
|
|
155
|
+
};
|
|
156
|
+
export {
|
|
157
|
+
resolveLocale,
|
|
158
|
+
resetI18nRegistry,
|
|
159
|
+
isSupportedLocale,
|
|
160
|
+
getDefaultI18n,
|
|
161
|
+
frMessages,
|
|
162
|
+
esMessages,
|
|
163
|
+
enMessages,
|
|
164
|
+
createLearningJourneyI18n,
|
|
165
|
+
XP_SOURCE_KEYS,
|
|
166
|
+
SUPPORTED_LOCALES,
|
|
167
|
+
I18N_KEYS,
|
|
168
|
+
DEFAULT_LOCALE
|
|
169
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/i18n/keys.ts
|
|
2
|
+
var XP_SOURCE_KEYS = {
|
|
3
|
+
"xp.source.base": "xp.source.base",
|
|
4
|
+
"xp.source.scoreBonus": "xp.source.scoreBonus",
|
|
5
|
+
"xp.source.perfectScore": "xp.source.perfectScore",
|
|
6
|
+
"xp.source.firstAttempt": "xp.source.firstAttempt",
|
|
7
|
+
"xp.source.retryPenalty": "xp.source.retryPenalty",
|
|
8
|
+
"xp.source.streakBonus": "xp.source.streakBonus"
|
|
9
|
+
};
|
|
10
|
+
var I18N_KEYS = {
|
|
11
|
+
...XP_SOURCE_KEYS
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
XP_SOURCE_KEYS,
|
|
15
|
+
I18N_KEYS
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/i18n/locale.ts
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_LOCALE,
|
|
4
|
+
SUPPORTED_LOCALES,
|
|
5
|
+
resolveLocale,
|
|
6
|
+
isSupportedLocale
|
|
7
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
8
|
+
export {
|
|
9
|
+
resolveLocale,
|
|
10
|
+
isSupportedLocale,
|
|
11
|
+
SUPPORTED_LOCALES,
|
|
12
|
+
DEFAULT_LOCALE
|
|
13
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// src/i18n/catalogs/en.ts
|
|
2
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
3
|
+
var enMessages = defineTranslation({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "learning-journey.messages",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
domain: "learning-journey",
|
|
8
|
+
description: "XP source labels for the learning-journey module",
|
|
9
|
+
owners: ["platform"],
|
|
10
|
+
stability: "experimental"
|
|
11
|
+
},
|
|
12
|
+
locale: "en",
|
|
13
|
+
fallback: "en",
|
|
14
|
+
messages: {
|
|
15
|
+
"xp.source.base": {
|
|
16
|
+
value: "Base",
|
|
17
|
+
description: "XP breakdown label for base XP"
|
|
18
|
+
},
|
|
19
|
+
"xp.source.scoreBonus": {
|
|
20
|
+
value: "Score Bonus",
|
|
21
|
+
description: "XP breakdown label for score-based bonus"
|
|
22
|
+
},
|
|
23
|
+
"xp.source.perfectScore": {
|
|
24
|
+
value: "Perfect Score",
|
|
25
|
+
description: "XP breakdown label for perfect score bonus"
|
|
26
|
+
},
|
|
27
|
+
"xp.source.firstAttempt": {
|
|
28
|
+
value: "First Attempt",
|
|
29
|
+
description: "XP breakdown label for first attempt bonus"
|
|
30
|
+
},
|
|
31
|
+
"xp.source.retryPenalty": {
|
|
32
|
+
value: "Retry Penalty",
|
|
33
|
+
description: "XP breakdown label for retry penalty"
|
|
34
|
+
},
|
|
35
|
+
"xp.source.streakBonus": {
|
|
36
|
+
value: "Streak Bonus",
|
|
37
|
+
description: "XP breakdown label for streak bonus"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// src/i18n/catalogs/fr.ts
|
|
43
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
44
|
+
var frMessages = defineTranslation2({
|
|
45
|
+
meta: {
|
|
46
|
+
key: "learning-journey.messages",
|
|
47
|
+
version: "1.0.0",
|
|
48
|
+
domain: "learning-journey",
|
|
49
|
+
description: "XP source labels (French)",
|
|
50
|
+
owners: ["platform"],
|
|
51
|
+
stability: "experimental"
|
|
52
|
+
},
|
|
53
|
+
locale: "fr",
|
|
54
|
+
fallback: "en",
|
|
55
|
+
messages: {
|
|
56
|
+
"xp.source.base": {
|
|
57
|
+
value: "Base",
|
|
58
|
+
description: "XP breakdown label for base XP"
|
|
59
|
+
},
|
|
60
|
+
"xp.source.scoreBonus": {
|
|
61
|
+
value: "Bonus de score",
|
|
62
|
+
description: "XP breakdown label for score-based bonus"
|
|
63
|
+
},
|
|
64
|
+
"xp.source.perfectScore": {
|
|
65
|
+
value: "Score parfait",
|
|
66
|
+
description: "XP breakdown label for perfect score bonus"
|
|
67
|
+
},
|
|
68
|
+
"xp.source.firstAttempt": {
|
|
69
|
+
value: "Premier essai",
|
|
70
|
+
description: "XP breakdown label for first attempt bonus"
|
|
71
|
+
},
|
|
72
|
+
"xp.source.retryPenalty": {
|
|
73
|
+
value: "Pénalité de réessai",
|
|
74
|
+
description: "XP breakdown label for retry penalty"
|
|
75
|
+
},
|
|
76
|
+
"xp.source.streakBonus": {
|
|
77
|
+
value: "Bonus de série",
|
|
78
|
+
description: "XP breakdown label for streak bonus"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// src/i18n/catalogs/es.ts
|
|
84
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
85
|
+
var esMessages = defineTranslation3({
|
|
86
|
+
meta: {
|
|
87
|
+
key: "learning-journey.messages",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
domain: "learning-journey",
|
|
90
|
+
description: "XP source labels (Spanish)",
|
|
91
|
+
owners: ["platform"],
|
|
92
|
+
stability: "experimental"
|
|
93
|
+
},
|
|
94
|
+
locale: "es",
|
|
95
|
+
fallback: "en",
|
|
96
|
+
messages: {
|
|
97
|
+
"xp.source.base": {
|
|
98
|
+
value: "Base",
|
|
99
|
+
description: "XP breakdown label for base XP"
|
|
100
|
+
},
|
|
101
|
+
"xp.source.scoreBonus": {
|
|
102
|
+
value: "Bonificación por puntuación",
|
|
103
|
+
description: "XP breakdown label for score-based bonus"
|
|
104
|
+
},
|
|
105
|
+
"xp.source.perfectScore": {
|
|
106
|
+
value: "Puntuación perfecta",
|
|
107
|
+
description: "XP breakdown label for perfect score bonus"
|
|
108
|
+
},
|
|
109
|
+
"xp.source.firstAttempt": {
|
|
110
|
+
value: "Primer intento",
|
|
111
|
+
description: "XP breakdown label for first attempt bonus"
|
|
112
|
+
},
|
|
113
|
+
"xp.source.retryPenalty": {
|
|
114
|
+
value: "Penalización por reintento",
|
|
115
|
+
description: "XP breakdown label for retry penalty"
|
|
116
|
+
},
|
|
117
|
+
"xp.source.streakBonus": {
|
|
118
|
+
value: "Bonificación por racha",
|
|
119
|
+
description: "XP breakdown label for streak bonus"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// src/i18n/messages.ts
|
|
125
|
+
import {
|
|
126
|
+
createI18nFactory
|
|
127
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
128
|
+
var factory = createI18nFactory({
|
|
129
|
+
specKey: "learning-journey.messages",
|
|
130
|
+
catalogs: [enMessages, frMessages, esMessages]
|
|
131
|
+
});
|
|
132
|
+
var createLearningJourneyI18n = factory.create;
|
|
133
|
+
var getDefaultI18n = factory.getDefault;
|
|
134
|
+
var resetI18nRegistry = factory.resetRegistry;
|
|
135
|
+
export {
|
|
136
|
+
resetI18nRegistry,
|
|
137
|
+
getDefaultI18n,
|
|
138
|
+
createLearningJourneyI18n
|
|
139
|
+
};
|
package/dist/browser/index.js
CHANGED
|
@@ -864,6 +864,141 @@ class SRSEngine {
|
|
|
864
864
|
}
|
|
865
865
|
var srsEngine = new SRSEngine;
|
|
866
866
|
|
|
867
|
+
// src/i18n/catalogs/en.ts
|
|
868
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
869
|
+
var enMessages = defineTranslation({
|
|
870
|
+
meta: {
|
|
871
|
+
key: "learning-journey.messages",
|
|
872
|
+
version: "1.0.0",
|
|
873
|
+
domain: "learning-journey",
|
|
874
|
+
description: "XP source labels for the learning-journey module",
|
|
875
|
+
owners: ["platform"],
|
|
876
|
+
stability: "experimental"
|
|
877
|
+
},
|
|
878
|
+
locale: "en",
|
|
879
|
+
fallback: "en",
|
|
880
|
+
messages: {
|
|
881
|
+
"xp.source.base": {
|
|
882
|
+
value: "Base",
|
|
883
|
+
description: "XP breakdown label for base XP"
|
|
884
|
+
},
|
|
885
|
+
"xp.source.scoreBonus": {
|
|
886
|
+
value: "Score Bonus",
|
|
887
|
+
description: "XP breakdown label for score-based bonus"
|
|
888
|
+
},
|
|
889
|
+
"xp.source.perfectScore": {
|
|
890
|
+
value: "Perfect Score",
|
|
891
|
+
description: "XP breakdown label for perfect score bonus"
|
|
892
|
+
},
|
|
893
|
+
"xp.source.firstAttempt": {
|
|
894
|
+
value: "First Attempt",
|
|
895
|
+
description: "XP breakdown label for first attempt bonus"
|
|
896
|
+
},
|
|
897
|
+
"xp.source.retryPenalty": {
|
|
898
|
+
value: "Retry Penalty",
|
|
899
|
+
description: "XP breakdown label for retry penalty"
|
|
900
|
+
},
|
|
901
|
+
"xp.source.streakBonus": {
|
|
902
|
+
value: "Streak Bonus",
|
|
903
|
+
description: "XP breakdown label for streak bonus"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
// src/i18n/catalogs/fr.ts
|
|
909
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
910
|
+
var frMessages = defineTranslation2({
|
|
911
|
+
meta: {
|
|
912
|
+
key: "learning-journey.messages",
|
|
913
|
+
version: "1.0.0",
|
|
914
|
+
domain: "learning-journey",
|
|
915
|
+
description: "XP source labels (French)",
|
|
916
|
+
owners: ["platform"],
|
|
917
|
+
stability: "experimental"
|
|
918
|
+
},
|
|
919
|
+
locale: "fr",
|
|
920
|
+
fallback: "en",
|
|
921
|
+
messages: {
|
|
922
|
+
"xp.source.base": {
|
|
923
|
+
value: "Base",
|
|
924
|
+
description: "XP breakdown label for base XP"
|
|
925
|
+
},
|
|
926
|
+
"xp.source.scoreBonus": {
|
|
927
|
+
value: "Bonus de score",
|
|
928
|
+
description: "XP breakdown label for score-based bonus"
|
|
929
|
+
},
|
|
930
|
+
"xp.source.perfectScore": {
|
|
931
|
+
value: "Score parfait",
|
|
932
|
+
description: "XP breakdown label for perfect score bonus"
|
|
933
|
+
},
|
|
934
|
+
"xp.source.firstAttempt": {
|
|
935
|
+
value: "Premier essai",
|
|
936
|
+
description: "XP breakdown label for first attempt bonus"
|
|
937
|
+
},
|
|
938
|
+
"xp.source.retryPenalty": {
|
|
939
|
+
value: "Pénalité de réessai",
|
|
940
|
+
description: "XP breakdown label for retry penalty"
|
|
941
|
+
},
|
|
942
|
+
"xp.source.streakBonus": {
|
|
943
|
+
value: "Bonus de série",
|
|
944
|
+
description: "XP breakdown label for streak bonus"
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
// src/i18n/catalogs/es.ts
|
|
950
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
951
|
+
var esMessages = defineTranslation3({
|
|
952
|
+
meta: {
|
|
953
|
+
key: "learning-journey.messages",
|
|
954
|
+
version: "1.0.0",
|
|
955
|
+
domain: "learning-journey",
|
|
956
|
+
description: "XP source labels (Spanish)",
|
|
957
|
+
owners: ["platform"],
|
|
958
|
+
stability: "experimental"
|
|
959
|
+
},
|
|
960
|
+
locale: "es",
|
|
961
|
+
fallback: "en",
|
|
962
|
+
messages: {
|
|
963
|
+
"xp.source.base": {
|
|
964
|
+
value: "Base",
|
|
965
|
+
description: "XP breakdown label for base XP"
|
|
966
|
+
},
|
|
967
|
+
"xp.source.scoreBonus": {
|
|
968
|
+
value: "Bonificación por puntuación",
|
|
969
|
+
description: "XP breakdown label for score-based bonus"
|
|
970
|
+
},
|
|
971
|
+
"xp.source.perfectScore": {
|
|
972
|
+
value: "Puntuación perfecta",
|
|
973
|
+
description: "XP breakdown label for perfect score bonus"
|
|
974
|
+
},
|
|
975
|
+
"xp.source.firstAttempt": {
|
|
976
|
+
value: "Primer intento",
|
|
977
|
+
description: "XP breakdown label for first attempt bonus"
|
|
978
|
+
},
|
|
979
|
+
"xp.source.retryPenalty": {
|
|
980
|
+
value: "Penalización por reintento",
|
|
981
|
+
description: "XP breakdown label for retry penalty"
|
|
982
|
+
},
|
|
983
|
+
"xp.source.streakBonus": {
|
|
984
|
+
value: "Bonificación por racha",
|
|
985
|
+
description: "XP breakdown label for streak bonus"
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
// src/i18n/messages.ts
|
|
991
|
+
import {
|
|
992
|
+
createI18nFactory
|
|
993
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
994
|
+
var factory = createI18nFactory({
|
|
995
|
+
specKey: "learning-journey.messages",
|
|
996
|
+
catalogs: [enMessages, frMessages, esMessages]
|
|
997
|
+
});
|
|
998
|
+
var createLearningJourneyI18n = factory.create;
|
|
999
|
+
var getDefaultI18n = factory.getDefault;
|
|
1000
|
+
var resetI18nRegistry = factory.resetRegistry;
|
|
1001
|
+
|
|
867
1002
|
// src/engines/xp.ts
|
|
868
1003
|
var DEFAULT_XP_CONFIG = {
|
|
869
1004
|
baseValues: {
|
|
@@ -1029,6 +1164,19 @@ class XPEngine {
|
|
|
1029
1164
|
return 0;
|
|
1030
1165
|
}
|
|
1031
1166
|
}
|
|
1167
|
+
var SOURCE_KEY_MAP = {
|
|
1168
|
+
base: "xp.source.base",
|
|
1169
|
+
score_bonus: "xp.source.scoreBonus",
|
|
1170
|
+
perfect_score: "xp.source.perfectScore",
|
|
1171
|
+
first_attempt: "xp.source.firstAttempt",
|
|
1172
|
+
retry_penalty: "xp.source.retryPenalty",
|
|
1173
|
+
streak_bonus: "xp.source.streakBonus"
|
|
1174
|
+
};
|
|
1175
|
+
function getXpSourceLabel(source, locale) {
|
|
1176
|
+
const i18n = createLearningJourneyI18n(locale);
|
|
1177
|
+
const i18nKey = SOURCE_KEY_MAP[source];
|
|
1178
|
+
return i18nKey ? i18n.t(i18nKey) : source;
|
|
1179
|
+
}
|
|
1032
1180
|
var xpEngine = new XPEngine;
|
|
1033
1181
|
|
|
1034
1182
|
// src/engines/streak.ts
|
|
@@ -2378,6 +2526,10 @@ var LearnerEntity = defineEntity5({
|
|
|
2378
2526
|
isOptional: true,
|
|
2379
2527
|
description: "Last learning activity"
|
|
2380
2528
|
}),
|
|
2529
|
+
locale: field5.string({
|
|
2530
|
+
isOptional: true,
|
|
2531
|
+
description: 'Preferred locale for learning content (e.g. "en", "fr", "es")'
|
|
2532
|
+
}),
|
|
2381
2533
|
timezone: field5.string({
|
|
2382
2534
|
default: '"UTC"',
|
|
2383
2535
|
description: "Learner timezone"
|
|
@@ -3721,6 +3873,7 @@ export {
|
|
|
3721
3873
|
learningJourneyEntities,
|
|
3722
3874
|
learnerEnums,
|
|
3723
3875
|
learnerEntities,
|
|
3876
|
+
getXpSourceLabel,
|
|
3724
3877
|
gamificationEnums,
|
|
3725
3878
|
gamificationEntities,
|
|
3726
3879
|
flashcardEnums,
|
package/dist/engines/index.js
CHANGED
|
@@ -193,6 +193,141 @@ class SRSEngine {
|
|
|
193
193
|
}
|
|
194
194
|
var srsEngine = new SRSEngine;
|
|
195
195
|
|
|
196
|
+
// src/i18n/catalogs/en.ts
|
|
197
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
198
|
+
var enMessages = defineTranslation({
|
|
199
|
+
meta: {
|
|
200
|
+
key: "learning-journey.messages",
|
|
201
|
+
version: "1.0.0",
|
|
202
|
+
domain: "learning-journey",
|
|
203
|
+
description: "XP source labels for the learning-journey module",
|
|
204
|
+
owners: ["platform"],
|
|
205
|
+
stability: "experimental"
|
|
206
|
+
},
|
|
207
|
+
locale: "en",
|
|
208
|
+
fallback: "en",
|
|
209
|
+
messages: {
|
|
210
|
+
"xp.source.base": {
|
|
211
|
+
value: "Base",
|
|
212
|
+
description: "XP breakdown label for base XP"
|
|
213
|
+
},
|
|
214
|
+
"xp.source.scoreBonus": {
|
|
215
|
+
value: "Score Bonus",
|
|
216
|
+
description: "XP breakdown label for score-based bonus"
|
|
217
|
+
},
|
|
218
|
+
"xp.source.perfectScore": {
|
|
219
|
+
value: "Perfect Score",
|
|
220
|
+
description: "XP breakdown label for perfect score bonus"
|
|
221
|
+
},
|
|
222
|
+
"xp.source.firstAttempt": {
|
|
223
|
+
value: "First Attempt",
|
|
224
|
+
description: "XP breakdown label for first attempt bonus"
|
|
225
|
+
},
|
|
226
|
+
"xp.source.retryPenalty": {
|
|
227
|
+
value: "Retry Penalty",
|
|
228
|
+
description: "XP breakdown label for retry penalty"
|
|
229
|
+
},
|
|
230
|
+
"xp.source.streakBonus": {
|
|
231
|
+
value: "Streak Bonus",
|
|
232
|
+
description: "XP breakdown label for streak bonus"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// src/i18n/catalogs/fr.ts
|
|
238
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
239
|
+
var frMessages = defineTranslation2({
|
|
240
|
+
meta: {
|
|
241
|
+
key: "learning-journey.messages",
|
|
242
|
+
version: "1.0.0",
|
|
243
|
+
domain: "learning-journey",
|
|
244
|
+
description: "XP source labels (French)",
|
|
245
|
+
owners: ["platform"],
|
|
246
|
+
stability: "experimental"
|
|
247
|
+
},
|
|
248
|
+
locale: "fr",
|
|
249
|
+
fallback: "en",
|
|
250
|
+
messages: {
|
|
251
|
+
"xp.source.base": {
|
|
252
|
+
value: "Base",
|
|
253
|
+
description: "XP breakdown label for base XP"
|
|
254
|
+
},
|
|
255
|
+
"xp.source.scoreBonus": {
|
|
256
|
+
value: "Bonus de score",
|
|
257
|
+
description: "XP breakdown label for score-based bonus"
|
|
258
|
+
},
|
|
259
|
+
"xp.source.perfectScore": {
|
|
260
|
+
value: "Score parfait",
|
|
261
|
+
description: "XP breakdown label for perfect score bonus"
|
|
262
|
+
},
|
|
263
|
+
"xp.source.firstAttempt": {
|
|
264
|
+
value: "Premier essai",
|
|
265
|
+
description: "XP breakdown label for first attempt bonus"
|
|
266
|
+
},
|
|
267
|
+
"xp.source.retryPenalty": {
|
|
268
|
+
value: "P\xE9nalit\xE9 de r\xE9essai",
|
|
269
|
+
description: "XP breakdown label for retry penalty"
|
|
270
|
+
},
|
|
271
|
+
"xp.source.streakBonus": {
|
|
272
|
+
value: "Bonus de s\xE9rie",
|
|
273
|
+
description: "XP breakdown label for streak bonus"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// src/i18n/catalogs/es.ts
|
|
279
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
280
|
+
var esMessages = defineTranslation3({
|
|
281
|
+
meta: {
|
|
282
|
+
key: "learning-journey.messages",
|
|
283
|
+
version: "1.0.0",
|
|
284
|
+
domain: "learning-journey",
|
|
285
|
+
description: "XP source labels (Spanish)",
|
|
286
|
+
owners: ["platform"],
|
|
287
|
+
stability: "experimental"
|
|
288
|
+
},
|
|
289
|
+
locale: "es",
|
|
290
|
+
fallback: "en",
|
|
291
|
+
messages: {
|
|
292
|
+
"xp.source.base": {
|
|
293
|
+
value: "Base",
|
|
294
|
+
description: "XP breakdown label for base XP"
|
|
295
|
+
},
|
|
296
|
+
"xp.source.scoreBonus": {
|
|
297
|
+
value: "Bonificaci\xF3n por puntuaci\xF3n",
|
|
298
|
+
description: "XP breakdown label for score-based bonus"
|
|
299
|
+
},
|
|
300
|
+
"xp.source.perfectScore": {
|
|
301
|
+
value: "Puntuaci\xF3n perfecta",
|
|
302
|
+
description: "XP breakdown label for perfect score bonus"
|
|
303
|
+
},
|
|
304
|
+
"xp.source.firstAttempt": {
|
|
305
|
+
value: "Primer intento",
|
|
306
|
+
description: "XP breakdown label for first attempt bonus"
|
|
307
|
+
},
|
|
308
|
+
"xp.source.retryPenalty": {
|
|
309
|
+
value: "Penalizaci\xF3n por reintento",
|
|
310
|
+
description: "XP breakdown label for retry penalty"
|
|
311
|
+
},
|
|
312
|
+
"xp.source.streakBonus": {
|
|
313
|
+
value: "Bonificaci\xF3n por racha",
|
|
314
|
+
description: "XP breakdown label for streak bonus"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// src/i18n/messages.ts
|
|
320
|
+
import {
|
|
321
|
+
createI18nFactory
|
|
322
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
323
|
+
var factory = createI18nFactory({
|
|
324
|
+
specKey: "learning-journey.messages",
|
|
325
|
+
catalogs: [enMessages, frMessages, esMessages]
|
|
326
|
+
});
|
|
327
|
+
var createLearningJourneyI18n = factory.create;
|
|
328
|
+
var getDefaultI18n = factory.getDefault;
|
|
329
|
+
var resetI18nRegistry = factory.resetRegistry;
|
|
330
|
+
|
|
196
331
|
// src/engines/xp.ts
|
|
197
332
|
var DEFAULT_XP_CONFIG = {
|
|
198
333
|
baseValues: {
|
|
@@ -358,6 +493,19 @@ class XPEngine {
|
|
|
358
493
|
return 0;
|
|
359
494
|
}
|
|
360
495
|
}
|
|
496
|
+
var SOURCE_KEY_MAP = {
|
|
497
|
+
base: "xp.source.base",
|
|
498
|
+
score_bonus: "xp.source.scoreBonus",
|
|
499
|
+
perfect_score: "xp.source.perfectScore",
|
|
500
|
+
first_attempt: "xp.source.firstAttempt",
|
|
501
|
+
retry_penalty: "xp.source.retryPenalty",
|
|
502
|
+
streak_bonus: "xp.source.streakBonus"
|
|
503
|
+
};
|
|
504
|
+
function getXpSourceLabel(source, locale) {
|
|
505
|
+
const i18n = createLearningJourneyI18n(locale);
|
|
506
|
+
const i18nKey = SOURCE_KEY_MAP[source];
|
|
507
|
+
return i18nKey ? i18n.t(i18nKey) : source;
|
|
508
|
+
}
|
|
361
509
|
var xpEngine = new XPEngine;
|
|
362
510
|
|
|
363
511
|
// src/engines/streak.ts
|
|
@@ -518,6 +666,7 @@ export {
|
|
|
518
666
|
xpEngine,
|
|
519
667
|
streakEngine,
|
|
520
668
|
srsEngine,
|
|
669
|
+
getXpSourceLabel,
|
|
521
670
|
XPEngine,
|
|
522
671
|
StreakEngine,
|
|
523
672
|
SRSEngine,
|
package/dist/engines/xp.d.ts
CHANGED
|
@@ -87,6 +87,13 @@ export declare class XPEngine {
|
|
|
87
87
|
private getScoreMultiplier;
|
|
88
88
|
private getStreakBonus;
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Get a localized display label for an XP breakdown source.
|
|
92
|
+
*
|
|
93
|
+
* @param source - The programmatic source key (e.g. `'base'`, `'streak_bonus'`).
|
|
94
|
+
* @param locale - Optional locale; defaults to English.
|
|
95
|
+
*/
|
|
96
|
+
export declare function getXpSourceLabel(source: string, locale?: string): string;
|
|
90
97
|
/**
|
|
91
98
|
* Default XP engine instance.
|
|
92
99
|
*/
|