Hacky solution for exploreDir error
We should only traverse the directories of actual plugins instead of traversing the whole node_modules folderpull/1297/head
parent
f4f2c1d9ab
commit
e3f9ed37b4
|
@ -2,7 +2,9 @@ var languages = require('languages4translatewiki')
|
||||||
, fs = require('fs')
|
, fs = require('fs')
|
||||||
, path = require('path')
|
, path = require('path')
|
||||||
, express = require('express')
|
, express = require('express')
|
||||||
, _ = require('underscore');
|
, _ = require('underscore')
|
||||||
|
, npm = require('npm')
|
||||||
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PRIVATE
|
* PRIVATE
|
||||||
|
@ -53,11 +55,10 @@ var getAllLocalesPaths = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
//add core supported languages first
|
//add core supported languages first
|
||||||
var root = path.resolve(__dirname+"/../../locales");
|
exploreDir (npm.root+"/ep_etherpad-lite/locales", extractLangs);
|
||||||
exploreDir (root, extractLangs);
|
|
||||||
//add plugins languages (if any)
|
//add plugins languages (if any) -- bad practice
|
||||||
root = path.resolve(__dirname+"/../../../node_modules");
|
exploreDir (npm.root, extractLangs);
|
||||||
exploreDir (root, extractLangs);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue