diff --git a/public/src/modules/translator.js b/public/src/modules/translator.js index b56e6e54ff..0ac8f8b004 100644 --- a/public/src/modules/translator.js +++ b/public/src/modules/translator.js @@ -313,8 +313,10 @@ callback(data); }; - if (err) { - winston.error('[translator] Could not load `' + filename + '`: ' + err.message + '. Skipping...'); + if (err && err.code === 'ENOENT') { + data = {}; + } else if (err) { + winston.error('[translator] Error while loading language file: ' + err.message); return callback({}); } diff --git a/src/plugins/load.js b/src/plugins/load.js index 8eac293829..04c0c84bba 100644 --- a/src/plugins/load.js +++ b/src/plugins/load.js @@ -253,7 +253,6 @@ module.exports = function(Plugins) { }).filter(Boolean).forEach(function(key) { Plugins.customLanguages[key] = _.defaults(Plugins.customLanguages[key] || {}, data); }); - fallbackMap[path.basename(pathToLang, '.json')] = path.join(pathToFolder, pluginData.defaultLang, path.basename(pathToLang)); } next(); @@ -263,9 +262,6 @@ module.exports = function(Plugins) { return callback(err); } - // do I need this either? - _.extendOwn(Plugins.customLanguageFallbacks, fallbackMap); - callback(); }); });