forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
ebc48f6b53
commit
e7de94576f
232 changed files with 11430 additions and 3365 deletions
|
@ -97,7 +97,6 @@ WHERE
|
|||
"User-Agent": "MapComplete script",
|
||||
})
|
||||
return <LanguageSpecResult[]>result.results.bindings
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -192,15 +191,17 @@ async function getOfficialLanguagesPerCountryCached(
|
|||
return officialLanguages
|
||||
}
|
||||
|
||||
async function generateSignLanguageOverview(){
|
||||
async function generateSignLanguageOverview() {
|
||||
const signLanguages = await fetchSignLanguages()
|
||||
const signPerId = WikidataUtils.extractLanguageData(signLanguages, WikidataUtils.languageRemapping)
|
||||
const asRecord : Record<string, Record<string, string>> = {}
|
||||
const signPerId = WikidataUtils.extractLanguageData(
|
||||
signLanguages,
|
||||
WikidataUtils.languageRemapping
|
||||
)
|
||||
const asRecord: Record<string, Record<string, string>> = {}
|
||||
for (const lng of signPerId.keys()) {
|
||||
asRecord[lng.toLowerCase()] = Utils.MapToObj(signPerId.get(lng).translations)
|
||||
}
|
||||
return asRecord
|
||||
|
||||
}
|
||||
|
||||
async function main(wipeCache = false) {
|
||||
|
@ -217,7 +218,10 @@ async function main(wipeCache = false) {
|
|||
const data = JSON.parse(readFileSync(cacheFile, { encoding: "utf8" }))
|
||||
const perId = WikidataUtils.extractLanguageData(data, WikidataUtils.languageRemapping)
|
||||
const nativeList = getNativeList(perId)
|
||||
writeFileSync("./src/assets/language_native.json", JSON.stringify({ ...nativeList, ...signLanguages }, null, " "))
|
||||
writeFileSync(
|
||||
"./src/assets/language_native.json",
|
||||
JSON.stringify({ ...nativeList, ...signLanguages }, null, " ")
|
||||
)
|
||||
|
||||
const languagesPerCountry = Utils.TransposeMap(
|
||||
await getOfficialLanguagesPerCountryCached(wipeCache)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue