Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"

This reverts commit ad47144355.
This commit is contained in:
David Baker 2019-01-03 18:55:56 +00:00 committed by Travis Ralston
parent d111fe27bb
commit f928be6f59
77 changed files with 598 additions and 3532 deletions

View file

@ -222,21 +222,10 @@ const translatables = new Set();
const walkOpts = {
listeners: {
names: function(root, nodeNamesArray) {
// Sort the names case insensitively and alphabetically to
// maintain some sense of order between the different strings.
nodeNamesArray.sort((a, b) => {
a = a.toLowerCase();
b = b.toLowerCase();
if (a > b) return 1;
if (a < b) return -1;
return 0;
});
},
file: function(root, fileStats, next) {
const fullPath = path.join(root, fileStats.name);
let trs;
let ltrs;
if (fileStats.name.endsWith('.js')) {
trs = getTranslationsJs(fullPath);
} else if (fileStats.name.endsWith('.html')) {
@ -246,8 +235,7 @@ const walkOpts = {
}
console.log(`${fullPath} (${trs.size} strings)`);
for (const tr of trs.values()) {
// Convert DOS line endings to unix
translatables.add(tr.replace(/\r\n/g, "\n"));
translatables.add(tr);
}
},
}