protected function deleteTranslatableEntities(EntityRepository $repository, LocaleInterface $locale, OutputInterface $output)
{
$entityManager = $this->doctrineHelper->getEntityManager();
$criteria = new Criteria();
$criteria->where($criteria->expr()->eq('locale', $locale->getCode()));
$collection = $repository->matching($criteria);
$collection->map(function (LocaleAwareInterface $entity) use($entityManager) {
$entityManager->remove($entity);
});
$output->write(sprintf('Deleted <info>%s</info> entities <info>%s</info>', $collection->count(), $repository->getClassName()), true);
}