waha-shared 1.0.95 → 1.0.97
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.
|
@@ -3,7 +3,9 @@ import type { TranslationsApp } from '../data/translationsApp/translationsApp.zo
|
|
|
3
3
|
import type { BibleInfo, LanguageInfo, MeetTranslations } from '../types/languages';
|
|
4
4
|
export declare function getBibleInfo(bibleId: string | undefined): BibleInfo | undefined;
|
|
5
5
|
export declare function getIsRtl(script: Languages[number]['script']): boolean;
|
|
6
|
-
export declare function getLanguageInfo(languageId: string
|
|
6
|
+
export declare function getLanguageInfo(languageId: string, options?: {
|
|
7
|
+
includeInProgressDmcSets?: boolean;
|
|
8
|
+
}): LanguageInfo;
|
|
7
9
|
export declare function getInitialAppInterfaceLanguage(userPhoneLanguages: Array<string | null>): Languages[number]['languageId'];
|
|
8
10
|
export declare function isLanguageAvailable(status: Languages[number]['status'], isDev?: boolean): boolean;
|
|
9
11
|
export declare function numerals(text: string, script: Languages[number]['script']): string;
|
|
@@ -46,7 +46,7 @@ function getBibleInfo(bibleId) {
|
|
|
46
46
|
function getIsRtl(script) {
|
|
47
47
|
return script === 'arabic' || script === 'hebrew' || script === 'uyghur';
|
|
48
48
|
}
|
|
49
|
-
function getLanguageInfo(languageId) {
|
|
49
|
+
function getLanguageInfo(languageId, options) {
|
|
50
50
|
const defaultReturn = {
|
|
51
51
|
...languages_1.languages[0],
|
|
52
52
|
setIds: [...curriculumFoundations_1.curriculumFoundations[0].sets],
|
|
@@ -85,9 +85,13 @@ function getLanguageInfo(languageId) {
|
|
|
85
85
|
setIds.push(...topicsCurriculum.sets);
|
|
86
86
|
if (language.dmCourseStatus === 'launched' ||
|
|
87
87
|
language.dmCourseStatus === 'testing' ||
|
|
88
|
-
language.videoBridgeLanguage
|
|
88
|
+
language.videoBridgeLanguage ||
|
|
89
|
+
(language.dmCourseStatus === 'inProgress' &&
|
|
90
|
+
options?.includeInProgressDmcSets))
|
|
89
91
|
setIds.push(specialIds_1.specialIds.dmCourseSetId);
|
|
90
|
-
if (language.gdmcStatus === 'launched' ||
|
|
92
|
+
if (language.gdmcStatus === 'launched' ||
|
|
93
|
+
language.gdmcStatus === 'testing' ||
|
|
94
|
+
(language.gdmcStatus === 'inProgress' && options?.includeInProgressDmcSets)) {
|
|
91
95
|
for (const gdmcSetId of specialIds_1.specialIds.growingAsDmcSetIds) {
|
|
92
96
|
setIds.push(gdmcSetId);
|
|
93
97
|
}
|