From a03945c991eecc5315b6165f86b82ee0d53533cc Mon Sep 17 00:00:00 2001 From: Christopher-Shiu <124838176+Christopher-Shiu@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:28:00 -0500 Subject: [PATCH] Parsed indexes --- convert/convertConfig.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/convert/convertConfig.ts b/convert/convertConfig.ts index 683f777a5..96a60ab14 100644 --- a/convert/convertConfig.ts +++ b/convert/convertConfig.ts @@ -269,6 +269,16 @@ function convertConfig(dataDir: string, verbose: number) { } data.writingSystems = writingSystems; + // Parsing indexes + const indexes: { [key: string]: { displayed: boolean } } = {}; + const indexesTag = document.getElementsByTagName('indexes')[0]; + const indexTags = indexesTag.getElementsByTagName('index'); + for (const tag of indexTags) { + const lang: string = tag.attributes.getNamedItem('lang')!.value; + const displayed: boolean = tag.attributes.getNamedItem('displayed')!.value === 'true'; + indexes[lang] = { displayed }; + } + data.indexes = indexes; } data.interfaceLanguages = parseInterfaceLanguages(document, data, verbose);