Sort translation output files for easier merges

This commit is contained in:
Pieter Vander Vennet 2021-09-14 18:20:25 +02:00
parent 2717ad55b8
commit 5d81e7d792
49 changed files with 7143 additions and 7117 deletions

View file

@ -472,5 +472,19 @@ export class Utils {
b: parseInt(hex.substr(5, 2), 16),
}
}
static sortKeys(o: any) {
const copy = {}
let keys = Object.keys(o)
keys = keys.sort()
for (const key of keys) {
let v = o[key]
if(typeof v === "object"){
v = Utils.sortKeys(v)
}
copy[key] = v
}
return copy
}
}