import Ember from "ember";
import config from "../config/environment";
import requireDirectory from "ember-locales/utils/require-directory";

import l from "ember-locales/helpers/l";
import t from "ember-locales/helpers/t";
import join from "ember-locales/helpers/join";

var registerHelper = Ember.HTMLBars._registerHelper || Ember.HTMLBars.registerHelper;
var makeBoundHelper = Ember.HTMLBars.makeBoundHelper;

export default {
  name: "ember-locales",

  initialize: function () {
    registerHelper('l',    makeBoundHelper(l));
    registerHelper('join', makeBoundHelper(join));
    registerHelper('t',    makeBoundHelper(t));

    // Pull all locales from the project
    I18n.defaultLocale = config.LOCALE;

    var translations = I18n.translations = {};
    var locales = requireDirectory(config.modulePrefix, 'locale');
    var defaultLocale = locales.findProperty('name', I18n.defaultLocale);

    // Promote the default locale
    locales.removeObject(defaultLocale);
    locales.unshiftObject(defaultLocale);

    locales.forEach(function (module) {
      Ember.assert(`${module.fullName} must export a translation table.`, module.contents != null);
      var table = module.contents.default;
      translations[module.name] = table;
    });
  }
}

@@ -1050,24 +1050,44 @@
  (module) %7B%0A
+      if(module)%7B%0A  
       Ember.
@@ -1176,24 +1176,26 @@
 ull);%0A      
+  
 var table = 
@@ -1225,16 +1225,18 @@
 ;%0A      
+  
 translat
@@ -1262,16 +1262,24 @@
  table;%0A
+      %7D%0A
     %7D);%0A

Update i18n.js