mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 17:55:59 +02:00
fixed #4062, fixed akhoury/nodebb-plugin-emailer-mandrill#19
This commit is contained in:
@@ -6,6 +6,7 @@ var fs = require('fs'),
|
||||
async = require('async'),
|
||||
winston = require('winston'),
|
||||
nconf = require('nconf'),
|
||||
_ = require('underscore'),
|
||||
file = require('../file'),
|
||||
utils = require('../../public/src/utils');
|
||||
|
||||
@@ -184,7 +185,7 @@ module.exports = function(Plugins) {
|
||||
route: pathToLang.replace(pathToFolder, '')
|
||||
});
|
||||
|
||||
if (pluginData.defaultLang) {
|
||||
if (pluginData.defaultLang && pathToLang.endsWith(pluginData.defaultLang + '/' + path.basename(pathToLang))) {
|
||||
fallbackMap[path.basename(pathToLang, '.json')] = path.join(pathToFolder, pluginData.defaultLang, path.basename(pathToLang));
|
||||
}
|
||||
|
||||
@@ -196,7 +197,7 @@ module.exports = function(Plugins) {
|
||||
}
|
||||
|
||||
Plugins.customLanguages = Plugins.customLanguages.concat(arr);
|
||||
Plugins.customLanguageFallbacks = fallbackMap;
|
||||
_.extendOwn(Plugins.customLanguageFallbacks, fallbackMap);
|
||||
|
||||
callback();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user