Hacky solution for exploreDir error

We should only traverse the directories of actual plugins instead
of traversing the whole node_modules folder
pull/1297/head
Marcel Klehr 2012-12-19 16:31:17 +01:00
parent f4f2c1d9ab
commit e3f9ed37b4
1 changed files with 7 additions and 6 deletions

View File

@ -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;
} }