diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-24 12:05:50 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-24 12:08:28 -0400 |
commit | d36d977a01b4796be38767d20e5e77283b023453 (patch) | |
tree | ec96a8a4efa38bc3cd0b7d0bd551ca35cfcdcbc2 /webapp/root.jsx | |
parent | 68dad8c7345b12c7d0b10709ddc1873d4b40163e (diff) | |
download | chat-d36d977a01b4796be38767d20e5e77283b023453.tar.gz chat-d36d977a01b4796be38767d20e5e77283b023453.tar.bz2 chat-d36d977a01b4796be38767d20e5e77283b023453.zip |
Consolidating i18n stuff into i18n.jsx
Diffstat (limited to 'webapp/root.jsx')
-rw-r--r-- | webapp/root.jsx | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx index f4d9a0e47..2318c0682 100644 --- a/webapp/root.jsx +++ b/webapp/root.jsx @@ -52,10 +52,7 @@ import OAuthToEmail from 'components/claim/components/oauth_to_email.jsx'; import LDAPToEmail from 'components/claim/components/ldap_to_email.jsx'; import EmailToLDAP from 'components/claim/components/email_to_ldap.jsx'; -import {addLocaleData} from 'react-intl'; -import enLocaleData from 'react-intl/locale-data/en'; -import esLocaleData from 'react-intl/locale-data/es'; -import ptLocaleData from 'react-intl/locale-data/pt'; +import * as I18n from 'i18n/i18n.jsx'; // This is for anything that needs to be done for ALL react components. // This runs before we start to render anything. @@ -115,28 +112,14 @@ function preRenderSetup(callwhendone) { ); function afterIntl() { - addLocaleData(enLocaleData); - addLocaleData(esLocaleData); - addLocaleData(ptLocaleData); - + I18n.doAddLocaleData(); $.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(); - }); + I18n.safarifix(afterIntl); } } |