chore(client): migrate i18n/configForTest.js to TS (#45624)
This commit is contained in:
21
client/i18n/config-for-tests.ts
Normal file
21
client/i18n/config-for-tests.ts
Normal 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;
|
@ -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;
|
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user