Permalink
Browse files

make locales optional

  • Loading branch information...
1 parent 19cc1d8 commit c92ee8630cf49ae218eee08f3ebb3b92a504aa43 @guileen guileen committed May 3, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 lib/jst.js
View
14 lib/jst.js
@@ -5,9 +5,19 @@
*/
var fs = require('fs'),
- locales = require('locales'),
filters = require('./filters'),
- hash = require('./hash');
+ hash = require('./hash'),
+ locales;
+
+try {
+ locales = requires('locales');
+} catch(e) {
+ locales = {
+ configure: function(){},
+ gettext : function(s) { return s },
+ ngettext : function(s) { return s}
+ }
+}
exports.version = '0.0.10';

0 comments on commit c92ee86

Please sign in to comment.