Don't show i18n messages in production mode

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2021-02-09 18:18:11 +01:00 committed by Tilman Vatteroth
parent 8a2d26f718
commit ae38ab007a

View file

@ -17,13 +17,13 @@ export const setUpI18n = async (): Promise<void> => {
.use(initReactI18next) .use(initReactI18next)
.init({ .init({
fallbackLng: 'en', fallbackLng: 'en',
debug: true, debug: process.env.NODE_ENV !== 'production',
backend: { backend: {
loadPath: '/locales/{{lng}}.json' loadPath: '/locales/{{lng}}.json'
}, },
interpolation: { interpolation: {
escapeValue: false // not needed for react as it escapes by default escapeValue: false
} }
}) })