waha-shared 1.0.83 → 1.0.85

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.
@@ -560,6 +560,7 @@
560
560
  "speakersSecondary": 131000,
561
561
  "speakersTotal": 989605,
562
562
  "status": "launched",
563
+ "titles": "eng",
563
564
  "uuid": "53fb02ab-f585-4ed9-9359-4b4298913423"
564
565
  },
565
566
  {
@@ -6108,36 +6108,36 @@
6108
6108
  },
6109
6109
  "ase": {
6110
6110
  "questions": {
6111
- "ase.a.001.mp4": 37.6547,
6112
- "ase.a.002.mp4": 16.2333,
6113
- "ase.a.003.mp4": 14.865267,
6114
- "ase.a.004.mp4": 20.871267,
6115
- "ase.a.005.mp4": 28.578967,
6116
- "ase.a.006.mp4": 19.569967,
6117
- "ase.a.007.mp4": 43.026733,
6118
- "ase.a.008.mp4": 12.162567,
6119
- "ase.a.009.mp4": 10.093833,
6120
- "ase.a.010.mp4": 10.5276,
6121
- "ase.a.011.mp4": 12.696433,
6122
- "ase.a.012.mp4": 19.670067,
6123
- "ase.a.013.mp4": 8.274933,
6124
- "ase.a.014.mp4": 15.766167,
6125
- "ase.a.015.mp4": 17.701433,
6126
- "ase.a.016.mp4": 26.410133,
6127
- "ase.a.017.mp4": 15.999733,
6128
- "ase.f.001.mp4": 30.051134,
6129
- "ase.f.002.mp4": 14.097833,
6130
- "ase.f.003.mp4": 20.270667,
6131
- "ase.f.004.mp4": 13.4305,
6132
- "ase.f.005.mp4": 19.703433,
6133
- "ase.f.006.mp4": 13.864267,
6134
- "ase.f.007.mp4": 18.2353,
6135
- "ase.f.008.mp4": 10.093833,
6136
- "ase.f.009.mp4": 29.550634,
6137
- "ase.f.010.mp4": 22.606333,
6138
- "ase.f.011.mp4": 21.405133,
6139
- "ase.f.012.mp4": 9.293033,
6140
- "ase.f.013.mp4": 9.760167
6111
+ "ase.a.001.mp4": 34.667967,
6112
+ "ase.a.002.mp4": 13.246567,
6113
+ "ase.a.003.mp4": 11.878542,
6114
+ "ase.a.004.mp4": 17.884542,
6115
+ "ase.a.005.mp4": 25.592233,
6116
+ "ase.a.006.mp4": 16.583233,
6117
+ "ase.a.007.mp4": 40.04,
6118
+ "ase.a.008.mp4": 9.175833,
6119
+ "ase.a.009.mp4": 7.107104,
6120
+ "ase.a.010.mp4": 7.540875,
6121
+ "ase.a.011.mp4": 9.709708,
6122
+ "ase.a.012.mp4": 16.683333,
6123
+ "ase.a.013.mp4": 8.274938,
6124
+ "ase.a.014.mp4": 12.779438,
6125
+ "ase.a.015.mp4": 14.714708,
6126
+ "ase.a.016.mp4": 23.4234,
6127
+ "ase.a.017.mp4": 13.013,
6128
+ "ase.f.001.mp4": 24.491133,
6129
+ "ase.f.002.mp4": 11.111104,
6130
+ "ase.f.003.mp4": 17.283938,
6131
+ "ase.f.004.mp4": 10.443771,
6132
+ "ase.f.005.mp4": 16.716708,
6133
+ "ase.f.006.mp4": 10.877542,
6134
+ "ase.f.007.mp4": 15.248567,
6135
+ "ase.f.008.mp4": 7.107104,
6136
+ "ase.f.009.mp4": 23.990633,
6137
+ "ase.f.010.mp4": 19.619604,
6138
+ "ase.f.011.mp4": 18.4184,
6139
+ "ase.f.012.mp4": 6.3063,
6140
+ "ase.f.013.mp4": 6.773438
6141
6141
  },
6142
6142
  "ftbs": {},
6143
6143
  "lessons": {
@@ -24,17 +24,24 @@ function getSetInfo({ setId, meetLanguageId, setIds, t, }) {
24
24
  const setNumber = (setIds
25
25
  .filter((set) => set.split('.')[0] === idComponents[0])
26
26
  .findIndex((set) => set === setId) + 1).toString();
27
- const thisSetTranslations = t.sets.find((set) => set.setId === setId);
27
+ let thisSetTranslations;
28
+ const thisSet = sets_1.sets.find((set) => set.setId === setId);
29
+ if (!thisSet)
30
+ return;
31
+ if (meetLanguageId === 'ase') {
32
+ const englishEquivalent = sets_1.sets.find((set) => set.name === thisSet.name && !set.comment);
33
+ thisSetTranslations = t.sets.find((setTranslations) => setTranslations.setId === englishEquivalent?.setId);
34
+ }
35
+ else {
36
+ thisSetTranslations = t.sets.find((set) => set.setId === setId);
37
+ }
28
38
  const categoryName = idComponents[0] === '01'
29
39
  ? t.foundations
30
40
  : idComponents[0] === '02'
31
41
  ? t.topics
32
42
  : t.training;
33
- const set = sets_1.sets.find((set) => set.setId === setId);
34
- if (!set)
35
- return;
36
43
  const toReturn = {
37
- ...set,
44
+ ...thisSet,
38
45
  ...thisSetTranslations,
39
46
  setSubtitle: category === 'Topics'
40
47
  ? (thisSetTranslations?.setTag ?? '')
@@ -68,8 +75,18 @@ function getLessonInfo({ lessonId, meetLanguageInfo, setInfo, t, useSpokenQuesti
68
75
  const lesson = setInfo.lessons.find((lesson) => lesson.lessonId === lessonId);
69
76
  if (!lesson)
70
77
  return;
71
- const thisSetTranslations = t.sets.find((set) => set.setId === setInfo?.setId);
72
- const lessonTitle = thisSetTranslations?.lessonTitles?.[lessonId];
78
+ let thisSetTranslations;
79
+ let lessonTitle;
80
+ if (meetLanguageId === 'ase') {
81
+ const englishEquivalent = sets_1.sets.find((set) => set.name === setInfo.name && !set.comment);
82
+ thisSetTranslations = t.sets.find((setTranslations) => setTranslations.setId === englishEquivalent?.setId);
83
+ lessonTitle =
84
+ thisSetTranslations?.lessonTitles?.[`${englishEquivalent?.setId}.${lessonNumber}`];
85
+ }
86
+ else {
87
+ thisSetTranslations = t.sets.find((setTranslations) => setTranslations.setId === setInfo?.setId);
88
+ lessonTitle = thisSetTranslations?.lessonTitles?.[lessonId];
89
+ }
73
90
  const fellowshipQuestions = meetLanguageInfo.questionSets.find((questionSet) => questionSet.questionSetId === lesson.f)?.questions ?? [];
74
91
  const fellowshipQuestionsText = fellowshipQuestions.map((questionId) => useSpokenQuestions ? t.questionsSpoken[questionId] : t.questions[questionId]);
75
92
  const applicationQuestions = meetLanguageInfo.questionSets.find((questionSet) => questionSet.questionSetId === lesson.a)?.questions ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",