Fixed ordering in translate.json.

This commit is contained in:
Ylian Saint-Hilaire 2020-03-22 13:33:21 -07:00
parent ac440d931c
commit 90691f7273
3 changed files with 3123 additions and 3123 deletions

View File

@ -251,7 +251,7 @@ module.exports.translationsToJson = function(t) {
for (var i in arr) { for (var i in arr) {
var names = [], el = arr[i], el2 = {}; var names = [], el = arr[i], el2 = {};
for (var j in el) { names.push(j); } for (var j in el) { names.push(j); }
names.sort(); names.sort(function (a, b) { if (a == b) { return 0; } if (a == 'xloc') { return 1; } if (b == 'xloc') { return -1; } return a - b });
for (var j in names) { el2[names[j]] = el[names[j]]; } for (var j in names) { el2[names[j]] = el[names[j]]; }
if (el2.xloc != null) { el2.xloc.sort(); } if (el2.xloc != null) { el2.xloc.sort(); }
arr2.push(el2); arr2.push(el2);

View File

@ -788,7 +788,7 @@ function translationsToJson(t) {
for (var i in arr) { for (var i in arr) {
var names = [], el = arr[i], el2 = {}; var names = [], el = arr[i], el2 = {};
for (var j in el) { names.push(j); } for (var j in el) { names.push(j); }
names.sort(); names.sort(function (a, b) { if (a == b) { return 0; } if (a == 'xloc') { return 1; } if (b == 'xloc') { return -1; } return a - b });
for (var j in names) { el2[names[j]] = el[names[j]]; } for (var j in names) { el2[names[j]] = el[names[j]]; }
if (el2.xloc != null) { el2.xloc.sort(); } if (el2.xloc != null) { el2.xloc.sort(); }
arr2.push(el2); arr2.push(el2);

File diff suppressed because it is too large Load Diff