chore(client): migrate i18n/configForTest.js to TS (#45624)

This commit is contained in:
Tiffanie Alcaide
2022-04-04 15:44:17 -04:00
committed by GitHub
parent 27b71f5e1e
commit 5b0250241a
3 changed files with 22 additions and 17 deletions

View File

@ -0,0 +1,21 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
i18n
.use(initReactI18next)
.init({
debug: true,
defaultNS: 'translations',
fallbackLng: 'en',
interpolation: {
escapeValue: false
},
lng: 'en',
ns: ['translations'],
resources: { en: { translations: {} } }
})
.catch((error: Error) => {
throw Error(error.message);
});
export default i18n;

View File

@ -1,16 +0,0 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
i18n.use(initReactI18next).init({
debug: true,
defaultNS: 'translations',
fallbackLng: 'en',
interpolation: {
escapeValue: false
},
lng: 'en',
ns: ['translations'],
resources: { en: { translations: {} } }
});
export default i18n;

View File

@ -4,7 +4,7 @@ import { I18nextProvider } from 'react-i18next';
import { Provider } from 'react-redux';
import { i18nextCodes } from '../../../config/i18n/all-langs';
import i18nTestConfig from '../../i18n/configForTests';
import i18nTestConfig from '../../i18n/config-for-tests';
import { createStore } from '../redux/createStore';
import AppMountNotifier from './app-mount-notifier';