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 Nov 21, 2024
1 parent d6c4dd1 commit 24fd707
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 24fd707

Please sign in to comment.