Skip to content

Commit

Permalink
Make cardinal direction strings translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouron committed Jan 16, 2020
1 parent 2d579d1 commit 5639b49
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions MMM-FlightTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,37 +181,37 @@ Module.register('MMM-FlightTracker', {

cardinalDirection(direction) {
if (direction> 11.25 && direction<= 33.75){
return "NNE";
return this.translate('NNE');
} else if (direction> 33.75 && direction<= 56.25) {
return "NE";
return this.translate('NE');
} else if (direction> 56.25 && direction<= 78.75) {
return "ENE";
return this.translate('ENE');
} else if (direction> 78.75 && direction<= 101.25) {
return "E";
return this.translate('E');
} else if (direction> 101.25 && direction<= 123.75) {
return "ESE";
return this.translate('ESE');
} else if (direction> 123.75 && direction<= 146.25) {
return "SE";
return this.translate('SE');
} else if (direction> 146.25 && direction<= 168.75) {
return "SSE";
return this.translate('SSE');
} else if (direction> 168.75 && direction<= 191.25) {
return "S";
return this.translate('S');
} else if (direction> 191.25 && direction<= 213.75) {
return "SSW";
return this.translate('SSW');
} else if (direction> 213.75 && direction<= 236.25) {
return "SW";
return this.translate('SW');
} else if (direction> 236.25 && direction<= 258.75) {
return "WSW";
return this.translate('WSW');
} else if (direction> 258.75 && direction<= 281.25) {
return "W";
return this.translate('W');
} else if (direction> 281.25 && direction<= 303.75) {
return "WNW";
return this.translate('WNW');
} else if (direction> 303.75 && direction<= 326.25) {
return "NW";
return this.translate('NW');
} else if (direction> 326.25 && direction<= 348.75) {
return "NNW";
return this.translate('NNW');
} else {
return "N";
return this.translate('N');
}
}

Expand Down

0 comments on commit 5639b49

Please sign in to comment.