summaryrefslogtreecommitdiffstats
path: root/webapp/root.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/root.jsx')
-rw-r--r--webapp/root.jsx27
1 files changed, 23 insertions, 4 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx
index 2ce220f1d..b0a6ae1ac 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -109,11 +109,30 @@ function preRenderSetup(callwhendone) {
}
);
- addLocaleData(enLocaleData);
- addLocaleData(esLocaleData);
- addLocaleData(ptLocaleData);
+ function afterIntl() {
+ addLocaleData(enLocaleData);
+ addLocaleData(esLocaleData);
+ addLocaleData(ptLocaleData);
- $.when(d1, d2).done(callwhendone);
+ $.when(d1, d2).done(callwhendone);
+ }
+
+ if (global.Intl) {
+ afterIntl();
+ } else {
+ require.ensure([
+ 'intl',
+ 'intl/locale-data/jsonp/en.js',
+ 'intl/locale-data/jsonp/es.js',
+ 'intl/locale-data/jsonp/pt.js'
+ ], (require) => {
+ require('intl');
+ require('intl/locale-data/jsonp/en.js');
+ require('intl/locale-data/jsonp/es.js');
+ require('intl/locale-data/jsonp/pt.js');
+ afterIntl();
+ });
+ }
}
function preLoggedIn(nextState, replace, callback) {