<commit_before>ManageIQ.angular.app.controller('cloudVolumeBackupFormController', ['miqService', 'cloudVolumeBackupFormId', '$http', function(miqService, cloudVolumeBackupFormId, $http) {
  var vm = this;

  var init = function() {
    vm.afterGet = false;

    vm.cloudVolumeBackupModel = {
      volume_id: '',
    };

    vm.formId = cloudVolumeBackupFormId;
    vm.model = "cloudVolumeBackupModel";

    ManageIQ.angular.scope = vm;
    vm.saveable = function(form) {
      return form.$valid;
    };

    vm.newRecord = false;

    $http.get('/cloud_volume_backup/volume_form_choices')
      .then(getVolumeFormDataComplete)
      .catch(miqService.handleFailure);
  };

  vm.saveClicked = function() {
    var restoreUrl = '/cloud_volume_backup/backup_restore/';
    var buttonUrl = '?button=restore';
    miqService.miqAjaxButton(restoreUrl + cloudVolumeBackupFormId + buttonUrl, vm.cloudVolumeBackupModel, { complete: false });
  };

  vm.cancelClicked = function() {
    var cancelUrl = '/cloud_volume_backup/backup_restore/';
    var buttonUrl = '?button=cancel';
    miqService.miqAjaxButton(cancelUrl + cloudVolumeBackupFormId + buttonUrl);
  };

  vm.resetClicked = function(angularForm) {
    resetModel();
    angularForm.$setPristine(true);
    miqService.miqFlash("warn", "All changes have been reset");
  };

  function getVolumeFormDataComplete(response) {
    vm.volume_choices = response.data.volume_choices;
    if (foundVolumes()) {
      vm.cloudVolumeBackupModel.volume = vm.volume_choices[0];
    }
  }

  function resetModel() {
    vm.cloudVolumeBackupModel = angular.copy(vm.modelCopy);
  }

  function foundVolumes() {
    return vm.volume_choices.length > 0;
  }

  init();
}]);<commit_msg>Add missing gettext into cloudVolumeBackupFormController<commit_after>ManageIQ.angular.app.controller('cloudVolumeBackupFormController', ['miqService', 'cloudVolumeBackupFormId', '$http', function(miqService, cloudVolumeBackupFormId, $http) {
  var vm = this;

  var init = function() {
    vm.afterGet = false;

    vm.cloudVolumeBackupModel = {
      volume_id: '',
    };

    vm.formId = cloudVolumeBackupFormId;
    vm.model = "cloudVolumeBackupModel";

    ManageIQ.angular.scope = vm;
    vm.saveable = function(form) {
      return form.$valid;
    };

    vm.newRecord = false;

    $http.get('/cloud_volume_backup/volume_form_choices')
      .then(getVolumeFormDataComplete)
      .catch(miqService.handleFailure);
  };

  vm.saveClicked = function() {
    var restoreUrl = '/cloud_volume_backup/backup_restore/';
    var buttonUrl = '?button=restore';
    miqService.miqAjaxButton(restoreUrl + cloudVolumeBackupFormId + buttonUrl, vm.cloudVolumeBackupModel, { complete: false });
  };

  vm.cancelClicked = function() {
    var cancelUrl = '/cloud_volume_backup/backup_restore/';
    var buttonUrl = '?button=cancel';
    miqService.miqAjaxButton(cancelUrl + cloudVolumeBackupFormId + buttonUrl);
  };

  vm.resetClicked = function(angularForm) {
    resetModel();
    angularForm.$setPristine(true);
    miqService.miqFlash("warn", __("All changes have been reset"));
  };

  function getVolumeFormDataComplete(response) {
    vm.volume_choices = response.data.volume_choices;
    if (foundVolumes()) {
      vm.cloudVolumeBackupModel.volume = vm.volume_choices[0];
    }
  }

  function resetModel() {
    vm.cloudVolumeBackupModel = angular.copy(vm.modelCopy);
  }

  function foundVolumes() {
    return vm.volume_choices.length > 0;
  }

  init();
}]);
{'fraction_non_alphanumeric': 0.12553740326741186, 'fraction_numerical': 0.0011464603038119805, 'mean_word_length': 3.992846924177396, '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': '987917', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1111, 'n_words': 174}