<commit_before>import i18next from 'i18next';

let translator = () => {
  console.log('Translations are still loading...');
  return '';
};

i18next
  .use(i18nextBrowserLanguageDetector)
  .init({
    fallbackLng: 'en'
  })
  .then(t => (translator = t))
  .catch(e => `Translations didn't load (${e})`);

export default () => {
  return translator.apply(args);
};<commit_msg>add nesting config<commit_after>import i18next from 'i18next';

let translator = () => {
  console.log('Translations are still loading...');
  return '';
};

i18next
  .use(i18nextBrowserLanguageDetector)
  .init({
    fallbackLng: 'en',
    nestingPrefix: '$tr(',
    nestingSuffix: ')'
  })
  .then(t => (translator = t))
  .catch(e => `Translations didn't load (${e})`);

export default () => {
  return translator.apply(args);
};
{'fraction_non_alphanumeric': 0.18641975308641975, 'fraction_numerical': 0.019753086419753086, 'mean_word_length': 4.037267080745342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6591412', 'n_tokens_mistral': 301, 'n_tokens_neox': 287, 'n_words': 61}