<commit_before>package org.zanata.webtrans.client.util;

import org.zanata.common.ContentState;

/**
 * @author <NAME> <a
 *         href="mailto:<EMAIL>"><EMAIL></a>
 */
public class ContentStateToStyleUtil {
    private ContentStateToStyleUtil() {
    }

    public static String stateToStyle(ContentState state, String initialStyle) {
        String styleNames = initialStyle;
        if (state == ContentState.Approved) {
            styleNames += " ApprovedStateDecoration";
        } else if (state == ContentState.NeedReview) {
            styleNames += " FuzzyStateDecoration";
        } else if (state == ContentState.Rejected) {
            styleNames += " RejectedStateDecoration";
        } else if (state == ContentState.Translated) {
            styleNames += " TranslatedStateDecoration";
        }
        return styleNames;
    }

    public static String stateToStyle(ContentState state) {
        String styleNames = "";
        switch (state) {
            case New:
                return "txt--state-neutral";
            case NeedReview:
                return "txt--state-unsure";
            case Translated:
                return "txt--state-success";
            case Approved:
                return "txt--state-highlight";
            case Rejected:
                return "txt--state-danger";
        }
        return styleNames;
    }
}<commit_msg>rhbz1147364 - fix concurrent popup<commit_after>package org.zanata.webtrans.client.util;

import org.zanata.common.ContentState;

/**
 * @author <NAME> <a
 *         href="mailto:<EMAIL>"><EMAIL></a>
 */
public class ContentStateToStyleUtil {
    private ContentStateToStyleUtil() {
    }

    public static String stateToStyle(ContentState state, String initialStyle) {
        String styleNames = initialStyle;
        if (state == ContentState.Approved) {
            styleNames += " ApprovedStateDecoration";
        } else if (state == ContentState.NeedReview) {
            styleNames += " FuzzyStateDecoration";
        } else if (state == ContentState.Rejected) {
            styleNames += " RejectedStateDecoration";
        } else if (state == ContentState.Translated) {
            styleNames += " TranslatedStateDecoration";
        }
        return styleNames;
    }

    public static String stateToStyle(ContentState state) {
        String styleNames = "";
        if (state == null) {
            return styleNames;
        }
        switch (state) {
            case New:
                return "txt--state-neutral";
            case NeedReview:
                return "txt--state-unsure";
            case Translated:
                return "txt--state-success";
            case Approved:
                return "txt--state-highlight";
            case Rejected:
                return "txt--state-danger";
        }
        return styleNames;
    }
}
{'fraction_non_alphanumeric': 0.10452472816555594, 'fraction_numerical': 0.002455278849526482, 'mean_word_length': 1.9708333333333334, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4336759', 'n_tokens_mistral': 782, 'n_tokens_neox': 735, 'n_words': 166}