<commit_before>import React from 'react'

export const TcpConnectDetails = ({ measurement }) => {
  return (
    <div>
      {measurement.test_keys.connection === 'success' &&
      <div>
        <h2 className='result-success'><i className='fa fa-check-circle-o' /> Everything is OK</h2>
      </div>
      }

      {measurement.test_keys.connection !== 'success' &&
      <div>
        <h2 className='result-warning'><i className='fa fa-times-circle-o' /> Connection problem</h2>
        <p>When connecting to <code>{measurement.input}</code> we got the error
          <code>{measurement.test_keys.connection}</code>
        </p>
      </div>
      }

    </div>
  )
}

TcpConnectDetails.propTypes = {
  measurement: React.PropTypes.object
}

export default TcpConnectDetails<commit_msg>Make TcpConnect.js ready for i18n<commit_after>import React from 'react'

export const TcpConnectDetails = ({ measurement }) => {
  return (
    <div>
      {measurement.test_keys.connection === 'success' &&
      <div>
        <h2 className='result-success'><i className='fa fa-check-circle-o' />
          <FormattedMessage
            id='nettests.tcpConnect.EverythingOkay'
            defaultValue='Everything is OK'
          />
        </h2>
      </div>
      }

      {measurement.test_keys.connection !== 'success' &&
      <div>
        <h2 className='result-warning'><i className='fa fa-times-circle-o' />
          <FormattedMessage
            id='nettests.tcpConnect.ConnectionProblem'
            defaultValue='Connection problem'
          />
        </h2>
        <p>
          <FormattedMessage
           id='nettests.tcpConnect.Explanation'
           defaultValue='When connecting to {input} we got the error {error}'
           values={{
             input: <code>{measurement.input}</code>,
             error: <code>{measurement.test_keys.connection}</code>
           }}
          />
        </p>
      </div>
      }

    </div>
  )
}

TcpConnectDetails.propTypes = {
  measurement: React.PropTypes.object
}

export default TcpConnectDetails
{'fraction_non_alphanumeric': 0.13709285367039378, 'fraction_numerical': 0.004861448711716091, 'mean_word_length': 2.303370786516854, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 44, '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': '2139635', 'n_tokens_mistral': 610, 'n_tokens_neox': 603, 'n_words': 113}