Skip to content

Commit

Permalink
Parsed indexes (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher-Shiu authored and aidanpscott committed Nov 22, 2024
1 parent d0d9af9 commit a520bf0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions convert/convertConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a520bf0

Please sign in to comment.