import { merge } from 'lodash' ; import defaultTranslations from '../translations.json' ; import transformTranslations from './transformTranslations' ; import { TranslationsType , TransformedTranslationsType } from './types' ; const loadTranslations = ( translationsOverride ? ) : TransformedTranslationsType => { const translations = translationsOverride ? merge ( defaultTranslations , translationsOverride ) : defaultTranslations ; return transformTranslations ( translations ) ; } ; export default loadTranslations ;