|
|
@ -262,8 +262,15 @@ var fs = require('fs'),
|
|
|
|
|
|
|
|
|
|
|
|
async.each(languages, function(pathToLang, next) {
|
|
|
|
async.each(languages, function(pathToLang, next) {
|
|
|
|
fs.readFile(pathToLang, function(err, file) {
|
|
|
|
fs.readFile(pathToLang, function(err, file) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
var json = JSON.parse(file.toString());
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
winston.error('[plugins] Unable to parse custom language file: ' + pathToLang + '\r\n' + err.stack);
|
|
|
|
|
|
|
|
return next(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
arr.push({
|
|
|
|
arr.push({
|
|
|
|
file: JSON.parse(file.toString()),
|
|
|
|
file: json,
|
|
|
|
route: pathToLang.replace(pathToFolder, '')
|
|
|
|
route: pathToLang.replace(pathToFolder, '')
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|