<commit_before>import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import FlatButton from 'material-ui/FlatButton';
import {
  FormattedMessage,
  defineMessages,
  injectIntl,
  intlShape,
} from 'react-intl';
import DatePicker from 'material-ui/DatePicker';
import areIntlLocalesSupported from 'intl-locales-supported';
import IntlPolyfill from 'intl';
import IconDateRange from 'material-ui/svg-icons/action/date-range';
import IconSchedule from 'material-ui/svg-icons/action/schedule';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
import CheckContext from '../../CheckContext';
import { convertNumbers2English } from '../../helpers';
import { alertRed, black38, black54, units, caption, FlexRow } from '../../styles/js/variables';
import timezones from '../../timezones';

const styles = {
  error: {
    font: 'caption',
    color: alertRed,
    display: 'block',
  },
  primaryColumn: {
    flex: 10,
  },
  secondaryColumn: {
    color: black54,
    height: units(2.5),
    width: units(2.5),
    flex: '1',
  },
  row: {
    marginBottom: units(2),
  },
  time: {
    width: units(6),
    textAlign: 'center',
  },
  label: {
    font: caption,
    color: black38,
  },
};

const messages = defineMessages({
  ok: {
    id: 'datetimeRespondTask.ok',
    defaultMessage: 'OK',
  },
  cancel: {
    id: 'datetimeRespondTask.cancel',
    defaultMessage: 'Cancel',
  },
  timeError: {
    id: 'datetimeRespondTask.timeError',
    defaultMessage: 'Error: invalid time',
  },
});

class DatetimeRespondTask extends Component {
  constructor(props) {
    super(props);

    let date = '';
    let hour = '';
    let minute = '';
    const note = this.props.note || '';
    let timezone = 'GMT';

    const response = convertNumbers2English(this.props.response);

    if (response) {<commit_msg>Ticket #5960: Fixing how Arabic numbers are edited<commit_after>import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import FlatButton from 'material-ui/FlatButton';
import {
  FormattedMessage,
  defineMessages,
  injectIntl,
  intlShape,
} from 'react-intl';
import DatePicker from 'material-ui/DatePicker';
import areIntlLocalesSupported from 'intl-locales-supported';
import IntlPolyfill from 'intl';
import IconDateRange from 'material-ui/svg-icons/action/date-range';
import IconSchedule from 'material-ui/svg-icons/action/schedule';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
import CheckContext from '../../CheckContext';
import { convertNumbers2English } from '../../helpers';
import { alertRed, black38, black54, units, caption, FlexRow } from '../../styles/js/variables';
import timezones from '../../timezones';

const styles = {
  error: {
    font: 'caption',
    color: alertRed,
    display: 'block',
  },
  primaryColumn: {
    flex: 10,
  },
  secondaryColumn: {
    color: black54,
    height: units(2.5),
    width: units(2.5),
    flex: '1',
  },
  row: {
    marginBottom: units(2),
  },
  time: {
    width: units(6),
    textAlign: 'center',
  },
  label: {
    font: caption,
    color: black38,
  },
};

const messages = defineMessages({
  ok: {
    id: 'datetimeRespondTask.ok',
    defaultMessage: 'OK',
  },
  cancel: {
    id: 'datetimeRespondTask.cancel',
    defaultMessage: 'Cancel',
  },
  timeError: {
    id: 'datetimeRespondTask.timeError',
    defaultMessage: 'Error: invalid time',
  },
});

class DatetimeRespondTask extends Component {
  constructor(props) {
    super(props);

    let date = '';
    let hour = '';
    let minute = '';
    const note = this.props.note || '';
    let timezone = 'GMT';

    let response = this.props.response;

    if (response) {
      response = convertNumbers2English(response);
{'fraction_non_alphanumeric': 0.14420062695924765, 'fraction_numerical': 0.0109717868338558, 'mean_word_length': 3.58562874251497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '926122', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1194, 'n_words': 301}