<commit_before>import PropTypes from 'prop-types';
import React from 'react';
import Dialog from 'modal-form/dialog';
import ReactDOM from 'react-dom';
import { TextSplit } from 'seven-ten';
import Translate from 'react-translate-component';

class WorkflowAssignmentDialog extends React.Component {
  static start(props = {}) {
    return Dialog.alert(<WorkflowAssignmentDialog {...props} />, {
      className: 'workflow-assignment-dialog',
      closeButton: true
    });
  }

  getPromotionMessage = (props) => {
    // The API needs to add the promotion message as a field in project contents...
    const gravitySpy = '1104';
    const snapshotWiChallenge = '5371';
    let promotionMessage = <Translate content="classifier.workflowAssignmentDialog.promotionMessage" />;
    const gravitySpyMessage = "Congratulations! Because you're doing so well, you can level up and access more types of glitches, have more options for classifying them, and see glitches that our computer algorithms are even less confident in. If you prefer to stay at this level, you can choose to stay.";
    const snapshotWiMessage = "Congratulations! You've unlocked the next level and can now access even more challenging questions about what you see in the trail camera images. If you prefer to stay at this level, you can choose to stay.";

    if (props.project && props.project.id === gravitySpy) {
      promotionMessage = gravitySpyMessage;
    } else if (props.project && props.project.id === snapshotWiChallenge) {
      promotionMessage = snapshotWiMessage;
    }

    return promotionMessage;
  };
<commit_msg>fix promotion message for snapshot wi (#4643)<commit_after>import PropTypes from 'prop-types';
import React from 'react';
import Dialog from 'modal-form/dialog';
import ReactDOM from 'react-dom';
import { TextSplit } from 'seven-ten';
import Translate from 'react-translate-component';

class WorkflowAssignmentDialog extends React.Component {
  static start(props = {}) {
    return Dialog.alert(<WorkflowAssignmentDialog {...props} />, {
      className: 'workflow-assignment-dialog',
      closeButton: true
    });
  }

  getPromotionMessage = (props) => {
    // The API needs to add the promotion message as a field in project contents...
    const gravitySpy = '1104';
    const snapshotWiChallenge = '5371';
    let promotionMessage = <Translate content="classifier.workflowAssignmentDialog.promotionMessage" />;
    const gravitySpyMessage = "Congratulations! Because you're doing so well, you can level up and access more types of glitches, have more options for classifying them, and see glitches that our computer algorithms are even less confident in. If you prefer to stay at this level, you can choose to stay.";
    const snapshotWiMessage = "Congratulations! You’ve unlocked the next level and can now access a new challenge about the habitat you see in the trail camera images. If you prefer, you can choose to stay.";

    if (props.project && props.project.id === gravitySpy) {
      promotionMessage = gravitySpyMessage;
    } else if (props.project && props.project.id === snapshotWiChallenge) {
      promotionMessage = snapshotWiMessage;
    }

    return promotionMessage;
  };

{'fraction_non_alphanumeric': 0.08954758190327614, 'fraction_numerical': 0.0062402496099844, 'mean_word_length': 4.1050955414012735, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5891086', 'n_tokens_mistral': 853, 'n_tokens_neox': 826, 'n_words': 331}