<commit_before>import Ember from 'ember';
import AjaxPromise from '../utils/ajax-promise';
import config from '../config/environment';
import logger from '../utils/logger';

export default Ember.Route.extend({
  beforeModel: function (transition) {
    var _this = this;

    var language = this.session.get("language") || Ember.I18n.default_language;
    Ember.I18n.translations = Ember.I18n.translation_store[language];

    Ember.onerror = function(error) {
      _this.send("error", error);
    };

    Ember.RSVP.on('error', function(error) {
      _this.send("error", error);<commit_msg>GCW-170 Prevent duplicate offline error alerts<commit_after>import Ember from 'ember';
import AjaxPromise from '../utils/ajax-promise';
import config from '../config/environment';
import logger from '../utils/logger';

export default Ember.Route.extend({
  beforeModel: function (transition) {
    var _this = this;

    var language = this.session.get("language") || Ember.I18n.default_language;
    Ember.I18n.translations = Ember.I18n.translation_store[language];

    Ember.onerror = function(error) {
      _this.send("error", error);
    };

    Ember.RSVP.on('error', function(error) {
      // request abort failures seem to also be handled in Ember.onerror so ignore here
      if (error.status !== 0) {
        _this.send("error", error);
      }
{'fraction_non_alphanumeric': 0.13936249073387694, 'fraction_numerical': 0.011860637509266123, 'mean_word_length': 3.736842105263158, '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': '324823', 'n_tokens_mistral': 423, 'n_tokens_neox': 402, 'n_words': 98}