<commit_before>'use strict'

angular.module('serinaApp').directive('swap', function ($rootScope, $routeParams, Breadcrumb, DataAccessor) {
  return {
    restrict: 'E',
    templateUrl: 'views/level/swap.html',
    link: function (scope) {

      scope.disabledSwap = false

      var getListLanguagesForSwap = function () {
        scope.languagesForSwap = []
        DataAccessor.getListLanguages().then(function (response) {
          var listAllLangages = response.data.listLanguages
          angular.forEach(listAllLangages, function (language) {
            if (language !== scope.currentLanguage) {
              scope.languagesForSwap.push(language)
            }
          })
        }, function (response) {
          console.error('Error on recover list languages for swap', response)
        })<commit_msg>Fix : button swap not disabled if second language not selected<commit_after>'use strict'

angular.module('serinaApp').directive('swap', function ($rootScope, $routeParams, Breadcrumb, DataAccessor) {
  return {
    restrict: 'E',
    templateUrl: 'views/level/swap.html',
    link: function (scope) {

      scope.disabledSwap = $rootScope.secondLanguage === ''

      var getListLanguagesForSwap = function () {
        scope.languagesForSwap = []
        DataAccessor.getListLanguages().then(function (response) {
          var listAllLangages = response.data.listLanguages
          angular.forEach(listAllLangages, function (language) {
            if (language !== scope.currentLanguage) {
              scope.languagesForSwap.push(language)
            }
          })
        }, function (response) {
          console.error('Error on recover list languages for swap', response)
        })
{'fraction_non_alphanumeric': 0.11318553092182031, 'fraction_numerical': 0.0, 'mean_word_length': 2.828125, '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': '207069', 'n_tokens_mistral': 460, 'n_tokens_neox': 455, 'n_words': 97}