warframe-worldstate-data
Version:
Warframe data for use with warframe-worldstate-parser
78 lines (76 loc) • 3.16 kB
JavaScript
import { safeImport } from "./safeImport.mjs";
//#region exports.ts
const locales = [
"de",
"es",
"fr",
"it",
"ko",
"pl",
"pt",
"ru",
"zh",
"cs",
"sr",
"uk"
];
const makeBundle = async () => {
/**
* English United States translations bundle,
* default translations
* @type {WorldstateLangBundle}
*/
const enUS = {
arcanes: await safeImport("./data/arcanes.json"),
archonShards: await safeImport("./data/archonShards.json"),
conclave: await safeImport("./data/conclaveData.json"),
events: await safeImport("./data/eventsData.json"),
factions: await safeImport("./data/factionsData.json"),
fissureModifiers: await safeImport("./data/fissureModifiers.json"),
languages: await safeImport("./data/languages.json"),
missionTypes: await safeImport("./data/missionTypes.json"),
operationTypes: await safeImport("./data/operationTypes.json"),
persistentEnemy: await safeImport("./data/persistentEnemyData.json"),
solNodes: await safeImport("./data/solNodes.json"),
sortie: await safeImport("./data/sortieData.json"),
syndicates: await safeImport("./data/syndicatesData.json"),
tutorials: await safeImport("./data/tutorials.json"),
upgradeTypes: await safeImport("./data/upgradeTypes.json"),
synthTargets: await safeImport("./data/synthTargets.json"),
steelPath: await safeImport("./data/steelPath.json")
};
const bundle = {
en: enUS,
...enUS,
locales
};
for await (const locale of locales)
/**
* Translations bundle for $locale
* @type {WorldstateLangBundle}
*/
bundle[locale] = {
arcanes: await safeImport(`./data/${locale}/arcanes.json`, enUS.arcanes),
archonShards: await safeImport(`./data/${locale}/archonShards.json`, enUS.archonShards),
conclave: await safeImport(`./data/${locale}/conclaveData.json`, enUS.conclave),
events: await safeImport(`./data/${locale}/eventsData.json`, enUS.events),
factions: await safeImport(`./data/${locale}/factionsData.json`, enUS.factions),
fissureModifiers: await safeImport(`./data/${locale}/fissureModifiers.json`, enUS.fissureModifiers),
languages: await safeImport(`./data/${locale}/languages.json`, enUS.languages),
missionTypes: await safeImport(`./data/${locale}/missionTypes.json`, enUS.missionTypes),
operationTypes: await safeImport(`./data/${locale}/operationTypes.json`, enUS.operationTypes),
persistentEnemy: await safeImport(`./data/${locale}/persistentEnemyData.json`, enUS.persistentEnemy),
solNodes: await safeImport(`./data/${locale}/solNodes.json`, enUS.solNodes),
sortie: await safeImport(`./data/${locale}/sortieData.json`, enUS.sortie),
syndicates: await safeImport(`./data/${locale}/syndicatesData.json`, enUS.syndicates),
tutorials: await safeImport(`./data/${locale}/tutorials.json`, enUS.tutorials),
upgradeTypes: await safeImport(`./data/${locale}/upgradeTypes.json`, enUS.upgradeTypes),
synthTargets: await safeImport(`./data/${locale}/synthTargets.json`, enUS.synthTargets),
steelPath: await safeImport(`./data/${locale}/steelPath.json`, enUS.steelPath)
};
locales.push("en");
return bundle;
};
var exports_default = await makeBundle();
//#endregion
export { exports_default as default };