<commit_before>// Global style. Import it first so its in the DOM first.
import './styles/index.styl';

import React from 'react';
import ReactDOM from 'react-dom';
import {SoundContext} from 'react-soundjs';

import {Sound as SoundJS} from 'soundjs';

import Main from './modules/main';

if (!global.Intl) {
  require('intl');
  require('intl/locale-data/jsonp/en');
}

import {addLocaleData, IntlProvider} from 'react-intl';
import enLocaleData from 'react-intl/locale-data/en';
addLocaleData(enLocaleData);

import strings from './locale/en/strings.json';

ReactDOM.render(
  <SoundContext soundjs={SoundJS}>
    <IntlProvider locale="en" messages={strings}>
      <Main />
    </IntlProvider>
  </SoundContext>,
  document.getElementById('root')
);<commit_msg>Hot module replace intl strings<commit_after>// Global style. Import it first so its in the DOM first.
import './styles/index.styl';

import React from 'react';
import ReactDOM from 'react-dom';
import {SoundContext} from 'react-soundjs';

import {Sound as SoundJS} from 'soundjs';

import Component from './classes/base-component';

import Main from './modules/main';

if (!global.Intl) {
  require('intl');
  require('intl/locale-data/jsonp/en');
}

import {addLocaleData, IntlProvider} from 'react-intl';
import enLocaleData from 'react-intl/locale-data/en';
addLocaleData(enLocaleData);

let strings = require('./locale/en/strings.json');

class IntlMain extends Component {
  render() {
    return (
      <SoundContext soundjs={SoundJS}>
        <IntlProvider locale="en" messages={strings}>
          <Main />
        </IntlProvider>
      </SoundContext>
    );
  }
}

ReactDOM.render(
  <IntlMain />,
  document.getElementById('root')
);

if (module.hot) {
  module.hot.accept('./locale/en/strings.json', function() {
    strings = require('./locale/en/strings.json');
    ReactDOM.render(
      <IntlMain />,
      document.getElementById('root')
    );
  });
}
{'fraction_non_alphanumeric': 0.15400516795865632, 'fraction_numerical': 0.0, 'mean_word_length': 4.002583979328166, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '565504', 'n_tokens_mistral': 610, 'n_tokens_neox': 612, 'n_words': 151}