Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updating the resolving code for node-localize so xlocalize.js and loc…

…alize.js can find the localize.js file even if not installed via NPM.
  • Loading branch information...
commit 5a530021280c850d3a776040e7b82deb7c1ccd82 1 parent 569fb6f
David Ellis authored July 12, 2012
2  bin/xlocalize.js
@@ -10,7 +10,7 @@ fs.exists = fs.exists ? fs.exists : path.exists;
10 10
 fs.existsSync = fs.existsSync ? fs.existsSync : path.existsSync;
11 11
 
12 12
 // Use localize for internal localizations
13  
-var localize = new require('localize')(__dirname);
  13
+var localize = new require('../lib/localize')(__dirname);
14 14
 localize.throwOnMissingTranslation(false);
15 15
 var translate = localize.translate;
16 16
 
2  lib/localize.js
@@ -405,6 +405,6 @@ function Localize(translations, dateFormats, defaultLocale) {
405 405
 
406 406
 // Publish as a module, if in a CommonJS environment
407 407
 if(typeof(module) != 'undefined') {
408  
-	Localize.source = fs.readFileSync(require.resolve('localize'), 'utf8'); // Append a source string to the Localize object for easy exporting to the client
  408
+	Localize.source = fs.readFileSync(require.resolve('./localize'), 'utf8'); // Append a source string to the Localize object for easy exporting to the client
409 409
 	module.exports = Localize;
410 410
 }

0 notes on commit 5a53002

Please sign in to comment.
Something went wrong with that request. Please try again.