<commit_before>(function ($) {

    $(function () {
        hideTranslationTabForOneLanguage();
    });

    function hideTranslationTabForOneLanguage() {
        $('ul.a2lix_translationsLocales').each(function() {
            console.log($(this).children('li').size());
            if ($(this).children('li').size() < 2) {
                $(this).hide();
            }
        });
    }

})(jQuery);<commit_msg>Show only on language tab in form<commit_after>(function () {
    $(document).ready(function () {
        LangTabs();
    });

    function LangTabs() {
        var $langTabs,
            $langFields;

        _init();

        function _changeLangNotUsedTabs(event) {
            var $clickedTab = $(event.currentTarget),
                clickedTabIndex = $clickedTab.index();

            for (var i = 1; i < $langTabs.length; i++) {
                var $otherLangTab = $($langTabs[i]);

                $otherLangTab.find('li:eq(' + clickedTabIndex + ') > a').click();
            }
        }

        function _hideNotUsedTabs() {
            for (var i = 1; i < $langTabs.length; i++) {
                var $langTab = $($langTabs[i]);

                $langTab.hide();
            }
        }

        function _isOnlyOneLang() {
            return $langTabs.first().find('li').length === 1;
        }

        function _hideAllTabs() {
            $langTabs.hide();
        }

        function _events() {
            var $mainLangTab;

            $mainLangTab = $langTabs.first();

            $mainLangTab.on('click', 'li', function (event) {
                _changeLangNotUsedTabs(event);
            });
        }

        function _init() {
            $langTabs = $('.a2lix_translationsLocales');
            $langFields = $('.a2lix_translationsFields');

            if (!$langTabs.length) {
                return false;
            }

            if (_isOnlyOneLang()) {
                _hideAllTabs();
            } else if ($langTabs.length > 1) {
                _hideNotUsedTabs();
                _events();
            }
        }
    }
})();
{'fraction_non_alphanumeric': 0.15077071290944125, 'fraction_numerical': 0.0038535645472061657, 'mean_word_length': 1.539119804400978, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '4304463', 'n_tokens_mistral': 620, 'n_tokens_neox': 586, 'n_words': 97}