mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-10 00:27:35 +01:00
Plugin defaultLang defaults to en-GB
This commit is contained in:
@@ -143,12 +143,13 @@ function getTranslationTree(callback) {
|
||||
// 4. old plugin defaultLang (en_US)
|
||||
async.eachLimit(plugins, 10, function (pluginData, call) {
|
||||
var pluginLanguages = path.join(__dirname, '../../node_modules/', pluginData.id, pluginData.languages);
|
||||
var defaultLang = pluginData.defaultLang || 'en-GB';
|
||||
|
||||
async.some([
|
||||
lang,
|
||||
lang.replace('-', '_').replace('-x-', '@'),
|
||||
pluginData.defaultLang.replace('_', '-').replace('@', '-x-'),
|
||||
pluginData.defaultLang.replace('-', '_').replace('-x-', '@'),
|
||||
defaultLang.replace('_', '-').replace('@', '-x-'),
|
||||
defaultLang.replace('-', '_').replace('-x-', '@'),
|
||||
], function (language, next) {
|
||||
fs.readFile(path.join(pluginLanguages, language, ns + '.json'), function (err, buffer) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user