fix issues

This commit is contained in:
Johannes Loher 2021-09-12 17:48:14 +02:00
parent 835efb31b9
commit 6a406db60a
23 changed files with 295 additions and 118 deletions

View file

@ -21,11 +21,11 @@ function localizeAndSortConfigObjects() {
const noSort = ["attributes", "traits", "combatValues", "creatureSizeCategories"];
const localizeObject = <T extends { [s: string]: string }>(obj: T, sort = true): T => {
const localized = Object.entries(obj).map(([key, value]) => {
const localized = Object.entries(obj).map(([key, value]): [string, string] => {
return [key, getGame().i18n.localize(value)];
});
if (sort) localized.sort((a, b) => a[1].localeCompare(b[1]));
return Object.fromEntries(localized);
return Object.fromEntries(localized) as T;
};
DS4.i18n = Object.fromEntries(