<commit_before>(function(angular) {
  'use strict';

  angular.module('ps.core.options.clear', ['ps.core.service'])
    .controller('ClearDataCtrl', ClearDataCtrl)
    .directive('psClearData', ClearDataDirective);


  function ClearDataCtrl($timeout, dataService, i18n) {
    var vm = this;
    vm.checkboxCB = checkboxCB;
    vm.allselectedCB = allselectedCB;
    vm.widgets = dataService.data.widgets;
    vm.clearData = clearData;
    vm.locale = locale;
    vm.buttonDisabled = true;
    vm.primaryCol = dataService.data.styles.primaryCol;
    getData();

    function getData() {
      dataService.getStorageData()
        .then(function(data) {
          vm.data = [];
          vm.allSelected = false;
          var i = 0;
          angular.forEach(data, function(value, key) {
            vm.data[i] = {
              label: key,
              selected: false,
            };
            switch (key) {
              case 'version':
              case 'activeTabs':
              case 'layout':
              case 'badgeLayout':
              case 'styles':
                vm.data[i].title = i18n.get('c_o_' + key);
                vm.data[i].order = i - 10;
                break;
              default:
                vm.data[i].title = i18n.get('w_' + key);
                vm.data[i].order = 10 + i;
            }
            if (vm.data[i].title === '') {
              vm.data[i].title = key;
            }
            i++;
          });
        });
    }

    function locale(text) {
      return i18n.get(text);<commit_msg>hide data users should not change<commit_after>(function(angular) {
  'use strict';

  angular.module('ps.core.options.clear', ['ps.core.service'])
    .controller('ClearDataCtrl', ClearDataCtrl)
    .directive('psClearData', ClearDataDirective);


  function ClearDataCtrl($timeout, dataService, i18n) {
    var vm = this;
    vm.checkboxCB = checkboxCB;
    vm.allselectedCB = allselectedCB;
    vm.widgets = dataService.data.widgets;
    vm.clearData = clearData;
    vm.locale = locale;
    vm.buttonDisabled = true;
    vm.primaryCol = dataService.data.styles.primaryCol;
    getData();

    function getData() {
      dataService.getStorageData()
        .then(function(data) {
          vm.data = [];
          vm.allSelected = false;
          var i = 0;
          angular.forEach(data, function(value, key) {
            switch (key) {
              // case 'version':
              case 'activeTabs':
              case 'layout':
              case 'badgeLayout':
              case 'styles':
                vm.data[i] = {
                  label: key,
                  selected: false,
                  title : i18n.get('c_o_' + key),
                  order : i - 10,
                };
                i++;
                break;
              default:
                var title = i18n.get('w_' + key);
                if (i18n.get('w_' + key) !== '') {
                  vm.data[i] = {
                    label: key,
                    selected: false,
                    title : i18n.get('w_' + key),
                    order : 10 + i,
                  };
                  i++;
                }
            }
          });
        });
    }

    function locale(text) {
      return i18n.get(text);
{'fraction_non_alphanumeric': 0.12924961715160796, 'fraction_numerical': 0.009188361408882083, 'mean_word_length': 1.4228486646884273, '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': '3824567', 'n_tokens_mistral': 985, 'n_tokens_neox': 925, 'n_words': 181}