<commit_before>import React, {Component} from 'react';
import ReactDom from 'react-dom';

import Header from './Header';
import Button from './Button';

import Rosetta, {CHANGE_TRANSLATION_EVENT, rosetta} from '@schibstedspain/rosetta';
import Polyglot from '@schibstedspain/rosetta/lib/adapters/polyglot';


const languages = {
  'es-ES': {
    'hello world': 'H<NAME>',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Abre la consola' 
  },
  'ca-ES': {
    'hello world': 'H<NAME>',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Obre la consola' 
  },
  'en-GB': {
    'hello world': 'Hello World',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Open the console'
  }
};

const i18n = new Rosetta();
i18n.adapter = new Polyglot();
i18n.setTranslationsSilent(languages['en-GB']);

i18n.on(CHANGE_TRANSLATION_EVENT, (dicc) => console.log('The dicctionary has been changed to', dicc));

@rosetta(i18n, languages)
class App extends Component {
  constructor(...args){<commit_msg>domingo, 13 de diciembre de 2015, 21:41:25 CET<commit_after>import React, {Component} from 'react';
import ReactDom from 'react-dom';

import Header from './Header';
import Button from './Button';

import Rosetta, {CHANGE_TRANSLATION_EVENT, rosetta} from '@schibstedspain/rosetta';
import Polyglot from '@schibstedspain/rosetta/lib/adapters/polyglot';


const languages = {
  'es-ES': {
    'hello world': '<NAME>',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Abre la consola' 
  },
  'ca-ES': {
    'hello world': '<NAME>',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Obre la consola' 
  },
  'en-GB': {
    'hello world': 'Hello world',
    'spanish': 'Español',
    'catalan': 'Catalá',
    'english': 'English',
    'review the console': 'Open the console'
  }
};

const i18n = new Rosetta();
i18n.adapter = new Polyglot();
i18n.setTranslationsSilent(languages['en-GB']);

i18n.on(CHANGE_TRANSLATION_EVENT, (dic) => console.log('The dictionary has been changed to', dic));

@rosetta(i18n, languages)
class App extends Component {
  constructor(...args){
{'fraction_non_alphanumeric': 0.17282889079965605, 'fraction_numerical': 0.013757523645743766, 'mean_word_length': 4.240990990990991, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1713584', 'n_tokens_mistral': 865, 'n_tokens_neox': 841, 'n_words': 210}