fix issues
This commit is contained in:
parent
835efb31b9
commit
6a406db60a
23 changed files with 295 additions and 118 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue