<commit_before>var test = require('tape')
var Core = require('../src/core/index.js')

test('russian translation', function (t) {
  const russian = require('../src/locale/ru.js')
  const core = new Core({locale: russian})

  t.equal(
    core.translator.t('choose_file'),
    'Выберите файл',
    'should return translated string'
  )

  t.end()
})

test('interpolation', function (t) {
  const english = require('../src/locale/en_US.js')
  const core = new Core({locale: english})

  t.equal(
    core.translator.t('you_have_chosen', {'file_name': 'img.jpg'}),
    'You have chosen: img.jpg',
    'should return interpolated string'
  )

  t.end()
})

test('pluralization', function (t) {
  const russian = require('../src/locale/ru.js')
  const core = new Core({locale: russian})

  t.equal(
    core.translator.t('files_chosen', {'smart_count': '18'}),
    'Выбрано 18 файлов',
    'should return interpolated & pluralized string'
  )

  t.end()
})<commit_msg>Translator tests updated<commit_after>var test = require('tape')
var Core = require('../src/core/index.js')

test('russian translation', function (t) {
  const russian = require('../src/locale/ru.js')
  const core = new Core({locale: russian})

  t.equal(
    core.translator.t('chooseFile'),
    'Выберите файл',
    'should return translated string'
  )

  t.end()
})

test('interpolation', function (t) {
  const english = require('../src/locale/en_US.js')
  const core = new Core({locale: english})

  t.equal(
    core.translator.t('youHaveChosen', {'fileName': 'img.jpg'}),
    'You have chosen: img.jpg',
    'should return interpolated string'
  )

  t.end()
})

test('pluralization', function (t) {
  const russian = require('../src/locale/ru.js')
  const core = new Core({locale: russian})

  t.equal(
    core.translator.t('filesChosen', {'smart_count': '18'}),
    'Выбрано 18 файлов',
    'should return interpolated & pluralized string'
  )

  t.end()
})
{'fraction_non_alphanumeric': 0.1772020725388601, 'fraction_numerical': 0.004145077720207254, 'mean_word_length': 3.675544794188862, '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': '5796623', 'n_tokens_mistral': 701, 'n_tokens_neox': 695, 'n_words': 152}