Skip to content

Commit

Permalink
leverage i18n and localeCompare to sort things in the roller
Browse files Browse the repository at this point in the history
  • Loading branch information
akrigline committed Jan 26, 2021
1 parent c0e3217 commit 19bd931
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/roller.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class LMRTFYRoller extends Application {
let skills = {}
this.abilities.forEach(a => abilities[a] = LMRTFY.abilities[a])
this.saves.forEach(a => saves[a] = LMRTFY.saves[a])
this.skills.forEach(s => skills[s] = LMRTFY.skills[s])
this.skills
.sort((a, b) => game.i18n.localize(LMRTFY.skills[a]).localeCompare(game.i18n.localize(LMRTFY.skills[b])))
.forEach(s => skills[s] = LMRTFY.skills[s]);
return {
actors: this.actors,
abilities: abilities,
Expand Down

0 comments on commit 19bd931

Please sign in to comment.