use core's I18n load mechanism

pull/6827/head
Jens Ulferts 9 years ago
parent 1a08604aca
commit a1fa786a43
  1. 7
      frontend/app/reporting_engine-app.js

@ -27,8 +27,7 @@
//++ //++
// load all js locales // 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$/); 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]; LoadLocales.files(localeFiles);
I18n.addTranslations(locale, localeFiles(localeFile)[locale]);
});

Loading…
Cancel
Save