<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import {defineMessages} from 'react-intl';

import {navigateAction} from 'fluxible-router';
import {connectToStores} from 'fluxible-addons-react';

import {flagForLocale} from '../../configs/locales';
import {getLanguageName} from '../../common';
import Util from '../common/Util';

import {Dropdown, Button, Icon, Flag} from 'semantic-ui-react';

import DeckTreeStore from '../../stores/DeckTreeStore';
import PermissionsStore from '../../stores/PermissionsStore';
import TranslationStore from '../../stores/TranslationStore';

class DeckLanguageMenu extends React.Component {

    constructor(props) {
        super(props);

        this.messages = defineMessages({
            language:{
                id: 'InfoPanelInfoView.language',
                defaultMessage:'Language'
            },
            selectLanguage:{
                id: 'InfoPanelInfoView.selectLanguage',
                defaultMessage:'Select language'
            },
            viewLanguage:{
                id: 'InfoPanelInfoView.viewLanguage',
                defaultMessage:'You are viewing this in language'
            },
            translation:{
                id: 'InfoPanelInfoView.translation',
                defaultMessage:'Translation'
            },
            current:{
                id: 'InfoPanelInfoView.current',
                defaultMessage:'Current'
            },
            alsoAvailableIn:{
                id: 'InfoPanelInfoView.alsoAvailableIn',
                defaultMessage:'Also available in'
            },
        });
    }

    changeCurrentLanguage(e, { value: language }) {
        // exclude keyboard events except Enter
        if (!(e.code && e.code === 'Enter' || !e.code)) {
            return;<commit_msg>Clean up some messaged code for deck languages menu<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import {defineMessages} from 'react-intl';

import {navigateAction} from 'fluxible-router';
import {connectToStores} from 'fluxible-addons-react';

import {flagForLocale} from '../../configs/locales';
import {getLanguageName} from '../../common';
import Util from '../common/Util';

import {Dropdown, Button, Icon, Flag} from 'semantic-ui-react';

import DeckTreeStore from '../../stores/DeckTreeStore';
import PermissionsStore from '../../stores/PermissionsStore';
import TranslationStore from '../../stores/TranslationStore';

class DeckLanguageMenu extends React.Component {

    constructor(props) {
        super(props);

        this.messages = defineMessages({
            selectLanguage:{
                id: 'InfoPanelInfoView.selectLanguage',
                defaultMessage:'Select language'
            },
        });
    }

    changeCurrentLanguage(e, { value: language }) {
        // exclude keyboard events except Enter
        if (!(e.code && e.code === 'Enter' || !e.code)) {
            return;
{'fraction_non_alphanumeric': 0.12588832487309645, 'fraction_numerical': 0.0, 'mean_word_length': 2.3977011494252873, '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': '229664', 'n_tokens_mistral': 754, 'n_tokens_neox': 737, 'n_words': 190}