Skip to content
Browse files

Merge pull request #34 from ericchaves/master

Added helperDirectory and i18nDirectory to hbs config
  • Loading branch information...
2 parents c090476 + 2b36096 commit 13631a15509700975e33c2a502de3d4ff294fa1d @SlexAxton committed Jun 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 hbs.js
View
4 hbs.js
@@ -294,7 +294,7 @@ define([
var i, paths = [],
pathGetter = config.hbs && config.hbs.helperPathCallback
? config.hbs.helperPathCallback
- : function (name){return helperDirectory + name;};
+ : function (name){return (config.hbs && config.hbs.i18nDirectory? config.hbs.helperDirectory : helperDirectory) + name;};
for ( i = 0; i < helps.length; i++ ) {
paths[i] = "'" + pathGetter(helps[i]) + "'"
@@ -433,7 +433,7 @@ define([
if (disableI18n){
fetchAndRegister(false);
} else {
- fetchOrGetCached( parentRequire.toUrl(i18nDirectory+(config.locale || "en_us")+'.json'), function (langMap) {
+ fetchOrGetCached( parentRequire.toUrl( config.hbs && config.hbs.i18nDirectory? config.hbs.i18nDirectory : i18nDirectory +(config.locale || "en_us")+'.json'), function (langMap) {
fetchAndRegister(JSON.parse(langMap));
});
}

0 comments on commit 13631a1

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