Hacky solution for exploreDir error
We should only traverse the directories of actual plugins instead of traversing the whole node_modules folder
This commit is contained in:
parent
f4f2c1d9ab
commit
e3f9ed37b4
1 changed files with 7 additions and 6 deletions
|
@ -2,7 +2,9 @@ var languages = require('languages4translatewiki')
|
|||
, fs = require('fs')
|
||||
, path = require('path')
|
||||
, express = require('express')
|
||||
, _ = require('underscore');
|
||||
, _ = require('underscore')
|
||||
, npm = require('npm')
|
||||
;
|
||||
|
||||
/*
|
||||
* PRIVATE
|
||||
|
@ -53,11 +55,10 @@ var getAllLocalesPaths = function () {
|
|||
}
|
||||
|
||||
//add core supported languages first
|
||||
var root = path.resolve(__dirname+"/../../locales");
|
||||
exploreDir (root, extractLangs);
|
||||
//add plugins languages (if any)
|
||||
root = path.resolve(__dirname+"/../../../node_modules");
|
||||
exploreDir (root, extractLangs);
|
||||
exploreDir (npm.root+"/ep_etherpad-lite/locales", extractLangs);
|
||||
|
||||
//add plugins languages (if any) -- bad practice
|
||||
exploreDir (npm.root, extractLangs);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue