forked from MapComplete/MapComplete
Sort translation output files for easier merges
This commit is contained in:
parent
2717ad55b8
commit
5d81e7d792
49 changed files with 7143 additions and 7117 deletions
14
Utils.ts
14
Utils.ts
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue