diff --git a/frontend/app/reporting_engine-app.js b/frontend/app/reporting_engine-app.js index 678b3841f4..afa51549c8 100644 --- a/frontend/app/reporting_engine-app.js +++ b/frontend/app/reporting_engine-app.js @@ -27,8 +27,7 @@ //++ // load all js locales +var LoadLocales = require('app/plugins/load-locales.module').LoadLocales; var localeFiles = require.context('../../config/locales', false, /js-[\w|-]{2,5}\.yml$/); -localeFiles.keys().forEach(function(localeFile) { - var locale = localeFile.match(/js-([\w|-]{2,5})\.yml/)[1]; - I18n.addTranslations(locale, localeFiles(localeFile)[locale]); -}); \ No newline at end of file + +LoadLocales.files(localeFiles);