<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import {get} from 'lodash';

export function state(props) {
    const {$filter, gettextCatalog, datetime} = props.svc;

    if (props.item.state !== undefined && props.item.state !== null) {
        var title = $filter('removeLodash')(props.item.state);

        if (props.item.state === 'scheduled') {
            const scheduled = get(props.item, 'archive_item.schedule_settings.utc_publish_schedule');

            if (scheduled) {
                title = gettextCatalog.getString('Scheduled on ') + datetime.longFormat(scheduled);
            }
        }

        return React.createElement(
            'span', {
                title: title,
                className: 'state-label state-' + props.item.state,
                key: 'state',
            },
            $filter('removeLodash')(gettextCatalog.getString(props.item.state))
        );
    }
}

state.propTypes = {
    svc: PropTypes.any.isRequired,
    item: PropTypes.any,
};
<commit_msg>fix(search): fix scheduled label text in lists<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import {get} from 'lodash';

export function state(props) {
    const {$filter, gettextCatalog, datetime} = props.svc;

    if (props.item.state !== undefined && props.item.state !== null) {
        var title = $filter('removeLodash')(props.item.state);

        if (props.item.state === 'scheduled') {
            const scheduled = get(props.item, 'archive_item.schedule_settings.utc_publish_schedule');

            if (scheduled) {
                title = gettextCatalog.getString('Scheduled for') + ' ' + datetime.longFormat(scheduled);
            }
        }

        return React.createElement(
            'span', {
                title: title,
                className: 'state-label state-' + props.item.state,
                key: 'state',
            },
            $filter('removeLodash')(gettextCatalog.getString(props.item.state))
        );
    }
}

state.propTypes = {
    svc: PropTypes.any.isRequired,
    item: PropTypes.any,
};

{'fraction_non_alphanumeric': 0.13478879924062648, 'fraction_numerical': 0.0, 'mean_word_length': 2.330173775671406, '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': '3010325', 'n_tokens_mistral': 609, 'n_tokens_neox': 600, 'n_words': 122}