<commit_before>var app = angular.module('theApp', ['ui.router']);

app.run(['$state', function($state) {
  $state.transitionTo('english.home');
}]);

app.controller('stateController', function($scope, $state) {

  let checkRouteValues = (oldValue, newValue) => {
    if(oldValue === 'english.home' && newValue === 'french') {
      $state.go('french.home');
    }
    else if(oldValue === 'french.home' && newValue === 'english') {
      $state.go('english.home');
    }
    else if(oldValue === 'english.prices' && newValue === 'french') {
      $state.go('french.prices');
    }
    else if(oldValue === 'french.prices' && newValue === 'english') {
      $state.go('english.prices');
    }
    else if(oldValue === 'english.hours' && newValue === 'french') {
      $state.go('french.hours');
    }
    else if(oldValue === 'french.hours' && newValue === 'english') {
      $state.go('english.hours');
    }
    else if(oldValue === 'english.location' && newValue === 'french') {
      $state.go('french.location');
    }
    else if(oldValue === 'french.location' && newValue === 'english') {
      $state.go('english.location');
    }
    else if(oldValue === 'english.snacks' && newValue === 'french') {
      $state.go('french.snacks');
    }
    else if(oldValue === 'french.snacks' && newValue === 'english') {
      $state.go('english.snacks');
    }
    else {
      // do nothing
    }
  }

  $scope.currentState = $state;
  $scope.$watch('currentState.current.name', function(newValue, oldValue) {
    checkRouteValues(oldValue, newValue);
  });

});

app.config(function($stateProvider) {
  $stateProvider

    // Languages
    .state('english', {
      url: '/en',
      abstract: true
    })
    .state('french', {
      url: '/fr',
      abstract: true
    })

    // English
    .state('english.home', {
      url: '/home',
      templateUrl: 'views/english/home.html'
    })
    .state('english.prices', {
      url: '/prices',
      templateUrl: 'views/english/prices.html'
    })
    .state('english.hours', {
      url: '/hours',
      templateUrl: 'views/english/hours.html'
    })
    .state('english.location', {
      url: '/location',
      templateUrl: 'views/english/location.html'
    })
    .state('english.snacks', {
      url: '/snacks',
      templateUrl: 'views/english/snacks.html'<commit_msg>Added placeholder templateURLs for EN and FR<commit_after>var app = angular.module('theApp', ['ui.router']);

app.run(['$state', function($state) {
  $state.transitionTo('english.home');
}]);

app.controller('stateController', function($scope, $state) {

  let checkRouteValues = (oldValue, newValue) => {
    if(oldValue === 'english.home' && newValue === 'french') {
      $state.go('french.home');
    }
    else if(oldValue === 'french.home' && newValue === 'english') {
      $state.go('english.home');
    }
    else if(oldValue === 'english.prices' && newValue === 'french') {
      $state.go('french.prices');
    }
    else if(oldValue === 'french.prices' && newValue === 'english') {
      $state.go('english.prices');
    }
    else if(oldValue === 'english.hours' && newValue === 'french') {
      $state.go('french.hours');
    }
    else if(oldValue === 'french.hours' && newValue === 'english') {
      $state.go('english.hours');
    }
    else if(oldValue === 'english.location' && newValue === 'french') {
      $state.go('french.location');
    }
    else if(oldValue === 'french.location' && newValue === 'english') {
      $state.go('english.location');
    }
    else if(oldValue === 'english.snacks' && newValue === 'french') {
      $state.go('french.snacks');
    }
    else if(oldValue === 'french.snacks' && newValue === 'english') {
      $state.go('english.snacks');
    }
    else {
      // do nothing
    }
  }

  $scope.currentState = $state;
  $scope.$watch('currentState.current.name', function(newValue, oldValue) {
    checkRouteValues(oldValue, newValue);
  });

});

app.config(function($stateProvider) {
  $stateProvider

    // Languages
    .state('english', {
      url: '/en',
      templateUrl: 'views/#.html',
      abstract: true
    })
    .state('french', {
      url: '/fr',
      templateUrl: 'views/#.html',
      abstract: true
    })

    // English
    .state('english.home', {
      url: '/home',
      templateUrl: 'views/english/home.html'
    })
    .state('english.prices', {
      url: '/prices',
      templateUrl: 'views/english/prices.html'
    })
    .state('english.hours', {
      url: '/hours',
      templateUrl: 'views/english/hours.html'
    })
    .state('english.location', {
      url: '/location',
      templateUrl: 'views/english/location.html'
    })
    .state('english.snacks', {
      url: '/snacks',
      templateUrl: 'views/english/snacks.html'
{'fraction_non_alphanumeric': 0.2035751840168244, 'fraction_numerical': 0.0, 'mean_word_length': 2.832393231265109, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2337403', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1624, 'n_words': 253}